func printLocalStepInfo(pth, format string) error { switch format { case OutputFormatRaw: if err := bitrise.StepmanPrintRawLocalStepInfo(pth); err != nil { return err } break case OutputFormatJSON: outStr, err := bitrise.StepmanJSONLocalStepInfo(pth) if err != nil { return fmt.Errorf("StepmanJSONLocalStepInfo failed, err: %s", err) } fmt.Println(outStr) break default: return fmt.Errorf("Invalid format: %s", format) } return nil }
func printLocalStepInfo(pth, format string) error { switch format { case configs.OutputFormatRaw: out, err := bitrise.StepmanRawLocalStepInfo(pth) if out != "" { fmt.Println("Step info:") fmt.Printf("%s", out) } return err case configs.OutputFormatJSON: outStr, err := bitrise.StepmanJSONLocalStepInfo(pth) if err != nil { return fmt.Errorf("StepmanJSONLocalStepInfo failed, err: %s", err) } fmt.Println(outStr) break default: return fmt.Errorf("Invalid format: %s", format) } return nil }