You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
446 B

  1. // Code generated by golang.org/x/text/internal/gen/bitfield. DO NOT EDIT.
  2. package bitfield
  3. type myInt2 uint32
  4. func (m myInt2) fob() uint16 {
  5. return uint16((m >> 12) & 0xffff)
  6. }
  7. func (m myInt2) baz() int8 {
  8. return int8((m >> 7) & 0x1f)
  9. }
  10. func (m myInt2) bar() myUint8 {
  11. return myUint8((m >> 4) & 0x7)
  12. }
  13. func (m myInt2) Bool() bool {
  14. const bit = 1 << 3
  15. return m&bit == bit
  16. }
  17. func (m myInt2) Baz() int8 {
  18. return int8((m >> 0) & 0x7)
  19. }