diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-05-14 15:06:31 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-05-14 15:06:31 -0400 |
| commit | 8b39d27eea85691cc45e7d6798060e110e627806 (patch) | |
| tree | 23ff6f39bdd0c4881de048ff300670ccd8824883 /pkgid.go | |
| parent | b2fc5a8c62b71d52d167e992c42fa6630cfca9b3 (diff) | |
| download | lulu-8b39d27eea85691cc45e7d6798060e110e627806.zip | |
cli: refactor flag handling
Diffstat (limited to 'pkgid.go')
| -rw-r--r-- | pkgid.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -21,8 +21,12 @@ type PkgId struct { Foil } +func (p PkgId) String() string { + return fmt.Sprintf("%s.%s.%s.%s.%s.%s%s%s", p.TrimSize, p.ColorType, p.Quality, p.Binding, p.Paper, p.Finish, p.Linen, p.Foil) +} + func (p PkgId) MarshalText() ([]byte, error) { - return []byte(fmt.Sprintf("%s.%s.%s.%s.%s.%s%s%s", p.TrimSize, p.ColorType, p.Quality, p.Binding, p.Paper, p.Finish, p.Linen, p.Foil)), nil + return []byte(p.String()), nil } func (p *PkgId) UnmarshalText(text []byte) error { |