github.com/avfs/avfs@v0.33.1-0.20240303173310-c6ba67c33eb7/errors_forlinux.go (about) 1 // Code generated by "stringer -type LinuxError -linecomment -output errors_forlinux.go"; DO NOT EDIT. 2 3 package avfs 4 5 import "strconv" 6 7 func _() { 8 // An "invalid array index" compiler error signifies that the constant values have changed. 9 // Re-run the stringer command to generate them again. 10 var x [1]struct{} 11 _ = x[ErrBadFileDesc-9] 12 _ = x[ErrCrossDevLink-18] 13 _ = x[ErrDirNotEmpty-39] 14 _ = x[ErrFileExists-17] 15 _ = x[ErrInvalidArgument-22] 16 _ = x[ErrIsADirectory-21] 17 _ = x[ErrNoSuchFileOrDir-2] 18 _ = x[ErrNotADirectory-20] 19 _ = x[ErrOpNotPermitted-1] 20 _ = x[ErrPermDenied-13] 21 _ = x[ErrTooManySymlinks-40] 22 } 23 24 const ( 25 _LinuxError_name_0 = "operation not permittedno such file or directory" 26 _LinuxError_name_1 = "bad file descriptor" 27 _LinuxError_name_2 = "permission denied" 28 _LinuxError_name_3 = "file existsinvalid cross-device link" 29 _LinuxError_name_4 = "not a directoryis a directoryinvalid argument" 30 _LinuxError_name_5 = "directory not emptytoo many levels of symbolic links" 31 ) 32 33 var ( 34 _LinuxError_index_0 = [...]uint8{0, 23, 48} 35 _LinuxError_index_3 = [...]uint8{0, 11, 36} 36 _LinuxError_index_4 = [...]uint8{0, 15, 29, 45} 37 _LinuxError_index_5 = [...]uint8{0, 19, 52} 38 ) 39 40 func (i LinuxError) String() string { 41 switch { 42 case 1 <= i && i <= 2: 43 i -= 1 44 return _LinuxError_name_0[_LinuxError_index_0[i]:_LinuxError_index_0[i+1]] 45 case i == 9: 46 return _LinuxError_name_1 47 case i == 13: 48 return _LinuxError_name_2 49 case 17 <= i && i <= 18: 50 i -= 17 51 return _LinuxError_name_3[_LinuxError_index_3[i]:_LinuxError_index_3[i+1]] 52 case 20 <= i && i <= 22: 53 i -= 20 54 return _LinuxError_name_4[_LinuxError_index_4[i]:_LinuxError_index_4[i+1]] 55 case 39 <= i && i <= 40: 56 i -= 39 57 return _LinuxError_name_5[_LinuxError_index_5[i]:_LinuxError_index_5[i+1]] 58 default: 59 return "LinuxError(" + strconv.FormatInt(int64(i), 10) + ")" 60 } 61 }