1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 11:31:54 +08:00

go-ipfs-config: fix: String method on the OptionalString (#153)

* fix: String method on the OptionalString
* test(OptionalString): empty string is preserved

Co-authored-by: Marcin Rataj <lidel@lidel.org>
This commit is contained in:
Marten Seemann
2021-10-29 17:21:53 +02:00
committed by GitHub
parent cdaa222b22
commit ba9d9f609c
2 changed files with 12 additions and 7 deletions

View File

@ -360,7 +360,7 @@ func (p OptionalString) String() string {
if p.value == nil {
return "default"
}
return fmt.Sprintf("%d", p.value)
return *p.value
}
var _ json.Unmarshaler = (*OptionalInteger)(nil)