aboutsummaryrefslogtreecommitdiff
path: root/ref/name/errors.go
blob: e39bc73ba36f13ce897c9037839bb2487a46f932 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package refname

import "fmt"

// NameError reports one invalid reference name.
type NameError struct {
	Name   string
	Reason string
}

// Error implements error.
func (err *NameError) Error() string {
	return fmt.Sprintf("ref: invalid name %q: %s", err.Name, err.Reason)
}