blob: f0a125fb8a25dae07b6964ecc4c8a4fcd95d4854 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Helper to print system metadata (CPU model, etc). This uses packages that
// may not be available in the bootstrap toolchain. It only needs to be built
// on the dist build using the final toolchain.
//go:build go1.18
// +build go1.18
package main
import (
"fmt"
"internal/sysinfo"
"runtime"
)
func logMetadata() error {
fmt.Printf("# GOARCH: %s\n", runtime.GOARCH)
fmt.Printf("# CPU: %s\n", sysinfo.CPU.Name())
return nil
}
|