Skip to content

Commit 02f0b98

Browse files
committed
types: fix marshal ID logic
1 parent feb4f9a commit 02f0b98

File tree

2 files changed

+15
-45
lines changed

2 files changed

+15
-45
lines changed

types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const Version = "2.0"
1919
// Only one of either the Name or Number members will be set, using the
2020
// number form if the Name is the empty string.
2121
type ID struct {
22-
Name string `json:"name,omitempty"`
23-
Number int64 `json:"number,omitempty"`
22+
Name string
23+
Number int64
2424
}
2525

2626
// String returns a string representation of the ID.
@@ -31,7 +31,7 @@ func (id *ID) String() string {
3131
return ""
3232
}
3333
if id.Name != "" {
34-
return strconv.Quote(id.Name)
34+
return id.Name
3535
}
3636

3737
return "#" + strconv.FormatInt(id.Number, 10)

types_gen.go

Lines changed: 12 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)