mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Code cleanup and missing error checks
This commit is contained in:
parent
6eaef18188
commit
c4193f42a1
7 changed files with 23 additions and 19 deletions
|
@ -24,11 +24,3 @@ func GetServiceConfigFromFlag(cmd *cobra.Command, flagName string) (config.Servi
|
|||
name := cmd.Flag(flagName).Value.String()
|
||||
return config.GetService(name)
|
||||
}
|
||||
|
||||
func getInt64FromFlag(cmd *cobra.Command, flagName string) (result int64) {
|
||||
result, err := cmd.Flags().GetInt64(flagName)
|
||||
if err != nil {
|
||||
result = 0
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue