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 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 InKey contextKey = "in"
InKey is the key indexing the options/flags for the in subcommand.
var LongVersionKey contextKey = "version_long"
LongVersionKey is the key storing the long version.
var ShortVersionKey contextKey = "version_short"
ShortVersionKey is the key storing the short version.
var ToKey contextKey = "to"
ToKey is the key indexing the options/flags for the in subcommand.
Functions ¶
func GetOptionsFromContext ¶
GetOptionsFromContext 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.