generated from templates/go-generic
Dan Anglin
4fdad2d805
- Set the project's placeholder name to indieauth-server. - Update the magefiles and CI workflow. - Add the version command to print the app's build information. - Add the serve command to run the HTTP server.
24 lines
347 B
Go
24 lines
347 B
Go
package executors
|
|
|
|
type command struct {
|
|
name string
|
|
args []string
|
|
}
|
|
|
|
func newCommand(args []string) command {
|
|
if len(args) == 0 {
|
|
return command{
|
|
name: "help",
|
|
args: make([]string, 0),
|
|
}
|
|
}
|
|
|
|
if len(args) == 1 {
|
|
return command{
|
|
name: args[0],
|
|
args: make([]string, 0),
|
|
}
|
|
}
|
|
|
|
return command{name: args[0], args: args[1:]}
|
|
}
|