there is a TOML primitive decode but there is no equivalent TOML primitive encode.

This issue has been created since 2020-09-29.

I am trying to do the following:

I have following structure and I want to encode some values into the toml.Primitive structure.

Runtime{
            Type:                         "",
            Engine:                       "",
            PodAnnotations:               []string{},
            ContainerAnnotations:         []string{},
            Root:                         crioKeyRoot,
            Options:                      &toml.Primitive{},
            PrivilegedWithoutHostDevices: false,
        }

Now I want the following structure

// runcoptions "github.com/containerd/containerd/runtime/v2/runc/options"
ropts := runcoptions.Options{}
ropts.BinaryName = "somePath"

Now I want to encode the ropts into the Runtime.Options

Please, let me know how can encode the value of ropts into the Options.

arp242 wrote this answer on 2021-06-09

This should be fixed with #281

More Details About Repo
Owner Name BurntSushi
Repo Name toml
Full Name BurntSushi/toml
Language Go
Created Date 2013-02-26
Updated Date 2023-03-20
Star Count 4154
Watcher Count 84
Fork Count 518
Issue Count 15

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Images don't have `background` supported 0 2022-10-14 2023-02-15
Subset data should allow setting to 100% vegetated AND pull the PFTs from the surface file 5 2022-04-14 2023-03-13
homebridge-hue -> homebridge-deconz 1 2022-03-04 2023-02-26
Adding onion removes : from http://somesite.onion and results in 503 0 2021-04-25 2023-02-04
the published version of 4.4.1 depends on a vulnerable version of lodash (4.17.13) 1 2020-08-18 2023-02-09
У генокрадов гринтекст на личность не работает. 0 2022-06-29 2023-03-15
Implement a number of ARMv8 instructions 5 2021-01-23 2023-03-20
'input_mask' is what? How to generate? 9 2020-07-17 2023-02-24
ValueError: too many values to unpack (expected 2) when using eval_df 8 2021-10-12 2023-02-18
non-virtual deconstructor 3 2018-10-15 2023-03-11
Define migration plan for Component Stories 0 2021-10-14 2023-02-23
Massive spike in CPU usage when running diff on a large object 1 2022-07-28 2023-03-23
[V2] Window Toolbar can be customized 2 2021-11-02 2023-02-03
A non well formed numeric value encountered 1 2021-01-19 2023-02-24
Mikrotik Rate-Limit Attribute 5 2020-04-13 2023-02-12
Result window too large 16 2017-05-18 2023-02-15
argon2id-hasher: unhandled error: illegal instruction. Some debugging context lost 8 2021-08-22 2023-03-17
Export `RE.Regex`, and make constructors easier. 2 2021-07-14 2023-03-07
Anonymous inner class with an instance initializer serialization problems 1 2021-08-17 2023-02-12
[Bug] Dataset .to_pandas() throws 1 2021-11-17 2023-02-19
`import.meta.env.DEV` and `PROD` are incorrect if a custom `mode` is provided programmatically 17 2022-07-18 2023-02-10
[🚀 Feature]: Add session, util and virtual authenticator in DefinitelyTyped 1 2022-10-27 2022-11-10
Psalm support is unclear from README.md 1 2023-01-27 2023-03-23
The game crashed whilst unexpected error Error: java.lang.NullPointerException: Cannot read field "field_3911" because "this.field_4015.field_1724" is null Exit Code: -1 2 2022-04-01 2023-03-09
readFileSync not resolving symbolic links 2 2022-08-08 2022-09-18
Environment variables don't appear to be properly processed in native binaries 1 2023-01-23 2023-03-12
munitnyucontextmanager non helpful error reporting 9 2023-01-23 2023-02-25
ReferenceError: global is not defined 1 2022-10-20 2023-02-21
Error: 'join' is not exported by __vite-browser-external, imported by node_modules/steno/lib/index.js 1 2022-10-20 2023-02-21
Re-add attachment functionality to quick reply 0 2023-02-23 2023-03-16
Re-add "continue using editor" functionality to quick reply 0 2023-02-23 2023-03-16
Add support for application start-up to detect if windows exists and open a new tab in the existing window 1 2022-01-17 2023-02-11
whenever i start emacs, the mouse doesn't work. 5 2022-04-30 2023-03-03
PodSecurityPolicy imcomplete? 1 2021-11-30 2023-01-26
"Passing" injections to view partials 4 2021-09-09 2023-02-20
Does downloadCli persist the pulumi cli across runs? 2 2021-08-16 2023-01-26
Manually calling getPurchaserInfo() 3 2021-12-08 2023-02-20
Manually materialize the view 1 2014-03-11 2023-03-15
Add nano.community as a block explorer 0 2021-09-05 2023-03-08
AttributeError: type object 'Factory' has no attribute '_get_provider_class' 1 2022-06-01 2023-02-21
Registry Controller: Running 3p commands in the controller 0 2021-08-24 2023-01-06
[META] Support asynchronous operations on an extension 0 2023-03-08 2023-03-23
[Question] How to determine when a REST request is destined for an extension 0 2023-03-08 2023-03-23
Load pretraining parameters from dureader_cross_encoder 後終止訓練 1 2022-12-26 2023-03-10
PostGIS - could not find libproj 4 2019-10-11 2023-03-23
Collect metrics from otel components 0 2022-05-13 2023-02-20
Finding New Stewards 25 2018-04-11 2023-02-18
Learning Mode Templates: Avoid using CSS 0 2022-10-28 2022-11-12
Observability News Feed Outdated 1 2023-01-31 2023-03-18