Skip to content

Commit

Permalink
Update cmd/oras/internal/option/platform.go
Browse files Browse the repository at this point in the history
Co-authored-by: Billy Zha <qweeah@gmail.com>
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
  • Loading branch information
TerryHowe and qweeah authored Sep 30, 2024
1 parent a8a6a36 commit bb6cfaa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/oras/internal/option/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ type ArtifactPlatform struct {

// ApplyFlags applies flags to a command flag set.
func (opts *ArtifactPlatform) ApplyFlags(fs *pflag.FlagSet) {
if opts.FlagDescription == "" {
opts.FlagDescription = "artifact platform"
}
fs.StringVarP(&opts.platform, "artifact-platform", "", "", opts.FlagDescription+" in the form of `os[/arch][/variant][:os_version]`")
opts.FlagDescription = "set artifact platform"
opts.Platform.AppFlags(fs)

Check failure on line 85 in cmd/oras/internal/option/platform.go

View workflow job for this annotation

GitHub Actions / Analyze (1.23)

opts.Platform.AppFlags undefined (type Platform has no field or method AppFlags)

Check failure on line 85 in cmd/oras/internal/option/platform.go

View workflow job for this annotation

GitHub Actions / lint (1.23)

opts.Platform.AppFlags undefined (type Platform has no field or method AppFlags)) (typecheck)

Check failure on line 85 in cmd/oras/internal/option/platform.go

View workflow job for this annotation

GitHub Actions / lint (1.23)

opts.Platform.AppFlags undefined (type Platform has no field or method AppFlags)) (typecheck)

Check failure on line 85 in cmd/oras/internal/option/platform.go

View workflow job for this annotation

GitHub Actions / lint (1.23)

opts.Platform.AppFlags undefined (type Platform has no field or method AppFlags)) (typecheck)

Check failure on line 85 in cmd/oras/internal/option/platform.go

View workflow job for this annotation

GitHub Actions / build (1.23)

opts.Platform.AppFlags undefined (type Platform has no field or method AppFlags)
}

// Parse parses the input platform flag to an oci platform type.
Expand Down

0 comments on commit bb6cfaa

Please sign in to comment.