()
| 61 | } |
| 62 | |
| 63 | func newSystemArchitectureCmd() *cobra.Command { |
| 64 | return &cobra.Command{ |
| 65 | Use: "system", |
| 66 | Aliases: []string{"cpu"}, |
| 67 | Short: "Shows CPU architecture", |
| 68 | Args: cobra.NoArgs, |
| 69 | RunE: func(cmd *cobra.Command, args []string) error { |
| 70 | s := system.NewSystem() |
| 71 | |
| 72 | systemArchitecture, err := s.GetCpuArchitecture() |
| 73 | if err != nil { |
| 74 | return fmt.Errorf("could not get CPU architecture: %w", err) |
| 75 | } |
| 76 | |
| 77 | fmt.Fprintln(cmd.OutOrStdout(), systemArchitecture) |
| 78 | |
| 79 | return nil |
| 80 | }, |
| 81 | } |
| 82 | } |
no test coverage detected