Documentation ¶
Overview ¶
SPDX-License-Identifier: Apache-2.0
Copyright © 2023 The listen.dev team <engineering@garnet.ai>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright © 2023 The listen.dev team <engineering@garnet.ai>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright © 2023 The listen.dev team <engineering@garnet.ai>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CiKey contextKey = "ci"
CiKey is the key indexing the options for the `ci` child command.
var ConfigKey contextKey = "cfg"
ConfigKey is the key indexing the configuration options in the contexts.
var ContextCancelFuncKey contextKey = "ctxcancel"
ContextCancelFuncKey is the key indexing the context cancelation function in the context itself.
var IOStreamsKey contextKey = "iostreams"
IOStreamsKey is the key storing the IOStreams (stdout, stderr, stdin).
var InKey contextKey = "in"
InKey is the key indexing the options for the `in` child command.
var ScanKey contextKey = "scan"
ScanKey is the key indexing the options for the `scan` child command.
var ToKey contextKey = "to"
ToKey is the key indexing the options for the `to` child command.
var VersionKey contextKey = "version"
VersionKey is the key indexing the options for the `version` child command.
var VersionLongKey contextKey = "version_long"
VersionLongKey is the key storing the long version.
var VersionShortKey contextKey = "version_short"
VersionShortKey is the key storing the short version.
var VersionTagKey contextKey = "version_tag"
VersionTagKey is the key storing the tag part of the version.
var VersionsCollection contextKey = "versionscollection"
VersionsCollection is the key indexing a versions collection.
Functions ¶
func GetOptionsFromContext ¶
GetFromContext returns a Options instance.
It also validates and transforms the Options instance it obtained.
It errors out if the context key does not refer an Options instance or f the validation and trasformation process errored out.
Types ¶
This section is empty.