File: errors.go

package info (click to toggle)
golang-github-aws-aws-sdk-go-v2 1.24.1-2~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 554,032 kB
  • sloc: java: 15,941; makefile: 419; sh: 175
file content (22 lines) | stat: -rw-r--r-- 483 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package ini

import "fmt"

// UnableToReadFile is an error indicating that a ini file could not be read
type UnableToReadFile struct {
	Err error
}

// Error returns an error message and the underlying error message if present
func (e *UnableToReadFile) Error() string {
	base := "unable to read file"
	if e.Err == nil {
		return base
	}
	return fmt.Sprintf("%s: %v", base, e.Err)
}

// Unwrap returns the underlying error
func (e *UnableToReadFile) Unwrap() error {
	return e.Err
}