MCPcopy
hub / github.com/jaypipes/ghw / String

Method String

host.go:123–140  ·  view source on GitHub ↗

String returns a newline-separated output of the HostInfo's component structs' String-ified output

()

Source from the content-addressed store, hash-verified

121// String returns a newline-separated output of the HostInfo's component
122// structs' String-ified output
123func (info *HostInfo) String() string {
124 return fmt.Sprintf(
125 "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
126 info.Block.String(),
127 info.CPU.String(),
128 info.GPU.String(),
129 info.Accelerator.String(),
130 info.Memory.String(),
131 info.Network.String(),
132 info.Topology.String(),
133 info.Chassis.String(),
134 info.BIOS.String(),
135 info.Baseboard.String(),
136 info.Product.String(),
137 info.PCI.String(),
138 info.USB.String(),
139 )
140}
141
142// YAMLString returns a string with the host information formatted as YAML
143// under a top-level "host:" key

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected