Help us shape the future of Go! Take the 2026 Go Developer Survey

initcmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spec

type Spec struct {
	Format      string   `long:"format" description:"the format for the spec document" default:"yaml" choice:"yaml" choice:"json"` //nolint:staticcheck
	Title       string   `long:"title" description:"the title of the API"`
	Description string   `long:"description" description:"the description of the API"`
	Version     string   `long:"version" description:"the version of the API" default:"0.1.0"`
	Terms       string   `long:"terms" description:"the terms of services"`
	Consumes    []string `long:"consumes" description:"add a content type to the global consumes definitions, can repeat" default:"application/json"`
	Produces    []string `long:"produces" description:"add a content type to the global produces definitions, can repeat" default:"application/json"`
	Schemes     []string `long:"scheme" description:"add a scheme to the global schemes definition, can repeat" default:"http"`
	Contact     struct {
		Name  string `long:"contact.name" description:"name of the primary contact for the API"`
		URL   string `long:"contact.url" description:"url of the primary contact for the API"`
		Email string `long:"contact.email" description:"email of the primary contact for the API"`
	}
	License struct {
		Name string `long:"license.name" description:"name of the license for the API"`
		URL  string `long:"license.url" description:"url of the license for the API"`
	}
}

Spec a command struct for initializing a new swagger application.

func (*Spec) Execute

func (s *Spec) Execute(args []string) error

Execute this command

Jump to

Keyboard shortcuts

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