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

Function newOsArchitectureCmd

cmd/architecture.go:43–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43func 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
63func newSystemArchitectureCmd() *cobra.Command {
64 return &cobra.Command{

Callers 1

newArchitectureCmdFunction · 0.85

Calls 2

GetArchitectureMethod · 0.95
NewSystemFunction · 0.92

Tested by

no test coverage detected