(idMap []configs.IDMap)
| 1019 | } |
| 1020 | |
| 1021 | func encodeIDMapping(idMap []configs.IDMap) ([]byte, error) { |
| 1022 | data := bytes.NewBuffer(nil) |
| 1023 | for _, im := range idMap { |
| 1024 | line := fmt.Sprintf("%d %d %d\n", im.ContainerID, im.HostID, im.Size) |
| 1025 | if _, err := data.WriteString(line); err != nil { |
| 1026 | return nil, err |
| 1027 | } |
| 1028 | } |
| 1029 | return data.Bytes(), nil |
| 1030 | } |
| 1031 | |
| 1032 | // netlinkError is an error wrapper type for use by custom netlink message |
| 1033 | // types. Panics with errors are wrapped in netlinkError so that the recover |
no outgoing calls
no test coverage detected
searching dependent graphs…