Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryPath ¶
func BinaryPath() string
BinaryPath returns path of docker binary directory.
Example ¶
package main import ( "fmt" "github.com/k-kinzal/aliases/pkg/aliases/context" ) func main() { if err := context.ChangeHomePath("/tmp"); err != nil { panic(err) } fmt.Println(context.BinaryPath()) }
Output: /tmp/docker
func ChangeConfPath ¶
ChangeConfPath changes configuration file path for aliases.
func ChangeExportPath ¶
ChangeExportPath changes export directory path for aliases.
func ChangeHomePath ¶
ChangeHomePath changes home directory path for aliases.
func ConfPath ¶
func ConfPath() string
ConfPath returns path of configuration file.
Example ¶
package main import ( "fmt" "os" "github.com/k-kinzal/aliases/pkg/aliases/context" ) func main() { file, err := os.Create("/tmp/aliases.yaml") if err != nil { panic(err) } defer file.Close() if err := context.ChangeConfPath(file.Name()); err != nil { panic(err) } fmt.Println(context.ConfPath()) }
Output: /tmp/aliases.yaml
func ExportPath ¶
func ExportPath() string
ConfPath returns path of export directory.
Example ¶
package main import ( "fmt" "github.com/k-kinzal/aliases/pkg/aliases/context" ) func main() { if err := context.ChangeExportPath("/tmp/export"); err != nil { panic(err) } fmt.Println(context.ExportPath()) }
Output: /tmp/export
func HomePath ¶
func HomePath() string
HomePath returns home directory path for aliases.
Example ¶
package main import ( "fmt" "github.com/k-kinzal/aliases/pkg/aliases/context" ) func main() { if err := context.ChangeHomePath("/tmp"); err != nil { panic(err) } fmt.Println(context.HomePath()) }
Output: /tmp
func TemporaryPath ¶ added in v0.5.0
func TemporaryPath() string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.