argf

package module
v0.0.0-...-3ff699b Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2015 License: MIT Imports: 2 Imported by: 30

README

argf

ARGF for Golang

Usage

Use all arguments as file
import "github.com/yuya-takeyama/argf"

func main() {
	reader, err := argf.Argf()
}
With library like "flag"
import (
	"flag"
	"github.com/yuya-takeyama/argf"
)

func main() {
	var displayHelp = flag.Bool("h", false, "display help")
	flag.Parse()

	reader, err := argf.From(flag.Args())
}

Author

Yuya Takeyama

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Argf

func Argf() (io.Reader, error)

Argf returns io.Reader from STDIN or files from command-line arguments.

If the files are multiple, they are concatinated as one io.Reader.

func From

func From(filenames []string) (io.Reader, error)

From returns io.Reader from STDIN or files from function argument.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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