Source File
fingerprinting.go
Belonging Package
github.com/prometheus/common/model
package model
import (
)
type Fingerprint uint64
func ( string) (Fingerprint, error) {
, := strconv.ParseUint(, 16, 64)
return Fingerprint(),
}
func ( string) (Fingerprint, error) {
, := strconv.ParseUint(, 16, 64)
if != nil {
return 0,
}
return Fingerprint(), nil
}
func ( Fingerprint) () string {
return fmt.Sprintf("%016x", uint64())
}
type Fingerprints []Fingerprint
func ( Fingerprints) () int {
return len()
}
func ( Fingerprints) (, int) bool {
return [] < []
}
func ( Fingerprints) (, int) {
[], [] = [], []
}
type FingerprintSet map[Fingerprint]struct{}
func ( FingerprintSet) ( FingerprintSet) bool {
if len() != len() {
return false
}
for := range {
if , := []; ! {
return false
}
}
return true
}
func ( FingerprintSet) ( FingerprintSet) FingerprintSet {
, := len(), len()
if == 0 || == 0 {
return FingerprintSet{}
}
:=
:=
if < {
=
=
}
:= FingerprintSet{}
for := range {
if , := []; {
[] = struct{}{}
}
}
return
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin 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 @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |