Skip to content

Commit dbd4a9c

Browse files
authored
Update fixtures and bump version (#80)
1 parent 9eaaafc commit dbd4a9c

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

_fixtures/struct_tags.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ type MyStruct struct {
66
Field1 string `json:"field1" info:"something"`
77

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

_fixtures/struct_tags__exp.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ type MyStruct struct {
66
Field1 string `json:"field1" info:"something"`
77

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

1616
type MyStruct2 struct {

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
)
1717

1818
const (
19-
versionStr = "0.10.0"
19+
versionStr = "0.11.0"
2020
)
2121

2222
var (

tags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func alignTags(fields []*dst.Field) {
138138

139139
if ok {
140140
tagComponents = append(tagComponents, fmt.Sprintf("%s:\"%s\"", key, value))
141-
lenUsed += len(key) + len(value) + 3
141+
lenUsed += len(key) + tagValueLen(value) + 3
142142
} else {
143143
tagComponents = append(tagComponents, "")
144144
}

0 commit comments

Comments
 (0)