mirror of
https://github.com/gogs/gogs.git
synced 2025-04-27 13:13:10 +00:00
* Rename pkg -> internal * Rename routes -> route * Move route -> internal/route * Rename models -> db * Move db -> internal/db * Fix route2 -> route * Move cmd -> internal/cmd * Bump version
17 lines
328 B
Go
17 lines
328 B
Go
package errors
|
|
|
|
import "fmt"
|
|
|
|
type AccessTokenNameAlreadyExist struct {
|
|
Name string
|
|
}
|
|
|
|
func IsAccessTokenNameAlreadyExist(err error) bool {
|
|
_, ok := err.(AccessTokenNameAlreadyExist)
|
|
return ok
|
|
}
|
|
|
|
func (err AccessTokenNameAlreadyExist) Error() string {
|
|
return fmt.Sprintf("access token already exist [name: %s]", err.Name)
|
|
}
|