File: platform.go

package info (click to toggle)
docker.io 28.5.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 69,048 kB
  • sloc: sh: 5,867; makefile: 863; ansic: 184; python: 162; asm: 159
file content (27 lines) | stat: -rw-r--r-- 956 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Package platform provides helper function to get the runtime architecture
// for different platforms.
//
// Deprecated: this package is only used internally, and will be removed in the next release.
package platform

import (
	"github.com/docker/docker/internal/platform"
)

// Architecture holds the runtime architecture of the process.
//
// Unlike [runtime.GOARCH] (which refers to the compiler platform),
// Architecture refers to the running platform.
//
// For example, Architecture reports "x86_64" as architecture, even
// when running a "linux/386" compiled binary on "linux/amd64" hardware.
//
// Deprecated: this package is only used internally, and will be removed in the next release.
var Architecture = platform.Architecture()

// NumProcs returns the number of processors on the system
//
// Deprecated: this package is only used internally, and will be removed in the next release.
func NumProcs() uint32 {
	return platform.NumProcs()
}