homeplate

package module
v0.0.0-...-8fb1b98 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2015 License: MPL-2.0 Imports: 5 Imported by: 2

README

GoDoc Build Status

homeplate

Make ~/.yourapp in golang

There's surprisingly little support to create ~/.yourapp configuration directories; homeplate is the utility lib for working with those directories and saving configuration files into them easily.

Documentation

Overview

Package homeplate provides utilities for dealing with ~/.dirname (hidden configuration directories).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(dirname string) error

Create creates ~/.dirname

func Exists

func Exists(path string) bool

Exists returns true or false based on the existance of the ~/.dirname directory

func ExpandTilde

func ExpandTilde(basename string) string

ExpandTilde assumes that it was passed in basename (~/.basename) and needs to expand it (e.g. /Users/fb3/.basename )

func Save

func Save(dirname string, configFilename, config interface{}, overwrite bool) error

Save will save the json marshal output of config into the file named ~/.dirname/configFilename.json If overwrite is false, and the file exists, an error will be returned

Types

This section is empty.

Jump to

Keyboard shortcuts

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