Commit a0fe802
committed
generate: Move Generator.spec to Generator.Config
This makes the attribute public, since quite a few config
manipulations are easier using Go's types than they are via
getter/setter/mutator methods. This also means that we can drop
methods that are more awkward than direct access (although we'll want
to keep methods that are more convenient than direct access). I
haven't done any method-dropping in this commit though, aside from the
getter/setter for the config itself. I'd called for this back when we
started adding these methods [1], and Mrunal was sounding more
positive about the public-attribute approach a few weeks ago [2].
I've also renamed this from "spec" to "config", because it is a
config. I'm not sure why runtime-spec decided to call the main
config.go type 'Spec' [3], but I don't think we should repeat that
idiosyncrasy.
[1]: #137 (comment)
[2]: #253 (comment)
[3]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/specs-go/config.go#L6
Signed-off-by: W. Trevor King <[email protected]>1 parent 303b751 commit a0fe802
File tree
4 files changed
+334
-346
lines changed- cmd/oci-runtime-tool
- generate
4 files changed
+334
-346
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 139 | + | |
142 | 140 | | |
143 | 141 | | |
144 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
0 commit comments