INNER CODE UNIT · Go
newDoctorCommand
gameknife/gkNextEngine · tools/gnb/cmd/gnb/main.go:220
func newDoctorCommand(ctx appContext) *cobra.Command {
return &cobra.Command{
Use: "doctor",
Short: "Check required build tools",
RunE: func(cmd *cobra.Command, args []string) error {
checks := []string{"git"}
if runtime.GOOS == "linux" {
checks = append(checks, "pkg-config")
}
if runtime.GOOS == "darwin" {
checks = append(checks, "xcodebuild")
}
failed := false
for _, name := range checks {
if platform.CommandExists(name) {
console.Success(name)
} else {
console.Warn("missing %s", name)