Skip to content

Commit

Permalink
types: format Godocs lists correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Jakubowski <[email protected]>
  • Loading branch information
patjakdev committed Nov 12, 2024
1 parent d82582b commit f1b2410
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions types/datetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ func (a Datetime) String() string {
// UnmarshalJSON implements encoding/json.Unmarshaler for Datetime
//
// It is capable of unmarshaling 3 different representations supported by Cedar
// - { "__extn": { "fn": "datetime", "arg": "1970-01-01" }}
// - { "fn": "datetime", "arg": "1970-01-01" }
// - "1970-01-01"
// - { "__extn": { "fn": "datetime", "arg": "1970-01-01" }}
// - { "fn": "datetime", "arg": "1970-01-01" }
// - "1970-01-01"
func (a *Datetime) UnmarshalJSON(b []byte) error {
aa, err := unmarshalExtensionValue(b, "datetime", ParseDatetime)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions types/decimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ func (d Decimal) String() string {
// UnmarshalJSON implements encoding/json.Unmarshaler for Decimal
//
// It is capable of unmarshaling 3 different representations supported by Cedar
// - { "__extn": { "fn": "decimal", "arg": "1234.5678" }}
// - { "fn": "decimal", "arg": "1234.5678" }
// - "1234.5678"
// - { "__extn": { "fn": "decimal", "arg": "1234.5678" }}
// - { "fn": "decimal", "arg": "1234.5678" }
// - "1234.5678"
func (d *Decimal) UnmarshalJSON(b []byte) error {
dd, err := unmarshalExtensionValue(b, "decimal", ParseDecimal)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions types/duration.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ func (v Duration) String() string {
// UnmarshalJSON implements encoding/json.Unmarshaler for Duration
//
// It is capable of unmarshaling 3 different representations supported by Cedar
// - { "__extn": { "fn": "duration", "arg": "1h10m" }}
// - { "fn": "duration", "arg": "1h10m" }
// - "1h10m"
// - { "__extn": { "fn": "duration", "arg": "1h10m" }}
// - { "fn": "duration", "arg": "1h10m" }
// - "1h10m"
func (v *Duration) UnmarshalJSON(b []byte) error {
vv, err := unmarshalExtensionValue(b, "duration", ParseDuration)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions types/ipaddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ func (c IPAddr) Contains(o IPAddr) bool {
// UnmarshalJSON implements encoding/json.Unmarshaler for IPAddr
//
// It is capable of unmarshaling 3 different representations supported by Cedar
// - { "__extn": { "fn": "ip", "arg": "12.34.56.78" }}
// - { "fn": "ip", "arg": "12.34.56.78" }
// - "12.34.56.78"
// - { "__extn": { "fn": "ip", "arg": "12.34.56.78" }}
// - { "fn": "ip", "arg": "12.34.56.78" }
// - "12.34.56.78"
func (v *IPAddr) UnmarshalJSON(b []byte) error {
vv, err := unmarshalExtensionValue(b, "ip", ParseIPAddr)
if err != nil {
Expand Down

0 comments on commit f1b2410

Please sign in to comment.