pathing

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pathing determines where to put the Packer config directory based on host OS architecture and user environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

ConfigDir returns the configuration directory for Packer.

func ConfigFile

func ConfigFile() (string, error)

ConfigFile returns the default path to the configuration file. On Unix-like systems this is the ".packerconfig" file in the home directory. On Windows, this is the "packer.config" file in the application data directory.

func ExpandUser

func ExpandUser(path string) (string, error)

Given a path, check to see if it's using ~ to reference a user directory. If so, then replace that component with the requested user directory. In "~/", "~" gets replaced by current user's home dir. In "~root/", "~user" gets replaced by root's home dir. ~ has to be the first character of path for ExpandUser change it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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