config

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 7 Imported by: 0 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

View Source
const (
	// ConfigFileName is the name of config file
	ConfigFileName = "config.json"
	// ConfigFileDir is the default folder where the config file is stored
	ConfigFileDir = ".docker"
	// ConfigFlagName is the name of the config flag
	ConfigFlagName = "config"
)

Variables

This section is empty.

Functions

func Dir

func Dir(ctx context.Context) string

Dir returns the config directory path

func WithDir

func WithDir(ctx context.Context, path string) context.Context

WithDir sets the config directory path in the context

func WriteCurrentContext

func WriteCurrentContext(dir string, name string) error

WriteCurrentContext writes the selected current context to the Docker configuration file. Note, the validity of the context is not checked.

Types

type File

type File struct {
	CurrentContext string `json:"currentContext,omitempty"`
}

File contains the current context from the docker configuration file

func LoadFile

func LoadFile(dir string) (*File, error)

LoadFile loads the docker configuration

Jump to

Keyboard shortcuts

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