package main

import (
	"flag"
	"fmt"
	"github.com/holizz/greyhound"
	"log"
	"net/http"
	"time"
)

func main() {
	port := flag.Int("p", 3000, "port number to listen on")
	dir := flag.String("d", ".", "directory to serve")
	timeout := flag.Duration("t", time.Second * 5, "timeout in milliseconds")
	flag.Parse()

	phpHandler, err := greyhound.NewPhpHandler(*dir, *timeout, []string{})
	if err != nil {
		log.Fatalln(err)
	}

	http.Handle("/", phpHandler)

	fmt.Printf("Listening on :%d\n", *port)
	log.Fatalln(http.ListenAndServe(fmt.Sprintf(":%d", *port), nil))
}

package main

import (
	"flag"
	"fmt"
	"github.com/holizz/greyhound"
	"log"
	"net/http"
	"time"
)

type stringslice []string

func (s *stringslice) String() string {
	return "a"
}

func (s *stringslice) Set(in string) (err error) {
	*s = append(*s, in)
	return
}

func main() {
	ignore := stringslice([]string{})
	port := flag.Int("p", 3000, "port number to listen on")
	dir := flag.String("d", ".", "directory to serve")
	timeout := flag.Duration("t", time.Second * 5, "timeout in milliseconds")
	flag.Var(&ignore, "i", "ignore errors matching this string")
	flag.Parse()

	phpHandler, err := greyhound.NewPhpHandler(*dir, *timeout, ignore)
	if err != nil {
		log.Fatalln(err)
	}

	http.Handle("/", phpHandler)

	fmt.Printf("Listening on :%d\n", *port)
	log.Fatalln(http.ListenAndServe(fmt.Sprintf(":%d", *port), nil))
}

Add -i option for ignoring errors to cli tool
Add -i option for ignoring errors to cli tool
