We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tried to make example with acmd, but have no success.
package main import ( "context" "fmt" "github.com/cristalhq/acmd" "os" ) func main() { cmds := []acmd.Command{ { Name: "test", Description: "test cmd", Do: func(ctx context.Context, args []string) error { fmt.Println("test") return nil }, }, } r := acmd.RunnerOf(cmds, acmd.Config{ AppName: "test", AppDescription: "Test example", Version: "v0.0.1", Output: os.Stdout, Args: os.Args, }) if err := r.Run(); err != nil { panic(err) } }
Build with go build main.go. All attempts to exec the command are failed with panic panic: acmd: cannot run command: no such command "./main".
go build main.go
panic: acmd: cannot run command: no such command "./main"
The text was updated successfully, but these errors were encountered:
solved with using os.Args[1:].
Sorry, something went wrong.
No branches or pull requests
Tried to make example with acmd, but have no success.
Build with
go build main.go
. All attempts to exec the command are failed with panicpanic: acmd: cannot run command: no such command "./main"
.The text was updated successfully, but these errors were encountered: