Modify return to follow Golang conventions

This commit is contained in:
Don 2016-11-17 10:09:58 -08:00
parent 9781e160a4
commit 36e528e365

View file

@ -22,17 +22,13 @@ func NewSecretReplacer(secrets []*model.Secret) SecretReplacer {
}
}
var replacer SecretReplacer
if len(r) == 0 {
return &noopReplacer{}
}
if len(r) > 0 {
replacer = &secretReplacer{
return &secretReplacer{
replacer: strings.NewReplacer(r...),
}
} else {
replacer = &noopReplacer{}
}
return replacer
}
type noopReplacer struct{}