// Copyright 2022 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.package cpuimport// parseRelease parses a dot-separated version number. It follows the semver// syntax, but allows the minor and patch versions to be elided.//// This is a copy of the Go runtime's parseRelease from// https://golang.org/cl/209597.func parseRelease( string) (, , int, bool) {// Strip anything after a dash or plus.for := 0; < len(); ++ {if [] == '-' || [] == '+' { = [:]break } } := func() (int, bool) {for := 0; < len(); ++ {if [] == '.' { , := strconv.Atoi([:]) = [+1:]return , == nil } } , := strconv.Atoi() = ""return , == nil }if , = (); ! || == "" {return }if , = (); ! || == "" {return } , = ()return}
The pages are generated with Goldsv0.7.0-preview. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.