@@ -17,6 +17,7 @@ package project
1717
1818import  (
1919	"context" 
20+ 	"errors" 
2021	"fmt" 
2122	"io" 
2223
@@ -33,6 +34,7 @@ const (
3334	describeProjectCmdLong   =  `Describe the configuration of the specified Project.` 
3435
3536	ErrMultipleIdentifiers  =  "multiple identifiers specified, please provide only one" 
37+ 	ErrMissingIdentifier    =  "missing revision/version/branch/tag name, please provide one as argument" 
3638)
3739
3840type  describeProjectOptions  struct  {
@@ -133,7 +135,7 @@ func GetRefFromOptions(options describeProjectOptions) (configuration.Ref, error
133135
134136	if  len (options .VersionName ) >  0  {
135137		if  len (refType ) >  0  {
136- 			return  configuration.Ref {}, fmt . Errorf (ErrMultipleIdentifiers )
138+ 			return  configuration.Ref {}, errors . New (ErrMultipleIdentifiers )
137139		}
138140
139141		refType  =  configuration .VersionRefType 
@@ -142,7 +144,7 @@ func GetRefFromOptions(options describeProjectOptions) (configuration.Ref, error
142144
143145	if  len (options .BranchName ) >  0  {
144146		if  len (refType ) >  0  {
145- 			return  configuration.Ref {}, fmt . Errorf (ErrMultipleIdentifiers )
147+ 			return  configuration.Ref {}, errors . New (ErrMultipleIdentifiers )
146148		}
147149
148150		refType  =  configuration .BranchRefType 
@@ -151,15 +153,15 @@ func GetRefFromOptions(options describeProjectOptions) (configuration.Ref, error
151153
152154	if  len (options .TagName ) >  0  {
153155		if  len (refType ) >  0  {
154- 			return  configuration.Ref {}, fmt . Errorf (ErrMultipleIdentifiers )
156+ 			return  configuration.Ref {}, errors . New (ErrMultipleIdentifiers )
155157		}
156158
157159		refType  =  configuration .TagRefType 
158160		refName  =  options .TagName 
159161	}
160162
161163	if  len (refType ) ==  0  {
162- 		return  configuration.Ref {}, fmt . Errorf ( "missing revision/version/branch/tag name, please provide one as argument" )
164+ 		return  configuration.Ref {}, errors . New ( ErrMissingIdentifier )
163165	}
164166
165167	return  configuration .NewRef (refType , refName )
0 commit comments