package types
Import Path
github.com/go-git/gcfg/types (on go.dev)
Dependency Relation
imports 4 packages, and imported by one package
Involved Source Files
bool.go
Package types defines helpers for type conversions.
The API for this package is not finalized yet.
enum.go
int.go
scan.go
Package-Level Type Names (total 2, both are exported)
EnumParser parses "enum" values; i.e. a predefined set of strings to
predefined values.
// if true, matching of strings is case-sensitive
// type name; if not set, use type of first value added
PrefixMatch bool
AddVals adds strings and values to an EnumParser.
Parse parses the string and returns the value or an error.
var boolParser *EnumParser
An IntMode is a mode for parsing integer values, representing a set of
accepted bases.
String returns a string representation of IntMode; e.g. `IntMode(Dec|Hex)`.
T : expvar.Var
T : fmt.Stringer
T : context.stringer
T : runtime.stringer
func github.com/go-git/gcfg.intMode(mode string) IntMode
func github.com/go-git/gcfg.intModeDefault(t reflect.Type) IntMode
func ParseInt(intptr interface{}, val string, mode IntMode) error
const Dec
const Hex
const Oct
Package-Level Functions (total 5, in which 3 are exported)
ParseBool parses bool values according to the definitions in BoolValues.
Parsing is case-insensitive.
ParseInt parses val using mode into intptr, which must be a pointer to an
integer kind type. Non-decimal value require prefix `0` or `0x` in the cases
when mode permits ambiguity of base; otherwise the prefix can be omitted.
ScanFully uses fmt.Sscanf with verb to fully scan val into ptr.
Package-Level Variables (total 3, in which 1 are exported)
BoolValues defines the name and value mappings for ParseBool.
Package-Level Constants (total 3, all are exported)
IntMode values for ParseInt; can be combined using binary or.
IntMode values for ParseInt; can be combined using binary or.
IntMode values for ParseInt; can be combined using binary or.
![]() |
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. |