containerd / containerd/go-cni

Some use issue about `WithArgs` in namespace_opts.go

Open
#87 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
162
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Hello all,

I got some special issue about `WithArgs` in namespace_opts.go. For right now, the code below

```go
func WithArgs(k, v string) NamespaceOpts {
return func(c *Namespace) error {
c.args[k] = v
return nil
}
}
```

Just allow people to use string as value when calling this function. But in the specification, the value may be a slice type. FYI https://www.cni.dev/docs/conventions/#args-in-network-config

I'm not sure if there is some mistake?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in namespace_opts.go at WithArgs and compare its string-only value handling with the CNI network configuration args convention linked in the issue. Determine the expected slice-valued behavior and check how NamespaceOpts and c.args are used elsewhere. Done means the API matches the stated convention and relevant behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.