Skip to content

Commit

Permalink
config: config: Consistent Markdown/Go wording for 'annotations'
Browse files Browse the repository at this point in the history
I've replaced the old OPTIONAL with our usual:

  (<type>, <optional|required>)

to get the property name first, since that translates more directly
into a Go comment that godoc will like.

The new Go comment is much shorter, dropping "unstructured" (because
the Markdown says "structured or unstructured") and "set by external
tools..." (because *everything* in the configuration JSON is set by
external-to-the-runtime tools).

Signed-off-by: W. Trevor King <wking@tremily.us>
  • Loading branch information
wking committed Aug 3, 2016
1 parent 9837b6b commit 7477fa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://g

## Annotations

This OPTIONAL property contains arbitrary metadata for the container.
**`annotations`** (object, optional) contains arbitrary metadata for the container.
This information MAY be structured or unstructured.
Annotations are key-value maps.

Expand Down
2 changes: 1 addition & 1 deletion specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Spec struct {
Mounts []Mount `json:"mounts,omitempty"`
// Hooks configures callbacks for container lifecycle events.
Hooks Hooks `json:"hooks"`
// Annotations is an unstructured key value map that may be set by external tools to store and retrieve arbitrary metadata.
// Annotations contains arbitrary metadata for the container.
Annotations map[string]string `json:"annotations,omitempty"`

// Linux is platform specific configuration for Linux based containers.
Expand Down

0 comments on commit 7477fa5

Please sign in to comment.