mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-30 10:11:23 +02:00
Modify return to follow Golang conventions
This commit is contained in:
parent
9781e160a4
commit
36e528e365
@ -22,17 +22,13 @@ func NewSecretReplacer(secrets []*model.Secret) SecretReplacer {
|
||||
}
|
||||
}
|
||||
|
||||
var replacer SecretReplacer
|
||||
|
||||
if len(r) > 0 {
|
||||
replacer = &secretReplacer{
|
||||
replacer: strings.NewReplacer(r...),
|
||||
}
|
||||
} else {
|
||||
replacer = &noopReplacer{}
|
||||
if len(r) == 0 {
|
||||
return &noopReplacer{}
|
||||
}
|
||||
|
||||
return replacer
|
||||
return &secretReplacer{
|
||||
replacer: strings.NewReplacer(r...),
|
||||
}
|
||||
}
|
||||
|
||||
type noopReplacer struct{}
|
||||
|
Loading…
Reference in New Issue
Block a user