Strubbl / wallabago

Go wrapper for the Wallabag API
GNU General Public License v3.0
11 stars 5 forks source link

properly parse non-default flags #1

Closed anarcat closed 7 years ago

anarcat commented 7 years ago

the string() cast was discarding zero values. the proper way to convert integers to strings is with strconv

without this, i cannot get the list of "unread" entries. i actually get:

$ go run config.go main.go
2017/01/29 23:10:11 getConfig: file is config.json
2017/01/29 23:10:11 main: setting wallabago.Config var
getEntries: json unmarshal failed: invalid character '<' looking for beginning of value
2017/01/29 23:10:11 unread%!(EXTRA int=0)

with the patch, i can successfully access unread entries.

Strubbl commented 7 years ago

Thanks!

anarcat commented 7 years ago

'pleasure, thanks for the merge!

my first golang contribution! :)