@@ -115,7 +115,7 @@ func Parse(reader io.Reader, path string) (ResolvConf, error) {
115
115
rc .processLine (scanner .Text ())
116
116
}
117
117
if err := scanner .Err (); err != nil {
118
- return ResolvConf {}, errSystem {err }
118
+ return ResolvConf {}, systemErr {err }
119
119
}
120
120
if _ , ok := rc .Option ("ndots" ); ok {
121
121
rc .md .NDotsFrom = "host"
@@ -177,7 +177,7 @@ func (rc *ResolvConf) Options() []string {
177
177
// Option("ndots") -> ("1", true)
178
178
// Option("edns0") -> ("", true)
179
179
func (rc * ResolvConf ) Option (search string ) (string , bool ) {
180
- for i := len (rc .options ) - 1 ; i >= 0 ; i -= 1 {
180
+ for i := len (rc .options ) - 1 ; i >= 0 ; i -- {
181
181
k , v , _ := strings .Cut (rc .options [i ], ":" )
182
182
if k == search {
183
183
return v , true
@@ -344,10 +344,10 @@ options {{join . " "}}
344
344
var buf bytes.Buffer
345
345
templ , err := template .New ("summary" ).Funcs (funcs ).Parse (templateText )
346
346
if err != nil {
347
- return nil , errSystem {err }
347
+ return nil , systemErr {err }
348
348
}
349
349
if err := templ .Execute (& buf , s ); err != nil {
350
- return nil , errSystem {err }
350
+ return nil , systemErr {err }
351
351
}
352
352
return buf .Bytes (), nil
353
353
}
@@ -419,15 +419,15 @@ func removeInvalidNDots(options []string) []string {
419
419
return options [:n ]
420
420
}
421
421
422
- // errSystem implements [github.com/docker/docker/errdefs.ErrSystem].
422
+ // systemErr implements [github.com/docker/docker/errdefs.ErrSystem].
423
423
//
424
424
// We don't use the errdefs helpers here, because the resolvconf package
425
425
// is imported in BuildKit, and this is the only location that used the
426
426
// errdefs package outside of the client.
427
- type errSystem struct { error }
427
+ type systemErr struct { error }
428
428
429
- func (errSystem ) System () {}
429
+ func (systemErr ) System () {}
430
430
431
- func (e errSystem ) Unwrap () error {
431
+ func (e systemErr ) Unwrap () error {
432
432
return e .error
433
433
}
0 commit comments