Debian Codegraph @

varint.go

raw symbols SCIP
1 package bare
2
3 import (
4 "reflect"
5 )
6
7 // Int is a variable-length encoded signed integer.
8 type Int int64
9
10 // Uint is a variable-length encoded unsigned integer.
11 type Uint uint64
12
13 var (
14 intType = reflect.TypeOf(Int(0))
15 uintType = reflect.TypeOf(Uint(0))
16 )
17
18 func getIntKind(t reflect.Type) reflect.Kind {
19 switch t {
20 case intType:
21 return reflect.Int
22 case uintType:
23 return reflect.Uint
24 default:
25 return t.Kind()
26 }
27 }