Skip to content

Commit

Permalink
Merge pull request #78 from alblue/master
Browse files Browse the repository at this point in the history
Allow running as ungron to perform --ungron automatically
  • Loading branch information
tomnomnom authored Nov 6, 2020
2 parents 602235e + 33df164 commit 7e958f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"io"
"os"
"sort"
"strings"

"github.com/fatih/color"
"github.com/mattn/go-colorable"
Expand Down Expand Up @@ -119,6 +120,11 @@ func main() {
os.Exit(exitOK)
}

// If executed as 'ungron' set the --ungron flag
if strings.HasSuffix(os.Args[0], "ungron") {
ungronFlag = true
}

// Determine what the program's input should be:
// file, HTTP URL or stdin
var rawInput io.Reader
Expand Down

0 comments on commit 7e958f8

Please sign in to comment.