Skip to content

Commit

Permalink
fix: optimize function name
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Jan 8, 2025
1 parent b448d0d commit da8af31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/notation/blob/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func runInspect(opts *inspectOpts) error {
return fmt.Errorf("unrecognized output format %s", opts.outputFormat)
}

envelopeMediaType, err := parseEnvelopeType(filepath.Base(opts.sigPath))
envelopeMediaType, err := parseEnvelopeMediaType(filepath.Base(opts.sigPath))
if err != nil {
return err
}
Expand Down Expand Up @@ -91,8 +91,8 @@ func runInspect(opts *inspectOpts) error {
return nil
}

// parseEnvelopeType returns the envelope media type based on the filename.
func parseEnvelopeType(filename string) (string, error) {
// parseEnvelopeMediaType returns the envelope media type based on the filename.
func parseEnvelopeMediaType(filename string) (string, error) {
parts := strings.Split(filename, ".")
if len(parts) < 3 || parts[len(parts)-1] != "sig" {
return "", fmt.Errorf("invalid signature filename: %s", filename)
Expand Down

0 comments on commit da8af31

Please sign in to comment.