File: errors.go

package info (click to toggle)
golang-github-gophercloud-gophercloud 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,416 kB
  • sloc: sh: 99; makefile: 21
file content (23 lines) | stat: -rw-r--r-- 535 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package apiversions

import (
	"fmt"
)

// ErrVersionNotFound is the error when the requested API version
// could not be found.
type ErrVersionNotFound struct{}

func (e ErrVersionNotFound) Error() string {
	return fmt.Sprintf("Unable to find requested API version")
}

// ErrMultipleVersionsFound is the error when a request for an API
// version returns multiple results.
type ErrMultipleVersionsFound struct {
	Count int
}

func (e ErrMultipleVersionsFound) Error() string {
	return fmt.Sprintf("Found %d API versions", e.Count)
}