Skip to content

Commit a676feb

Browse files
committed
general note about defaults
1 parent c1925e2 commit a676feb

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func listen() (lis net.Listener, cleanupFn func(), err error) {
243243
return nil, nil, fmt.Errorf("listen %s: %w", socketPath, err)
244244
}
245245

246-
mode := fs.FileMode(cfg.Cfg.SocketMode)
246+
mode := fs.FileMode(cfg.Cfg.SocketMode) // defaults to 0660 - see .defaults.yml
247247
if err = os.Chmod(socketPath, mode); err != nil {
248248
return nil, nil, fmt.Errorf("chmod socket file %s %#o", socketPath, mode)
249249
}

pkg/cfg/cfg.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import (
4141
// in certain situations you'll need to add both a `mapstructure` tag used by viper
4242
// as well as a `envconfig` tag used by https://github.com/kelseyhightower/envconfig
4343
// though most of the time envconfig will use the struct key's name: VOUCH_PORT VOUCH_JWT_MAXAGE
44+
// default values should be set in .defaults.yml
4445
type Config struct {
4546
LogLevel string `mapstructure:"logLevel"`
4647
Listen string `mapstructure:"listen"`

0 commit comments

Comments
 (0)