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.
Index ¶
- func GetDirectory(args []string) (string, error)
- func PackageTriple(c *cobra.Command, args []string) error
- func PackageTripleActiveHelp(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective)
- func SingleDirectory(c *cobra.Command, args []string) error
- func SingleDirectoryActiveHelp(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDirectory ¶
GetDirectory computes the absolute path from the input arguments.
When no argument has been specified, it return the current working directory.
func PackageTriple ¶
PackageTriple validates that the arguments are a triple package, version, and shasum.
It checks that there's a package name as first arguments, at least. It checks that there are no more that 3 arguments. It accepts a single version or versions constraints as the second argument, in which case the third one is ignored.
func PackageTripleActiveHelp ¶
func PackageTripleActiveHelp(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective)
PackageTripleActiveHelp generates the active help for a triple package, version (or version constraint), and shasumxs.
func SingleDirectory ¶
SingleDirectory validates the input arguments is a single directory.
It checks that there is maximum one argument. It checks that the argument is an existing directory, too.
func SingleDirectoryActiveHelp ¶
func SingleDirectoryActiveHelp(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective)
SingleDirectoryActiveHelp generates the active help for a single directory.
Types ¶
This section is empty.