Source File
godebug.go
Belonging Package
github.com/tmc/go-iroh/internal/itls/shim/godebug
// Package godebug is a minimal shim for the GOROOT-private internal/godebug,// providing just the Setting API that the vendored crypto/tls uses.package godebugimport// Setting is a GODEBUG setting.type Setting struct{ name string }// New returns the Setting for the given GODEBUG key.func ( string) *Setting { return &Setting{name: } }// Value returns the value of the setting from the GODEBUG environment variable,// or "" if unset. This is sufficient for crypto/tls's default-path checks.func ( *Setting) () string {:= os.Getenv("GODEBUG")for != "" {var stringif := indexByte(, ','); >= 0 {, = [:], [+1:]} else {, = , ""}if := indexByte(, '='); >= 0 && [:] == .name {return [+1:]}}return ""}// IncNonDefault is a no-op (metrics-only in the original).func ( *Setting) () {}func indexByte( string, byte) int {for := 0; < len(); ++ {if [] == {return}}return -1}
![]() |
The pages are generated with Golds v0.8.4. (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. |