(namespace string)
| 213 | } |
| 214 | |
| 215 | func WithNamespace(namespace string) CNIEnvOpt { |
| 216 | return func(e *CNIEnv) error { |
| 217 | err := fsEnsureRoot(e, namespace) |
| 218 | if err != nil { |
| 219 | return err |
| 220 | } |
| 221 | e.Namespace = namespace |
| 222 | return nil |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | func NewCNIEnv(cniPath, cniConfPath string, opts ...CNIEnvOpt) (*CNIEnv, error) { |
| 227 | e := CNIEnv{ |
no test coverage detected
searching dependent graphs…