fileresource

package
v0.0.0-...-7bcb550 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2017 License: Apache-2.0 Imports: 8 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