segmentio / golines

A golang formatter that fixes long lines
MIT License
925 stars 59 forks source link

Fix len on multi-byte characters #78

Closed momaek closed 2 years ago

momaek commented 2 years ago

Before

type Diacritics struct {
    A string `foo:"ä" json:"a"`
    E string `foo:"e"  json:"e"`
    I string `foo:"ï" json:"i"`
    O string `foo:"o"  json:"o"`
    U string `foo:"ü" json:"u"`
}

After

type Diacritics struct {
    A string `foo:"ä" json:"a"`
    E string `foo:"e" json:"e"`
    I string `foo:"ï" json:"i"`
    O string `foo:"o" json:"o"`
    U string `foo:"ü" json:"u"`
}
yolken commented 2 years ago

Thanks for the fix!