summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉrico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>2020-07-27 04:13:55 -0300
committerGitHub <noreply@github.com>2020-07-27 09:13:55 +0200
commit84f5382eda69e206c49bfaa777b3c1445f3a3a96 (patch)
treef36821e31aa9f813fa279c736127a4e10db27db3
parent92825166e0bb1bf9498dee5ddaf27b5c0cf2e5ac (diff)
Move to Go modules (#338)
* interfacer: Move to Go modules. * interfacer/contrib: remove dep usage. No longer needed due to the move to Go modules. * Move src/main.go to cmd/browsh/main.go. Allows installation with `go install ./cmd/browsh`, no need to specify output. * interfacer/src/browsh/firefox: fix browsh.xpi path * setup_linux_build_env: clean up and update. - Remove references to dep and GOPATH - Use code blocks for commands - Update for new build instructions
-rw-r--r--contrib/setup_linux_build_environment.md172
-rw-r--r--interfacer/Gopkg.lock349
-rw-r--r--interfacer/Gopkg.toml78
-rw-r--r--interfacer/cmd/browsh/main.go7
-rwxr-xr-xinterfacer/contrib/build_browsh.sh12
-rwxr-xr-xinterfacer/contrib/setup_dep.sh15
-rw-r--r--interfacer/go.mod34
-rw-r--r--interfacer/go.sum176
-rw-r--r--interfacer/src/browsh/firefox.go2
-rw-r--r--interfacer/src/main.go7
-rw-r--r--interfacer/test/http-server/setup.go2
-rw-r--r--interfacer/test/tty/setup.go2
12 files changed, 308 insertions, 548 deletions
diff --git a/contrib/setup_linux_build_environment.md b/contrib/setup_linux_build_environment.md
index 2ba119b..429357f 100644
--- a/contrib/setup_linux_build_environment.md
+++ b/contrib/setup_linux_build_environment.md
@@ -1,14 +1,18 @@
# How to setup the build environment for browsh on a generic Linux system
This guide was made for x86-64 based Linux systems. You may try to adapt it to other systems.
-In this guide it is assumed that you can't install the required go, nodejs and firefox versions from your distribution's repositories. In case this shouldn't be correct, you should try to install go, nodejs and firefox using the package manager of your distribution.
+In this guide, it is assumed that you can't install the required go, nodejs and firefox versions from your distribution's repositories.
+In case they are available, you should try to install go, nodejs and firefox using your distribution's package manager.
## Installing golang
Get the latest amd64 binary for Linux on the [golang download page](https://golang.org/dl/).
Extract to `/usr/local` with:
-> tar -C /usr/local -xzf go1.11.linux-amd64.tar.gz
+
+```
+$ tar -C /usr/local -xzf go1.11.linux-amd64.tar.gz
+```
Add `/usr/local/go/bin` to your `PATH` in `~/.profile`
@@ -16,131 +20,127 @@ Add `/usr/local/go/bin` to your `PATH` in `~/.profile`
Go to the [nodejs download page](https://nodejs.org/download) and select the LTS version of the Linux x86 64bit binaries.
-> mkdir /usr/local/lib/nodejs
-
-> VERSION=v8.11.4
-
-> DISTRO=linux-x64
-
-> tar -xJvf node-$VERSION-$DISTRO.tar.xz -C /usr/local/lib/nodejs
-
-> mv /usr/local/lib/nodejs/node-$VERSION-$DISTRO /usr/local/lib/nodejs/node-$VERSION
+```
+$ mkdir /usr/local/lib/nodejs
+$ VERSION=v8.11.4
+$ DISTRO=linux-x64
+$ tar -xJvf node-$VERSION-$DISTRO.tar.xz -C /usr/local/lib/nodejs
+$ mv /usr/local/lib/nodejs/node-$VERSION-$DISTRO /usr/local/lib/nodejs/node-$VERSION
+```
-Edit your `~/.profile` and add `/usr/local/lib/nodejs/node-v8.11.4/bin` to your `PATH`.
+Edit your `~/.profile` to add `/usr/local/lib/nodejs/node-v8.11.4/bin` to your `PATH`, then reload your profile:
-Reload your profile:
-> source ~/.profile
+```
+$ source ~/.profile
+```
Create symlinks for *node* and *npm*:
-> sudo ln -s /usr/local/lib/nodejs/node-$VERSION/bin/node /usr/bin/node
-> sudo ln -s /usr/local/lib/nodejs/node-$VERSION/bin/npm /usr/bin/npm
+```
+$ sudo ln -s /usr/local/lib/nodejs/node-$VERSION/bin/node /usr/local/bin/node
+$ sudo ln -s /usr/local/lib/nodejs/node-$VERSION/bin/npm /usr/local/bin/npm
+```
Now you should be able to call the *go* and *node* binaries:
-> go --version
-> node --version
+```
+$ go --version
+$ node --version
+```
-## Setting up GOPATH
-Add these two lines to the end of your *bash* profile in ~/.profile:
-> GOPATH=$HOME/go/
-
-> PATH="$PATH:$GOPATH/bin"
-
-Reload your profile:
-> source ~/.profile
-
-Make sure the path `GOPATH/bin` exists with:
-> mkdir -p $GOPATH/bin
+## Installing webpack and webpack-cli
-## Installing dep (dependency manager for go)
-See script in `browsh/interfacer/contrib/setup_dep.sh` for reference.
+(`--no-audit` is used to get around errors, may not be needed)
-Get the latest amd64 linux binary of *dep* at [https://github.com/golang/dep/releases/](https://github.com/golang/dep/releases/)
+```
+$ npm install -g --no-audit webpack
+$ npm install -g webpack-cli
+```
-Move the binary to `GOPATH/bin/dep` and make sure `GOPATH/bin` exists with `mkdir -p $GOPATH/bin`
-> chmod +x $GOPATH/bin/dep
+## Installing web-ext
-## Installing webpack and webpack-cli
-(--no-audit is used to get around errors, may not be needed)
-> npm install -g --no-audit webpack
+(`--no-audit` is used to get around errors, may not be needed)
-> npm install -g webpack-cli
+```
+$ npm install -g --ignore-scripts web-ext
+```
-## Installing web-ext
-(--ignore-scripts is used to get around errors, may not be needed)
-> npm install -g --ignore-scripts web-ext
+## Installing Firefox
-## Installing firefox
You may install *firefox* from your distribution's repositories. **Version 57 or higher is required.**
### Installing firefox from mozilla's binaries
-See `interfacer/contrib/setup_firefox.sh` for reference.
-
-> export FIREFOX_VERSION=60.0
-
-> mkdir -p $HOME/bin
-
-> pushd $HOME/bin
-
-> curl -L -o firefox.tar.bz2 https://ftp.mozilla.org/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2
-
-> bzip2 -d firefox.tar.bz2
-> tar xf firefox.tar
+See `interfacer/contrib/setup_firefox.sh` for reference.
-> popd
+```
+$ export FIREFOX_VERSION=60.0
+$ mkdir -p $HOME/bin
+$ pushd $HOME/bin
+$ curl -L -o firefox.tar.bz2 https://ftp.mozilla.org/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2
+$ bzip2 -d firefox.tar.bz2
+$ tar xf firefox.tar
+$ popd
+```
## Cloning the browsh repository
+
It's assumed that you already have *git* installed.
-Ensure `GOPATH/src` exists with:
-> mkdir -p "$GOPATH/src"
+Run this anywhere you want:
-Run this in `GOPATH/src`:
-> git clone https://github.com/browsh-org/browsh.git
+```
+$ git clone https://github.com/browsh-org/browsh.git
+```
## Setting up the build environment in the cloned repository
### Setting up dependencies
-> REPO_ROOT=$GOPATH/src/browsh
-
-> cd $REPO_ROOT/interfacer && dep ensure
-
-> cd $REPO_ROOT/webext
-
-(source ~/.nvm/nvm.sh)
-
-> npm run get-gobindata
-
-> npm install
-
-> npm run build
-
-> diff -u <(echo -n) <(gofmt -d ./)
-
-> ./node_modules/.bin/prettier --list-different "{src,test}/**/*.js"
-
+```
+$ REPO_ROOT=/path/to/browsh
+$ cd $REPO_ROOT/webext
+$ source ~/.nvm/nvm.sh # this is optional
+$ npm run get-gobindata
+$ npm install
+$ npm run build
+$ diff -u <(echo -n) <(gofmt -d ./)
+$ ./node_modules/.bin/prettier --list-different "{src,test}/**/*.js"
+```
### Building browsh
-> cd $REPO_ROOT/interfacer
-
-> go build -o browsh src/main.go
+```
+$ cd $REPO_ROOT/interfacer
+$ go build -o browsh src/main.go
+```
### Building the web extension
-In `REPO_ROOT/webext`:
-> webpack --watch
+In `$REPO_ROOT/webext`:
+
+```
+$ webpack --watch
+```
This will continuously watch for changes made to the web extension and rebuild it.
## Run firefox and the webextension
-In `REPO_ROOT/webext/dist`:
-> web-ext run --verbose --firefox path/to/firefox
+
+In `$REPO_ROOT/webext/dist`:
+
+```
+$ web-ext run --verbose --firefox path/to/firefox
+```
## Run browsh
-> go run ./interfacer/src/main.go --firefox.use-existing --debug
+
+```
+$ cd $REPO_ROOT/interfacer
+$ go run ./cmd/browsh --firefox.use-existing --debug
+```
Or after building:
-> ./browsh --firefox.use-existing --debug
+
+```
+$ ./browsh --firefox.use-existing --debug
+```
diff --git a/interfacer/Gopkg.lock b/interfacer/Gopkg.lock
deleted file mode 100644
index bbe7ce9..0000000
--- a/interfacer/Gopkg.lock
+++ /dev/null
@@ -1,349 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
- digest = "1:af6e785bedb62fc2abb81977c58a7a44e5cf9f7e41b8d3c8dd4d872edea0ce08"
- name = "github.com/NYTimes/gziphandler"
- packages = ["."]
- pruneopts = "UT"
- revision = "dd0439581c7657cb652dfe5c71d7d48baf39541d"
- version = "v1.1.1"
-
-[[projects]]
- digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd"
- name = "github.com/fsnotify/fsnotify"
- packages = ["."]
- pruneopts = "UT"
- revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
- version = "v1.4.7"
-
-[[projects]]
- digest = "1:0e16b03c72bd42739ca68d055c10369e60d17838428f512f3b29ae115ba788e0"
- name = "github.com/gdamore/encoding"
- packages = ["."]
- pruneopts = "UT"
- revision = "6289cdc94c00ac4aa177771c5fce7af2f96b626d"
- version = "v1.0.0"
-
-[[projects]]
- digest = "1:939e23f904cb50168a21dc38ca60b432a0e57482bed803fdae94223821dcad59"
- name = "github.com/gdamore/tcell"
- packages = [
- ".",
- "terminfo",
- ]
- pruneopts = "UT"
- revision = "b5d0c1ac570211e469f43ff88c0c6aa4b56cc99a"
- version = "v1.1.2"
-
-[[projects]]
- digest = "1:aacef5f5e45685f2aeda5534d0a750dee6859de7e9088cdd06192787bb01ae6d"
- name = "github.com/go-errors/errors"
- packages = ["."]
- pruneopts = "UT"
- revision = "a6af135bd4e28680facf08a3d206b454abc877a4"
- version = "v1.0.1"
-
-[[projects]]
- digest = "1:7b5c6e2eeaa9ae5907c391a91c132abfd5c9e8a784a341b5625e750c67e6825d"
- name = "github.com/gorilla/websocket"
- packages = ["."]
- pruneopts = "UT"
- revision = "66b9c49e59c6c48f0ffce28c2d8b8a5678502c6d"
- version = "v1.4.0"
-
-[[projects]]
- digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10"
- name = "github.com/hashicorp/hcl"
- packages = [
- ".",
- "hcl/ast",
- "hcl/parser",
- "hcl/printer",
- "hcl/scanner",
- "hcl/strconv",
- "hcl/token",
- "json/parser",
- "json/scanner",
- "json/token",
- ]
- pruneopts = "UT"
- revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241"
- version = "v1.0.0"
-
-[[projects]]
- digest = "1:a1038ef593beb4771c8f0f9c26e8b00410acd800af5c6864651d9bf160ea1813"
- name = "github.com/hpcloud/tail"
- packages = [
- ".",
- "ratelimiter",
- "util",
- "watch",
- "winfile",
- ]
- pruneopts = "UT"
- revision = "a30252cb686a21eb2d0b98132633053ec2f7f1e5"
- version = "v1.0.0"
-
-[[projects]]
- digest = "1:39de67207027b7374272d5ec9b1bf85457714150ba1263e8d236316629dad570"
- name = "github.com/lucasb-eyer/go-colorful"
- packages = ["."]
- pruneopts = "UT"
- revision = "30298f24079860c4dee452fdef6519b362a4a026"
- version = "v1.0.2"
-
-[[projects]]
- digest = "1:5a0ef768465592efca0412f7e838cdc0826712f8447e70e6ccc52eb441e9ab13"
- name = "github.com/magiconair/properties"
- packages = ["."]
- pruneopts = "UT"
- revision = "de8848e004dd33dc07a2947b3d76f618a7fc7ef1"
- version = "v1.8.1"
-
-[[projects]]
- digest = "1:0356f3312c9bd1cbeda81505b7fd437501d8e778ab66998ef69f00d7f9b3a0d7"
- name = "github.com/mattn/go-runewidth"
- packages = ["."]
- pruneopts = "UT"
- revision = "3ee7d812e62a0804a7d0a324e0249ca2db3476d3"
- version = "v0.0.4"
-
-[[projects]]
- digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318"
- name = "github.com/mitchellh/mapstructure"
- packages = ["."]
- pruneopts = "UT"
- revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe"
- version = "v1.1.2"
-
-[[projects]]
- digest = "1:e9c3bb68a6c9470302b8046d4647e0612a2ea6037b9c6a47de60c0a90db504f8"
- name = "github.com/onsi/ginkgo"
- packages = [
- ".",
- "config",
- "internal/codelocation",
- "internal/containernode",
- "internal/failer",
- "internal/leafnodes",
- "internal/remote",
- "internal/spec",
- "internal/spec_iterator",
- "internal/specrunner",
- "internal/suite",
- "internal/testingtproxy",
- "internal/writer",
- "reporters",
- "reporters/stenographer",
- "reporters/stenographer/support/go-colorable",
- "reporters/stenographer/support/go-isatty",
- "types",
- ]
- pruneopts = "UT"
- revision = "eea6ad008b96acdaa524f5b409513bf062b500ad"
- version = "v1.8.0"
-
-[[projects]]
- digest = "1:fe167e8f858cbfc10c721f2000f2446140800bb53fa83c088e03d191275611a4"
- name = "github.com/onsi/gomega"
- packages = [
- ".",
- "format",
- "internal/assertion",
- "internal/asyncassertion",
- "internal/oraclematcher",
- "internal/testingtsupport",
- "matchers",
- "matchers/support/goraph/bipartitegraph",
- "matchers/support/goraph/edge",
- "matchers/support/goraph/node",
- "matchers/support/goraph/util",
- "types",
- ]
- pruneopts = "UT"
- revision = "90e289841c1ed79b7a598a7cd9959750cb5e89e2"
- version = "v1.5.0"
-
-[[projects]]
- digest = "1:93131d8002d7025da13582877c32d1fc302486775a1b06f62241741006428c5e"
- name = "github.com/pelletier/go-toml"
- packages = ["."]
- pruneopts = "UT"
- revision = "728039f679cbcd4f6a54e080d2219a4c4928c546"
- version = "v1.4.0"
-
-[[projects]]
- digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b"
- name = "github.com/pkg/errors"
- packages = ["."]
- pruneopts = "UT"
- revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4"
- version = "v0.8.1"
-
-[[projects]]
- branch = "master"
- digest = "1:8209ed8bf2336848aa760c11e809f93ba96fffa64d3c2948e970a362a46e534b"
- name = "github.com/shibukawa/configdir"
- packages = ["."]
- pruneopts = "UT"
- revision = "e180dbdc8da04c4fa04272e875ce64949f38bd3e"
-
-[[projects]]
- digest = "1:bb495ec276ab82d3dd08504bbc0594a65de8c3b22c6f2aaa92d05b73fbf3a82e"
- name = "github.com/spf13/afero"
- packages = [
- ".",
- "mem",
- ]
- pruneopts = "UT"
- revision = "588a75ec4f32903aa5e39a2619ba6a4631e28424"
- version = "v1.2.2"
-
-[[projects]]
- digest = "1:08d65904057412fc0270fc4812a1c90c594186819243160dc779a402d4b6d0bc"
- name = "github.com/spf13/cast"
- packages = ["."]
- pruneopts = "UT"
- revision = "8c9545af88b134710ab1cd196795e7f2388358d7"
- version = "v1.3.0"
-
-[[projects]]
- digest = "1:1b753ec16506f5864d26a28b43703c58831255059644351bbcb019b843950900"
- name = "github.com/spf13/jwalterweatherman"
- packages = ["."]
- pruneopts = "UT"
- revision = "94f6ae3ed3bceceafa716478c5fbf8d29ca601a1"
- version = "v1.1.0"
-
-[[projects]]
- digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2"
- name = "github.com/spf13/pflag"
- packages = ["."]
- pruneopts = "UT"
- revision = "298182f68c66c05229eb03ac171abe6e309ee79a"
- version = "v1.0.3"
-
-[[projects]]
- digest = "1:11118bd196646c6515fea3d6c43f66162833c6ae4939bfb229b9956d91c6cf17"
- name = "github.com/spf13/viper"
- packages = ["."]
- pruneopts = "UT"
- revision = "b5bf975e5823809fb22c7644d008757f78a4259e"
- version = "v1.4.0"
-
-[[projects]]
- digest = "1:46b32b8bb81eff9edd36937c2f7e486221fd3f93f17045385971f966e697f971"
- name = "github.com/ulule/limiter"
- packages = [
- ".",
- "drivers/middleware/stdlib",
- "drivers/store/common",
- "drivers/store/memory",
- ]
- pruneopts = "UT"
- revision = "38b2a440be905c8be884fd5e114dc893a64e5d81"
- version = "v2.2.2"
-
-[[projects]]
- branch = "master"
- digest = "1:a167b5c532f3245f5a147ade26185f16d6ee8f8d3f6c9846f447e9d8b9705505"
- name = "golang.org/x/net"
- packages = [
- "html",
- "html/atom",
- "html/charset",
- ]
- pruneopts = "UT"
- revision = "461777fb6f67e8cb9d70cda16573678d085a74cf"
-
-[[projects]]
- branch = "master"
- digest = "1:c394fdf391c9a2bee21cef33d4004a93995fe8503ae5e68dbc1d2bdfed8f3071"
- name = "golang.org/x/sys"
- packages = [
- "unix",
- "windows",
- "windows/registry",
- ]
- pruneopts = "UT"
- revision = "93c9922d18aeb82498a065f07aec7ad7fa60dfb7"
-
-[[projects]]
- digest = "1:7570a3e4daa14b7627089e77ad8c714f5f36b4cf1b7dfd8510df7d6935dc42a0"
- name = "golang.org/x/text"
- packages = [
- "encoding",
- "encoding/charmap",
- "encoding/htmlindex",
- "encoding/internal",
- "encoding/internal/identifier",
- "encoding/japanese",
- "encoding/korean",
- "encoding/simplifiedchinese",
- "encoding/traditionalchinese",
- "encoding/unicode",
- "internal/gen",
- "internal/language",
- "internal/language/compact",
- "internal/tag",
- "internal/triegen",
- "internal/ucd",
- "internal/utf8internal",
- "language",
- "runes",
- "transform",
- "unicode/cldr",
- "unicode/norm",
- ]
- pruneopts = "UT"
- revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475"
- version = "v0.3.2"
-
-[[projects]]
- digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd"
- name = "gopkg.in/fsnotify.v1"
- packages = ["."]
- pruneopts = "UT"
- revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
- source = "https://github.com/fsnotify/fsnotify/archive/v1.4.7.tar.gz"
- version = "v1.4.7"
-
-[[projects]]
- branch = "v1"
- digest = "1:0caa92e17bc0b65a98c63e5bc76a9e844cd5e56493f8fdbb28fad101a16254d9"
- name = "gopkg.in/tomb.v1"
- packages = ["."]
- pruneopts = "UT"
- revision = "dd632973f1e7218eb1089048e0798ec9ae7dceb8"
-
-[[projects]]
- digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96"
- name = "gopkg.in/yaml.v2"
- packages = ["."]
- pruneopts = "UT"
- revision = "51d6538a90f86fe93ac480b35f37b2be17fef232"
- version = "v2.2.2"
-
-[solve-meta]
- analyzer-name = "dep"
- analyzer-version = 1
- input-imports = [
- "github.com/NYTimes/gziphandler",
- "github.com/gdamore/tcell",
- "github.com/gdamore/tcell/terminfo",
- "github.com/go-errors/errors",
- "github.com/gorilla/websocket",
- "github.com/onsi/ginkgo",
- "github.com/onsi/gomega",
- "github.com/onsi/gomega/types",
- "github.com/shibukawa/configdir",
- "github.com/spf13/pflag",
- "github.com/spf13/viper",
- "github.com/ulule/limiter",
- "github.com/ulule/limiter/drivers/middleware/stdlib",
- "github.com/ulule/limiter/drivers/store/memory",
- "golang.org/x/sys/windows/registry",
- ]
- solver-name = "gps-cdcl"
- solver-version = 1
diff --git a/interfacer/Gopkg.toml b/interfacer/Gopkg.toml
deleted file mode 100644
index e024676..0000000
--- a/interfacer/Gopkg.toml
+++ /dev/null
@@ -1,78 +0,0 @@
-# Gopkg.toml example
-#
-# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
-# for detailed Gopkg.toml documentation.
-#
-# required = ["github.com/user/thing/cmd/thing"]
-# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
-#
-# [[constraint]]
-# name = "github.com/user/project"
-# version = "1.0.0"
-#
-# [[constraint]]
-# name = "github.com/user/project2"
-# branch = "dev"
-# source = "github.com/myfork/project2"
-#
-# [[override]]
-# name = "github.com/x/y"
-# version = "2.4.0"
-#
-# [prune]
-# non-go = false
-# go-tests = true
-# unused-packages = true
-
-
-[[constraint]]
- name = "github.com/NYTimes/gziphandler"
- version = "1.0.1"
-
-[[constraint]]
- name = "github.com/gdamore/tcell"
- version = "1.1.0"
-
-[[constraint]]
- name = "github.com/go-errors/errors"
- version = "1.0.1"
-
-[[constraint]]
- name = "github.com/gorilla/websocket"
- version = "1.4.0"
-
-[[constraint]]
- name = "github.com/onsi/ginkgo"
- version = "1.6.0"
-
-[[constraint]]
- name = "github.com/onsi/gomega"
- version = "1.4.2"
-
-[[constraint]]
- branch = "master"
- name = "github.com/shibukawa/configdir"
-
-[[constraint]]
- name = "github.com/spf13/pflag"
- version = "1.0.3"
-
-[[constraint]]
- name = "github.com/spf13/viper"
- version = "1.2.1"
-
-[[constraint]]
- name = "github.com/ulule/limiter"
- version = "2.2.1"
-
-[[constraint]]
- branch = "master"
- name = "golang.org/x/sys"
-
-[[override]]
- source = "https://github.com/fsnotify/fsnotify/archive/v1.4.7.tar.gz"
- name = "gopkg.in/fsnotify.v1"
-
-[prune]
- go-tests = true
- unused-packages = true
diff --git a/interfacer/cmd/browsh/main.go b/interfacer/cmd/browsh/main.go
new file mode 100644
index 0000000..c6693f4
--- /dev/null
+++ b/interfacer/cmd/browsh/main.go
@@ -0,0 +1,7 @@
+package main
+
+import "github.com/browsh-org/browsh/interfacer/src/browsh"
+
+func main() {
+ browsh.MainEntry()
+}
diff --git a/interfacer/contrib/build_browsh.sh b/interfacer/contrib/build_browsh.sh
index bef9633..387a602 100755
--- a/interfacer/contrib/build_browsh.sh
+++ b/interfacer/contrib/build_browsh.sh
@@ -4,26 +4,18 @@
# To build Browsh during development see:
# https://github.com/browsh-org/browsh#contributing
-# This script depends on Golang, dep and go-bindata
-# See; ./setup_dep.sh for an example `dep` installation
+# This script depends on Golang, go-bindata and curl
# `go-bindata` can be easily installed with:
# `go get -u gopkg.in/shuLhan/go-bindata.v3/...`
-# `dep esnure` must be run in `interfacer/`
set -e
INTERFACER_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && cd ../ && pwd )"
cd $INTERFACER_ROOT
-# Install `dep` the current defacto dependency manager for Golang
-./contrib/setup_dep.sh
-
# Install the tool to convert the web extenstion file into a Go-compatible binary
go get -u gopkg.in/shuLhan/go-bindata.v3/...
-# Install Golang dependencies
-dep ensure
-
# Get the current Browsh version, in order to find the corresponding web extension release
version_file=$INTERFACER_ROOT/src/browsh/version.go
line=$(grep 'browshVersion' < $version_file)
@@ -45,4 +37,4 @@ XPI_FILE=$xpi_file BIN_FILE=$destination \
$INTERFACER_ROOT/contrib/xpi2bin.sh
# The actual build iteself
-go build -o browsh src/main.go
+go build ./cmd/browsh
diff --git a/interfacer/contrib/setup_dep.sh b/interfacer/contrib/setup_dep.sh
deleted file mode 100755
index 568f639..0000000
--- a/interfacer/contrib/setup_dep.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-# Install `dep` the current defacto dependency for Golang
-GOLANG_DEP_VERSION=0.5.0
-dep_url=https://github.com/golang/dep/releases/download/v$GOLANG_DEP_VERSION/dep-linux-amd64
-
-if [ -z $GOPATH ]; then
- echo '$GOPATH is not set, aborting'
- exit 1
-fi
-
-curl -L -o $GOPATH/bin/dep $dep_url
-chmod +x $GOPATH/bin/dep
-
diff --git a/interfacer/go.mod b/interfacer/go.mod
new file mode 100644
index 0000000..0c92241
--- /dev/null
+++ b/interfacer/go.mod
@@ -0,0 +1,34 @@
+module github.com/browsh-org/browsh/interfacer
+
+go 1.14
+
+require (
+ github.com/NYTimes/gziphandler v1.1.1
+ github.com/fsnotify/fsnotify v1.4.7
+ github.com/gdamore/encoding v1.0.0
+ github.com/gdamore/tcell v1.1.2
+ github.com/go-errors/errors v1.0.1
+ github.com/gorilla/websocket v1.4.0
+ github.com/hashicorp/hcl v1.0.0
+ github.com/hpcloud/tail v1.0.0
+ github.com/lucasb-eyer/go-colorful v1.0.2
+ github.com/magiconair/properties v1.8.1
+ github.com/mattn/go-runewidth v0.0.4
+ github.com/mitchellh/mapstructure v1.1.2
+ github.com/onsi/ginkgo v1.8.0
+ github.com/onsi/gomega v1.5.0
+ github.com/pelletier/go-toml v1.4.0
+ github.com/pkg/errors v0.8.1
+ github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0
+ github.com/spf13/afero v1.2.2
+ github.com/spf13/cast v1.3.0
+ github.com/spf13/jwalterweatherman v1.1.0
+ github.com/spf13/pflag v1.0.3
+ github.com/spf13/viper v1.4.0
+ github.com/ulule/limiter v2.2.2+incompatible
+ golang.org/x/net v0.0.0-20190607181551-461777fb6f67
+ golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae
+ golang.org/x/text v0.3.2
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
+ gopkg.in/yaml.v2 v2.2.2
+)
diff --git a/interfacer/go.sum b/interfacer/go.sum
new file mode 100644
index 0000000..b1fe86f
--- /dev/null
+++ b/interfacer/go.sum
@@ -0,0 +1,176 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
+github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
+github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
+github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
+github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
+github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
+github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
+github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
+github.com/gdamore/tcell v1.1.2 h1:Afe8cU6SECC06UmvaJ55Jr3Eh0tz/ywLjqWYqjGZp3s=
+github.com/gdamore/tcell v1.1.2/go.mod h1:h3kq4HO9l2On+V9ed8w8ewqQEmGCSSHOgQ+2h8uzurE=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
+github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
+github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
+github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/lucasb-eyer/go-colorful v1.0.2 h1:mCMFu6PgSozg9tDNMMK3g18oJBX7oYGrC09mS6CXfO4=
+github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s=
+github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
+github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
+github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
+github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w=
+github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo=
+github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/pelletier/go-toml v1.4.0 h1:u3Z1r+oOXJIkxqw34zVhyPgjBsm6X2wn21NWs/HfSeg=
+github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
+github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
+github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
+github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0 h1:Xuk8ma/ibJ1fOy4Ee11vHhUFHQNpHhrBneOCNHVXS5w=
+github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0/go.mod h1:7AwjWCpdPhkSmNAgUv5C7EJ4AbmjEB3r047r3DXWu3Y=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
+github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
+github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
+github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
+github.com/spf13/cast v1.3.0/go.mo