Skip to content

Commit 62b67f3

Browse files
committed
Migrate configuration from JSON to YAML format and update related code references
1 parent 19ade4b commit 62b67f3

13 files changed

+123
-53
lines changed

.github/workflows/pipeline.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: go build -v -o PowerShellProfileLauncher.exe
2323

2424
- name: Compress Artifact to Zip
25-
run: Compress-Archive -Path .\PowerShellProfileLauncher.exe, .\awesome_profile.Profile.tmpl, .\config.json.tmpl -DestinationPath .\PowerShellProfileLauncher.zip
25+
run: Compress-Archive -Path .\PowerShellProfileLauncher.exe, .\awesome_profile.Profile.tmpl, .\config.yaml.tmpl -DestinationPath .\PowerShellProfileLauncher.zip
2626

2727
- name: Upload Build Artifact
2828
uses: actions/upload-artifact@v4.4.3

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
**.csv
99

1010
# Ignore config file
11-
config.json
11+
config.yaml
1212

1313
# Ignore executable files
1414
**.exe

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build:
1414
image: golang:${GO_VERSION}
1515
script:
1616
- go build -v -o PowerShellProfileLauncher.exe
17-
- zip PowerShellProfileLauncher.zip PowerShellProfileLauncher.exe profiles.csv.tmpl config.json.tmpl
17+
- zip PowerShellProfileLauncher.zip PowerShellProfileLauncher.exe profiles.csv.tmpl config.yaml.tmpl
1818
artifacts:
1919
paths:
2020
- PowerShellProfileLauncher.zip

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"window.autoDetectColorScheme": false
3+
}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Running the Launcher:
2222

2323
## Configure the Basic Settings
2424

25-
1. Edit the included `config.json` file, replacing `profile_path` with the location of your profile directory.
26-
2. Add your profiles to the directory specified in the `config.json` file. Profiles should be `.ps1` files that match the pattern `*.Profiles.ps1`.
25+
1. Edit the included `config.yaml` file, replacing `profile_path` with the location of your profile directory.
26+
2. Add your profiles to the directory specified in the `config.yaml` file. Profiles should be `.ps1` files that match the pattern `*.Profile.ps1`.
2727

2828
### Example Configuration

cmd/ui/profileselector/profileselector.go

-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package profileselector
22

33
import (
4-
"os"
5-
64
"github.com/charmbracelet/bubbles/list"
75
tea "github.com/charmbracelet/bubbletea"
86
l "github.com/ntatschner/GoPowerShellLauncher/cmd/logger"
@@ -17,19 +15,12 @@ import (
1715
type model struct {
1816
profilesList list.Model
1917
selected map[int]struct{}
20-
csvPath string
2118
windowSize tea.WindowSizeMsg
2219
viewChanger view.ViewChanger
2320
}
2421

2522
func New(viewChanger view.ViewChanger, windowSize tea.WindowSizeMsg) *model {
2623
l.Logger.Debug("Initializing profile list")
27-
path, err := os.Getwd()
28-
l.Logger.Debug("Getting working directory", "path", path)
29-
if err != nil {
30-
l.Logger.Error("Failed to get working directory", "error", err)
31-
}
32-
path = path + string(os.PathSeparator) + "config.json"
3324
loadConfig, err := utils.LoadConfig()
3425
if err != nil {
3526
l.Logger.Error("Failed to load configuration file", "error", err)

cmd/utils/config.go

+30-22
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,44 @@
11
package utils
22

33
import (
4-
"encoding/json"
5-
"os"
6-
"path/filepath"
4+
"fmt"
5+
6+
"github.com/spf13/viper"
77
)
88

99
type Config struct {
10-
ProfilePath string `json:"profile_path"`
11-
Recursive bool `json:"recursive"`
12-
Logging struct {
13-
LogPath string `json:"log_path"`
14-
LogFile string `json:"log_file"`
15-
LogLevel string `json:"log_level"`
16-
} `json:"logging"`
10+
Profile struct {
11+
Path string `mapstructure:"path"`
12+
Recursive bool `mapstructure:"recursive"`
13+
} `mapstructure:"profile"`
14+
Logging struct {
15+
Path string `mapstructure:"path"`
16+
File string `mapstructure:"file"`
17+
Level string `mapstructure:"level"`
18+
} `mapstructure:"logging"`
1719
}
1820

21+
var config *Config
22+
1923
func LoadConfig() (*Config, error) {
20-
cwd, _ := os.Getwd()
21-
filePath := filepath.Join(cwd, "config.json")
22-
file, err := os.Open(filePath)
23-
if err != nil {
24-
return nil, err
24+
if config != nil {
25+
return config, nil
26+
}
27+
28+
viper.SetConfigName("config")
29+
viper.SetConfigType("yaml")
30+
viper.AddConfigPath(".")
31+
viper.AddConfigPath("$HOME\\AppData\\Local\\GoPowerShellLauncher")
32+
viper.AddConfigPath("C:\\ProgramData\\GoPowerShellLauncher")
33+
34+
if err := viper.ReadInConfig(); err != nil {
35+
return nil, fmt.Errorf("error reading config file: %w", err)
2536
}
26-
defer file.Close()
2737

28-
var config Config
29-
decoder := json.NewDecoder(file)
30-
err = decoder.Decode(&config)
31-
if err != nil {
32-
return nil, err
38+
config = &Config{}
39+
if err := viper.Unmarshal(config); err != nil {
40+
return nil, fmt.Errorf("unable to decode into struct: %w", err)
3341
}
3442

35-
return &config, nil
43+
return config, nil
3644
}

cmd/utils/profiles.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import (
1414
func LoadProfilesFromDir() ([]types.ProfileItem, error) {
1515
var profiles []types.ProfileItem
1616
configData, _ := LoadConfig()
17-
directory := configData.ProfilePath
17+
directory := configData.Profile.Path
1818
l.Logger.Info("Loading profiles from config directory", "dir", directory)
19-
recursive := configData.Recursive
19+
recursive := configData.Profile.Recursive
2020
l.Logger.Info("Recursive search", "recursive", recursive)
2121

2222
var processedFiles []string

config.json.tmpl

-9
This file was deleted.

config.yaml.tmpl

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
profile:
2+
path: ""
3+
recursive: false
4+
logging:
5+
path: ""
6+
file: "GoPowerShellLauncher.log"
7+
level: "INFO"

go.mod

+17-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ require (
99
github.com/charmbracelet/log v0.4.0
1010
github.com/charmbracelet/x/ansi v0.5.2
1111
github.com/spf13/cobra v1.8.1
12+
github.com/spf13/viper v1.19.0
1213
golang.org/x/term v0.26.0
1314
)
1415

@@ -18,20 +19,35 @@ require (
1819
github.com/charmbracelet/x/term v0.2.1 // indirect
1920
github.com/dustin/go-humanize v1.0.1 // indirect
2021
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
22+
github.com/fsnotify/fsnotify v1.7.0 // indirect
2123
github.com/go-logfmt/logfmt v0.6.0 // indirect
24+
github.com/hashicorp/hcl v1.0.0 // indirect
2225
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2326
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
27+
github.com/magiconair/properties v1.8.7 // indirect
2428
github.com/mattn/go-isatty v0.0.20 // indirect
2529
github.com/mattn/go-localereader v0.0.1 // indirect
2630
github.com/mattn/go-runewidth v0.0.16 // indirect
31+
github.com/mitchellh/mapstructure v1.5.0 // indirect
2732
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
2833
github.com/muesli/cancelreader v0.2.2 // indirect
2934
github.com/muesli/termenv v0.15.2 // indirect
35+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
3036
github.com/rivo/uniseg v0.4.7 // indirect
37+
github.com/sagikazarmark/locafero v0.4.0 // indirect
38+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
3139
github.com/sahilm/fuzzy v0.1.1 // indirect
40+
github.com/sourcegraph/conc v0.3.0 // indirect
41+
github.com/spf13/afero v1.11.0 // indirect
42+
github.com/spf13/cast v1.6.0 // indirect
3243
github.com/spf13/pflag v1.0.5 // indirect
44+
github.com/subosito/gotenv v1.6.0 // indirect
45+
go.uber.org/atomic v1.9.0 // indirect
46+
go.uber.org/multierr v1.9.0 // indirect
3347
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
3448
golang.org/x/sync v0.9.0 // indirect
3549
golang.org/x/sys v0.27.0 // indirect
36-
golang.org/x/text v0.3.8 // indirect
50+
golang.org/x/text v0.14.0 // indirect
51+
gopkg.in/ini.v1 v1.67.0 // indirect
52+
gopkg.in/yaml.v3 v3.0.1 // indirect
3753
)

go.sum

+58-4
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,95 @@ github.com/charmbracelet/x/ansi v0.5.2/go.mod h1:KBUFw1la39nl0dLl10l5ORDAqGXaeur
1515
github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
1616
github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
1717
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
18-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
18+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1919
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
20+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
21+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2022
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
2123
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
2224
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=
2325
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
26+
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
27+
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
28+
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
29+
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
2430
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
2531
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
32+
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
33+
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
34+
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
35+
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
2636
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
2737
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
38+
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
39+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
40+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
41+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
2842
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
2943
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
3044
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
3145
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
46+
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
47+
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
3248
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
3349
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
3450
github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=
3551
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
3652
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
3753
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
54+
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
55+
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
3856
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
3957
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo=
4058
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
4159
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
4260
github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo=
4361
github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
44-
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
62+
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
63+
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
4564
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
65+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
66+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
4667
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
4768
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
4869
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
70+
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
71+
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
4972
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
73+
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
74+
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
75+
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
76+
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
5077
github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA=
5178
github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
79+
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
80+
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
81+
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
82+
github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
83+
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
84+
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
5285
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
5386
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
5487
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
5588
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
89+
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
90+
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
91+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
92+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
93+
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
94+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
95+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
96+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
97+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
98+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
5699
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
57100
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
101+
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
102+
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
103+
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
104+
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
105+
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
106+
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
58107
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
59108
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
60109
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
@@ -65,8 +114,13 @@ golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
65114
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
66115
golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU=
67116
golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E=
68-
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
69-
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
117+
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
118+
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
70119
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
120+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
121+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
122+
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
123+
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
124+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
71125
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
72126
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func main() {
1515
panic(err)
1616
}
1717
// Initialize the logger
18-
err = l.InitLogger(config.Logging.LogPath, config.Logging.LogFile, config.Logging.LogLevel)
18+
err = l.InitLogger(config.Logging.Path, config.Logging.File, config.Logging.Level)
1919
if err != nil {
2020
panic(err)
2121
}

0 commit comments

Comments
 (0)