sub-cli/main.go
2024-08-11 12:13:11 +08:00

27 lines
373 B
Go

package main
import (
"fmt"
"os"
)
func main() {
// parse args
if len(os.Args) < 2 {
fmt.Println(USAGE)
return
}
switch os.Args[1] {
case "sync":
syncLyrics(os.Args[2:])
case "convert":
convertLyrics(os.Args[2:])
case "fmt":
fmtLyrics(os.Args[2:])
case "help":
fmt.Println(USAGE)
default:
fmt.Println("Unknown command")
fmt.Println(USAGE)
}
}