func (c *Gcd) AddEnvironmentVars(vars []string) {
	c.env = append(c.env, vars...)
}
AddEnvironmentVars for the chrome process, useful for Xvfb etc.
package gcd
import (
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"os/exec"
	"time"
	"github.com/wirepair/gcd/gcdapi"
)
var GCDVERSION = "v1.0.2"
var (
	ErrNoTabAvailable = errors.New("no available tab found")
)
type GcdBodyReadErr struct {
	Message string
}
func (g *GcdBodyReadErr) Error() string {
	return "error reading response body: " + g.Message
}
type GcdDecodingErr struct {
	Message string
}
func (g *GcdDecodingErr) Error() string {
	return "error decoding inspectable page: " + g.Message
}
type TerminatedHandler func(reason string)
type Gcd struct {
	timeout           time.Duration  
	chromeProcess     *os.Process
	chromeCmd         *exec.Cmd
	terminatedHandler TerminatedHandler
	port              string
	host              string
	addr              string
	profileDir        string
	deleteProfile     bool
	readyCh           chan struct{}
	apiEndpoint       string
	flags             []string
	env               []string
	chomeApiVersion   string
}
func NewChromeDebugger() *Gcd {
	c := &Gcd{}
	c.timeout = 15
	c.host = "localhost"
	c.readyCh = make(chan struct{})
	c.terminatedHandler = nil
	c.flags = make([]string, 0)
	c.env = make([]string, 0)
	return c
}
func (c *Gcd) SetTerminationHandler(handler TerminatedHandler) {
	c.terminatedHandler = handler
}
func (c *Gcd) SetTimeout(timeout time.Duration) {
	c.timeout = timeout
}
func (c *Gcd) AddFlags(flags []string) {
	c.flags = append(c.flags, flags...)
}