MCPcopy Create free account
hub / github.com/devfeel/mapper / Int64

Method Int64

convert.go:75–86  ·  view source on GitHub ↗

Int64 string to int64

()

Source from the content-addressed store, hash-verified

73
74// Int64 string to int64
75func (f Convert) Int64() (int64, error) {
76 v, err := strconv.ParseInt(f.String(), 10, 64)
77 if err != nil {
78 i := new(big.Int)
79 ni, ok := i.SetString(f.String(), 10) // octal
80 if !ok {
81 return v, err
82 }
83 return ni.Int64(), nil
84 }
85 return v, err
86}
87
88// Uint string to uint
89func (f Convert) Uint() (uint, error) {

Callers 1

setFieldValueMethod · 0.80

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected