Browse Source

only support stdin for input

master
Alexander Avery 2 months ago
parent
commit
c509e783a1
  1. 16
      odl.go

16
odl.go

@ -2,7 +2,6 @@ package main
import ( import (
"bufio" "bufio"
"flag"
"fmt" "fmt"
"io" "io"
"log" "log"
@ -14,20 +13,7 @@ import (
) )
func main() { func main() {
flag.Parse() Download(Read(".", os.Stdin))
var err error
f := os.Stdin
filename := flag.Arg(0)
if filename != "-" && filename != "" {
f, err = os.Open(filename)
if err != nil {
log.Fatalf("failed to open file %s: %v", filename, err)
}
}
Download(Read(".", f))
} }
type request struct { type request struct {

Loading…
Cancel
Save