1313// See the License for the specific language governing permissions and
1414// limitations under the License.
1515
16- package cli
16+ package download
1717
1818import (
1919 "context"
@@ -25,34 +25,34 @@ import (
2525 "github.com/google/go-containerregistry/pkg/name"
2626 "github.com/google/go-containerregistry/pkg/v1/remote"
2727 "github.com/peterbourgon/ff/v3/ffcli"
28-
28+ "github.com/sigstore/cosign/cmd/cosign/cli"
2929 "github.com/sigstore/cosign/pkg/cosign"
3030)
3131
32- func Download () * ffcli.Command {
32+ func Signature () * ffcli.Command {
3333 var (
34- flagset = flag .NewFlagSet ("cosign download" , flag .ExitOnError )
34+ flagset = flag .NewFlagSet ("cosign download signature " , flag .ExitOnError )
3535 )
3636 return & ffcli.Command {
37- Name : "download " ,
38- ShortUsage : "cosign download <image uri>" ,
37+ Name : "signature " ,
38+ ShortUsage : "cosign download signature <image uri>" ,
3939 ShortHelp : "Download signatures from the supplied container image" ,
4040 FlagSet : flagset ,
4141 Exec : func (ctx context.Context , args []string ) error {
4242 if len (args ) != 1 {
4343 return flag .ErrHelp
4444 }
45- return DownloadCmd (ctx , args [0 ])
45+ return SignatureCmd (ctx , args [0 ])
4646 },
4747 }
4848}
4949
50- func DownloadCmd (ctx context.Context , imageRef string ) error {
50+ func SignatureCmd (ctx context.Context , imageRef string ) error {
5151 ref , err := name .ParseReference (imageRef )
5252 if err != nil {
5353 return err
5454 }
55- sigRepo , err := SignatureRepositoryForImage (ref )
55+ sigRepo , err := cli . TargetRepositoryForImage (ref )
5656 if err != nil {
5757 return err
5858 }
0 commit comments