File: gen1_test.go

package info (click to toggle)
golang-golang-x-text 0.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie, trixie-backports
  • size: 41,612 kB
  • sloc: xml: 1,022; makefile: 6
file content (26 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Code generated by golang.org/x/text/internal/gen/bitfield. DO NOT EDIT.

package bitfield

type myInt uint32

func (m myInt) fob() uint16 {
	return uint16((m >> 16) & 0xffff)
}

func (m myInt) baz() int8 {
	return int8((m >> 11) & 0x1f)
}

func (m myInt) bar() myUint8 {
	return myUint8((m >> 8) & 0x7)
}

func (m myInt) Bool() bool {
	const bit = 1 << 7
	return m&bit == bit
}

func (m myInt) Baz() int8 {
	return int8((m >> 4) & 0x7)
}