fileresource

package
v0.0.0-...-10d6984 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFromResource

func ReadFromResource(r string) (string, error)

ReadFromResource reads a file from different sources at the moment suppoted resources are http, http, local file system(POSIX)

Example
file, err := ReadFromResource("http://raw.githubusercontent.com/mariomazo/test-files/master/test")
if err != nil {
	fmt.Println(err)
	return
}
fmt.Printf("%s", file)
Output:

test

Types

This section is empty.

Jump to

Keyboard shortcuts

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