()
| 64 | } |
| 65 | |
| 66 | func (s syncT) String() string { |
| 67 | str := "type:" + string(s.Type) |
| 68 | if s.Flags != 0 { |
| 69 | str += " flags:0b" + strconv.FormatInt(int64(s.Flags), 2) |
| 70 | } |
| 71 | if s.Arg != nil { |
| 72 | str += " arg:" + string(*s.Arg) |
| 73 | } |
| 74 | if s.File != nil { |
| 75 | str += " file:" + s.File.Name() + " (fd:" + strconv.Itoa(int(s.File.Fd())) + ")" |
| 76 | } |
| 77 | return str |
| 78 | } |
| 79 | |
| 80 | // initError is used to wrap errors for passing them via JSON, |
| 81 | // as encoding/json can't unmarshal into error type. |
no outgoing calls