Skip to content

Commit ea0666c

Browse files
committed
feat(cli): set explicit 0 default for --expire
1 parent 042e701 commit ea0666c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/pago-agent/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type CLI struct {
2828
}
2929

3030
type RunCmd struct {
31-
Expire time.Duration `short:"e" help:"Agent expiration time (Go duration, 0 to disable)"`
31+
Expire time.Duration `short:"e" default:"0" help:"Agent expiration time (Go duration, 0 to disable)"`
3232
}
3333

3434
func (cmd *RunCmd) Run(cli *CLI) error {

cmd/pago/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type CLI struct {
4646
AgentExecutable string `short:"a" name:"agent" env:"${AgentEnv}" default:"${DefaultAgent}" help:"Agent executable (${env})"`
4747
Confirm bool `env:"${ConfirmEnv}" default:"true" negatable:"" help:"Enter passwords twice (${env})"`
4848
Dir string `short:"d" env:"${DataDirEnv}" default:"${DefaultDataDir}" help:"Store location (${env})"`
49-
Expire time.Duration `short:"e" env:"${ExpireEnv}" help:"Agent expiration time (Go duration, 0 to disable, ${env})"`
49+
Expire time.Duration `short:"e" env:"${ExpireEnv}" default:"0" help:"Agent expiration time (Go duration, 0 to disable, ${env})"`
5050
Git bool `env:"${GitEnv}" default:"true" negatable:"" help:"Commit to Git (${env})"`
5151
GitEmail string `env:"${GitEmailEnv}" default:"${GitEmail}" help:"Email for Git commits (${env})"`
5252
GitName string `env:"${GitNameEnv}" default:"${GitName}" help:"Name for Git commits (${env})"`

0 commit comments

Comments
 (0)