Files
any2anexoj/internal/nature.go
Natercio Moniz adcd192cb9
All checks were successful
Generate check / check-changes (pull_request) Successful in 28s
Quality / check-changes (pull_request) Successful in 3s
Generate check / verify-generate (pull_request) Has been skipped
Quality / run-tests (pull_request) Successful in 58s
support some filtering
2026-05-16 09:09:39 +01:00

32 lines
685 B
Go

package internal
type Nature string
const (
// NatureUnknown is the zero value of Nature type
NatureUnknown Nature = ""
// NatureG01 describes selling of stocks per table VII: Alienação onerosa de ações/partes sociais
NatureG01 Nature = "G01"
// NatureG20 describes selling units in investment funds (including ETFs) as per table VII:
// Resgates ou alienação de unidades de participação ou liquidação de fundos de investimento
NatureG20 Nature = "G20"
)
func (n Nature) String() string {
if n.Valid() {
return string(n)
}
return "unknown"
}
func (n Nature) Valid() bool {
switch n {
case NatureG01, NatureG20:
return true
default:
return false
}
}