org.go 536 B

123456789101112131415161718192021222324
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Copyright 2018 Gitote. All rights reserved.
  3. //
  4. // This source code is licensed under the MIT license found in the
  5. // LICENSE file in the root directory of this source tree.
  6. package errors
  7. import "fmt"
  8. type TeamNotExist struct {
  9. TeamID int64
  10. Name string
  11. }
  12. func IsTeamNotExist(err error) bool {
  13. _, ok := err.(TeamNotExist)
  14. return ok
  15. }
  16. func (err TeamNotExist) Error() string {
  17. return fmt.Sprintf("team does not exist [team_id: %d, name: %s]", err.TeamID, err.Name)
  18. }