Fixing chromedp-gen flag parameters and updating README.md
This commit is contained in:
parent
6eec61e7df
commit
98a04266f9
|
@ -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
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user