Skip to content

Commit

Permalink
Switches to filename argument
Browse files Browse the repository at this point in the history
  • Loading branch information
tomnomnom committed Jun 2, 2016
1 parent 71fe44f commit 965c87f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Binary file added gron
Binary file not shown.
15 changes: 14 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@ package main

import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"regexp"
)

const (
exitOK = iota
exitInvalidArgs
)

func main() {
filename := "test-input.json"
flag.Parse()

filename := flag.Arg(0)
if filename == "" {
os.Exit(exitInvalidArgs)
}

raw, err := ioutil.ReadFile(filename)
if err != nil {
todo(err)
Expand Down
File renamed without changes.

0 comments on commit 965c87f

Please sign in to comment.