Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gofu
fup
Commits
c18bb20d
Commit
c18bb20d
authored
1 year ago
by
roshless
Browse files
Options
Downloads
Patches
Plain Diff
config: default to .config in home for real
parent
b0f539cd
Branches
master
Tags
4
No related merge requests found
Pipeline
#867
passed
1 year ago
Stage: build
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/config.go
+11
-0
11 additions, 0 deletions
config/config.go
main.go
+1
-1
1 addition, 1 deletion
main.go
with
12 additions
and
1 deletion
config/config.go
+
11
−
0
View file @
c18bb20d
...
...
@@ -3,6 +3,8 @@ package config
import
(
"log"
"os"
"os/user"
"path/filepath"
"gopkg.in/yaml.v3"
)
...
...
@@ -41,3 +43,12 @@ func NewConfig(path string) *Config {
func
GetConfig
()
*
Config
{
return
cfg
}
func
GetDefaultConfigPath
()
string
{
usr
,
err
:=
user
.
Current
()
if
err
!=
nil
{
return
"couldnt get user home directory"
}
dir
:=
usr
.
HomeDir
return
filepath
.
Join
(
dir
,
".config/fup/config.yml"
)
}
This diff is collapsed.
Click to expand it.
main.go
+
1
−
1
View file @
c18bb20d
...
...
@@ -14,7 +14,7 @@ import (
var
(
helpFlag
bool
configPath
=
"~/.
config
/fup/config.yml"
configPath
=
config
.
GetDefaultConfigPath
()
filePath
string
fileName
=
uuid
.
NewString
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment