问题描述
我具有以下结构,我想将一些值编码到toml.Primitive结构中。
我正在使用TOML库,我想将值编码到toml.Primitive结构中,但是我无法对值进行编码。
Runtime{
Type: "",Engine: "",PodAnnotations: []string{},ContainerAnnotations: []string{},Root: crioKeyRoot,Options: &toml.Primitive{},PrivilegedWithoutHostDevices: false,}
现在我想要以下结构
// runcoptions "github.com/containerd/containerd/runtime/v2/runc/options"
ropts := runcoptions.Options{}
ropts.BinaryName = "somePath"
现在我想将ropts编码为Runtime.Options
请让我知道如何将“ ropts”的值编码到“选项”中。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)