paths

package
v2.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// File is the default name of the JSON file where the config written.
	// The user can pass an alternate filename when using the CLI.
	File = "exercism.json"
	// DirExercises is the default name of the directory for active users.
	// Make this non-exported when handlers.Login is deleted.
	DirExercises = "exercism"
)

Variables

View Source
var (
	// Home by default will contact the location of your home directory.
	Home string
	// ConfigHome will contain $XDG_CONFIG_HOME if it is set or default config home directory.
	ConfigHome string
	// DefaultConfig will contain default path to config, according to Home
	DefaultConfig string
)

Functions

func Config

func Config(path string) string

Config will return the correct input path given any input. Blank input will return the default configuration location based on ConfigHome. Non-blank input will expand home to be an absolute path. If the target is known to be a directory, the config filename will be appended.

func Exercises

func Exercises(path string) string

Exercises will return the correct exercises path given any input. Blank input will return the default location for exercises. Non-blank input will expand home to be an absolute path.

func IsDir

func IsDir(path string) bool

IsDir determines whether the given path is a valid directory path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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