Fixing chromedp-gen flag parameters and updating README.md

This commit is contained in:
Kenneth Shaw 2017-02-09 13:04:50 +07:00
parent 6eec61e7df
commit 98a04266f9
3 changed files with 7 additions and 5 deletions

View File

@ -99,10 +99,9 @@ func googleSearch(q, text string, site, res *string) cdp.Tasks {
Please see the [examples](examples/) directory for examples.
## TODO
* Unit tests / coverage: travis-ci + coveralls integration
* Move timeouts to context (defaults)
* Implement more query selector options (allow over riding context timeouts)
* Contextual actions for "dry run" (or via an accumulator?)
* Network loader / manager
* More examples
* Profiler
* Unit tests / coverage: travis-ci + coveralls integration

View File

@ -1,9 +1,12 @@
package internal
import "flag"
import (
"flag"
"os"
)
// FlagSet is the set of application flags.
var FlagSet = &flag.FlagSet{}
var FlagSet = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
// The application flags.
var (

View File

@ -23,7 +23,7 @@ func main() {
var err error
// parse flags
err = internal.FlagSet.Parse(os.Args)
err = internal.FlagSet.Parse(os.Args[1:])
if err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1)