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. Please see the [examples](examples/) directory for examples.
## TODO ## TODO
* Unit tests / coverage: travis-ci + coveralls integration
* Move timeouts to context (defaults) * Move timeouts to context (defaults)
* Implement more query selector options (allow over riding context timeouts) * Implement more query selector options (allow over riding context timeouts)
* Contextual actions for "dry run" (or via an accumulator?) * Contextual actions for "dry run" (or via an accumulator?)
* Network loader / manager * Network loader / manager
* More examples
* Profiler * Profiler
* Unit tests / coverage: travis-ci + coveralls integration

View File

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

View File

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