MCPcopy Create free account
hub / github.com/archlinux-de/pkgstats-cli / newSystemArchitectureCmd

Function newSystemArchitectureCmd

cmd/architecture.go:63–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61}
62
63func 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}

Callers 1

newArchitectureCmdFunction · 0.85

Calls 2

GetCpuArchitectureMethod · 0.95
NewSystemFunction · 0.92

Tested by

no test coverage detected