cli

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKittyCADClient

func NewKittyCADClient(cfg configGetter, hostname string) (*kittycad.Client, error)

NewKittyCADClient returns an API client for kittycad.io only that borrows from but does not depend on user configuration. TODO: if they are in debug mode, we should set debug mode in the client library.

Types

type Browser

type Browser interface {
	Browse(string) error
}

Browser represents the browser that kittycad will use to open links.

func NewBrowser

func NewBrowser(launcher string, stdout, stderr io.Writer) Browser

NewBrowser creates a new Browser instance.

type CLI

type CLI struct {
	IOStreams *iostreams.IOStreams
	Browser   Browser

	Context context.Context

	KittyCADClient func(string) (*kittycad.Client, error)
	Config         func() (config.Config, error)

	// Executable is the path to the currently invoked kittycad binary
	Executable func() string
}

CLI is the main type for the kittycad command line interface.

func New

func New(ctx context.Context) *CLI

New returns a new CLI instance.

Jump to

Keyboard shortcuts

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