Skip to content

Commit

Permalink
feat: make err as var variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Luthfi Fahlevi committed Sep 2, 2024
1 parent a938f0f commit 74eb7a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (

const configFlag = "config"

var errDeleteAssetsTimeoutIsZero = errors.New("delete assets timeout must greater than 0 second")

func configCommand(cfg *Config) *cobra.Command {
cmd := &cobra.Command{
Use: "config <command>",
Expand Down Expand Up @@ -115,7 +117,7 @@ type Asset struct {

func (a *Asset) Validate() error {
if a.DeleteAssetsTimeout == 0 {
return errors.New("delete assets timeout must greater than 0 second")
return errDeleteAssetsTimeoutIsZero
}

return nil
Expand Down

0 comments on commit 74eb7a8

Please sign in to comment.