mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-10 19:46:07 +08:00
move the contents of main.go into app package. scaffold a CLI subcommands package. add a version package and add /_version handler to print detailed version info.
24 lines
271 B
Go
24 lines
271 B
Go
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/micromdm/micromdm/version"
|
|
)
|
|
|
|
func Main() {
|
|
switch os.Args[1] {
|
|
case "version":
|
|
version.Print()
|
|
return
|
|
case "gencert":
|
|
fmt.Printf("coming soon\n")
|
|
return
|
|
default:
|
|
fmt.Printf("no such command")
|
|
return
|
|
}
|
|
|
|
}
|