Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

json.MarshalIndent's error was checked after trying to use its value.

Cette révision appartient à :
Adelyne Maulideau 2017-05-05 14:54:36 +02:00
Parent 1c1e9ef7af
révision f3f6316771

Voir le fichier

@ -96,10 +96,10 @@ func (config *Config) Write(output io.Writer) error {
func (config *Config) Pretty(output io.Writer) error {
data, err := json.MarshalIndent(config, "", "\t")
data = append(data, []byte("\n")...)
if err != nil {
return err
}
data = append(data, []byte("\n")...)
_, err = output.Write(data)
return err
}