func newHost()

in providers/linux/host_linux.go [156:176]


func newHost(fs procFS) (*host, error) {
	stat, err := fs.Stat()
	if err != nil {
		return nil, fmt.Errorf("failed to read proc stat: %w", err)
	}

	h := &host{stat: stat, procFS: fs}
	r := &reader{}
	r.architecture(h)
	r.nativeArchitecture(h)
	r.bootTime(h)
	r.containerized(h)
	r.hostname(h)
	r.network(h)
	r.kernelVersion(h)
	r.os(h)
	r.time(h)
	r.uniqueID(h)

	return h, r.Err()
}