Skip to content

Commit

Permalink
Update fixtures and bump version (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
yolken authored Aug 7, 2022
1 parent 9eaaafc commit dbd4a9c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions _fixtures/struct_tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type MyStruct struct {
Field1 string `json:"field1" info:"something"`

// Field6 example adapted from https://github.com/segmentio/golines/issues/15.
ALongField2 string `json:"long_field2" info:"something else" tag:"a really long tag that extends us beyond 100 chars"`
Field3 string `json:"field3" info:"third thing"`
Field4 string `json:"field3" tag:"something"`
ALongField2 string `json:"long_field2 ãï" info:"something else ãï" tag:"a really long tag that extends us beyond 100 chars"`
Field3 string `json:"field3" info:"ãï third thing"`
Field4 string `json:"field3" tag:"ãï something"`
Field5 int `tag:"something else" tag:"something"`
Field6 string `json:"somevalue" info:"http://username:[email protected]:1234"`
}
Expand Down
10 changes: 5 additions & 5 deletions _fixtures/struct_tags__exp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ type MyStruct struct {
Field1 string `json:"field1" info:"something"`

// Field6 example adapted from https://github.com/segmentio/golines/issues/15.
ALongField2 string `json:"long_field2" info:"something else" tag:"a really long tag that extends us beyond 100 chars"`
Field3 string `json:"field3" info:"third thing"`
Field4 string `json:"field3" tag:"something"`
Field5 int ` tag:"something else"`
Field6 string `json:"somevalue" info:"http://username:[email protected]:1234"`
ALongField2 string `json:"long_field2 ãï" info:"something else ãï" tag:"a really long tag that extends us beyond 100 chars"`
Field3 string `json:"field3" info:"ãï third thing"`
Field4 string `json:"field3" tag:"ãï something"`
Field5 int ` tag:"something else"`
Field6 string `json:"somevalue" info:"http://username:[email protected]:1234"`
}

type MyStruct2 struct {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

const (
versionStr = "0.10.0"
versionStr = "0.11.0"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func alignTags(fields []*dst.Field) {

if ok {
tagComponents = append(tagComponents, fmt.Sprintf("%s:\"%s\"", key, value))
lenUsed += len(key) + len(value) + 3
lenUsed += len(key) + tagValueLen(value) + 3
} else {
tagComponents = append(tagComponents, "")
}
Expand Down

0 comments on commit dbd4a9c

Please sign in to comment.