WIP: Some refactoring
This commit is contained in:
@ -42,6 +42,10 @@ func (r *Repository) ValidateURL() error {
|
||||
func (r *Repository) KindFromUrl() error {
|
||||
// It panics if URL is not valid,
|
||||
// but invalid url should not pass the ValidateURL function
|
||||
if err := r.ValidateURL(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
prefix := r.URL[:strings.IndexByte(r.URL, ':')]
|
||||
switch prefix {
|
||||
case "oci":
|
||||
|
Reference in New Issue
Block a user