genFigSpec

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 4 Imported by: 6

README

Fig // Cobra CLI

This Go package is Fig's integration with popular CLI framework Cobra.

See Fig's docs for how to integrate: https://fig.io/docs/guides/autocomplete-for-teams/cobra

Contributors

This integration was built by Ethan Orlander. Please see his repo for the original docs, git history, and additional customization information: https://github.com/EthanOrlander/genFigSpec.

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

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

This section is empty.

Functions

func NewCmdGenFigSpec

func NewCmdGenFigSpec(options ...Opts) *cobra.Command

Types

type Arg

type Arg struct {
	// contains filtered or unexported fields
}

func (*Arg) ToTypescript

func (arg *Arg) ToTypescript() string

type Args

type Args []Arg

func (*Args) ToTypescript

func (args *Args) ToTypescript() string

type BaseSuggestion

type BaseSuggestion struct {
	// contains filtered or unexported fields
}

type Names

type Names []string

func (*Names) ToTypescript

func (names *Names) ToTypescript() string

type Option

type Option struct {
	*BaseSuggestion
	// contains filtered or unexported fields
}

func (*Option) ToTypescript

func (option *Option) ToTypescript() string

type Options

type Options []Option

func (*Options) ToTypescript

func (options *Options) ToTypescript() string

type Opts

type Opts struct {
	Use     string
	Short   string
	Visible bool
	Long    string
	// contains filtered or unexported fields
}

type Spec

type Spec struct {
	*Subcommand
	// contains filtered or unexported fields
}

func MakeFigSpec

func MakeFigSpec(root *cobra.Command) Spec

func (*Spec) ToTypescript

func (spec *Spec) ToTypescript() string

type Subcommand

type Subcommand struct {
	*BaseSuggestion
	// contains filtered or unexported fields
}

func (*Subcommand) ToTypescript

func (subcommand *Subcommand) ToTypescript() string

type Subcommands

type Subcommands []Subcommand

func (*Subcommands) ToTypescript

func (subcommands *Subcommands) ToTypescript() string

type Suggestion

type Suggestion struct {
	*BaseSuggestion
	// contains filtered or unexported fields
}

type SuggestionType

type SuggestionType int
const (
	FOLDER SuggestionType = iota
	FILE
	ARG
	SUBCOMMAND
	OPTION
	SPECIAL
	SHORTCUT
)

type Template

type Template int
const (
	FOLDERS Template = iota
	FILEPATHS
)

Jump to

Keyboard shortcuts

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