()
| 41 | } |
| 42 | |
| 43 | func newOsArchitectureCmd() *cobra.Command { |
| 44 | return &cobra.Command{ |
| 45 | Use: "os", |
| 46 | Short: "Shows OS architecture", |
| 47 | Args: cobra.NoArgs, |
| 48 | RunE: func(cmd *cobra.Command, args []string) error { |
| 49 | s := system.NewSystem() |
| 50 | |
| 51 | osArchitecture, err := s.GetArchitecture() |
| 52 | if err != nil { |
| 53 | return fmt.Errorf("could not get OS architecture: %w", err) |
| 54 | } |
| 55 | |
| 56 | fmt.Fprintln(cmd.OutOrStdout(), osArchitecture) |
| 57 | |
| 58 | return nil |
| 59 | }, |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | func newSystemArchitectureCmd() *cobra.Command { |
| 64 | return &cobra.Command{ |
no test coverage detected