cmd

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Copyright © 2021 pe.container <pe.container@trendyol.com>

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

View Source
var (
	// Output of "git describe". The prerequisite is that the branch should be
	// tagged using the correct versioning strategy.
	GitVersion = "devel"
)

Base version information.

This is the fallback data used when version information from git is not provided via go ldflags (e.g. via Makefile).

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func NewCmdDelete

func NewCmdDelete() *cobra.Command

NewCmdDelete represents the delete command

func NewCmdList

func NewCmdList() *cobra.Command

NewCmdList represents the list command

func NewCmdLoad

func NewCmdLoad() *cobra.Command

NewCmdLoad represents the load command

func NewCmdRun

func NewCmdRun() *cobra.Command

NewCmdRun represents the run command

func NewCmdVersion

func NewCmdVersion() *cobra.Command

func NewCompletionCmd

func NewCompletionCmd() *cobra.Command

NewCompletionCmd represents the completion command

func NewListSupportedVersionsCmd

func NewListSupportedVersionsCmd() *cobra.Command

NewListSupportedVersionsCmd represents the listSupportedVersions command

func TempDir

func TempDir(dir, prefix string) (name string, err error)

TempDir is like ioutil.TempDir, but more docker friendly

func WriteFile

func WriteFile(path string, data []byte, perm os.FileMode) error

Types

type Info

type Info struct {
	GitVersion   string
	GitCommit    string
	GitTreeState string
	BuildDate    string
	GoVersion    string
	Compiler     string
	Platform     string
}

func VersionInfo

func VersionInfo() Info

func (*Info) JSONString

func (i *Info) JSONString() (string, error)

JSONString returns the JSON representation of the version info

func (*Info) String

func (i *Info) String() string

String returns the string representation of the version info

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL