Skip to content

Commit 4840e07

Browse files
committed
misc: go vet fixes
These are some code problems flagged by `go vet` that shouldn't affect correctness at all. Signed-off-by: Hank Donnay <[email protected]>
1 parent 733d8f1 commit 4840e07

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

digest.go

-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ func (d *Digest) Scan(i interface{}) error {
127127
return nil
128128
default:
129129
return &DigestError{msg: fmt.Sprintf("invalid digest type: %T", v)}
130-
131130
}
132-
panic("the default case should return before this panic is reached.")
133131
}
134132

135133
// Value implements driver.Valuer.

rhel/updaterset.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type Factory struct {
5252
}
5353

5454
type FactoryConfig struct {
55-
URL string `json:"url", yaml:"url"`
55+
URL string `json:"url" yaml:"url"`
5656
}
5757

5858
func (f *Factory) Configure(ctx context.Context, cfg driver.ConfigUnmarshaler, c *http.Client) error {

rpm/packagescanner.go

-3
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,4 @@ func parsePackage(ctx context.Context, log zerolog.Logger, src map[string]*clair
336336
return nil, err
337337
}
338338
}
339-
340-
// Should have cleanly returned when io.EOF was hit.
341-
panic("unreachable")
342339
}

0 commit comments

Comments
 (0)