From 7477fa519fc86a80aeafdfab2562edc9ed1448b7 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 3 Aug 2016 00:18:07 -0700 Subject: [PATCH] config: config: Consistent Markdown/Go wording for 'annotations' I've replaced the old OPTIONAL with our usual: (, ) 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 --- config.md | 2 +- specs-go/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.md b/config.md index d6e8000e3..8d2d746d3 100644 --- a/config.md +++ b/config.md @@ -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. diff --git a/specs-go/config.go b/specs-go/config.go index f4c6b28fc..3b5eeda41 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -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.