如何解决编码为TOML原语
我具有以下结构,我想将一些值编码到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 举报,一经查实,本站将立刻删除。