paths

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2016 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

	// XDGConfigHome will contain $XDG_CONFIG_HOME if it exists.
	XDGConfigHome 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. 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.

func Recalculate

func Recalculate()

Recalculate sets exercism paths based on Home.

Types

This section is empty.

Jump to

Keyboard shortcuts

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