| 1 |
package secrets |
| 2 |
|
| 3 |
import "fmt" |
| 4 |
|
| 5 |
type NotTextFileError struct { |
| 6 |
path string |
| 7 |
} |
| 8 |
|
| 9 |
func NewNotTextFileError(path string) error { |
| 10 |
return &NotTextFileError{path: path} |
| 11 |
} |
| 12 |
|
| 13 |
func (err *NotTextFileError) Error() string { |
| 14 |
return fmt.Sprintf("%s is not a text file", err.path) |
| 15 |
} |