custom_path

package
v0.0.0-alpha.0...-306d899 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package custom_path sets the working directory to the directory containing the program and returns an optional custom path defined on the command line.

code derived from:

https://www.kaihag.com/external-assets-working-directories-and-go/

When using a Docker container for example you could point the asset path to a persistent directory so that your files survive a restart.

Usage

Specify a custom path to the asset files. This needs to be an absolute path.

Example: -custom-path C:/testdata

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(fileName string) string

func Join receives a filename string and joins it to the defined custom path in accordance with the os.

Example: 	fpath := custom_path.Join("test.tst")

Types

This section is empty.

Jump to

Keyboard shortcuts

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