Skip to content

Commit

Permalink
💚 fix: build error on use not exists method
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Feb 11, 2023
1 parent b75c6fa commit 0eef495
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ func exampleExecute(c *gcli.Command, args []string) error {
color.Infoln("hello, in example command")

if exampleOpts.showErr {
return c.Errorf("OO, An error has occurred!!")
return c.NewErrf("OO, An error has occurred!!")
}

magentaln := color.Magenta.Println
Expand Down
2 changes: 1 addition & 1 deletion builtin/reverseproxy/reverse_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var ReverseProxyCmd = &gcli.Command{

func (rp *reverseProxy) Run(cmd *gcli.Command, args []string) error {
if rp.remote == "" {
return cmd.Errorf("must be setting the remote server by -r, --remote ")
return cmd.NewErrf("must be setting the remote server by -r, --remote ")
}

urlObj, err := url.Parse(rp.remote)
Expand Down

0 comments on commit 0eef495

Please sign in to comment.