source: code/trunk/vendor/git.sr.ht/~sircmpwn/go-bare/varint.go@ 822

Last change on this file since 822 was 822, checked in by yakumo.izuru, 22 months ago

Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 424 bytes
Line 
1package bare
2
3import (
4 "reflect"
5)
6
7// Int is a variable-length encoded signed integer.
8type Int int64
9
10// Uint is a variable-length encoded unsigned integer.
11type Uint uint64
12
13var (
14 intType = reflect.TypeOf(Int(0))
15 uintType = reflect.TypeOf(Uint(0))
16)
17
18func 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}
Note: See TracBrowser for help on using the repository browser.