Skip to content

Commit

Permalink
Integrate fortio/dflag#45
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Oct 10, 2023
1 parent 4979aab commit e9d0cf7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
12 changes: 7 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ module fortio.org/scli
go 1.18

require (
fortio.org/cli v1.3.3
fortio.org/cli v1.4.2
fortio.org/dflag v1.5.3
fortio.org/log v1.10.0
fortio.org/version v1.0.2
golang.org/x/sys v0.10.0
fortio.org/log v1.11.0
fortio.org/version v1.0.3
golang.org/x/sys v0.13.0
)

require (
fortio.org/sets v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
)

replace fortio.org/dflag => ../dflag
22 changes: 10 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
fortio.org/assert v1.2.0 h1:XscfvR8yp4xW7OMCvNbCsieRFDxlwdEcb69+JZRp6LA=
fortio.org/cli v1.3.3 h1:b2JPQ7ekVFpF7SrEllJTbh1rdivsyXT081oQUeiuIp0=
fortio.org/cli v1.3.3/go.mod h1:ZsevXTvMidh3xllYoAElS52XRcGx+f1hVlgB+v2Pa0Y=
fortio.org/dflag v1.5.3 h1:+pCqZBCz95PYTxhcmenjrkVORWIRB1Je4eO/So574Bc=
fortio.org/dflag v1.5.3/go.mod h1:cM/ojIzdDv8FRA5yqSRpDK9jCGmASln0k7ag3zeiqbw=
fortio.org/log v1.10.0 h1:Id2z9HjGlof0VsIHi2XNI9k+tG7ujODVDnAAvkSgpuE=
fortio.org/log v1.10.0/go.mod h1:u/8/2lyczXq52aT5Nw6reD+3cR6m/EbS2jBiIYhgiTU=
fortio.org/cli v1.4.2 h1:pCYVPk5FpQuJtD31f9CG8sdgoTOWdv9Gls8As/MLJhU=
fortio.org/cli v1.4.2/go.mod h1:VGqFDEKpA6u3NbTM3aSz2lZfAYKnGaszl1pLxbBhxsY=
fortio.org/log v1.11.0 h1:w7ueGPGbXz0A3+ApMz/5Q9gwEMrwSo/ohTlLo2Um6dU=
fortio.org/log v1.11.0/go.mod h1:u/8/2lyczXq52aT5Nw6reD+3cR6m/EbS2jBiIYhgiTU=
fortio.org/sets v1.0.3 h1:HzewdGjH69YmyW06yzplL35lGr+X4OcqQt0qS6jbaO4=
fortio.org/sets v1.0.3/go.mod h1:QZVj0r6KP/ZD9ebySW9SgxVNy/NjghUfyHW9NN+WU+4=
fortio.org/version v1.0.2 h1:8NwxdX58aoeKx7T5xAPO0xlUu1Hpk42nRz5s6e6eKZ0=
fortio.org/version v1.0.2/go.mod h1:2JQp9Ax+tm6QKiGuzR5nJY63kFeANcgrZ0osoQFDVm0=
fortio.org/version v1.0.3 h1:5gJ3plj6isAOMq52cI5ifo4cC+QHmJF76Wevc5Cp4x0=
fortio.org/version v1.0.3/go.mod h1:2JQp9Ax+tm6QKiGuzR5nJY63kFeANcgrZ0osoQFDVm0=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI=
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
5 changes: 4 additions & 1 deletion scli.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ func ServerMain() bool {
cli.ServerMode = true
cli.Main() // will call ExitFunction() if there are usage errors
if *configDir != "" {
if _, err := configmap.Setup(flag.CommandLine, *configDir); err != nil {
updt, err := configmap.Setup(flag.CommandLine, *configDir)
if err != nil {
log.Critf("Unable to watch config/flag changes in %v: %v", *configDir, err)
} else if updt.Warnings() != 0 {
log.S(log.Warning, "Unknown flags found", log.Int("count", updt.Warnings()), log.Str("dir", *configDir))
}
}

Expand Down

0 comments on commit e9d0cf7

Please sign in to comment.