Debian Codegraph @

uint.go

raw symbols SCIP
1 // Copyright 2013 Google Inc. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package getoptscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/
6
7 import (
8 "fmtscip-go gomod github.com/golang/go/src go1.13 fmt/"
9 "strconvscip-go gomod github.com/golang/go/src go1.13 strconv/"
10 )
11
12 type uintValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/uintValue# uint
13
14 func (i *uintValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/uintValue#) Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/uintValue#Set().(value string, opt Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option#) error {
15 v, err := strconvscip-go gomod github.com/golang/go/src go1.13 strconv/.ParseUintscip-go gomod github.com/golang/go/src go1.13 strconv/ParseUint().(value, 0, strconvscip-go gomod github.com/golang/go/src go1.13 strconv/.IntSizescip-go gomod github.com/golang/go/src go1.13 strconv/IntSize.)
16 if err != nil {
17 if e, ok := err.(*strconvscip-go gomod github.com/golang/go/src go1.13 strconv/.NumErrorscip-go gomod github.com/golang/go/src go1.13 strconv/NumError#); ok {
18 switch e.Errscip-go gomod github.com/golang/go/src go1.13 strconv/NumError#Err. {
19 case strconvscip-go gomod github.com/golang/go/src go1.13 strconv/.ErrRangescip-go gomod github.com/golang/go/src go1.13 strconv/ErrRange.:
20 err = fmtscip-go gomod github.com/golang/go/src go1.13 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.13 fmt/Errorf().("value out of range: %s", value)
21 case strconvscip-go gomod github.com/golang/go/src go1.13 strconv/.ErrSyntaxscip-go gomod github.com/golang/go/src go1.13 strconv/ErrSyntax.:
22 err = fmtscip-go gomod github.com/golang/go/src go1.13 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.13 fmt/Errorf().("not a valid number: %s", value)
23 }
24 }
25 return err
26 }
27 *i = uintValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/uintValue#(v)
28 return nil
29 }
30
31 func (i *uintValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/uintValue#) Stringscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/uintValue#String().() string {
32 return strconvscip-go gomod github.com/golang/go/src go1.13 strconv/.FormatUintscip-go gomod github.com/golang/go/src go1.13 strconv/FormatUint().(uint64(*i), 10)
33 }
34
35 // Uint creates an option that parses its value as an unsigned integer.
36 func Uintscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Uint().(name rune, value uint, helpvalue ...string) *uint {
37 return CommandLinescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/CommandLine..Uintscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#Uint().(name, value, helpvalue...)
38 }
39
40 func (s *Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#) Uintscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#Uint().(name rune, value uint, helpvalue ...string) *uint {
41 return s.UintLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintLong().("", name, value, helpvalue...)
42 }
43
44 func UintLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/UintLong().(name string, short rune, value uint, helpvalue ...string) *uint {
45 return CommandLinescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/CommandLine..UintLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintLong().(name, short, value, helpvalue...)
46 }
47
48 func (s *Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#) UintLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintLong().(name string, short rune, value uint, helpvalue ...string) *uint {
49 s.UintVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintVarLong().(&value, name, short, helpvalue...)
50 return &value
51 }
52
53 func UintVarscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/UintVar().(p *uint, name rune, helpvalue ...string) Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option# {
54 return CommandLinescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/CommandLine..UintVarscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintVar().(p, name, helpvalue...)
55 }
56
57 func (s *Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#) UintVarscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintVar().(p *uint, name rune, helpvalue ...string) Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option# {
58 return s.UintVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintVarLong().(p, "", name, helpvalue...)
59 }
60
61 func UintVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/UintVarLong().(p *uint, name string, short rune, helpvalue ...string) Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option# {
62 return CommandLinescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/CommandLine..UintVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintVarLong().(p, name, short, helpvalue...)
63 }
64
65 func (s *Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#) UintVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#UintVarLong().(p *uint, name string, short rune, helpvalue ...string) Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option# {
66 return s.VarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#VarLong().((*uintValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/uintValue#)(p), name, short, helpvalue...)
67 }