This commit is contained in:
2026-06-12 14:47:58 +08:00
commit edd950f38d
6 changed files with 74 additions and 0 deletions

30
main.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import (
"fmt"
"os"
)
func commandsUsage() string {
return fmt.Sprintf(
`commands:
path %v
`, commandPathDescription)
}
func main() {
if len(os.Args) >= 2 {
switch os.Args[1] {
case "path":
commandPath(os.Args[1:])
default:
fmt.Printf("unknow command `%v`\n\n", os.Args[1])
fmt.Printf("%v", commandsUsage())
os.Exit(1)
}
} else {
fmt.Println("Personal scripts set written in Golang\n")
fmt.Printf("%v", commandsUsage())
}
}