tempo

package module
v0.0.0-...-968c996 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: MIT Imports: 4 Imported by: 0

README

Tempo

Get a random temporary file or directory path

Build Status Coverage Status GoDoc Go Report Card

Install

go get github.com/m1ome/tempo

Usage

package main

import (
    "fmt"

    "github.com/m1ome/tempo"
)

func main() {
    fmt.Printf("Tempo directory: %s\n", tempo.Dir())
    fmt.Printf("Tempo file: %s\n", tempo.File(".png"))
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir return & create random tmp directory (chmod 0777)

In e.g.: f := Dir()

Will return: /private/var/folders/3x/jf5977zase79drglr7rk0tq4d00000gn/T/4f502b9eds5ba0e89451617bf9f971bb

func File

func File(extension string) string

File return file name that lays in /tmp OS directory

In e.g.: f := File(".png")

Will return: /private/var/folders/3x/jf5977zase79drglr7rk0tq4d00000gn/T/4f502b9eds5ba0e89451617bf9f971bb.png

Types

This section is empty.

Jump to

Keyboard shortcuts

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