fixing filename, and a file not getting deleted

This commit is contained in:
Elliott Pardee 2015-06-07 04:06:48 -04:00
parent 8213cf927a
commit ff1db80023
2 changed files with 0 additions and 27 deletions

27
bin.go
View File

@ -1,27 +0,0 @@
package main
import (
"os"
"io/ioutil"
"fmt"
)
func processFile(filename string) {
file, err := ioutil.ReadFile(filename)
if err != nil {
panic(err)
}
typeprint(string(file))
}
func main() {
args := os.Args[1:]
if len(args) == 1 {
processFile(args[0])
} else {
fmt.Println("needs a file to process")
}
}