|
7 | 7 | "strconv" |
8 | 8 |
|
9 | 9 | "github.com/MakeNowJust/heredoc" |
10 | | - "github.com/raystack/salt/printer" |
11 | | - "github.com/raystack/salt/term" |
| 10 | + "github.com/raystack/salt/cli/printer" |
12 | 11 | stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" |
13 | 12 | "github.com/spf13/cobra" |
14 | 13 | "google.golang.org/grpc/codes" |
@@ -44,18 +43,18 @@ func infoSchemaCmd(cdk *CDK) *cobra.Command { |
44 | 43 | if err != nil { |
45 | 44 | errStatus, _ := status.FromError(err) |
46 | 45 | if codes.NotFound == errStatus.Code() { |
47 | | - fmt.Printf("%s Schema with id '%s' not found.\n", term.Red(term.FailureIcon()), args[0]) |
| 46 | + fmt.Printf("%s Schema with id '%s' not found.\n", printer.Red(printer.Icon("failure")), args[0]) |
48 | 47 | return nil |
49 | 48 | } |
50 | 49 | return err |
51 | 50 | } |
52 | 51 |
|
53 | | - fmt.Printf("\n%s\n", term.Blue(args[0])) |
54 | | - fmt.Printf("\n%s\n\n", term.Grey("No description provided")) |
55 | | - fmt.Printf("%s \t %s \n", term.Grey("Namespace:"), namespace) |
56 | | - fmt.Printf("%s \t %s \n", term.Grey("Format:"), dict[info.GetFormat().String()]) |
57 | | - fmt.Printf("%s \t %s \n", term.Grey("Compatibility:"), dict[info.GetCompatibility().String()]) |
58 | | - fmt.Printf("%s \t %s \n\n", term.Grey("Authority:"), dict[info.GetAuthority()]) |
| 52 | + fmt.Printf("\n%s\n", printer.Blue(args[0])) |
| 53 | + fmt.Printf("\n%s\n\n", printer.Grey("No description provided")) |
| 54 | + fmt.Printf("%s \t %s \n", printer.Grey("Namespace:"), namespace) |
| 55 | + fmt.Printf("%s \t %s \n", printer.Grey("Format:"), dict[info.GetFormat().String()]) |
| 56 | + fmt.Printf("%s \t %s \n", printer.Grey("Compatibility:"), dict[info.GetCompatibility().String()]) |
| 57 | + fmt.Printf("%s \t %s \n\n", printer.Grey("Authority:"), dict[info.GetAuthority()]) |
59 | 58 | return nil |
60 | 59 | }, |
61 | 60 | } |
@@ -109,7 +108,7 @@ func versionSchemaCmd(cdk *CDK) *cobra.Command { |
109 | 108 |
|
110 | 109 | for _, v := range versions { |
111 | 110 | report = append(report, []string{ |
112 | | - term.Greenf("#%v", strconv.FormatInt(int64(v), 10)), |
| 111 | + printer.Greenf("#%v", strconv.FormatInt(int64(v), 10)), |
113 | 112 | "-", |
114 | 113 | "-", |
115 | 114 | }) |
|
0 commit comments