go-enum-encoding

Generate Go enum encoding

MIT License

Stars
12
go-enum-encoding - v1.8.0 Latest Release

Published by nikolaydubina about 2 months ago

go-enum-encoding - v1.7.0

Published by nikolaydubina about 2 months ago

go-enum-encoding - v1.6.2

Published by nikolaydubina about 2 months ago

go-enum-encoding - v1.6.1

Published by nikolaydubina about 2 months ago

What's Changed

  • Tailscale feedback by @nikolaydubina in https://github.com/nikolaydubina/go-enum-encoding/pull/28
  • fixes issue with missing dot in generated code header line
  • fixes issue with package level godoc is mixed with generated directive
  • avoid malloc in String() method
  • short version of String method
  • conversion to string is efficient as conversion to []byte

Full Changelog: https://github.com/nikolaydubina/go-enum-encoding/compare/v1.6.0...v1.6.1

go-enum-encoding - v1.6.0

Published by nikolaydubina about 2 months ago

go-enum-encoding - v1.5.0

Published by nikolaydubina 2 months ago

[!WARNING]
go:generate command is required to be immediately before var/const block with enum values

What's Changed

New Contributors

Full Changelog: https://github.com/nikolaydubina/go-enum-encoding/compare/v1.4.1...v1.5.0

go-enum-encoding - v1.4.2

Published by nikolaydubina 5 months ago

  • iota illustration
go-enum-encoding - v1.4.1

Published by nikolaydubina 5 months ago

  • illustration for iota
go-enum-encoding - v1.4.0

Published by nikolaydubina 7 months ago

  • short mode for inlining switch
  • long mode example with currencies
  • removed String
  • encoding defines an array of byte slices
go-enum-encoding - v1.3.0

Published by nikolaydubina 7 months ago

  • generating benchmarks
  • research for array loop benchmarks
go-enum-encoding - v1.2.1

Published by nikolaydubina 7 months ago

  • smaller code, [][2]string instead of map. removing convertion.
go-enum-encoding - empty tag notation

Published by nikolaydubina 7 months ago

  • no more json:"-" tag
  • instead using json:"" tag

this is to simplify definition of empty values

go-enum-encoding - allowing empty values

Published by nikolaydubina 7 months ago

  1. Unknown is not a special word
  2. Unknown is not required
  3. empty value is optional and can be bound to any symbol name
  4. if json does not match any values (including empty string, if any), then error

this effectively allows to have both options: A) error on empty values; or B) treat empty value as one of values.

bug fixes:

  • when json tags strings have different ordering from symbol values ordering, ordering was breaking. now ordering is preserved.
go-enum-encoding - v1.0.16

Published by nikolaydubina 7 months ago

  • no log (which uses fmt)
go-enum-encoding - v1.0.15

Published by nikolaydubina 7 months ago

  • no fmt
  • no bytes
go-enum-encoding - v1.0.14

Published by nikolaydubina 7 months ago

  • 120 LOC
go-enum-encoding - v1.0.13

Published by nikolaydubina 7 months ago

  • nit
go-enum-encoding - v1.0.12

Published by nikolaydubina 7 months ago

  • 100% coverage, no skipped errors
go-enum-encoding - v1.0.11

Published by nikolaydubina 7 months ago

  • even higher coverage
go-enum-encoding - v1.0.10

Published by nikolaydubina 7 months ago

  • even more test
Package Rankings
Top 9.04% on Proxy.golang.org
Badges
Extracted from project README
Go Report Card Go Reference codecov go-recipes OpenSSF Scorecard