From 04d216dcc53a2900b3bf3a016d9cb1828697f5c2 Mon Sep 17 00:00:00 2001 From: Adam Babik Date: Wed, 21 Feb 2018 15:37:46 +0100 Subject: [PATCH] Remove non-go option (#682) --- Gopkg.toml | 3 +- .../github.com/NaySoftware/go-fcm/README.md | 193 -- .../beorn7/perks/quantile/exampledata.txt | 2388 ----------------- .../github.com/btcsuite/btcd/btcec/README.md | 74 - .../btcsuite/btcd/chaincfg/README.md | 87 - .../btcd/chaincfg/chainhash/README.md | 42 - .../github.com/btcsuite/btcd/wire/README.md | 114 - vendor/github.com/btcsuite/btcutil/.gitignore | 28 - .../github.com/btcsuite/btcutil/.travis.yml | 15 - vendor/github.com/btcsuite/btcutil/README.md | 53 - .../btcsuite/btcutil/base58/README.md | 40 - .../btcsuite/btcutil/base58/cov_report.sh | 17 - .../github.com/btcsuite/btcutil/cov_report.sh | 17 - vendor/github.com/btcsuite/btcutil/goclean.sh | 48 - .../btcsuite/btcutil/test_coverage.txt | 72 - vendor/github.com/edsrzf/mmap-go/.gitignore | 8 - vendor/github.com/edsrzf/mmap-go/README.md | 12 - .../go-playground/locales/.gitignore | 24 - .../go-playground/locales/README.md | 172 -- .../github.com/go-playground/locales/logo.png | Bin 37360 -> 0 bytes .../universal-translator/.gitignore | 24 - .../universal-translator/README.md | 90 - .../universal-translator/logo.png | Bin 16598 -> 0 bytes vendor/github.com/go-stack/stack/.travis.yml | 16 - vendor/github.com/go-stack/stack/README.md | 38 - .../github.com/golang/protobuf/proto/Makefile | 43 - .../protoc-gen-go/descriptor/Makefile | 36 - vendor/github.com/golang/snappy/.gitignore | 16 - vendor/github.com/golang/snappy/README | 107 - .../hashicorp/golang-lru/.gitignore | 23 - .../github.com/hashicorp/golang-lru/README.md | 25 - vendor/github.com/huin/goupnp/.gitignore | 1 - vendor/github.com/huin/goupnp/README.md | 44 - .../github.com/jackpal/go-nat-pmp/.travis.yml | 13 - .../github.com/jackpal/go-nat-pmp/README.md | 52 - .../github.com/mattn/go-colorable/.travis.yml | 8 - .../github.com/mattn/go-colorable/README.md | 43 - vendor/github.com/mattn/go-isatty/.travis.yml | 8 - vendor/github.com/mattn/go-isatty/README.md | 47 - vendor/github.com/pborman/uuid/.travis.yml | 9 - .../github.com/pborman/uuid/CONTRIBUTING.md | 10 - vendor/github.com/pborman/uuid/README.md | 13 - .../client_golang/prometheus/.gitignore | 1 - .../client_golang/prometheus/README.md | 1 - .../bitbucket.org/ww/goautoneg/README.txt | 67 - .../github.com/prometheus/procfs/.travis.yml | 9 - .../prometheus/procfs/CONTRIBUTING.md | 18 - .../prometheus/procfs/MAINTAINERS.md | 1 - vendor/github.com/prometheus/procfs/Makefile | 18 - vendor/github.com/prometheus/procfs/README.md | 11 - vendor/github.com/prometheus/procfs/ttar | 264 -- .../github.com/rcrowley/go-metrics/.gitignore | 9 - .../rcrowley/go-metrics/.travis.yml | 14 - .../github.com/rcrowley/go-metrics/README.md | 153 -- .../github.com/rcrowley/go-metrics/memory.md | 285 -- .../rcrowley/go-metrics/validate.sh | 10 - vendor/github.com/rjeczalik/notify/.gitignore | 92 - .../github.com/rjeczalik/notify/.travis.yml | 28 - vendor/github.com/rjeczalik/notify/README.md | 21 - .../github.com/rjeczalik/notify/appveyor.yml | 23 - .../github.com/robertkrimen/otto/.gitignore | 5 - .../robertkrimen/otto/DESIGN.markdown | 1 - vendor/github.com/robertkrimen/otto/Makefile | 63 - .../robertkrimen/otto/README.markdown | 871 ------ .../robertkrimen/otto/ast/README.markdown | 1068 -------- .../robertkrimen/otto/file/README.markdown | 110 - vendor/github.com/robertkrimen/otto/inline.pl | 1086 -------- .../robertkrimen/otto/parser/Makefile | 4 - .../robertkrimen/otto/parser/README.markdown | 190 -- .../otto/registry/README.markdown | 51 - .../robertkrimen/otto/token/Makefile | 2 - .../robertkrimen/otto/token/README.markdown | 171 -- .../robertkrimen/otto/token/tokenfmt | 222 -- vendor/github.com/rs/cors/.travis.yml | 4 - vendor/github.com/rs/cors/README.md | 99 - vendor/github.com/rs/xhandler/.travis.yml | 7 - vendor/github.com/rs/xhandler/README.md | 134 - .../testify/assert/assertion_format.go.tmpl | 4 - .../testify/assert/assertion_forward.go.tmpl | 4 - .../stretchr/testify/require/require.go.tmpl | 6 - .../testify/require/require_forward.go.tmpl | 4 - .../vishvananda/netlink/.travis.yml | 13 - .../github.com/vishvananda/netlink/Makefile | 30 - .../github.com/vishvananda/netlink/README.md | 92 - vendor/github.com/vishvananda/netns/README.md | 51 - vendor/golang.org/x/sys/unix/.gitignore | 2 - vendor/golang.org/x/sys/unix/README.md | 173 -- vendor/golang.org/x/sys/unix/mkall.sh | 188 -- vendor/golang.org/x/sys/unix/mkerrors.sh | 580 ---- vendor/golang.org/x/sys/unix/mksyscall.pl | 340 --- .../x/sys/unix/mksyscall_solaris.pl | 289 -- .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 264 -- .../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 - .../x/sys/unix/mksysnum_dragonfly.pl | 50 - .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 50 - .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 - .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 - vendor/golang.org/x/text/language/Makefile | 16 - vendor/gopkg.in/fatih/set.v0/.travis.yml | 3 - vendor/gopkg.in/fatih/set.v0/README.md | 245 -- .../go-playground/validator.v9/.gitignore | 29 - .../go-playground/validator.v9/README.md | 149 - .../go-playground/validator.v9/logo.png | Bin 13443 -> 0 bytes vendor/gopkg.in/natefinch/npipe.v2/.gitignore | 22 - vendor/gopkg.in/natefinch/npipe.v2/README.md | 308 --- vendor/gopkg.in/sourcemap.v1/.travis.yml | 16 - vendor/gopkg.in/sourcemap.v1/Makefile | 4 - vendor/gopkg.in/sourcemap.v1/README.md | 35 - vendor/gopkg.in/urfave/cli.v1/.flake8 | 2 - vendor/gopkg.in/urfave/cli.v1/.gitignore | 2 - vendor/gopkg.in/urfave/cli.v1/.travis.yml | 27 - vendor/gopkg.in/urfave/cli.v1/CHANGELOG.md | 435 --- vendor/gopkg.in/urfave/cli.v1/README.md | 1381 ---------- vendor/gopkg.in/urfave/cli.v1/appveyor.yml | 26 - vendor/gopkg.in/urfave/cli.v1/flag-types.json | 93 - .../urfave/cli.v1/generate-flag-types | 255 -- vendor/gopkg.in/urfave/cli.v1/runtests | 122 - 117 files changed, 2 insertions(+), 14641 deletions(-) delete mode 100644 vendor/github.com/NaySoftware/go-fcm/README.md delete mode 100644 vendor/github.com/beorn7/perks/quantile/exampledata.txt delete mode 100644 vendor/github.com/btcsuite/btcd/btcec/README.md delete mode 100644 vendor/github.com/btcsuite/btcd/chaincfg/README.md delete mode 100644 vendor/github.com/btcsuite/btcd/chaincfg/chainhash/README.md delete mode 100644 vendor/github.com/btcsuite/btcd/wire/README.md delete mode 100644 vendor/github.com/btcsuite/btcutil/.gitignore delete mode 100644 vendor/github.com/btcsuite/btcutil/.travis.yml delete mode 100644 vendor/github.com/btcsuite/btcutil/README.md delete mode 100644 vendor/github.com/btcsuite/btcutil/base58/README.md delete mode 100644 vendor/github.com/btcsuite/btcutil/base58/cov_report.sh delete mode 100644 vendor/github.com/btcsuite/btcutil/cov_report.sh delete mode 100755 vendor/github.com/btcsuite/btcutil/goclean.sh delete mode 100644 vendor/github.com/btcsuite/btcutil/test_coverage.txt delete mode 100644 vendor/github.com/edsrzf/mmap-go/.gitignore delete mode 100644 vendor/github.com/edsrzf/mmap-go/README.md delete mode 100644 vendor/github.com/go-playground/locales/.gitignore delete mode 100644 vendor/github.com/go-playground/locales/README.md delete mode 100644 vendor/github.com/go-playground/locales/logo.png delete mode 100644 vendor/github.com/go-playground/universal-translator/.gitignore delete mode 100644 vendor/github.com/go-playground/universal-translator/README.md delete mode 100644 vendor/github.com/go-playground/universal-translator/logo.png delete mode 100644 vendor/github.com/go-stack/stack/.travis.yml delete mode 100644 vendor/github.com/go-stack/stack/README.md delete mode 100644 vendor/github.com/golang/protobuf/proto/Makefile delete mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile delete mode 100644 vendor/github.com/golang/snappy/.gitignore delete mode 100644 vendor/github.com/golang/snappy/README delete mode 100644 vendor/github.com/hashicorp/golang-lru/.gitignore delete mode 100644 vendor/github.com/hashicorp/golang-lru/README.md delete mode 100644 vendor/github.com/huin/goupnp/.gitignore delete mode 100644 vendor/github.com/huin/goupnp/README.md delete mode 100644 vendor/github.com/jackpal/go-nat-pmp/.travis.yml delete mode 100644 vendor/github.com/jackpal/go-nat-pmp/README.md delete mode 100644 vendor/github.com/mattn/go-colorable/.travis.yml delete mode 100644 vendor/github.com/mattn/go-colorable/README.md delete mode 100644 vendor/github.com/mattn/go-isatty/.travis.yml delete mode 100644 vendor/github.com/mattn/go-isatty/README.md delete mode 100644 vendor/github.com/pborman/uuid/.travis.yml delete mode 100644 vendor/github.com/pborman/uuid/CONTRIBUTING.md delete mode 100644 vendor/github.com/pborman/uuid/README.md delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/.gitignore delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/README.md delete mode 100644 vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt delete mode 100644 vendor/github.com/prometheus/procfs/.travis.yml delete mode 100644 vendor/github.com/prometheus/procfs/CONTRIBUTING.md delete mode 100644 vendor/github.com/prometheus/procfs/MAINTAINERS.md delete mode 100644 vendor/github.com/prometheus/procfs/Makefile delete mode 100644 vendor/github.com/prometheus/procfs/README.md delete mode 100755 vendor/github.com/prometheus/procfs/ttar delete mode 100644 vendor/github.com/rcrowley/go-metrics/.gitignore delete mode 100644 vendor/github.com/rcrowley/go-metrics/.travis.yml delete mode 100644 vendor/github.com/rcrowley/go-metrics/README.md delete mode 100644 vendor/github.com/rcrowley/go-metrics/memory.md delete mode 100755 vendor/github.com/rcrowley/go-metrics/validate.sh delete mode 100644 vendor/github.com/rjeczalik/notify/.gitignore delete mode 100644 vendor/github.com/rjeczalik/notify/.travis.yml delete mode 100644 vendor/github.com/rjeczalik/notify/README.md delete mode 100644 vendor/github.com/rjeczalik/notify/appveyor.yml delete mode 100644 vendor/github.com/robertkrimen/otto/.gitignore delete mode 100644 vendor/github.com/robertkrimen/otto/DESIGN.markdown delete mode 100644 vendor/github.com/robertkrimen/otto/Makefile delete mode 100644 vendor/github.com/robertkrimen/otto/README.markdown delete mode 100644 vendor/github.com/robertkrimen/otto/ast/README.markdown delete mode 100644 vendor/github.com/robertkrimen/otto/file/README.markdown delete mode 100755 vendor/github.com/robertkrimen/otto/inline.pl delete mode 100644 vendor/github.com/robertkrimen/otto/parser/Makefile delete mode 100644 vendor/github.com/robertkrimen/otto/parser/README.markdown delete mode 100644 vendor/github.com/robertkrimen/otto/registry/README.markdown delete mode 100644 vendor/github.com/robertkrimen/otto/token/Makefile delete mode 100644 vendor/github.com/robertkrimen/otto/token/README.markdown delete mode 100755 vendor/github.com/robertkrimen/otto/token/tokenfmt delete mode 100644 vendor/github.com/rs/cors/.travis.yml delete mode 100644 vendor/github.com/rs/cors/README.md delete mode 100644 vendor/github.com/rs/xhandler/.travis.yml delete mode 100644 vendor/github.com/rs/xhandler/README.md delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/require/require.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/require/require_forward.go.tmpl delete mode 100644 vendor/github.com/vishvananda/netlink/.travis.yml delete mode 100644 vendor/github.com/vishvananda/netlink/Makefile delete mode 100644 vendor/github.com/vishvananda/netlink/README.md delete mode 100644 vendor/github.com/vishvananda/netns/README.md delete mode 100644 vendor/golang.org/x/sys/unix/.gitignore delete mode 100644 vendor/golang.org/x/sys/unix/README.md delete mode 100755 vendor/golang.org/x/sys/unix/mkall.sh delete mode 100755 vendor/golang.org/x/sys/unix/mkerrors.sh delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl delete mode 100644 vendor/golang.org/x/text/language/Makefile delete mode 100644 vendor/gopkg.in/fatih/set.v0/.travis.yml delete mode 100644 vendor/gopkg.in/fatih/set.v0/README.md delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/.gitignore delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/README.md delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/logo.png delete mode 100644 vendor/gopkg.in/natefinch/npipe.v2/.gitignore delete mode 100644 vendor/gopkg.in/natefinch/npipe.v2/README.md delete mode 100644 vendor/gopkg.in/sourcemap.v1/.travis.yml delete mode 100644 vendor/gopkg.in/sourcemap.v1/Makefile delete mode 100644 vendor/gopkg.in/sourcemap.v1/README.md delete mode 100644 vendor/gopkg.in/urfave/cli.v1/.flake8 delete mode 100644 vendor/gopkg.in/urfave/cli.v1/.gitignore delete mode 100644 vendor/gopkg.in/urfave/cli.v1/.travis.yml delete mode 100644 vendor/gopkg.in/urfave/cli.v1/CHANGELOG.md delete mode 100644 vendor/gopkg.in/urfave/cli.v1/README.md delete mode 100644 vendor/gopkg.in/urfave/cli.v1/appveyor.yml delete mode 100644 vendor/gopkg.in/urfave/cli.v1/flag-types.json delete mode 100755 vendor/gopkg.in/urfave/cli.v1/generate-flag-types delete mode 100755 vendor/gopkg.in/urfave/cli.v1/runtests diff --git a/Gopkg.toml b/Gopkg.toml index 5cee1607e..87a487835 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -3,6 +3,7 @@ ignored = ["github.com/ethereum/go-ethereum/whisper/notifications"] [prune] unused-packages = true go-tests = true + non-go = true [[prune.project]] name = "github.com/karalabe/hid" @@ -11,8 +12,8 @@ ignored = ["github.com/ethereum/go-ethereum/whisper/notifications"] [[prune.project]] name = "github.com/ethereum/go-ethereum" - non-go = false unused-packages = false + non-go = false # * * * * * constrained `status-go` dependencies * * * * * # (for the full dependency list see `Gopkg.lock`) diff --git a/vendor/github.com/NaySoftware/go-fcm/README.md b/vendor/github.com/NaySoftware/go-fcm/README.md deleted file mode 100644 index 135ee53b9..000000000 --- a/vendor/github.com/NaySoftware/go-fcm/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# go-fcm : FCM Library for Go - -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=MYW4MY786JXFN&lc=GB&item_name=go%2dfcm%20development&item_number=go%2dfcm¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) -[![AUR](https://img.shields.io/aur/license/yaourt.svg?style=flat-square)](https://github.com/NaySoftware/go-fcm/blob/master/LICENSE) - -Firebase Cloud Messaging ( FCM ) Library using golang ( Go ) - -This library uses HTTP/JSON Firebase Cloud Messaging connection server protocol - - -###### Features - -* Send messages to a topic -* Send messages to a device list -* Message can be a notification or data payload -* Supports condition attribute (fcm only) -* Instace Id Features - - Get info about app Instance - - Subscribe app Instance to a topic - - Batch Subscribe/Unsubscribe to/from a topic - - Create registration tokens for APNs tokens - - - -## Usage - -``` -go get github.com/NaySoftware/go-fcm -``` - -## Docs - go-fcm API -``` -https://godoc.org/github.com/NaySoftware/go-fcm -``` - -#### Firebase Cloud Messaging HTTP Protocol Specs -``` -https://firebase.google.com/docs/cloud-messaging/http-server-ref -``` - -#### Firebase Cloud Messaging Developer docs -``` -https://firebase.google.com/docs/cloud-messaging/ -``` - -#### (Google) Instance Id Server Reference -``` -https://developers.google.com/instance-id/reference/server -``` -### Notes - - - - -> a note from firebase console - -``` -Firebase Cloud Messaging tokens have replaced server keys for -sending messages. While you may continue to use them, support -is being deprecated for server keys. -``` - - -###### Firebase Cloud Messaging token ( new token ) - -serverKey variable will also hold the new FCM token by Firebase Cloud Messaging - -Firebase Cloud Messaging token can be found in: - -1. Firebase project settings -2. Cloud Messaging -3. then copy the Firebase Cloud Messaging token - - -###### Server Key - -serverKey is the server key by Firebase Cloud Messaging - -Server Key can be found in: - -1. Firebase project settings -2. Cloud Messaging -3. then copy the server key - -[will be deprecated by firabase as mentioned above!] - -###### Retry mechanism - -Retry should be implemented based on the requirements. -Sending a request will result with a "FcmResponseStatus" struct, which holds -a detailed information based on the Firebase Response, with RetryAfter -(response header) if available - with a failed request. -its recommended to use a backoff time to retry the request - (if RetryAfter - header is not available). - - - - -# Examples - -### Send to A topic - -```go - -package main - -import ( - "fmt" - "github.com/NaySoftware/go-fcm" -) - -const ( - serverKey = "YOUR-KEY" - topic = "/topics/someTopic" -) - -func main() { - - data := map[string]string{ - "msg": "Hello World1", - "sum": "Happy Day", - } - - c := fcm.NewFcmClient(serverKey) - c.NewFcmMsgTo(topic, data) - - - status, err := c.Send() - - - if err == nil { - status.PrintResults() - } else { - fmt.Println(err) - } - -} - - -``` - - -### Send to a list of Devices (tokens) - -```go - -package main - -import ( - "fmt" - "github.com/NaySoftware/go-fcm" -) - -const ( - serverKey = "YOUR-KEY" -) - -func main() { - - data := map[string]string{ - "msg": "Hello World1", - "sum": "Happy Day", - } - - ids := []string{ - "token1", - } - - - xds := []string{ - "token5", - "token6", - "token7", - } - - c := fcm.NewFcmClient(serverKey) - c.NewFcmRegIdsMsg(ids, data) - c.AppendDevices(xds) - - status, err := c.Send() - - - if err == nil { - status.PrintResults() - } else { - fmt.Println(err) - } - -} - - - -``` diff --git a/vendor/github.com/beorn7/perks/quantile/exampledata.txt b/vendor/github.com/beorn7/perks/quantile/exampledata.txt deleted file mode 100644 index 1602287d7..000000000 --- a/vendor/github.com/beorn7/perks/quantile/exampledata.txt +++ /dev/null @@ -1,2388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-2 -4 diff --git a/vendor/github.com/btcsuite/btcd/btcec/README.md b/vendor/github.com/btcsuite/btcd/btcec/README.md deleted file mode 100644 index 5875dfc91..000000000 --- a/vendor/github.com/btcsuite/btcd/btcec/README.md +++ /dev/null @@ -1,74 +0,0 @@ -btcec -===== - -[![Build Status](https://travis-ci.org/btcsuite/btcd.png?branch=master)] -(https://travis-ci.org/btcsuite/btcec) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://godoc.org/github.com/btcsuite/btcd/btcec?status.png)] -(http://godoc.org/github.com/btcsuite/btcd/btcec) - -Package btcec implements elliptic curve cryptography needed for working with -Bitcoin (secp256k1 only for now). It is designed so that it may be used with the -standard crypto/ecdsa packages provided with go. A comprehensive suite of test -is provided to ensure proper functionality. Package btcec was originally based -on work from ThePiachu which is licensed under the same terms as Go, but it has -signficantly diverged since then. The btcsuite developers original is licensed -under the liberal ISC license. - -Although this package was primarily written for btcd, it has intentionally been -designed so it can be used as a standalone package for any projects needing to -use secp256k1 elliptic curve cryptography. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcd/btcec -``` - -## Examples - -* [Sign Message] - (http://godoc.org/github.com/btcsuite/btcd/btcec#example-package--SignMessage) - Demonstrates signing a message with a secp256k1 private key that is first - parsed form raw bytes and serializing the generated signature. - -* [Verify Signature] - (http://godoc.org/github.com/btcsuite/btcd/btcec#example-package--VerifySignature) - Demonstrates verifying a secp256k1 signature against a public key that is - first parsed from raw bytes. The signature is also parsed from raw bytes. - -* [Encryption] - (http://godoc.org/github.com/btcsuite/btcd/btcec#example-package--EncryptMessage) - Demonstrates encrypting a message for a public key that is first parsed from - raw bytes, then decrypting it using the corresponding private key. - -* [Decryption] - (http://godoc.org/github.com/btcsuite/btcd/btcec#example-package--DecryptMessage) - Demonstrates decrypting a message using a private key that is first parsed - from raw bytes. - -## GPG Verification Key - -All official release tags are signed by Conformal so users can ensure the code -has not been tampered with and is coming from the btcsuite developers. To -verify the signature perform the following: - -- Download the public key from the Conformal website at - https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt - -- Import the public key into your GPG keyring: - ```bash - gpg --import GIT-GPG-KEY-conformal.txt - ``` - -- Verify the release tag with the following command where `TAG_NAME` is a - placeholder for the specific tag: - ```bash - git tag -v TAG_NAME - ``` - -## License - -Package btcec is licensed under the [copyfree](http://copyfree.org) ISC License -except for btcec.go and btcec_test.go which is under the same license as Go. - diff --git a/vendor/github.com/btcsuite/btcd/chaincfg/README.md b/vendor/github.com/btcsuite/btcd/chaincfg/README.md deleted file mode 100644 index ae28c1681..000000000 --- a/vendor/github.com/btcsuite/btcd/chaincfg/README.md +++ /dev/null @@ -1,87 +0,0 @@ -chaincfg -======== - -[![Build Status](http://img.shields.io/travis/btcsuite/btcd.svg)] -(https://travis-ci.org/btcsuite/btcd) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] -(http://godoc.org/github.com/btcsuite/btcd/chaincfg) - -Package chaincfg defines chain configuration parameters for the three standard -Bitcoin networks and provides the ability for callers to define their own custom -Bitcoin networks. - -Although this package was primarily written for btcd, it has intentionally been -designed so it can be used as a standalone package for any projects needing to -use parameters for the standard Bitcoin networks or for projects needing to -define their own network. - -## Sample Use - -```Go -package main - -import ( - "flag" - "fmt" - "log" - - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcd/chaincfg" -) - -var testnet = flag.Bool("testnet", false, "operate on the testnet Bitcoin network") - -// By default (without -testnet), use mainnet. -var chainParams = &chaincfg.MainNetParams - -func main() { - flag.Parse() - - // Modify active network parameters if operating on testnet. - if *testnet { - chainParams = &chaincfg.TestNet3Params - } - - // later... - - // Create and print new payment address, specific to the active network. - pubKeyHash := make([]byte, 20) - addr, err := btcutil.NewAddressPubKeyHash(pubKeyHash, chainParams) - if err != nil { - log.Fatal(err) - } - fmt.Println(addr) -} -``` - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcd/chaincfg -``` - -## GPG Verification Key - -All official release tags are signed by Conformal so users can ensure the code -has not been tampered with and is coming from the btcsuite developers. To -verify the signature perform the following: - -- Download the public key from the Conformal website at - https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt - -- Import the public key into your GPG keyring: - ```bash - gpg --import GIT-GPG-KEY-conformal.txt - ``` - -- Verify the release tag with the following command where `TAG_NAME` is a - placeholder for the specific tag: - ```bash - git tag -v TAG_NAME - ``` - -## License - -Package chaincfg is licensed under the [copyfree](http://copyfree.org) ISC -License. diff --git a/vendor/github.com/btcsuite/btcd/chaincfg/chainhash/README.md b/vendor/github.com/btcsuite/btcd/chaincfg/chainhash/README.md deleted file mode 100644 index ab1e8d3cc..000000000 --- a/vendor/github.com/btcsuite/btcd/chaincfg/chainhash/README.md +++ /dev/null @@ -1,42 +0,0 @@ -chainhash -========= - -[![Build Status](http://img.shields.io/travis/btcsuite/btcd.svg)] -(https://travis-ci.org/btcsuite/btcd) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] -(http://godoc.org/github.com/btcsuite/btcd/chaincfg/chainhash) - -chainhash provides a generic hash type and associated functions that allows the -specific hash algorithm to be abstracted. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcd/chaincfg/chainhash -``` - -## GPG Verification Key - -All official release tags are signed by Conformal so users can ensure the code -has not been tampered with and is coming from the btcsuite developers. To -verify the signature perform the following: - -- Download the public key from the Conformal website at - https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt - -- Import the public key into your GPG keyring: - ```bash - gpg --import GIT-GPG-KEY-conformal.txt - ``` - -- Verify the release tag with the following command where `TAG_NAME` is a - placeholder for the specific tag: - ```bash - git tag -v TAG_NAME - ``` - -## License - -Package chainhash is licensed under the [copyfree](http://copyfree.org) ISC -License. diff --git a/vendor/github.com/btcsuite/btcd/wire/README.md b/vendor/github.com/btcsuite/btcd/wire/README.md deleted file mode 100644 index 0e937a62f..000000000 --- a/vendor/github.com/btcsuite/btcd/wire/README.md +++ /dev/null @@ -1,114 +0,0 @@ -wire -==== - -[![Build Status](http://img.shields.io/travis/btcsuite/btcd.svg)] -(https://travis-ci.org/btcsuite/btcd) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] -(http://godoc.org/github.com/btcsuite/btcd/wire) - -Package wire implements the bitcoin wire protocol. A comprehensive suite of -tests with 100% test coverage is provided to ensure proper functionality. - -There is an associated blog post about the release of this package -[here](https://blog.conformal.com/btcwire-the-bitcoin-wire-protocol-package-from-btcd/). - -This package has intentionally been designed so it can be used as a standalone -package for any projects needing to interface with bitcoin peers at the wire -protocol level. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcd/wire -``` - -## Bitcoin Message Overview - -The bitcoin protocol consists of exchanging messages between peers. Each message -is preceded by a header which identifies information about it such as which -bitcoin network it is a part of, its type, how big it is, and a checksum to -verify validity. All encoding and decoding of message headers is handled by this -package. - -To accomplish this, there is a generic interface for bitcoin messages named -`Message` which allows messages of any type to be read, written, or passed -around through channels, functions, etc. In addition, concrete implementations -of most of the currently supported bitcoin messages are provided. For these -supported messages, all of the details of marshalling and unmarshalling to and -from the wire using bitcoin encoding are handled so the caller doesn't have to -concern themselves with the specifics. - -## Reading Messages Example - -In order to unmarshal bitcoin messages from the wire, use the `ReadMessage` -function. It accepts any `io.Reader`, but typically this will be a `net.Conn` -to a remote node running a bitcoin peer. Example syntax is: - -```Go - // Use the most recent protocol version supported by the package and the - // main bitcoin network. - pver := wire.ProtocolVersion - btcnet := wire.MainNet - - // Reads and validates the next bitcoin message from conn using the - // protocol version pver and the bitcoin network btcnet. The returns - // are a wire.Message, a []byte which contains the unmarshalled - // raw payload, and a possible error. - msg, rawPayload, err := wire.ReadMessage(conn, pver, btcnet) - if err != nil { - // Log and handle the error - } -``` - -See the package documentation for details on determining the message type. - -## Writing Messages Example - -In order to marshal bitcoin messages to the wire, use the `WriteMessage` -function. It accepts any `io.Writer`, but typically this will be a `net.Conn` -to a remote node running a bitcoin peer. Example syntax to request addresses -from a remote peer is: - -```Go - // Use the most recent protocol version supported by the package and the - // main bitcoin network. - pver := wire.ProtocolVersion - btcnet := wire.MainNet - - // Create a new getaddr bitcoin message. - msg := wire.NewMsgGetAddr() - - // Writes a bitcoin message msg to conn using the protocol version - // pver, and the bitcoin network btcnet. The return is a possible - // error. - err := wire.WriteMessage(conn, msg, pver, btcnet) - if err != nil { - // Log and handle the error - } -``` - -## GPG Verification Key - -All official release tags are signed by Conformal so users can ensure the code -has not been tampered with and is coming from the btcsuite developers. To -verify the signature perform the following: - -- Download the public key from the Conformal website at - https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt - -- Import the public key into your GPG keyring: - ```bash - gpg --import GIT-GPG-KEY-conformal.txt - ``` - -- Verify the release tag with the following command where `TAG_NAME` is a - placeholder for the specific tag: - ```bash - git tag -v TAG_NAME - ``` - -## License - -Package wire is licensed under the [copyfree](http://copyfree.org) ISC -License. diff --git a/vendor/github.com/btcsuite/btcutil/.gitignore b/vendor/github.com/btcsuite/btcutil/.gitignore deleted file mode 100644 index 5b97dbba7..000000000 --- a/vendor/github.com/btcsuite/btcutil/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# Temp files -*~ - -# Log files -*.log - -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe diff --git a/vendor/github.com/btcsuite/btcutil/.travis.yml b/vendor/github.com/btcsuite/btcutil/.travis.yml deleted file mode 100644 index 3d5ab83d1..000000000 --- a/vendor/github.com/btcsuite/btcutil/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: go -go: - - 1.7.x - - 1.8.x -sudo: false -install: - - go get -d -t -v ./... - - go get -v github.com/alecthomas/gometalinter - - gometalinter --install -script: - - export PATH=$PATH:$HOME/gopath/bin - - ./goclean.sh -after_success: - - go get -v github.com/mattn/goveralls - - goveralls -coverprofile=profile.cov -service=travis-ci diff --git a/vendor/github.com/btcsuite/btcutil/README.md b/vendor/github.com/btcsuite/btcutil/README.md deleted file mode 100644 index f0faf75fb..000000000 --- a/vendor/github.com/btcsuite/btcutil/README.md +++ /dev/null @@ -1,53 +0,0 @@ -btcutil -======= - -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)] -(https://travis-ci.org/btcsuite/btcutil) [![Coverage Status] -(http://img.shields.io/coveralls/btcsuite/btcutil.svg)] -(https://coveralls.io/r/btcsuite/btcutil?branch=master) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)] -(http://godoc.org/github.com/btcsuite/btcutil) - -Package btcutil provides bitcoin-specific convenience functions and types. -A comprehensive suite of tests is provided to ensure proper functionality. See -`test_coverage.txt` for the gocov coverage report. Alternatively, if you are -running a POSIX OS, you can run the `cov_report.sh` script for a real-time -report. - -This package was developed for btcd, an alternative full-node implementation of -bitcoin which is under active development by Conformal. Although it was -primarily written for btcd, this package has intentionally been designed so it -can be used as a standalone package for any projects needing the functionality -provided. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil -``` - -## GPG Verification Key - -All official release tags are signed by Conformal so users can ensure the code -has not been tampered with and is coming from the btcsuite developers. To -verify the signature perform the following: - -- Download the public key from the Conformal website at - https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt - -- Import the public key into your GPG keyring: - ```bash - gpg --import GIT-GPG-KEY-conformal.txt - ``` - -- Verify the release tag with the following command where `TAG_NAME` is a - placeholder for the specific tag: - ```bash - git tag -v TAG_NAME - ``` - -## License - -Package btcutil is licensed under the [copyfree](http://copyfree.org) ISC -License. diff --git a/vendor/github.com/btcsuite/btcutil/base58/README.md b/vendor/github.com/btcsuite/btcutil/base58/README.md deleted file mode 100644 index fdb243121..000000000 --- a/vendor/github.com/btcsuite/btcutil/base58/README.md +++ /dev/null @@ -1,40 +0,0 @@ -base58 -========== - -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)] -(https://travis-ci.org/btcsuite/btcutil) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://godoc.org/github.com/btcsuite/btcutil/base58?status.png)] -(http://godoc.org/github.com/btcsuite/btcutil/base58) - -Package base58 provides an API for encoding and decoding to and from the -modified base58 encoding. It also provides an API to do Base58Check encoding, -as described [here](https://en.bitcoin.it/wiki/Base58Check_encoding). - -A comprehensive suite of tests is provided to ensure proper functionality. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil/base58 -``` - -## Examples - -* [Decode Example] - (http://godoc.org/github.com/btcsuite/btcutil/base58#example-Decode) - Demonstrates how to decode modified base58 encoded data. -* [Encode Example] - (http://godoc.org/github.com/btcsuite/btcutil/base58#example-Encode) - Demonstrates how to encode data using the modified base58 encoding scheme. -* [CheckDecode Example] - (http://godoc.org/github.com/btcsuite/btcutil/base58#example-CheckDecode) - Demonstrates how to decode Base58Check encoded data. -* [CheckEncode Example] - (http://godoc.org/github.com/btcsuite/btcutil/base58#example-CheckEncode) - Demonstrates how to encode data using the Base58Check encoding scheme. - -## License - -Package base58 is licensed under the [copyfree](http://copyfree.org) ISC -License. diff --git a/vendor/github.com/btcsuite/btcutil/base58/cov_report.sh b/vendor/github.com/btcsuite/btcutil/base58/cov_report.sh deleted file mode 100644 index 307f05b76..000000000 --- a/vendor/github.com/btcsuite/btcutil/base58/cov_report.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# This script uses gocov to generate a test coverage report. -# The gocov tool my be obtained with the following command: -# go get github.com/axw/gocov/gocov -# -# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. - -# Check for gocov. -type gocov >/dev/null 2>&1 -if [ $? -ne 0 ]; then - echo >&2 "This script requires the gocov tool." - echo >&2 "You may obtain it with the following command:" - echo >&2 "go get github.com/axw/gocov/gocov" - exit 1 -fi -gocov test | gocov report diff --git a/vendor/github.com/btcsuite/btcutil/cov_report.sh b/vendor/github.com/btcsuite/btcutil/cov_report.sh deleted file mode 100644 index 307f05b76..000000000 --- a/vendor/github.com/btcsuite/btcutil/cov_report.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# This script uses gocov to generate a test coverage report. -# The gocov tool my be obtained with the following command: -# go get github.com/axw/gocov/gocov -# -# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. - -# Check for gocov. -type gocov >/dev/null 2>&1 -if [ $? -ne 0 ]; then - echo >&2 "This script requires the gocov tool." - echo >&2 "You may obtain it with the following command:" - echo >&2 "go get github.com/axw/gocov/gocov" - exit 1 -fi -gocov test | gocov report diff --git a/vendor/github.com/btcsuite/btcutil/goclean.sh b/vendor/github.com/btcsuite/btcutil/goclean.sh deleted file mode 100755 index 41308485e..000000000 --- a/vendor/github.com/btcsuite/btcutil/goclean.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# The script does automatic checking on a Go package and its sub-packages, including: -# 1. gofmt (http://golang.org/cmd/gofmt/) -# 2. goimports (https://github.com/bradfitz/goimports) -# 3. golint (https://github.com/golang/lint) -# 4. go vet (http://golang.org/cmd/vet) -# 5. gosimple (https://github.com/dominikh/go-simple) -# 6. unconvert (https://github.com/mdempsky/unconvert) -# 7. race detector (http://blog.golang.org/race-detector) -# 8. test coverage (http://blog.golang.org/cover) -# -# gometalint (github.com/alecthomas/gometalinter) is used to run each each -# static checker. - -set -ex - -# Automatic checks -test -z "$(gometalinter --disable-all \ ---enable=gofmt \ ---enable=goimports \ ---enable=golint \ ---enable=vet \ ---enable=gosimple \ ---enable=unconvert \ ---deadline=120s ./... | grep -v 'ExampleNew' 2>&1 | tee /dev/stderr)" -env GORACE="halt_on_error=1" go test -race ./... - -# Run test coverage on each subdirectories and merge the coverage profile. - -echo "mode: count" > profile.cov - -# Standard go tooling behavior is to ignore dirs with leading underscores. -for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d); -do -if ls $dir/*.go &> /dev/null; then - go test -covermode=count -coverprofile=$dir/profile.tmp $dir - if [ -f $dir/profile.tmp ]; then - cat $dir/profile.tmp | tail -n +2 >> profile.cov - rm $dir/profile.tmp - fi -fi -done - -go tool cover -func profile.cov - -# To submit the test coverage result to coveralls.io, -# use goveralls (https://github.com/mattn/goveralls) -# goveralls -coverprofile=profile.cov -service=travis-ci diff --git a/vendor/github.com/btcsuite/btcutil/test_coverage.txt b/vendor/github.com/btcsuite/btcutil/test_coverage.txt deleted file mode 100644 index e475fad96..000000000 --- a/vendor/github.com/btcsuite/btcutil/test_coverage.txt +++ /dev/null @@ -1,72 +0,0 @@ - -github.com/conformal/btcutil/base58.go Base58Decode 100.00% (20/20) -github.com/conformal/btcutil/base58.go Base58Encode 100.00% (15/15) -github.com/conformal/btcutil/block.go Block.Tx 100.00% (12/12) -github.com/conformal/btcutil/wif.go WIF.String 100.00% (11/11) -github.com/conformal/btcutil/block.go Block.Transactions 100.00% (11/11) -github.com/conformal/btcutil/amount.go AmountUnit.String 100.00% (8/8) -github.com/conformal/btcutil/tx.go NewTxFromReader 100.00% (6/6) -github.com/conformal/btcutil/block.go NewBlockFromBytes 100.00% (6/6) -github.com/conformal/btcutil/block.go NewBlockFromReader 100.00% (6/6) -github.com/conformal/btcutil/address.go encodeAddress 100.00% (6/6) -github.com/conformal/btcutil/address.go newAddressPubKeyHash 100.00% (5/5) -github.com/conformal/btcutil/address.go newAddressScriptHashFromHash 100.00% (5/5) -github.com/conformal/btcutil/tx.go Tx.Sha 100.00% (5/5) -github.com/conformal/btcutil/block.go Block.Sha 100.00% (5/5) -github.com/conformal/btcutil/amount.go NewAmount 100.00% (5/5) -github.com/conformal/btcutil/amount.go round 100.00% (3/3) -github.com/conformal/btcutil/address.go NewAddressScriptHash 100.00% (2/2) -github.com/conformal/btcutil/amount.go Amount.Format 100.00% (2/2) -github.com/conformal/btcutil/tx.go NewTxFromBytes 100.00% (2/2) -github.com/conformal/btcutil/hash160.go calcHash 100.00% (2/2) -github.com/conformal/btcutil/address.go AddressPubKeyHash.Hash160 100.00% (1/1) -github.com/conformal/btcutil/block.go OutOfRangeError.Error 100.00% (1/1) -github.com/conformal/btcutil/block.go Block.MsgBlock 100.00% (1/1) -github.com/conformal/btcutil/tx.go Tx.MsgTx 100.00% (1/1) -github.com/conformal/btcutil/hash160.go Hash160 100.00% (1/1) -github.com/conformal/btcutil/block.go NewBlockFromBlockAndBytes 100.00% (1/1) -github.com/conformal/btcutil/block.go Block.Height 100.00% (1/1) -github.com/conformal/btcutil/block.go Block.SetHeight 100.00% (1/1) -github.com/conformal/btcutil/block.go NewBlock 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKeyHash.IsForNet 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKey.EncodeAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go NewAddressPubKeyHash 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKeyHash.EncodeAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKeyHash.ScriptAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKeyHash.String 100.00% (1/1) -github.com/conformal/btcutil/address.go NewAddressScriptHashFromHash 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.EncodeAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.ScriptAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.IsForNet 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.String 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.Hash160 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKey.ScriptAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKey.IsForNet 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKey.String 100.00% (1/1) -github.com/conformal/btcutil/tx.go NewTx 100.00% (1/1) -github.com/conformal/btcutil/tx.go Tx.SetIndex 100.00% (1/1) -github.com/conformal/btcutil/amount.go Amount.ToUnit 100.00% (1/1) -github.com/conformal/btcutil/tx.go Tx.Index 100.00% (1/1) -github.com/conformal/btcutil/amount.go Amount.String 100.00% (1/1) -github.com/conformal/btcutil/amount.go Amount.MulF64 100.00% (1/1) -github.com/conformal/btcutil/appdata.go appDataDir 92.00% (23/25) -github.com/conformal/btcutil/block.go Block.TxLoc 88.89% (8/9) -github.com/conformal/btcutil/block.go Block.Bytes 88.89% (8/9) -github.com/conformal/btcutil/address.go NewAddressPubKey 87.50% (7/8) -github.com/conformal/btcutil/address.go DecodeAddress 85.00% (17/20) -github.com/conformal/btcutil/wif.go DecodeWIF 85.00% (17/20) -github.com/conformal/btcutil/address.go AddressPubKey.serialize 80.00% (4/5) -github.com/conformal/btcutil/block.go Block.TxSha 75.00% (3/4) -github.com/conformal/btcutil/wif.go paddedAppend 66.67% (2/3) -github.com/conformal/btcutil/wif.go NewWIF 66.67% (2/3) -github.com/conformal/btcutil/certgen.go NewTLSCertPair 0.00% (0/54) -github.com/conformal/btcutil/wif.go WIF.SerializePubKey 0.00% (0/4) -github.com/conformal/btcutil/address.go AddressPubKey.AddressPubKeyHash 0.00% (0/3) -github.com/conformal/btcutil/address.go AddressPubKey.Format 0.00% (0/1) -github.com/conformal/btcutil/address.go AddressPubKey.PubKey 0.00% (0/1) -github.com/conformal/btcutil/address.go AddressPubKey.SetFormat 0.00% (0/1) -github.com/conformal/btcutil/wif.go WIF.IsForNet 0.00% (0/1) -github.com/conformal/btcutil/appdata.go AppDataDir 0.00% (0/1) -github.com/conformal/btcutil/net.go interfaceAddrs 0.00% (0/1) -github.com/conformal/btcutil ------------------------------- 75.88% (258/340) - diff --git a/vendor/github.com/edsrzf/mmap-go/.gitignore b/vendor/github.com/edsrzf/mmap-go/.gitignore deleted file mode 100644 index 9aa02c1ed..000000000 --- a/vendor/github.com/edsrzf/mmap-go/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.out -*.5 -*.6 -*.8 -*.swp -_obj -_test -testdata diff --git a/vendor/github.com/edsrzf/mmap-go/README.md b/vendor/github.com/edsrzf/mmap-go/README.md deleted file mode 100644 index 4cc2bfe1c..000000000 --- a/vendor/github.com/edsrzf/mmap-go/README.md +++ /dev/null @@ -1,12 +0,0 @@ -mmap-go -======= - -mmap-go is a portable mmap package for the [Go programming language](http://golang.org). -It has been tested on Linux (386, amd64), OS X, and Windows (386). It should also -work on other Unix-like platforms, but hasn't been tested with them. I'm interested -to hear about the results. - -I haven't been able to add more features without adding significant complexity, -so mmap-go doesn't support mprotect, mincore, and maybe a few other things. -If you're running on a Unix-like platform and need some of these features, -I suggest Gustavo Niemeyer's [gommap](http://labix.org/gommap). diff --git a/vendor/github.com/go-playground/locales/.gitignore b/vendor/github.com/go-playground/locales/.gitignore deleted file mode 100644 index daf913b1b..000000000 --- a/vendor/github.com/go-playground/locales/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/vendor/github.com/go-playground/locales/README.md b/vendor/github.com/go-playground/locales/README.md deleted file mode 100644 index b462c93a0..000000000 --- a/vendor/github.com/go-playground/locales/README.md +++ /dev/null @@ -1,172 +0,0 @@ -## locales -![Project status](https://img.shields.io/badge/version-0.11.1-green.svg) -[![Build Status](https://semaphoreci.com/api/v1/joeybloggs/locales/branches/master/badge.svg)](https://semaphoreci.com/joeybloggs/locales) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/locales)](https://goreportcard.com/report/github.com/go-playground/locales) -[![GoDoc](https://godoc.org/github.com/go-playground/locales?status.svg)](https://godoc.org/github.com/go-playground/locales) -![License](https://img.shields.io/dub/l/vibe-d.svg) -[![Gitter](https://badges.gitter.im/go-playground/locales.svg)](https://gitter.im/go-playground/locales?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -Locales is a set of locales generated from the [Unicode CLDR Project](http://cldr.unicode.org/) which can be used independently or within -an i18n package; these were built for use with, but not exclusive to, [Universal Translator](https://github.com/go-playground/universal-translator). - -Features --------- -- [x] Rules generated from the latest [CLDR](http://cldr.unicode.org/index/downloads) data, v31.0.1 -- [x] Contains Cardinal, Ordinal and Range Plural Rules -- [x] Contains Month, Weekday and Timezone translations built in -- [x] Contains Date & Time formatting functions -- [x] Contains Number, Currency, Accounting and Percent formatting functions -- [x] Supports the "Gregorian" calendar only ( my time isn't unlimited, had to draw the line somewhere ) - -Full Tests --------------------- -I could sure use your help adding tests for every locale, it is a huge undertaking and I just don't have the free time to do it all at the moment; -any help would be **greatly appreciated!!!!** please see [issue](https://github.com/go-playground/locales/issues/1) for details. - -Installation ------------ - -Use go get - -```shell -go get github.com/go-playground/locales -``` - -NOTES --------- -You'll notice most return types are []byte, this is because most of the time the results will be concatenated with a larger body -of text and can avoid some allocations if already appending to a byte array, otherwise just cast as string. - -Usage -------- -```go -package main - -import ( - "fmt" - "time" - - "github.com/go-playground/locales/currency" - "github.com/go-playground/locales/en_CA" -) - -func main() { - - loc, _ := time.LoadLocation("America/Toronto") - datetime := time.Date(2016, 02, 03, 9, 0, 1, 0, loc) - - l := en_CA.New() - - // Dates - fmt.Println(l.FmtDateFull(datetime)) - fmt.Println(l.FmtDateLong(datetime)) - fmt.Println(l.FmtDateMedium(datetime)) - fmt.Println(l.FmtDateShort(datetime)) - - // Times - fmt.Println(l.FmtTimeFull(datetime)) - fmt.Println(l.FmtTimeLong(datetime)) - fmt.Println(l.FmtTimeMedium(datetime)) - fmt.Println(l.FmtTimeShort(datetime)) - - // Months Wide - fmt.Println(l.MonthWide(time.January)) - fmt.Println(l.MonthWide(time.February)) - fmt.Println(l.MonthWide(time.March)) - // ... - - // Months Abbreviated - fmt.Println(l.MonthAbbreviated(time.January)) - fmt.Println(l.MonthAbbreviated(time.February)) - fmt.Println(l.MonthAbbreviated(time.March)) - // ... - - // Months Narrow - fmt.Println(l.MonthNarrow(time.January)) - fmt.Println(l.MonthNarrow(time.February)) - fmt.Println(l.MonthNarrow(time.March)) - // ... - - // Weekdays Wide - fmt.Println(l.WeekdayWide(time.Sunday)) - fmt.Println(l.WeekdayWide(time.Monday)) - fmt.Println(l.WeekdayWide(time.Tuesday)) - // ... - - // Weekdays Abbreviated - fmt.Println(l.WeekdayAbbreviated(time.Sunday)) - fmt.Println(l.WeekdayAbbreviated(time.Monday)) - fmt.Println(l.WeekdayAbbreviated(time.Tuesday)) - // ... - - // Weekdays Short - fmt.Println(l.WeekdayShort(time.Sunday)) - fmt.Println(l.WeekdayShort(time.Monday)) - fmt.Println(l.WeekdayShort(time.Tuesday)) - // ... - - // Weekdays Narrow - fmt.Println(l.WeekdayNarrow(time.Sunday)) - fmt.Println(l.WeekdayNarrow(time.Monday)) - fmt.Println(l.WeekdayNarrow(time.Tuesday)) - // ... - - var f64 float64 - - f64 = -10356.4523 - - // Number - fmt.Println(l.FmtNumber(f64, 2)) - - // Currency - fmt.Println(l.FmtCurrency(f64, 2, currency.CAD)) - fmt.Println(l.FmtCurrency(f64, 2, currency.USD)) - - // Accounting - fmt.Println(l.FmtAccounting(f64, 2, currency.CAD)) - fmt.Println(l.FmtAccounting(f64, 2, currency.USD)) - - f64 = 78.12 - - // Percent - fmt.Println(l.FmtPercent(f64, 0)) - - // Plural Rules for locale, so you know what rules you must cover - fmt.Println(l.PluralsCardinal()) - fmt.Println(l.PluralsOrdinal()) - - // Cardinal Plural Rules - fmt.Println(l.CardinalPluralRule(1, 0)) - fmt.Println(l.CardinalPluralRule(1.0, 0)) - fmt.Println(l.CardinalPluralRule(1.0, 1)) - fmt.Println(l.CardinalPluralRule(3, 0)) - - // Ordinal Plural Rules - fmt.Println(l.OrdinalPluralRule(21, 0)) // 21st - fmt.Println(l.OrdinalPluralRule(22, 0)) // 22nd - fmt.Println(l.OrdinalPluralRule(33, 0)) // 33rd - fmt.Println(l.OrdinalPluralRule(34, 0)) // 34th - - // Range Plural Rules - fmt.Println(l.RangePluralRule(1, 0, 1, 0)) // 1-1 - fmt.Println(l.RangePluralRule(1, 0, 2, 0)) // 1-2 - fmt.Println(l.RangePluralRule(5, 0, 8, 0)) // 5-8 -} -``` - -NOTES: -------- -These rules were generated from the [Unicode CLDR Project](http://cldr.unicode.org/), if you encounter any issues -I strongly encourage contributing to the CLDR project to get the locale information corrected and the next time -these locales are regenerated the fix will come with. - -I do however realize that time constraints are often important and so there are two options: - -1. Create your own locale, copy, paste and modify, and ensure it complies with the `Translator` interface. -2. Add an exception in the locale generation code directly and once regenerated, fix will be in place. - -Please to not make fixes inside the locale files, they WILL get overwritten when the locales are regenerated. - -License ------- -Distributed under MIT License, please see license file in code for more details. diff --git a/vendor/github.com/go-playground/locales/logo.png b/vendor/github.com/go-playground/locales/logo.png deleted file mode 100644 index 3038276e6873076ecd542099e95b25037b1c0c34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37360 zcmV(-K-|BHP)ysx*JK zMpBX=dbK}5gAy}y3R{{beYQe$t~_(EI9HY=983!yQ4BbH2t9fee6m7kr7b^x7%_4X zJ9`gfp(=T?K~s?>F>nbtbqz;?9&D*HLWLAVf)p1<2qIzzh`mlUaSo2aQfQ+xioj4u zi57RSK09+4J$n}=VG1>K6C+;`IdT#dKnQiRIYfOMa;!RRrZpi|42HT(K7kH5Z51D0 z2RV8bBU%zznI$e~3~;G9N{kpKWf73XRDQWdPL3KgZV)nR5J7tvJAVu-VG5JQScJDo zR+bL!Ta3IbT6ncoYNbC?j4!6pWoxTBl*n#=wPJ6nPG_V?T&y%kcr-zED1W(DRHZFT zhB7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Zo77-Viz3k2%SVodA*pwF++VgEq~?8UHjvK%5n7q8GU0ev;L%(g%WLipA?Bw4Hw z!pm@GA_igJiefrmwn?8Scz<7YjdHFT1|^ZdRYzhwN$%s!nXaj>lhKTkP50uNKUz`_ z{!H?<8-jl>wpCP_2X@s7ul=1t+Qi0B*20g5GBHuRH11wN-58oBMIr))cUG#Uw0d2u z`zJ!pe1nb+_&;>0Hvlh~WdzNH0eT^D{vYW2)$6zE3=|&FC36;D4?#+8*sSR^P7~fI z_+~>o%D_4#@y?E_^IWw|AQ)}L3f4NP6D2L3qeA6L6wQ-zqvs;`)+V$kz6x8Nzljo= zEv2uGI;;Soslz8{ji84Uu~NA#lzD|%55#d5>;gTYRj>}wDOU84*TW3_sBf;>40#I~ zeT7~da9A(U$zqNWetQMS3!J~117wY-SdPGX#0VD#w?KEV(5ap*1y$hfA|6kHB|t8^ zG4Y)ejZa#pFmG#_pbj#j?K}x8xe!80F+=6mx!JS{8wgvIzf__p8koI;Ac8$$)sn5Q z8nhzwJn67xcq5pCi-oW~bd$9qEHyk7sC5pkkEH$=Ix_~CF$qSqKwr$*8pyF^0u!&$ zg?)uyup3^Oi(a8Kz1Yp`k#r2uCH}qtpo1J@C{ryF3?$__SN_~C#jYPJB?wb3!3>O9 s>SmKTFz#xX%2+j_#T4;&ea^-9Z+8#z7el$et^fc407*qoM6N<$f?|Tx;{X5v diff --git a/vendor/github.com/go-playground/universal-translator/.gitignore b/vendor/github.com/go-playground/universal-translator/.gitignore deleted file mode 100644 index 26617857e..000000000 --- a/vendor/github.com/go-playground/universal-translator/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof \ No newline at end of file diff --git a/vendor/github.com/go-playground/universal-translator/README.md b/vendor/github.com/go-playground/universal-translator/README.md deleted file mode 100644 index 24aef1585..000000000 --- a/vendor/github.com/go-playground/universal-translator/README.md +++ /dev/null @@ -1,90 +0,0 @@ -## universal-translator - -![Project status](https://img.shields.io/badge/version-0.16.0-green.svg) -[![Build Status](https://semaphoreci.com/api/v1/joeybloggs/universal-translator/branches/master/badge.svg)](https://semaphoreci.com/joeybloggs/universal-translator) -[![Coverage Status](https://coveralls.io/repos/github/go-playground/universal-translator/badge.svg)](https://coveralls.io/github/go-playground/universal-translator) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/universal-translator)](https://goreportcard.com/report/github.com/go-playground/universal-translator) -[![GoDoc](https://godoc.org/github.com/go-playground/universal-translator?status.svg)](https://godoc.org/github.com/go-playground/universal-translator) -![License](https://img.shields.io/dub/l/vibe-d.svg) -[![Gitter](https://badges.gitter.im/go-playground/universal-translator.svg)](https://gitter.im/go-playground/universal-translator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -Universal Translator is an i18n Translator for Go/Golang using CLDR data + pluralization rules - -Why another i18n library? --------------------------- -Because none of the plural rules seem to be correct out there, including the previous implementation of this package, -so I took it upon myself to create [locales](https://github.com/go-playground/locales) for everyone to use; this package -is a thin wrapper around [locales](https://github.com/go-playground/locales) in order to store and translate text for -use in your applications. - -Features --------- -- [x] Rules generated from the [CLDR](http://cldr.unicode.org/index/downloads) data, v30.0.3 -- [x] Contains Cardinal, Ordinal and Range Plural Rules -- [x] Contains Month, Weekday and Timezone translations built in -- [x] Contains Date & Time formatting functions -- [x] Contains Number, Currency, Accounting and Percent formatting functions -- [x] Supports the "Gregorian" calendar only ( my time isn't unlimited, had to draw the line somewhere ) -- [x] Support loading translations from files -- [x] Exporting translations to file(s), mainly for getting them professionally translated -- [ ] Code Generation for translation files -> Go code.. i.e. after it has been professionally translated -- [ ] Tests for all languages, I need help with this, please see [here](https://github.com/go-playground/locales/issues/1) - -Installation ------------ - -Use go get - -```shell -go get github.com/go-playground/universal-translator -``` - -Usage & Documentation -------- - -Please see https://godoc.org/github.com/go-playground/universal-translator for usage docs - -##### Examples: - -- [Basic](https://github.com/go-playground/universal-translator/tree/master/examples/basic) -- [Full - no files](https://github.com/go-playground/universal-translator/tree/master/examples/full-no-files) -- [Full - with files](https://github.com/go-playground/universal-translator/tree/master/examples/full-with-files) - -File formatting --------------- -All types, Plain substitution, Cardinal, Ordinal and Range translations can all be contained withing the same file(s); -they are only separated for easy viewing. - -##### Examples: - -- [Formats](https://github.com/go-playground/universal-translator/tree/master/examples/file-formats) - -##### Basic Makeup -NOTE: not all fields are needed for all translation types, see [examples](https://github.com/go-playground/universal-translator/tree/master/examples/file-formats) -```json -{ - "locale": "en", - "key": "days-left", - "trans": "You have {0} day left.", - "type": "Cardinal", - "rule": "One", - "override": false -} -``` -|Field|Description| -|---|---| -|locale|The locale for which the translation is for.| -|key|The translation key that will be used to store and lookup each translation; normally it is a string or integer.| -|trans|The actual translation text.| -|type|The type of translation Cardinal, Ordinal, Range or "" for a plain substitution(not required to be defined if plain used)| -|rule|The plural rule for which the translation is for eg. One, Two, Few, Many or Other.(not required to be defined if plain used)| -|override|If you wish to override an existing translation that has already been registered, set this to 'true'. 99% of the time there is no need to define it.| - -Help With Tests ---------------- -To anyone interesting in helping or contributing, I sure could use some help creating tests for each language. -Please see issue [here](https://github.com/go-playground/locales/issues/1) for details. - -License ------- -Distributed under MIT License, please see license file in code for more details. diff --git a/vendor/github.com/go-playground/universal-translator/logo.png b/vendor/github.com/go-playground/universal-translator/logo.png deleted file mode 100644 index a37aa8c0cd0f6e1b98e0be3eb2531ebc6ac6717b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16598 zcmV(yK*U_<=i=1Q$^7;0v#+eDrK0%p z>%6(N%f`XBv#;pk-N3xJlaY`9`tZ@r#>d0H&B?^Dtf>F`_3`TEoSK)csHK;dl)1LD z{xUb9o}0zMyZALSjf{%1BqI0!{{5jc`1SO`zPq8KpwB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z$sdh<6zNiBL0eLe3l2ve3@Qxsb|0^hxP~+r$6B&T?ARtbF0Q@`N77 z;R&Z;nSQP}xQPjUTE$82e&nx658Oi1fxoe{+C1BsAngAEz5qf00MAd3Cq<=4x Z{{;$xH diff --git a/vendor/github.com/prometheus/procfs/Makefile b/vendor/github.com/prometheus/procfs/Makefile deleted file mode 100644 index dd48afdcd..000000000 --- a/vendor/github.com/prometheus/procfs/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -ci: fmt lint test - -fmt: - ! gofmt -l *.go | read nothing - go vet - -lint: - go get github.com/golang/lint/golint - golint *.go - -test: sysfs/fixtures/.unpacked - go test -v ./... - -sysfs/fixtures/.unpacked: sysfs/fixtures.ttar - ./ttar -C sysfs -x -f sysfs/fixtures.ttar - touch $@ - -.PHONY: fmt lint test ci diff --git a/vendor/github.com/prometheus/procfs/README.md b/vendor/github.com/prometheus/procfs/README.md deleted file mode 100644 index 209549471..000000000 --- a/vendor/github.com/prometheus/procfs/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# procfs - -This procfs package provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -*WARNING*: This package is a work in progress. Its API may still break in -backwards-incompatible ways without warnings. Use it at your own risk. - -[![GoDoc](https://godoc.org/github.com/prometheus/procfs?status.png)](https://godoc.org/github.com/prometheus/procfs) -[![Build Status](https://travis-ci.org/prometheus/procfs.svg?branch=master)](https://travis-ci.org/prometheus/procfs) -[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/procfs)](https://goreportcard.com/report/github.com/prometheus/procfs) diff --git a/vendor/github.com/prometheus/procfs/ttar b/vendor/github.com/prometheus/procfs/ttar deleted file mode 100755 index 8227a4a37..000000000 --- a/vendor/github.com/prometheus/procfs/ttar +++ /dev/null @@ -1,264 +0,0 @@ -#!/usr/bin/env bash -# Purpose: plain text tar format -# Limitations: - only suitable for text files, directories, and symlinks -# - stores only filename, content, and mode -# - not designed for untrusted input - -# Note: must work with bash version 3.2 (macOS) - -set -o errexit -o nounset - -# Sanitize environment (for instance, standard sorting of glob matches) -export LC_ALL=C - -path="" -CMD="" - -function usage { - bname=$(basename "$0") - cat << USAGE -Usage: $bname [-C

] -c -f (create archive) - $bname -t -f (list archive contents) - $bname [-C ] -x -f (extract archive) - -Options: - -C (change directory) - -Example: Change to sysfs directory, create ttar file from fixtures directory - $bname -C sysfs -c -f sysfs/fixtures.ttar fixtures/ -USAGE -exit "$1" -} - -function vecho { - if [ "${VERBOSE:-}" == "yes" ]; then - echo >&7 "$@" - fi -} - -function set_cmd { - if [ -n "$CMD" ]; then - echo "ERROR: more than one command given" - echo - usage 2 - fi - CMD=$1 -} - -while getopts :cf:htxvC: opt; do - case $opt in - c) - set_cmd "create" - ;; - f) - ARCHIVE=$OPTARG - ;; - h) - usage 0 - ;; - t) - set_cmd "list" - ;; - x) - set_cmd "extract" - ;; - v) - VERBOSE=yes - exec 7>&1 - ;; - C) - CDIR=$OPTARG - ;; - *) - echo >&2 "ERROR: invalid option -$OPTARG" - echo - usage 1 - ;; - esac -done - -# Remove processed options from arguments -shift $(( OPTIND - 1 )); - -if [ "${CMD:-}" == "" ]; then - echo >&2 "ERROR: no command given" - echo - usage 1 -elif [ "${ARCHIVE:-}" == "" ]; then - echo >&2 "ERROR: no archive name given" - echo - usage 1 -fi - -function list { - local path="" - local size=0 - local line_no=0 - local ttar_file=$1 - if [ -n "${2:-}" ]; then - echo >&2 "ERROR: too many arguments." - echo - usage 1 - fi - if [ ! -e "$ttar_file" ]; then - echo >&2 "ERROR: file not found ($ttar_file)" - echo - usage 1 - fi - while read -r line; do - line_no=$(( line_no + 1 )) - if [ $size -gt 0 ]; then - size=$(( size - 1 )) - continue - fi - if [[ $line =~ ^Path:\ (.*)$ ]]; then - path=${BASH_REMATCH[1]} - elif [[ $line =~ ^Lines:\ (.*)$ ]]; then - size=${BASH_REMATCH[1]} - echo "$path" - elif [[ $line =~ ^Directory:\ (.*)$ ]]; then - path=${BASH_REMATCH[1]} - echo "$path/" - elif [[ $line =~ ^SymlinkTo:\ (.*)$ ]]; then - echo "$path -> ${BASH_REMATCH[1]}" - fi - done < "$ttar_file" -} - -function extract { - local path="" - local size=0 - local line_no=0 - local ttar_file=$1 - if [ -n "${2:-}" ]; then - echo >&2 "ERROR: too many arguments." - echo - usage 1 - fi - if [ ! -e "$ttar_file" ]; then - echo >&2 "ERROR: file not found ($ttar_file)" - echo - usage 1 - fi - while IFS= read -r line; do - line_no=$(( line_no + 1 )) - if [ "$size" -gt 0 ]; then - echo "$line" >> "$path" - size=$(( size - 1 )) - continue - fi - if [[ $line =~ ^Path:\ (.*)$ ]]; then - path=${BASH_REMATCH[1]} - if [ -e "$path" ] || [ -L "$path" ]; then - rm "$path" - fi - elif [[ $line =~ ^Lines:\ (.*)$ ]]; then - size=${BASH_REMATCH[1]} - # Create file even if it is zero-length. - touch "$path" - vecho " $path" - elif [[ $line =~ ^Mode:\ (.*)$ ]]; then - mode=${BASH_REMATCH[1]} - chmod "$mode" "$path" - vecho "$mode" - elif [[ $line =~ ^Directory:\ (.*)$ ]]; then - path=${BASH_REMATCH[1]} - mkdir -p "$path" - vecho " $path/" - elif [[ $line =~ ^SymlinkTo:\ (.*)$ ]]; then - ln -s "${BASH_REMATCH[1]}" "$path" - vecho " $path -> ${BASH_REMATCH[1]}" - elif [[ $line =~ ^# ]]; then - # Ignore comments between files - continue - else - echo >&2 "ERROR: Unknown keyword on line $line_no: $line" - exit 1 - fi - done < "$ttar_file" -} - -function div { - echo "# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" \ - "- - - - - -" -} - -function get_mode { - local mfile=$1 - if [ -z "${STAT_OPTION:-}" ]; then - if stat -c '%a' "$mfile" >/dev/null 2>&1; then - STAT_OPTION='-c' - STAT_FORMAT='%a' - else - STAT_OPTION='-f' - STAT_FORMAT='%A' - fi - fi - stat "${STAT_OPTION}" "${STAT_FORMAT}" "$mfile" -} - -function _create { - shopt -s nullglob - local mode - while (( "$#" )); do - file=$1 - if [ -L "$file" ]; then - echo "Path: $file" - symlinkTo=$(readlink "$file") - echo "SymlinkTo: $symlinkTo" - vecho " $file -> $symlinkTo" - div - elif [ -d "$file" ]; then - # Strip trailing slash (if there is one) - file=${file%/} - echo "Directory: $file" - mode=$(get_mode "$file") - echo "Mode: $mode" - vecho "$mode $file/" - div - # Find all files and dirs, including hidden/dot files - for x in "$file/"{*,.[^.]*}; do - _create "$x" - done - elif [ -f "$file" ]; then - echo "Path: $file" - lines=$(wc -l "$file"|awk '{print $1}') - echo "Lines: $lines" - cat "$file" - mode=$(get_mode "$file") - echo "Mode: $mode" - vecho "$mode $file" - div - else - echo >&2 "ERROR: file not found ($file in $(pwd))" - exit 2 - fi - shift - done -} - -function create { - ttar_file=$1 - shift - if [ -z "${1:-}" ]; then - echo >&2 "ERROR: missing arguments." - echo - usage 1 - fi - if [ -e "$ttar_file" ]; then - rm "$ttar_file" - fi - exec > "$ttar_file" - _create "$@" -} - -if [ -n "${CDIR:-}" ]; then - if [[ "$ARCHIVE" != /* ]]; then - # Relative path: preserve the archive's location before changing - # directory - ARCHIVE="$(pwd)/$ARCHIVE" - fi - cd "$CDIR" -fi - -"$CMD" "$ARCHIVE" "$@" diff --git a/vendor/github.com/rcrowley/go-metrics/.gitignore b/vendor/github.com/rcrowley/go-metrics/.gitignore deleted file mode 100644 index 83c8f8237..000000000 --- a/vendor/github.com/rcrowley/go-metrics/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.[68] -*.a -*.out -*.swp -_obj -_testmain.go -cmd/metrics-bench/metrics-bench -cmd/metrics-example/metrics-example -cmd/never-read/never-read diff --git a/vendor/github.com/rcrowley/go-metrics/.travis.yml b/vendor/github.com/rcrowley/go-metrics/.travis.yml deleted file mode 100644 index 20aa5d042..000000000 --- a/vendor/github.com/rcrowley/go-metrics/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go - -go: - - 1.2 - - 1.3 - - 1.4 - - 1.5 - -script: - - ./validate.sh - -# this should give us faster builds according to -# http://docs.travis-ci.com/user/migrating-from-legacy/ -sudo: false diff --git a/vendor/github.com/rcrowley/go-metrics/README.md b/vendor/github.com/rcrowley/go-metrics/README.md deleted file mode 100644 index 2d1a6dcfa..000000000 --- a/vendor/github.com/rcrowley/go-metrics/README.md +++ /dev/null @@ -1,153 +0,0 @@ -go-metrics -========== - -![travis build status](https://travis-ci.org/rcrowley/go-metrics.svg?branch=master) - -Go port of Coda Hale's Metrics library: . - -Documentation: . - -Usage ------ - -Create and update metrics: - -```go -c := metrics.NewCounter() -metrics.Register("foo", c) -c.Inc(47) - -g := metrics.NewGauge() -metrics.Register("bar", g) -g.Update(47) - -r := NewRegistry() -g := metrics.NewRegisteredFunctionalGauge("cache-evictions", r, func() int64 { return cache.getEvictionsCount() }) - -s := metrics.NewExpDecaySample(1028, 0.015) // or metrics.NewUniformSample(1028) -h := metrics.NewHistogram(s) -metrics.Register("baz", h) -h.Update(47) - -m := metrics.NewMeter() -metrics.Register("quux", m) -m.Mark(47) - -t := metrics.NewTimer() -metrics.Register("bang", t) -t.Time(func() {}) -t.Update(47) -``` - -Register() is not threadsafe. For threadsafe metric registration use -GetOrRegister: - -``` -t := metrics.GetOrRegisterTimer("account.create.latency", nil) -t.Time(func() {}) -t.Update(47) -``` - -Periodically log every metric in human-readable form to standard error: - -```go -go metrics.Log(metrics.DefaultRegistry, 5 * time.Second, log.New(os.Stderr, "metrics: ", log.Lmicroseconds)) -``` - -Periodically log every metric in slightly-more-parseable form to syslog: - -```go -w, _ := syslog.Dial("unixgram", "/dev/log", syslog.LOG_INFO, "metrics") -go metrics.Syslog(metrics.DefaultRegistry, 60e9, w) -``` - -Periodically emit every metric to Graphite using the [Graphite client](https://github.com/cyberdelia/go-metrics-graphite): - -```go - -import "github.com/cyberdelia/go-metrics-graphite" - -addr, _ := net.ResolveTCPAddr("tcp", "127.0.0.1:2003") -go graphite.Graphite(metrics.DefaultRegistry, 10e9, "metrics", addr) -``` - -Periodically emit every metric into InfluxDB: - -**NOTE:** this has been pulled out of the library due to constant fluctuations -in the InfluxDB API. In fact, all client libraries are on their way out. see -issues [#121](https://github.com/rcrowley/go-metrics/issues/121) and -[#124](https://github.com/rcrowley/go-metrics/issues/124) for progress and details. - -```go -import "github.com/vrischmann/go-metrics-influxdb" - -go influxdb.Influxdb(metrics.DefaultRegistry, 10e9, &influxdb.Config{ - Host: "127.0.0.1:8086", - Database: "metrics", - Username: "test", - Password: "test", -}) -``` - -Periodically upload every metric to Librato using the [Librato client](https://github.com/mihasya/go-metrics-librato): - -**Note**: the client included with this repository under the `librato` package -has been deprecated and moved to the repository linked above. - -```go -import "github.com/mihasya/go-metrics-librato" - -go librato.Librato(metrics.DefaultRegistry, - 10e9, // interval - "example@example.com", // account owner email address - "token", // Librato API token - "hostname", // source - []float64{0.95}, // percentiles to send - time.Millisecond, // time unit -) -``` - -Periodically emit every metric to StatHat: - -```go -import "github.com/rcrowley/go-metrics/stathat" - -go stathat.Stathat(metrics.DefaultRegistry, 10e9, "example@example.com") -``` - -Maintain all metrics along with expvars at `/debug/metrics`: - -This uses the same mechanism as [the official expvar](http://golang.org/pkg/expvar/) -but exposed under `/debug/metrics`, which shows a json representation of all your usual expvars -as well as all your go-metrics. - - -```go -import "github.com/rcrowley/go-metrics/exp" - -exp.Exp(metrics.DefaultRegistry) -``` - -Installation ------------- - -```sh -go get github.com/rcrowley/go-metrics -``` - -StatHat support additionally requires their Go client: - -```sh -go get github.com/stathat/go -``` - -Publishing Metrics ------------------- - -Clients are available for the following destinations: - -* Librato - [https://github.com/mihasya/go-metrics-librato](https://github.com/mihasya/go-metrics-librato) -* Graphite - [https://github.com/cyberdelia/go-metrics-graphite](https://github.com/cyberdelia/go-metrics-graphite) -* InfluxDB - [https://github.com/vrischmann/go-metrics-influxdb](https://github.com/vrischmann/go-metrics-influxdb) -* Ganglia - [https://github.com/appscode/metlia](https://github.com/appscode/metlia) -* Prometheus - [https://github.com/deathowl/go-metrics-prometheus](https://github.com/deathowl/go-metrics-prometheus) diff --git a/vendor/github.com/rcrowley/go-metrics/memory.md b/vendor/github.com/rcrowley/go-metrics/memory.md deleted file mode 100644 index 47454f54b..000000000 --- a/vendor/github.com/rcrowley/go-metrics/memory.md +++ /dev/null @@ -1,285 +0,0 @@ -Memory usage -============ - -(Highly unscientific.) - -Command used to gather static memory usage: - -```sh -grep ^Vm "/proc/$(ps fax | grep [m]etrics-bench | awk '{print $1}')/status" -``` - -Program used to gather baseline memory usage: - -```go -package main - -import "time" - -func main() { - time.Sleep(600e9) -} -``` - -Baseline --------- - -``` -VmPeak: 42604 kB -VmSize: 42604 kB -VmLck: 0 kB -VmHWM: 1120 kB -VmRSS: 1120 kB -VmData: 35460 kB -VmStk: 136 kB -VmExe: 1020 kB -VmLib: 1848 kB -VmPTE: 36 kB -VmSwap: 0 kB -``` - -Program used to gather metric memory usage (with other metrics being similar): - -```go -package main - -import ( - "fmt" - "metrics" - "time" -) - -func main() { - fmt.Sprintf("foo") - metrics.NewRegistry() - time.Sleep(600e9) -} -``` - -1000 counters registered ------------------------- - -``` -VmPeak: 44016 kB -VmSize: 44016 kB -VmLck: 0 kB -VmHWM: 1928 kB -VmRSS: 1928 kB -VmData: 36868 kB -VmStk: 136 kB -VmExe: 1024 kB -VmLib: 1848 kB -VmPTE: 40 kB -VmSwap: 0 kB -``` - -**1.412 kB virtual, TODO 0.808 kB resident per counter.** - -100000 counters registered --------------------------- - -``` -VmPeak: 55024 kB -VmSize: 55024 kB -VmLck: 0 kB -VmHWM: 12440 kB -VmRSS: 12440 kB -VmData: 47876 kB -VmStk: 136 kB -VmExe: 1024 kB -VmLib: 1848 kB -VmPTE: 64 kB -VmSwap: 0 kB -``` - -**0.1242 kB virtual, 0.1132 kB resident per counter.** - -1000 gauges registered ----------------------- - -``` -VmPeak: 44012 kB -VmSize: 44012 kB -VmLck: 0 kB -VmHWM: 1928 kB -VmRSS: 1928 kB -VmData: 36868 kB -VmStk: 136 kB -VmExe: 1020 kB -VmLib: 1848 kB -VmPTE: 40 kB -VmSwap: 0 kB -``` - -**1.408 kB virtual, 0.808 kB resident per counter.** - -100000 gauges registered ------------------------- - -``` -VmPeak: 55020 kB -VmSize: 55020 kB -VmLck: 0 kB -VmHWM: 12432 kB -VmRSS: 12432 kB -VmData: 47876 kB -VmStk: 136 kB -VmExe: 1020 kB -VmLib: 1848 kB -VmPTE: 60 kB -VmSwap: 0 kB -``` - -**0.12416 kB virtual, 0.11312 resident per gauge.** - -1000 histograms with a uniform sample size of 1028 --------------------------------------------------- - -``` -VmPeak: 72272 kB -VmSize: 72272 kB -VmLck: 0 kB -VmHWM: 16204 kB -VmRSS: 16204 kB -VmData: 65100 kB -VmStk: 136 kB -VmExe: 1048 kB -VmLib: 1848 kB -VmPTE: 80 kB -VmSwap: 0 kB -``` - -**29.668 kB virtual, TODO 15.084 resident per histogram.** - -10000 histograms with a uniform sample size of 1028 ---------------------------------------------------- - -``` -VmPeak: 256912 kB -VmSize: 256912 kB -VmLck: 0 kB -VmHWM: 146204 kB -VmRSS: 146204 kB -VmData: 249740 kB -VmStk: 136 kB -VmExe: 1048 kB -VmLib: 1848 kB -VmPTE: 448 kB -VmSwap: 0 kB -``` - -**21.4308 kB virtual, 14.5084 kB resident per histogram.** - -50000 histograms with a uniform sample size of 1028 ---------------------------------------------------- - -``` -VmPeak: 908112 kB -VmSize: 908112 kB -VmLck: 0 kB -VmHWM: 645832 kB -VmRSS: 645588 kB -VmData: 900940 kB -VmStk: 136 kB -VmExe: 1048 kB -VmLib: 1848 kB -VmPTE: 1716 kB -VmSwap: 1544 kB -``` - -**17.31016 kB virtual, 12.88936 kB resident per histogram.** - -1000 histograms with an exponentially-decaying sample size of 1028 and alpha of 0.015 -------------------------------------------------------------------------------------- - -``` -VmPeak: 62480 kB -VmSize: 62480 kB -VmLck: 0 kB -VmHWM: 11572 kB -VmRSS: 11572 kB -VmData: 55308 kB -VmStk: 136 kB -VmExe: 1048 kB -VmLib: 1848 kB -VmPTE: 64 kB -VmSwap: 0 kB -``` - -**19.876 kB virtual, 10.452 kB resident per histogram.** - -10000 histograms with an exponentially-decaying sample size of 1028 and alpha of 0.015 --------------------------------------------------------------------------------------- - -``` -VmPeak: 153296 kB -VmSize: 153296 kB -VmLck: 0 kB -VmHWM: 101176 kB -VmRSS: 101176 kB -VmData: 146124 kB -VmStk: 136 kB -VmExe: 1048 kB -VmLib: 1848 kB -VmPTE: 240 kB -VmSwap: 0 kB -``` - -**11.0692 kB virtual, 10.0056 kB resident per histogram.** - -50000 histograms with an exponentially-decaying sample size of 1028 and alpha of 0.015 --------------------------------------------------------------------------------------- - -``` -VmPeak: 557264 kB -VmSize: 557264 kB -VmLck: 0 kB -VmHWM: 501056 kB -VmRSS: 501056 kB -VmData: 550092 kB -VmStk: 136 kB -VmExe: 1048 kB -VmLib: 1848 kB -VmPTE: 1032 kB -VmSwap: 0 kB -``` - -**10.2932 kB virtual, 9.99872 kB resident per histogram.** - -1000 meters ------------ - -``` -VmPeak: 74504 kB -VmSize: 74504 kB -VmLck: 0 kB -VmHWM: 24124 kB -VmRSS: 24124 kB -VmData: 67340 kB -VmStk: 136 kB -VmExe: 1040 kB -VmLib: 1848 kB -VmPTE: 92 kB -VmSwap: 0 kB -``` - -**31.9 kB virtual, 23.004 kB resident per meter.** - -10000 meters ------------- - -``` -VmPeak: 278920 kB -VmSize: 278920 kB -VmLck: 0 kB -VmHWM: 227300 kB -VmRSS: 227300 kB -VmData: 271756 kB -VmStk: 136 kB -VmExe: 1040 kB -VmLib: 1848 kB -VmPTE: 488 kB -VmSwap: 0 kB -``` - -**23.6316 kB virtual, 22.618 kB resident per meter.** diff --git a/vendor/github.com/rcrowley/go-metrics/validate.sh b/vendor/github.com/rcrowley/go-metrics/validate.sh deleted file mode 100755 index f6499982e..000000000 --- a/vendor/github.com/rcrowley/go-metrics/validate.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -e - -# check there are no formatting issues -GOFMT_LINES=`gofmt -l . | wc -l | xargs` -test $GOFMT_LINES -eq 0 || echo "gofmt needs to be run, ${GOFMT_LINES} files have issues" - -# run the tests for the root package -go test . diff --git a/vendor/github.com/rjeczalik/notify/.gitignore b/vendor/github.com/rjeczalik/notify/.gitignore deleted file mode 100644 index 32c6eb987..000000000 --- a/vendor/github.com/rjeczalik/notify/.gitignore +++ /dev/null @@ -1,92 +0,0 @@ -# Created by https://www.gitignore.io - -### OSX ### -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear on external disk -.Spotlight-V100 -.Trashes - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - - -### Windows ### -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - - -### Linux ### -*~ - -# KDE directory preferences -.directory - - -### Go ### -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - - -### vim ### -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] -*.un~ -Session.vim -.netrwhist -*~ - -### JetBrains files ### -.idea/ -*.iml \ No newline at end of file diff --git a/vendor/github.com/rjeczalik/notify/.travis.yml b/vendor/github.com/rjeczalik/notify/.travis.yml deleted file mode 100644 index 0f38a3535..000000000 --- a/vendor/github.com/rjeczalik/notify/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: go - -go: - - 1.7.5 - -os: - - linux - - osx - -matrix: - include: - - os: osx - go: 1.7.5 - env: - - GOFLAGS="-tags kqueue" - -env: - global: - - GOBIN=$HOME/bin - - PATH=$HOME/bin:$PATH - -install: - - go get -t -v ./... - -script: - - "(go version | grep -q 1.4) || go tool vet -all ." - - go install $GOFLAGS ./... - - go test -v -race $GOFLAGS ./... diff --git a/vendor/github.com/rjeczalik/notify/README.md b/vendor/github.com/rjeczalik/notify/README.md deleted file mode 100644 index a728d1dd0..000000000 --- a/vendor/github.com/rjeczalik/notify/README.md +++ /dev/null @@ -1,21 +0,0 @@ -notify [![GoDoc](https://godoc.org/github.com/rjeczalik/notify?status.svg)](https://godoc.org/github.com/rjeczalik/notify) [![Build Status](https://img.shields.io/travis/rjeczalik/notify/master.svg)](https://travis-ci.org/rjeczalik/notify "inotify + FSEvents + kqueue") [![Build status](https://img.shields.io/appveyor/ci/rjeczalik/notify-246.svg)](https://ci.appveyor.com/project/rjeczalik/notify-246 "ReadDirectoryChangesW") [![Coverage Status](https://img.shields.io/coveralls/rjeczalik/notify/master.svg)](https://coveralls.io/r/rjeczalik/notify?branch=master) -====== - -Filesystem event notification library on steroids. (under active development) - -*Documentation* - -[godoc.org/github.com/rjeczalik/notify](https://godoc.org/github.com/rjeczalik/notify) - -*Installation* - -``` -~ $ go get -u github.com/rjeczalik/notify -``` - -*Projects using notify* - -- [github.com/rjeczalik/cmd/notify](https://godoc.org/github.com/rjeczalik/cmd/notify) -- [github.com/cortesi/devd](https://github.com/cortesi/devd) -- [github.com/cortesi/modd](https://github.com/cortesi/modd) - diff --git a/vendor/github.com/rjeczalik/notify/appveyor.yml b/vendor/github.com/rjeczalik/notify/appveyor.yml deleted file mode 100644 index 8e762d05c..000000000 --- a/vendor/github.com/rjeczalik/notify/appveyor.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: "{build}" - -os: Windows Server 2012 R2 - -clone_folder: c:\projects\src\github.com\rjeczalik\notify - -environment: - PATH: c:\projects\bin;%PATH% - GOPATH: c:\projects - NOTIFY_TIMEOUT: 5s - -install: - - go version - - go get -v -t ./... - -build_script: - - go tool vet -all . - - go build ./... - - go test -v -race ./... - -test: off - -deploy: off diff --git a/vendor/github.com/robertkrimen/otto/.gitignore b/vendor/github.com/robertkrimen/otto/.gitignore deleted file mode 100644 index 8c2a16949..000000000 --- a/vendor/github.com/robertkrimen/otto/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/.test -/otto/otto -/otto/otto-* -/test/test-*.js -/test/tester diff --git a/vendor/github.com/robertkrimen/otto/DESIGN.markdown b/vendor/github.com/robertkrimen/otto/DESIGN.markdown deleted file mode 100644 index 288752987..000000000 --- a/vendor/github.com/robertkrimen/otto/DESIGN.markdown +++ /dev/null @@ -1 +0,0 @@ -* Designate the filename of "anonymous" source code by the hash (md5/sha1, etc.) diff --git a/vendor/github.com/robertkrimen/otto/Makefile b/vendor/github.com/robertkrimen/otto/Makefile deleted file mode 100644 index 9868db3ca..000000000 --- a/vendor/github.com/robertkrimen/otto/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -.PHONY: test test-race test-release release release-check test-262 -.PHONY: parser -.PHONY: otto assets underscore - -TESTS := \ - ~ - -TEST := -v --run -TEST := -v -TEST := -v --run Test\($(subst $(eval) ,\|,$(TESTS))\) -TEST := . - -test: parser inline.go - go test -i - go test $(TEST) - @echo PASS - -parser: - $(MAKE) -C parser - -inline.go: inline.pl - ./$< > $@ - -################# -# release, test # -################# - -release: test-race test-release - for package in . parser token ast file underscore registry; do (cd $$package && godocdown --signature > README.markdown); done - @echo \*\*\* make release-check - @echo PASS - -release-check: .test - $(MAKE) -C test build test - $(MAKE) -C .test/test262 build test - @echo PASS - -test-262: .test - $(MAKE) -C .test/test262 build test - @echo PASS - -test-release: - go test -i - go test - -test-race: - go test -race -i - go test -race - -################################# -# otto, assets, underscore, ... # -################################# - -otto: - $(MAKE) -C otto - -assets: - mkdir -p .assets - for file in underscore/test/*.js; do tr "\`" "_" < $$file > .assets/`basename $$file`; done - -underscore: - $(MAKE) -C $@ - diff --git a/vendor/github.com/robertkrimen/otto/README.markdown b/vendor/github.com/robertkrimen/otto/README.markdown deleted file mode 100644 index a1ae7d1ae..000000000 --- a/vendor/github.com/robertkrimen/otto/README.markdown +++ /dev/null @@ -1,871 +0,0 @@ -# otto --- -```go -import "github.com/robertkrimen/otto" -``` - -Package otto is a JavaScript parser and interpreter written natively in Go. - -http://godoc.org/github.com/robertkrimen/otto - -```go -import ( - "github.com/robertkrimen/otto" -) -``` - -Run something in the VM - -```go -vm := otto.New() -vm.Run(` - abc = 2 + 2; - console.log("The value of abc is " + abc); // 4 -`) -``` - -Get a value out of the VM - -```go -if value, err := vm.Get("abc"); err == nil { - if value_int, err := value.ToInteger(); err == nil { - fmt.Printf("", value_int, err) - } -} -``` - -Set a number - -```go -vm.Set("def", 11) -vm.Run(` - console.log("The value of def is " + def); - // The value of def is 11 -`) -``` - -Set a string - -```go -vm.Set("xyzzy", "Nothing happens.") -vm.Run(` - console.log(xyzzy.length); // 16 -`) -``` - -Get the value of an expression - -```go -value, _ = vm.Run("xyzzy.length") -{ - // value is an int64 with a value of 16 - value, _ := value.ToInteger() -} -``` - -An error happens - -```go -value, err = vm.Run("abcdefghijlmnopqrstuvwxyz.length") -if err != nil { - // err = ReferenceError: abcdefghijlmnopqrstuvwxyz is not defined - // If there is an error, then value.IsUndefined() is true - ... -} -``` - -Set a Go function - -```go -vm.Set("sayHello", func(call otto.FunctionCall) otto.Value { - fmt.Printf("Hello, %s.\n", call.Argument(0).String()) - return otto.Value{} -}) -``` - -Set a Go function that returns something useful - -```go -vm.Set("twoPlus", func(call otto.FunctionCall) otto.Value { - right, _ := call.Argument(0).ToInteger() - result, _ := vm.ToValue(2 + right) - return result -}) -``` - -Use the functions in JavaScript - -```go -result, _ = vm.Run(` - sayHello("Xyzzy"); // Hello, Xyzzy. - sayHello(); // Hello, undefined - - result = twoPlus(2.0); // 4 -`) -``` - -### Parser - -A separate parser is available in the parser package if you're just interested -in building an AST. - -http://godoc.org/github.com/robertkrimen/otto/parser - -Parse and return an AST - -```go -filename := "" // A filename is optional -src := ` - // Sample xyzzy example - (function(){ - if (3.14159 > 0) { - console.log("Hello, World."); - return; - } - - var xyzzy = NaN; - console.log("Nothing happens."); - return xyzzy; - })(); -` - -// Parse some JavaScript, yielding a *ast.Program and/or an ErrorList -program, err := parser.ParseFile(nil, filename, src, 0) -``` - -### otto - -You can run (Go) JavaScript from the commandline with: -http://github.com/robertkrimen/otto/tree/master/otto - - $ go get -v github.com/robertkrimen/otto/otto - -Run JavaScript by entering some source on stdin or by giving otto a filename: - - $ otto example.js - -### underscore - -Optionally include the JavaScript utility-belt library, underscore, with this -import: - -```go -import ( - "github.com/robertkrimen/otto" - _ "github.com/robertkrimen/otto/underscore" -) - -// Now every otto runtime will come loaded with underscore -``` - -For more information: http://github.com/robertkrimen/otto/tree/master/underscore - - -### Caveat Emptor - -The following are some limitations with otto: - - * "use strict" will parse, but does nothing. - * The regular expression engine (re2/regexp) is not fully compatible with the ECMA5 specification. - * Otto targets ES5. ES6 features (eg: Typed Arrays) are not supported. - - -### Regular Expression Incompatibility - -Go translates JavaScript-style regular expressions into something that is -"regexp" compatible via `parser.TransformRegExp`. Unfortunately, RegExp requires -backtracking for some patterns, and backtracking is not supported by the -standard Go engine: https://code.google.com/p/re2/wiki/Syntax - -Therefore, the following syntax is incompatible: - - (?=) // Lookahead (positive), currently a parsing error - (?!) // Lookahead (backhead), currently a parsing error - \1 // Backreference (\1, \2, \3, ...), currently a parsing error - -A brief discussion of these limitations: "Regexp (?!re)" -https://groups.google.com/forum/?fromgroups=#%21topic/golang-nuts/7qgSDWPIh_E - -More information about re2: https://code.google.com/p/re2/ - -In addition to the above, re2 (Go) has a different definition for \s: [\t\n\f\r -]. The JavaScript definition, on the other hand, also includes \v, Unicode -"Separator, Space", etc. - - -### Halting Problem - -If you want to stop long running executions (like third-party code), you can use -the interrupt channel to do this: - -```go -package main - -import ( - "errors" - "fmt" - "os" - "time" - - "github.com/robertkrimen/otto" -) - -var halt = errors.New("Stahp") - -func main() { - runUnsafe(`var abc = [];`) - runUnsafe(` - while (true) { - // Loop forever - }`) -} - -func runUnsafe(unsafe string) { - start := time.Now() - defer func() { - duration := time.Since(start) - if caught := recover(); caught != nil { - if caught == halt { - fmt.Fprintf(os.Stderr, "Some code took to long! Stopping after: %v\n", duration) - return - } - panic(caught) // Something else happened, repanic! - } - fmt.Fprintf(os.Stderr, "Ran code successfully: %v\n", duration) - }() - - vm := otto.New() - vm.Interrupt = make(chan func(), 1) // The buffer prevents blocking - - go func() { - time.Sleep(2 * time.Second) // Stop after two seconds - vm.Interrupt <- func() { - panic(halt) - } - }() - - vm.Run(unsafe) // Here be dragons (risky code) -} -``` - -Where is setTimeout/setInterval? - -These timing functions are not actually part of the ECMA-262 specification. -Typically, they belong to the `window` object (in the browser). It would not be -difficult to provide something like these via Go, but you probably want to wrap -otto in an event loop in that case. - -For an example of how this could be done in Go with otto, see natto: - -http://github.com/robertkrimen/natto - -Here is some more discussion of the issue: - -* http://book.mixu.net/node/ch2.html - -* http://en.wikipedia.org/wiki/Reentrancy_%28computing%29 - -* http://aaroncrane.co.uk/2009/02/perl_safe_signals/ - -## Usage - -```go -var ErrVersion = errors.New("version mismatch") -``` - -#### type Error - -```go -type Error struct { -} -``` - -An Error represents a runtime error, e.g. a TypeError, a ReferenceError, etc. - -#### func (Error) Error - -```go -func (err Error) Error() string -``` -Error returns a description of the error - - TypeError: 'def' is not a function - -#### func (Error) String - -```go -func (err Error) String() string -``` -String returns a description of the error and a trace of where the error -occurred. - - TypeError: 'def' is not a function - at xyz (:3:9) - at :7:1/ - -#### type FunctionCall - -```go -type FunctionCall struct { - This Value - ArgumentList []Value - Otto *Otto -} -``` - -FunctionCall is an encapsulation of a JavaScript function call. - -#### func (FunctionCall) Argument - -```go -func (self FunctionCall) Argument(index int) Value -``` -Argument will return the value of the argument at the given index. - -If no such argument exists, undefined is returned. - -#### type Object - -```go -type Object struct { -} -``` - -Object is the representation of a JavaScript object. - -#### func (Object) Call - -```go -func (self Object) Call(name string, argumentList ...interface{}) (Value, error) -``` -Call a method on the object. - -It is essentially equivalent to: - - var method, _ := object.Get(name) - method.Call(object, argumentList...) - -An undefined value and an error will result if: - - 1. There is an error during conversion of the argument list - 2. The property is not actually a function - 3. An (uncaught) exception is thrown - -#### func (Object) Class - -```go -func (self Object) Class() string -``` -Class will return the class string of the object. - -The return value will (generally) be one of: - - Object - Function - Array - String - Number - Boolean - Date - RegExp - -#### func (Object) Get - -```go -func (self Object) Get(name string) (Value, error) -``` -Get the value of the property with the given name. - -#### func (Object) Keys - -```go -func (self Object) Keys() []string -``` -Get the keys for the object - -Equivalent to calling Object.keys on the object - -#### func (Object) Set - -```go -func (self Object) Set(name string, value interface{}) error -``` -Set the property of the given name to the given value. - -An error will result if the setting the property triggers an exception (i.e. -read-only), or there is an error during conversion of the given value. - -#### func (Object) Value - -```go -func (self Object) Value() Value -``` -Value will return self as a value. - -#### type Otto - -```go -type Otto struct { - // Interrupt is a channel for interrupting the runtime. You can use this to halt a long running execution, for example. - // See "Halting Problem" for more information. - Interrupt chan func() -} -``` - -Otto is the representation of the JavaScript runtime. Each instance of Otto has -a self-contained namespace. - -#### func New - -```go -func New() *Otto -``` -New will allocate a new JavaScript runtime - -#### func Run - -```go -func Run(src interface{}) (*Otto, Value, error) -``` -Run will allocate a new JavaScript runtime, run the given source on the -allocated runtime, and return the runtime, resulting value, and error (if any). - -src may be a string, a byte slice, a bytes.Buffer, or an io.Reader, but it MUST -always be in UTF-8. - -src may also be a Script. - -src may also be a Program, but if the AST has been modified, then runtime -behavior is undefined. - -#### func (Otto) Call - -```go -func (self Otto) Call(source string, this interface{}, argumentList ...interface{}) (Value, error) -``` -Call the given JavaScript with a given this and arguments. - -If this is nil, then some special handling takes place to determine the proper -this value, falling back to a "standard" invocation if necessary (where this is -undefined). - -If source begins with "new " (A lowercase new followed by a space), then Call -will invoke the function constructor rather than performing a function call. In -this case, the this argument has no effect. - -```go -// value is a String object -value, _ := vm.Call("Object", nil, "Hello, World.") - -// Likewise... -value, _ := vm.Call("new Object", nil, "Hello, World.") - -// This will perform a concat on the given array and return the result -// value is [ 1, 2, 3, undefined, 4, 5, 6, 7, "abc" ] -value, _ := vm.Call(`[ 1, 2, 3, undefined, 4 ].concat`, nil, 5, 6, 7, "abc") -``` - -#### func (*Otto) Compile - -```go -func (self *Otto) Compile(filename string, src interface{}) (*Script, error) -``` -Compile will parse the given source and return a Script value or nil and an -error if there was a problem during compilation. - -```go -script, err := vm.Compile("", `var abc; if (!abc) abc = 0; abc += 2; abc;`) -vm.Run(script) -``` - -#### func (*Otto) Copy - -```go -func (in *Otto) Copy() *Otto -``` -Copy will create a copy/clone of the runtime. - -Copy is useful for saving some time when creating many similar runtimes. - -This method works by walking the original runtime and cloning each object, -scope, stash, etc. into a new runtime. - -Be on the lookout for memory leaks or inadvertent sharing of resources. - -#### func (Otto) Get - -```go -func (self Otto) Get(name string) (Value, error) -``` -Get the value of the top-level binding of the given name. - -If there is an error (like the binding does not exist), then the value will be -undefined. - -#### func (Otto) Object - -```go -func (self Otto) Object(source string) (*Object, error) -``` -Object will run the given source and return the result as an object. - -For example, accessing an existing object: - -```go -object, _ := vm.Object(`Number`) -``` - -Or, creating a new object: - -```go -object, _ := vm.Object(`({ xyzzy: "Nothing happens." })`) -``` - -Or, creating and assigning an object: - -```go -object, _ := vm.Object(`xyzzy = {}`) -object.Set("volume", 11) -``` - -If there is an error (like the source does not result in an object), then nil -and an error is returned. - -#### func (Otto) Run - -```go -func (self Otto) Run(src interface{}) (Value, error) -``` -Run will run the given source (parsing it first if necessary), returning the -resulting value and error (if any) - -src may be a string, a byte slice, a bytes.Buffer, or an io.Reader, but it MUST -always be in UTF-8. - -If the runtime is unable to parse source, then this function will return -undefined and the parse error (nothing will be evaluated in this case). - -src may also be a Script. - -src may also be a Program, but if the AST has been modified, then runtime -behavior is undefined. - -#### func (Otto) Set - -```go -func (self Otto) Set(name string, value interface{}) error -``` -Set the top-level binding of the given name to the given value. - -Set will automatically apply ToValue to the given value in order to convert it -to a JavaScript value (type Value). - -If there is an error (like the binding is read-only, or the ToValue conversion -fails), then an error is returned. - -If the top-level binding does not exist, it will be created. - -#### func (Otto) ToValue - -```go -func (self Otto) ToValue(value interface{}) (Value, error) -``` -ToValue will convert an interface{} value to a value digestible by -otto/JavaScript. - -#### type Script - -```go -type Script struct { -} -``` - -Script is a handle for some (reusable) JavaScript. Passing a Script value to a -run method will evaluate the JavaScript. - -#### func (*Script) String - -```go -func (self *Script) String() string -``` - -#### type Value - -```go -type Value struct { -} -``` - -Value is the representation of a JavaScript value. - -#### func FalseValue - -```go -func FalseValue() Value -``` -FalseValue will return a value representing false. - -It is equivalent to: - -```go -ToValue(false) -``` - -#### func NaNValue - -```go -func NaNValue() Value -``` -NaNValue will return a value representing NaN. - -It is equivalent to: - -```go -ToValue(math.NaN()) -``` - -#### func NullValue - -```go -func NullValue() Value -``` -NullValue will return a Value representing null. - -#### func ToValue - -```go -func ToValue(value interface{}) (Value, error) -``` -ToValue will convert an interface{} value to a value digestible by -otto/JavaScript - -This function will not work for advanced types (struct, map, slice/array, etc.) -and you should use Otto.ToValue instead. - -#### func TrueValue - -```go -func TrueValue() Value -``` -TrueValue will return a value representing true. - -It is equivalent to: - -```go -ToValue(true) -``` - -#### func UndefinedValue - -```go -func UndefinedValue() Value -``` -UndefinedValue will return a Value representing undefined. - -#### func (Value) Call - -```go -func (value Value) Call(this Value, argumentList ...interface{}) (Value, error) -``` -Call the value as a function with the given this value and argument list and -return the result of invocation. It is essentially equivalent to: - - value.apply(thisValue, argumentList) - -An undefined value and an error will result if: - - 1. There is an error during conversion of the argument list - 2. The value is not actually a function - 3. An (uncaught) exception is thrown - -#### func (Value) Class - -```go -func (value Value) Class() string -``` -Class will return the class string of the value or the empty string if value is -not an object. - -The return value will (generally) be one of: - - Object - Function - Array - String - Number - Boolean - Date - RegExp - -#### func (Value) Export - -```go -func (self Value) Export() (interface{}, error) -``` -Export will attempt to convert the value to a Go representation and return it -via an interface{} kind. - -Export returns an error, but it will always be nil. It is present for backwards -compatibility. - -If a reasonable conversion is not possible, then the original value is returned. - - undefined -> nil (FIXME?: Should be Value{}) - null -> nil - boolean -> bool - number -> A number type (int, float32, uint64, ...) - string -> string - Array -> []interface{} - Object -> map[string]interface{} - -#### func (Value) IsBoolean - -```go -func (value Value) IsBoolean() bool -``` -IsBoolean will return true if value is a boolean (primitive). - -#### func (Value) IsDefined - -```go -func (value Value) IsDefined() bool -``` -IsDefined will return false if the value is undefined, and true otherwise. - -#### func (Value) IsFunction - -```go -func (value Value) IsFunction() bool -``` -IsFunction will return true if value is a function. - -#### func (Value) IsNaN - -```go -func (value Value) IsNaN() bool -``` -IsNaN will return true if value is NaN (or would convert to NaN). - -#### func (Value) IsNull - -```go -func (value Value) IsNull() bool -``` -IsNull will return true if the value is null, and false otherwise. - -#### func (Value) IsNumber - -```go -func (value Value) IsNumber() bool -``` -IsNumber will return true if value is a number (primitive). - -#### func (Value) IsObject - -```go -func (value Value) IsObject() bool -``` -IsObject will return true if value is an object. - -#### func (Value) IsPrimitive - -```go -func (value Value) IsPrimitive() bool -``` -IsPrimitive will return true if value is a primitive (any kind of primitive). - -#### func (Value) IsString - -```go -func (value Value) IsString() bool -``` -IsString will return true if value is a string (primitive). - -#### func (Value) IsUndefined - -```go -func (value Value) IsUndefined() bool -``` -IsUndefined will return true if the value is undefined, and false otherwise. - -#### func (Value) Object - -```go -func (value Value) Object() *Object -``` -Object will return the object of the value, or nil if value is not an object. - -This method will not do any implicit conversion. For example, calling this -method on a string primitive value will not return a String object. - -#### func (Value) String - -```go -func (value Value) String() string -``` -String will return the value as a string. - -This method will make return the empty string if there is an error. - -#### func (Value) ToBoolean - -```go -func (value Value) ToBoolean() (bool, error) -``` -ToBoolean will convert the value to a boolean (bool). - - ToValue(0).ToBoolean() => false - ToValue("").ToBoolean() => false - ToValue(true).ToBoolean() => true - ToValue(1).ToBoolean() => true - ToValue("Nothing happens").ToBoolean() => true - -If there is an error during the conversion process (like an uncaught exception), -then the result will be false and an error. - -#### func (Value) ToFloat - -```go -func (value Value) ToFloat() (float64, error) -``` -ToFloat will convert the value to a number (float64). - - ToValue(0).ToFloat() => 0. - ToValue(1.1).ToFloat() => 1.1 - ToValue("11").ToFloat() => 11. - -If there is an error during the conversion process (like an uncaught exception), -then the result will be 0 and an error. - -#### func (Value) ToInteger - -```go -func (value Value) ToInteger() (int64, error) -``` -ToInteger will convert the value to a number (int64). - - ToValue(0).ToInteger() => 0 - ToValue(1.1).ToInteger() => 1 - ToValue("11").ToInteger() => 11 - -If there is an error during the conversion process (like an uncaught exception), -then the result will be 0 and an error. - -#### func (Value) ToString - -```go -func (value Value) ToString() (string, error) -``` -ToString will convert the value to a string (string). - - ToValue(0).ToString() => "0" - ToValue(false).ToString() => "false" - ToValue(1.1).ToString() => "1.1" - ToValue("11").ToString() => "11" - ToValue('Nothing happens.').ToString() => "Nothing happens." - -If there is an error during the conversion process (like an uncaught exception), -then the result will be the empty string ("") and an error. - --- -**godocdown** http://github.com/robertkrimen/godocdown diff --git a/vendor/github.com/robertkrimen/otto/ast/README.markdown b/vendor/github.com/robertkrimen/otto/ast/README.markdown deleted file mode 100644 index a785da911..000000000 --- a/vendor/github.com/robertkrimen/otto/ast/README.markdown +++ /dev/null @@ -1,1068 +0,0 @@ -# ast --- - import "github.com/robertkrimen/otto/ast" - -Package ast declares types representing a JavaScript AST. - - -### Warning - -The parser and AST interfaces are still works-in-progress (particularly where -node types are concerned) and may change in the future. - -## Usage - -#### type ArrayLiteral - -```go -type ArrayLiteral struct { - LeftBracket file.Idx - RightBracket file.Idx - Value []Expression -} -``` - - -#### func (*ArrayLiteral) Idx0 - -```go -func (self *ArrayLiteral) Idx0() file.Idx -``` - -#### func (*ArrayLiteral) Idx1 - -```go -func (self *ArrayLiteral) Idx1() file.Idx -``` - -#### type AssignExpression - -```go -type AssignExpression struct { - Operator token.Token - Left Expression - Right Expression -} -``` - - -#### func (*AssignExpression) Idx0 - -```go -func (self *AssignExpression) Idx0() file.Idx -``` - -#### func (*AssignExpression) Idx1 - -```go -func (self *AssignExpression) Idx1() file.Idx -``` - -#### type BadExpression - -```go -type BadExpression struct { - From file.Idx - To file.Idx -} -``` - - -#### func (*BadExpression) Idx0 - -```go -func (self *BadExpression) Idx0() file.Idx -``` - -#### func (*BadExpression) Idx1 - -```go -func (self *BadExpression) Idx1() file.Idx -``` - -#### type BadStatement - -```go -type BadStatement struct { - From file.Idx - To file.Idx -} -``` - - -#### func (*BadStatement) Idx0 - -```go -func (self *BadStatement) Idx0() file.Idx -``` - -#### func (*BadStatement) Idx1 - -```go -func (self *BadStatement) Idx1() file.Idx -``` - -#### type BinaryExpression - -```go -type BinaryExpression struct { - Operator token.Token - Left Expression - Right Expression - Comparison bool -} -``` - - -#### func (*BinaryExpression) Idx0 - -```go -func (self *BinaryExpression) Idx0() file.Idx -``` - -#### func (*BinaryExpression) Idx1 - -```go -func (self *BinaryExpression) Idx1() file.Idx -``` - -#### type BlockStatement - -```go -type BlockStatement struct { - LeftBrace file.Idx - List []Statement - RightBrace file.Idx -} -``` - - -#### func (*BlockStatement) Idx0 - -```go -func (self *BlockStatement) Idx0() file.Idx -``` - -#### func (*BlockStatement) Idx1 - -```go -func (self *BlockStatement) Idx1() file.Idx -``` - -#### type BooleanLiteral - -```go -type BooleanLiteral struct { - Idx file.Idx - Literal string - Value bool -} -``` - - -#### func (*BooleanLiteral) Idx0 - -```go -func (self *BooleanLiteral) Idx0() file.Idx -``` - -#### func (*BooleanLiteral) Idx1 - -```go -func (self *BooleanLiteral) Idx1() file.Idx -``` - -#### type BracketExpression - -```go -type BracketExpression struct { - Left Expression - Member Expression - LeftBracket file.Idx - RightBracket file.Idx -} -``` - - -#### func (*BracketExpression) Idx0 - -```go -func (self *BracketExpression) Idx0() file.Idx -``` - -#### func (*BracketExpression) Idx1 - -```go -func (self *BracketExpression) Idx1() file.Idx -``` - -#### type BranchStatement - -```go -type BranchStatement struct { - Idx file.Idx - Token token.Token - Label *Identifier -} -``` - - -#### func (*BranchStatement) Idx0 - -```go -func (self *BranchStatement) Idx0() file.Idx -``` - -#### func (*BranchStatement) Idx1 - -```go -func (self *BranchStatement) Idx1() file.Idx -``` - -#### type CallExpression - -```go -type CallExpression struct { - Callee Expression - LeftParenthesis file.Idx - ArgumentList []Expression - RightParenthesis file.Idx -} -``` - - -#### func (*CallExpression) Idx0 - -```go -func (self *CallExpression) Idx0() file.Idx -``` - -#### func (*CallExpression) Idx1 - -```go -func (self *CallExpression) Idx1() file.Idx -``` - -#### type CaseStatement - -```go -type CaseStatement struct { - Case file.Idx - Test Expression - Consequent []Statement -} -``` - - -#### func (*CaseStatement) Idx0 - -```go -func (self *CaseStatement) Idx0() file.Idx -``` - -#### func (*CaseStatement) Idx1 - -```go -func (self *CaseStatement) Idx1() file.Idx -``` - -#### type CatchStatement - -```go -type CatchStatement struct { - Catch file.Idx - Parameter *Identifier - Body Statement -} -``` - - -#### func (*CatchStatement) Idx0 - -```go -func (self *CatchStatement) Idx0() file.Idx -``` - -#### func (*CatchStatement) Idx1 - -```go -func (self *CatchStatement) Idx1() file.Idx -``` - -#### type ConditionalExpression - -```go -type ConditionalExpression struct { - Test Expression - Consequent Expression - Alternate Expression -} -``` - - -#### func (*ConditionalExpression) Idx0 - -```go -func (self *ConditionalExpression) Idx0() file.Idx -``` - -#### func (*ConditionalExpression) Idx1 - -```go -func (self *ConditionalExpression) Idx1() file.Idx -``` - -#### type DebuggerStatement - -```go -type DebuggerStatement struct { - Debugger file.Idx -} -``` - - -#### func (*DebuggerStatement) Idx0 - -```go -func (self *DebuggerStatement) Idx0() file.Idx -``` - -#### func (*DebuggerStatement) Idx1 - -```go -func (self *DebuggerStatement) Idx1() file.Idx -``` - -#### type Declaration - -```go -type Declaration interface { - // contains filtered or unexported methods -} -``` - -All declaration nodes implement the Declaration interface. - -#### type DoWhileStatement - -```go -type DoWhileStatement struct { - Do file.Idx - Test Expression - Body Statement -} -``` - - -#### func (*DoWhileStatement) Idx0 - -```go -func (self *DoWhileStatement) Idx0() file.Idx -``` - -#### func (*DoWhileStatement) Idx1 - -```go -func (self *DoWhileStatement) Idx1() file.Idx -``` - -#### type DotExpression - -```go -type DotExpression struct { - Left Expression - Identifier Identifier -} -``` - - -#### func (*DotExpression) Idx0 - -```go -func (self *DotExpression) Idx0() file.Idx -``` - -#### func (*DotExpression) Idx1 - -```go -func (self *DotExpression) Idx1() file.Idx -``` - -#### type EmptyStatement - -```go -type EmptyStatement struct { - Semicolon file.Idx -} -``` - - -#### func (*EmptyStatement) Idx0 - -```go -func (self *EmptyStatement) Idx0() file.Idx -``` - -#### func (*EmptyStatement) Idx1 - -```go -func (self *EmptyStatement) Idx1() file.Idx -``` - -#### type Expression - -```go -type Expression interface { - Node - // contains filtered or unexported methods -} -``` - -All expression nodes implement the Expression interface. - -#### type ExpressionStatement - -```go -type ExpressionStatement struct { - Expression Expression -} -``` - - -#### func (*ExpressionStatement) Idx0 - -```go -func (self *ExpressionStatement) Idx0() file.Idx -``` - -#### func (*ExpressionStatement) Idx1 - -```go -func (self *ExpressionStatement) Idx1() file.Idx -``` - -#### type ForInStatement - -```go -type ForInStatement struct { - For file.Idx - Into Expression - Source Expression - Body Statement -} -``` - - -#### func (*ForInStatement) Idx0 - -```go -func (self *ForInStatement) Idx0() file.Idx -``` - -#### func (*ForInStatement) Idx1 - -```go -func (self *ForInStatement) Idx1() file.Idx -``` - -#### type ForStatement - -```go -type ForStatement struct { - For file.Idx - Initializer Expression - Update Expression - Test Expression - Body Statement -} -``` - - -#### func (*ForStatement) Idx0 - -```go -func (self *ForStatement) Idx0() file.Idx -``` - -#### func (*ForStatement) Idx1 - -```go -func (self *ForStatement) Idx1() file.Idx -``` - -#### type FunctionDeclaration - -```go -type FunctionDeclaration struct { - Function *FunctionLiteral -} -``` - - -#### type FunctionLiteral - -```go -type FunctionLiteral struct { - Function file.Idx - Name *Identifier - ParameterList *ParameterList - Body Statement - Source string - - DeclarationList []Declaration -} -``` - - -#### func (*FunctionLiteral) Idx0 - -```go -func (self *FunctionLiteral) Idx0() file.Idx -``` - -#### func (*FunctionLiteral) Idx1 - -```go -func (self *FunctionLiteral) Idx1() file.Idx -``` - -#### type Identifier - -```go -type Identifier struct { - Name string - Idx file.Idx -} -``` - - -#### func (*Identifier) Idx0 - -```go -func (self *Identifier) Idx0() file.Idx -``` - -#### func (*Identifier) Idx1 - -```go -func (self *Identifier) Idx1() file.Idx -``` - -#### type IfStatement - -```go -type IfStatement struct { - If file.Idx - Test Expression - Consequent Statement - Alternate Statement -} -``` - - -#### func (*IfStatement) Idx0 - -```go -func (self *IfStatement) Idx0() file.Idx -``` - -#### func (*IfStatement) Idx1 - -```go -func (self *IfStatement) Idx1() file.Idx -``` - -#### type LabelledStatement - -```go -type LabelledStatement struct { - Label *Identifier - Colon file.Idx - Statement Statement -} -``` - - -#### func (*LabelledStatement) Idx0 - -```go -func (self *LabelledStatement) Idx0() file.Idx -``` - -#### func (*LabelledStatement) Idx1 - -```go -func (self *LabelledStatement) Idx1() file.Idx -``` - -#### type NewExpression - -```go -type NewExpression struct { - New file.Idx - Callee Expression - LeftParenthesis file.Idx - ArgumentList []Expression - RightParenthesis file.Idx -} -``` - - -#### func (*NewExpression) Idx0 - -```go -func (self *NewExpression) Idx0() file.Idx -``` - -#### func (*NewExpression) Idx1 - -```go -func (self *NewExpression) Idx1() file.Idx -``` - -#### type Node - -```go -type Node interface { - Idx0() file.Idx // The index of the first character belonging to the node - Idx1() file.Idx // The index of the first character immediately after the node -} -``` - -All nodes implement the Node interface. - -#### type NullLiteral - -```go -type NullLiteral struct { - Idx file.Idx - Literal string -} -``` - - -#### func (*NullLiteral) Idx0 - -```go -func (self *NullLiteral) Idx0() file.Idx -``` - -#### func (*NullLiteral) Idx1 - -```go -func (self *NullLiteral) Idx1() file.Idx -``` - -#### type NumberLiteral - -```go -type NumberLiteral struct { - Idx file.Idx - Literal string - Value interface{} -} -``` - - -#### func (*NumberLiteral) Idx0 - -```go -func (self *NumberLiteral) Idx0() file.Idx -``` - -#### func (*NumberLiteral) Idx1 - -```go -func (self *NumberLiteral) Idx1() file.Idx -``` - -#### type ObjectLiteral - -```go -type ObjectLiteral struct { - LeftBrace file.Idx - RightBrace file.Idx - Value []Property -} -``` - - -#### func (*ObjectLiteral) Idx0 - -```go -func (self *ObjectLiteral) Idx0() file.Idx -``` - -#### func (*ObjectLiteral) Idx1 - -```go -func (self *ObjectLiteral) Idx1() file.Idx -``` - -#### type ParameterList - -```go -type ParameterList struct { - Opening file.Idx - List []*Identifier - Closing file.Idx -} -``` - - -#### type Program - -```go -type Program struct { - Body []Statement - - DeclarationList []Declaration - - File *file.File -} -``` - - -#### func (*Program) Idx0 - -```go -func (self *Program) Idx0() file.Idx -``` - -#### func (*Program) Idx1 - -```go -func (self *Program) Idx1() file.Idx -``` - -#### type Property - -```go -type Property struct { - Key string - Kind string - Value Expression -} -``` - - -#### type RegExpLiteral - -```go -type RegExpLiteral struct { - Idx file.Idx - Literal string - Pattern string - Flags string - Value string -} -``` - - -#### func (*RegExpLiteral) Idx0 - -```go -func (self *RegExpLiteral) Idx0() file.Idx -``` - -#### func (*RegExpLiteral) Idx1 - -```go -func (self *RegExpLiteral) Idx1() file.Idx -``` - -#### type ReturnStatement - -```go -type ReturnStatement struct { - Return file.Idx - Argument Expression -} -``` - - -#### func (*ReturnStatement) Idx0 - -```go -func (self *ReturnStatement) Idx0() file.Idx -``` - -#### func (*ReturnStatement) Idx1 - -```go -func (self *ReturnStatement) Idx1() file.Idx -``` - -#### type SequenceExpression - -```go -type SequenceExpression struct { - Sequence []Expression -} -``` - - -#### func (*SequenceExpression) Idx0 - -```go -func (self *SequenceExpression) Idx0() file.Idx -``` - -#### func (*SequenceExpression) Idx1 - -```go -func (self *SequenceExpression) Idx1() file.Idx -``` - -#### type Statement - -```go -type Statement interface { - Node - // contains filtered or unexported methods -} -``` - -All statement nodes implement the Statement interface. - -#### type StringLiteral - -```go -type StringLiteral struct { - Idx file.Idx - Literal string - Value string -} -``` - - -#### func (*StringLiteral) Idx0 - -```go -func (self *StringLiteral) Idx0() file.Idx -``` - -#### func (*StringLiteral) Idx1 - -```go -func (self *StringLiteral) Idx1() file.Idx -``` - -#### type SwitchStatement - -```go -type SwitchStatement struct { - Switch file.Idx - Discriminant Expression - Default int - Body []*CaseStatement -} -``` - - -#### func (*SwitchStatement) Idx0 - -```go -func (self *SwitchStatement) Idx0() file.Idx -``` - -#### func (*SwitchStatement) Idx1 - -```go -func (self *SwitchStatement) Idx1() file.Idx -``` - -#### type ThisExpression - -```go -type ThisExpression struct { - Idx file.Idx -} -``` - - -#### func (*ThisExpression) Idx0 - -```go -func (self *ThisExpression) Idx0() file.Idx -``` - -#### func (*ThisExpression) Idx1 - -```go -func (self *ThisExpression) Idx1() file.Idx -``` - -#### type ThrowStatement - -```go -type ThrowStatement struct { - Throw file.Idx - Argument Expression -} -``` - - -#### func (*ThrowStatement) Idx0 - -```go -func (self *ThrowStatement) Idx0() file.Idx -``` - -#### func (*ThrowStatement) Idx1 - -```go -func (self *ThrowStatement) Idx1() file.Idx -``` - -#### type TryStatement - -```go -type TryStatement struct { - Try file.Idx - Body Statement - Catch *CatchStatement - Finally Statement -} -``` - - -#### func (*TryStatement) Idx0 - -```go -func (self *TryStatement) Idx0() file.Idx -``` - -#### func (*TryStatement) Idx1 - -```go -func (self *TryStatement) Idx1() file.Idx -``` - -#### type UnaryExpression - -```go -type UnaryExpression struct { - Operator token.Token - Idx file.Idx // If a prefix operation - Operand Expression - Postfix bool -} -``` - - -#### func (*UnaryExpression) Idx0 - -```go -func (self *UnaryExpression) Idx0() file.Idx -``` - -#### func (*UnaryExpression) Idx1 - -```go -func (self *UnaryExpression) Idx1() file.Idx -``` - -#### type VariableDeclaration - -```go -type VariableDeclaration struct { - Var file.Idx - List []*VariableExpression -} -``` - - -#### type VariableExpression - -```go -type VariableExpression struct { - Name string - Idx file.Idx - Initializer Expression -} -``` - - -#### func (*VariableExpression) Idx0 - -```go -func (self *VariableExpression) Idx0() file.Idx -``` - -#### func (*VariableExpression) Idx1 - -```go -func (self *VariableExpression) Idx1() file.Idx -``` - -#### type VariableStatement - -```go -type VariableStatement struct { - Var file.Idx - List []Expression -} -``` - - -#### func (*VariableStatement) Idx0 - -```go -func (self *VariableStatement) Idx0() file.Idx -``` - -#### func (*VariableStatement) Idx1 - -```go -func (self *VariableStatement) Idx1() file.Idx -``` - -#### type WhileStatement - -```go -type WhileStatement struct { - While file.Idx - Test Expression - Body Statement -} -``` - - -#### func (*WhileStatement) Idx0 - -```go -func (self *WhileStatement) Idx0() file.Idx -``` - -#### func (*WhileStatement) Idx1 - -```go -func (self *WhileStatement) Idx1() file.Idx -``` - -#### type WithStatement - -```go -type WithStatement struct { - With file.Idx - Object Expression - Body Statement -} -``` - - -#### func (*WithStatement) Idx0 - -```go -func (self *WithStatement) Idx0() file.Idx -``` - -#### func (*WithStatement) Idx1 - -```go -func (self *WithStatement) Idx1() file.Idx -``` - --- -**godocdown** http://github.com/robertkrimen/godocdown diff --git a/vendor/github.com/robertkrimen/otto/file/README.markdown b/vendor/github.com/robertkrimen/otto/file/README.markdown deleted file mode 100644 index 79757baa8..000000000 --- a/vendor/github.com/robertkrimen/otto/file/README.markdown +++ /dev/null @@ -1,110 +0,0 @@ -# file --- - import "github.com/robertkrimen/otto/file" - -Package file encapsulates the file abstractions used by the ast & parser. - -## Usage - -#### type File - -```go -type File struct { -} -``` - - -#### func NewFile - -```go -func NewFile(filename, src string, base int) *File -``` - -#### func (*File) Base - -```go -func (fl *File) Base() int -``` - -#### func (*File) Name - -```go -func (fl *File) Name() string -``` - -#### func (*File) Source - -```go -func (fl *File) Source() string -``` - -#### type FileSet - -```go -type FileSet struct { -} -``` - -A FileSet represents a set of source files. - -#### func (*FileSet) AddFile - -```go -func (self *FileSet) AddFile(filename, src string) int -``` -AddFile adds a new file with the given filename and src. - -This an internal method, but exported for cross-package use. - -#### func (*FileSet) File - -```go -func (self *FileSet) File(idx Idx) *File -``` - -#### func (*FileSet) Position - -```go -func (self *FileSet) Position(idx Idx) *Position -``` -Position converts an Idx in the FileSet into a Position. - -#### type Idx - -```go -type Idx int -``` - -Idx is a compact encoding of a source position within a file set. It can be -converted into a Position for a more convenient, but much larger, -representation. - -#### type Position - -```go -type Position struct { - Filename string // The filename where the error occurred, if any - Offset int // The src offset - Line int // The line number, starting at 1 - Column int // The column number, starting at 1 (The character count) - -} -``` - -Position describes an arbitrary source position including the filename, line, -and column location. - -#### func (*Position) String - -```go -func (self *Position) String() string -``` -String returns a string in one of several forms: - - file:line:column A valid position with filename - line:column A valid position without filename - file An invalid position with filename - - An invalid position without filename - --- -**godocdown** http://github.com/robertkrimen/godocdown diff --git a/vendor/github.com/robertkrimen/otto/inline.pl b/vendor/github.com/robertkrimen/otto/inline.pl deleted file mode 100755 index c3620b4a2..000000000 --- a/vendor/github.com/robertkrimen/otto/inline.pl +++ /dev/null @@ -1,1086 +0,0 @@ -#!/usr/bin/env perl - -my $_fmt; -$_fmt = "gofmt"; -$_fmt = "cat -n" if "cat" eq ($ARGV[0] || ""); - -use strict; -use warnings; -use IO::File; - -my $self = __PACKAGE__; - -sub functionLabel ($) { - return "$_[0]_function"; -} - -sub trim ($) { - local $_ = shift; - s/^\s*//, s/\s*$// for $_; - return $_; -} - -open my $fmt, "|-", "$_fmt" or die $!; - -$fmt->print(<<_END_); -package otto - -import ( - "math" -) - -func _newContext(runtime *_runtime) { -@{[ join "\n", $self->newContext() ]} -} - -func newConsoleObject(runtime *_runtime) *_object { -@{[ join "\n", $self->newConsoleObject() ]} -} -_END_ - -for (qw/int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float32 float64/) { - $fmt->print(<<_END_); - -func toValue_$_(value $_) Value { - return Value{ - kind: valueNumber, - value: value, - } -} -_END_ -} - -$fmt->print(<<_END_); - -func toValue_string(value string) Value { - return Value{ - kind: valueString, - value: value, - } -} - -func toValue_string16(value []uint16) Value { - return Value{ - kind: valueString, - value: value, - } -} - -func toValue_bool(value bool) Value { - return Value{ - kind: valueBoolean, - value: value, - } -} - -func toValue_object(value *_object) Value { - return Value{ - kind: valueObject, - value: value, - } -} -_END_ - -close $fmt; - -sub newConsoleObject { - my $self = shift; - - return - $self->block(sub { - my $class = "Console"; - my @got = $self->functionDeclare( - $class, - "log", 0, - "debug:log", 0, - "info:log", 0, - "error", 0, - "warn:error", 0, - "dir", 0, - "time", 0, - "timeEnd", 0, - "trace", 0, - "assert", 0, - ); - return - "return @{[ $self->newObject(@got) ]}" - }), - ; -} - -sub newContext { - my $self = shift; - return - # ObjectPrototype - $self->block(sub { - my $class = "Object"; - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classObject", - undef, - "prototypeValueObject", - ), - }), - - # FunctionPrototype - $self->block(sub { - my $class = "Function"; - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classObject", - ".ObjectPrototype", - "prototypeValueFunction", - ), - }), - - # ObjectPrototype - $self->block(sub { - my $class = "Object"; - my @got = $self->functionDeclare( - $class, - "valueOf", 0, - "toString", 0, - "toLocaleString", 0, - "hasOwnProperty", 1, - "isPrototypeOf", 1, - "propertyIsEnumerable", 1, - ); - my @propertyMap = $self->propertyMap( - @got, - $self->property("constructor", undef), - ); - my $propertyOrder = $self->propertyOrder(@propertyMap); - $propertyOrder =~ s/^propertyOrder: //; - return - ".${class}Prototype.property =", @propertyMap, - ".${class}Prototype.propertyOrder =", $propertyOrder, - }), - - # FunctionPrototype - $self->block(sub { - my $class = "Function"; - my @got = $self->functionDeclare( - $class, - "toString", 0, - "apply", 2, - "call", 1, - "bind", 1, - ); - my @propertyMap = $self->propertyMap( - @got, - $self->property("constructor", undef), - $self->property("length", $self->numberValue(0), "0"), - ); - my $propertyOrder = $self->propertyOrder(@propertyMap); - $propertyOrder =~ s/^propertyOrder: //; - return - ".${class}Prototype.property =", @propertyMap, - ".${class}Prototype.propertyOrder =", $propertyOrder, - }), - - # Object - $self->block(sub { - my $class = "Object"; - return - ".$class =", - $self->globalFunction( - $class, - 1, - $self->functionDeclare( - $class, - "getPrototypeOf", 1, - "getOwnPropertyDescriptor", 2, - "defineProperty", 3, - "defineProperties", 2, - "create", 2, - "isExtensible", 1, - "preventExtensions", 1, - "isSealed", 1, - "seal", 1, - "isFrozen", 1, - "freeze", 1, - "keys", 1, - "getOwnPropertyNames", 1, - ), - ), - }), - - # Function - $self->block(sub { - my $class = "Function"; - return - "Function :=", - $self->globalFunction( - $class, - 1, - ), - ".$class = Function", - }), - - # Array - $self->block(sub { - my $class = "Array"; - my @got = $self->functionDeclare( - $class, - "toString", 0, - "toLocaleString", 0, - "concat", 1, - "join", 1, - "splice", 2, - "shift", 0, - "pop", 0, - "push", 1, - "slice", 2, - "unshift", 1, - "reverse", 0, - "sort", 1, - "indexOf", 1, - "lastIndexOf", 1, - "every", 1, - "some", 1, - "forEach", 1, - "map", 1, - "filter", 1, - "reduce", 1, - "reduceRight", 1, - ); - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classArray", - ".ObjectPrototype", - undef, - $self->property("length", $self->numberValue("uint32(0)"), "0100"), - @got, - ), - ".$class =", - $self->globalFunction( - $class, - 1, - $self->functionDeclare( - $class, - "isArray", 1, - ), - ), - }), - - # String - $self->block(sub { - my $class = "String"; - my @got = $self->functionDeclare( - $class, - "toString", 0, - "valueOf", 0, - "charAt", 1, - "charCodeAt", 1, - "concat", 1, - "indexOf", 1, - "lastIndexOf", 1, - "match", 1, - "replace", 2, - "search", 1, - "split", 2, - "slice", 2, - "substring", 2, - "toLowerCase", 0, - "toUpperCase", 0, - "substr", 2, - "trim", 0, - "trimLeft", 0, - "trimRight", 0, - "localeCompare", 1, - "toLocaleLowerCase", 0, - "toLocaleUpperCase", 0, - ); - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classString", - ".ObjectPrototype", - "prototypeValueString", - $self->property("length", $self->numberValue("int(0)"), "0"), - @got, - ), - ".$class =", - $self->globalFunction( - $class, - 1, - $self->functionDeclare( - $class, - "fromCharCode", 1, - ), - ), - }), - - # Boolean - $self->block(sub { - my $class = "Boolean"; - my @got = $self->functionDeclare( - $class, - "toString", 0, - "valueOf", 0, - ); - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classObject", - ".ObjectPrototype", - "prototypeValueBoolean", - @got, - ), - ".$class =", - $self->globalFunction( - $class, - 1, - $self->functionDeclare( - $class, - ), - ), - }), - - # Number - $self->block(sub { - my $class = "Number"; - my @got = $self->functionDeclare( - $class, - "toString", 0, - "valueOf", 0, - "toFixed", 1, - "toExponential", 1, - "toPrecision", 1, - "toLocaleString", 1, - ); - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classObject", - ".ObjectPrototype", - "prototypeValueNumber", - @got, - ), - ".$class =", - $self->globalFunction( - $class, - 1, - $self->functionDeclare( - $class, - ), - $self->numberConstantDeclare( - "MAX_VALUE", "math.MaxFloat64", - "MIN_VALUE", "math.SmallestNonzeroFloat64", - "NaN", "math.NaN()", - "NEGATIVE_INFINITY", "math.Inf(-1)", - "POSITIVE_INFINITY", "math.Inf(+1)", - ), - ), - }), - - # Math - $self->block(sub { - my $class = "Math"; - return - ".$class =", - $self->globalObject( - $class, - $self->functionDeclare( - $class, - "abs", 1, - "acos", 1, - "asin", 1, - "atan", 1, - "atan2", 1, - "ceil", 1, - "cos", 1, - "exp", 1, - "floor", 1, - "log", 1, - "max", 2, - "min", 2, - "pow", 2, - "random", 0, - "round", 1, - "sin", 1, - "sqrt", 1, - "tan", 1, - ), - $self->numberConstantDeclare( - "E", "math.E", - "LN10", "math.Ln10", - "LN2", "math.Ln2", - "LOG2E", "math.Log2E", - "LOG10E", "math.Log10E", - "PI", "math.Pi", - "SQRT1_2", "sqrt1_2", - "SQRT2", "math.Sqrt2", - ) - ), - }), - - # Date - $self->block(sub { - my $class = "Date"; - my @got = $self->functionDeclare( - $class, - "toString", 0, - "toDateString", 0, - "toTimeString", 0, - "toUTCString", 0, - "toISOString", 0, - "toJSON", 1, - "toGMTString", 0, - "toLocaleString", 0, - "toLocaleDateString", 0, - "toLocaleTimeString", 0, - "valueOf", 0, - "getTime", 0, - "getYear", 0, - "getFullYear", 0, - "getUTCFullYear", 0, - "getMonth", 0, - "getUTCMonth", 0, - "getDate", 0, - "getUTCDate", 0, - "getDay", 0, - "getUTCDay", 0, - "getHours", 0, - "getUTCHours", 0, - "getMinutes", 0, - "getUTCMinutes", 0, - "getSeconds", 0, - "getUTCSeconds", 0, - "getMilliseconds", 0, - "getUTCMilliseconds", 0, - "getTimezoneOffset", 0, - "setTime", 1, - "setMilliseconds", 1, - "setUTCMilliseconds", 1, - "setSeconds", 2, - "setUTCSeconds", 2, - "setMinutes", 3, - "setUTCMinutes", 3, - "setHours", 4, - "setUTCHours", 4, - "setDate", 1, - "setUTCDate", 1, - "setMonth", 2, - "setUTCMonth", 2, - "setYear", 1, - "setFullYear", 3, - "setUTCFullYear", 3, - ); - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classObject", - ".ObjectPrototype", - "prototypeValueDate", - @got, - ), - ".$class =", - $self->globalFunction( - $class, - 7, - $self->functionDeclare( - $class, - "parse", 1, - "UTC", 7, - "now", 0, - ), - ), - }), - - # RegExp - $self->block(sub { - my $class = "RegExp"; - my @got = $self->functionDeclare( - $class, - "toString", 0, - "exec", 1, - "test", 1, - "compile", 1, - ); - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classObject", - ".ObjectPrototype", - "prototypeValueRegExp", - @got, - ), - ".$class =", - $self->globalFunction( - $class, - 2, - $self->functionDeclare( - $class, - ), - ), - }), - - # Error - $self->block(sub { - my $class = "Error"; - my @got = $self->functionDeclare( - $class, - "toString", 0, - ); - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classObject", - ".ObjectPrototype", - undef, - @got, - $self->property("name", $self->stringValue("Error")), - $self->property("message", $self->stringValue("")), - ), - ".$class =", - $self->globalFunction( - $class, - 1, - $self->functionDeclare( - $class, - ), - ), - }), - - (map { - my $class = "${_}Error"; - $self->block(sub { - my @got = $self->functionDeclare( - $class, - ); - return - ".${class}Prototype =", - $self->globalPrototype( - $class, - "_classObject", - ".ErrorPrototype", - undef, - @got, - $self->property("name", $self->stringValue($class)), - ), - ".$class =", - $self->globalFunction( - $class, - 1, - $self->functionDeclare( - $class, - ), - ), - }); - } qw/Eval Type Range Reference Syntax URI/), - - # JSON - $self->block(sub { - my $class = "JSON"; - return - ".$class =", - $self->globalObject( - $class, - $self->functionDeclare( - $class, - "parse", 2, - "stringify", 3, - ), - ), - }), - - # Global - $self->block(sub { - my $class = "Global"; - my @got = $self->functionDeclare( - $class, - "eval", 1, - "parseInt", 2, - "parseFloat", 1, - "isNaN", 1, - "isFinite", 1, - "decodeURI", 1, - "decodeURIComponent", 1, - "encodeURI", 1, - "encodeURIComponent", 1, - "escape", 1, - "unescape", 1, - ); - my @propertyMap = $self->propertyMap( - @got, - $self->globalDeclare( - "Object", - "Function", - "Array", - "String", - "Boolean", - "Number", - "Math", - "Date", - "RegExp", - "Error", - "EvalError", - "TypeError", - "RangeError", - "ReferenceError", - "SyntaxError", - "URIError", - "JSON", - ), - $self->property("undefined", $self->undefinedValue(), "0"), - $self->property("NaN", $self->numberValue("math.NaN()"), "0"), - $self->property("Infinity", $self->numberValue("math.Inf(+1)"), "0"), - ); - my $propertyOrder = $self->propertyOrder(@propertyMap); - $propertyOrder =~ s/^propertyOrder: //; - return - "runtime.globalObject.property =", - @propertyMap, - "runtime.globalObject.propertyOrder =", - $propertyOrder, - ; - }), - ; -} - -sub propertyMap { - my $self = shift; - return "map[string]_property{", (join ",\n", @_, ""), "}", -} - -our (@preblock, @postblock); -sub block { - my $self = shift; - local @preblock = (); - local @postblock = (); - my @input = $_[0]->(); - my @output; - while (@input) { - local $_ = shift @input; - if (m/^\./) { - $_ = "runtime.global$_"; - } - if (m/ :?=$/) { - $_ .= shift @input; - } - push @output, $_; - } - return - "{", - @preblock, - @output, - @postblock, - "}", - ; -} - -sub numberConstantDeclare { - my $self = shift; - my @got; - while (@_) { - my $name = shift; - my $value = shift; - push @got, $self->property($name, $self->numberValue($value), "0"), - } - return @got; -} - -sub functionDeclare { - my $self = shift; - my $class = shift; - my $builtin = "builtin${class}"; - my @got; - while (@_) { - my $name = shift; - my $length = shift; - $name = $self->newFunction($name, "${builtin}_", $length); - push @got, $self->functionProperty($name), - } - return @got; -} - -sub globalDeclare { - my $self = shift; - my @got; - while (@_) { - my $name = shift; - push @got, $self->property($name, $self->objectValue("runtime.global.$name"), "0101"), - } - return @got; -} - -sub propertyOrder { - my $self = shift; - my $propertyMap = join "", @_; - - my (@keys) = $propertyMap =~ m/("\w+"):/g; - my $propertyOrder = - join "\n", "propertyOrder: []string{", (join ",\n", @keys, ""), "}"; - return $propertyOrder; -} - -sub globalObject { - my $self = shift; - my $name = shift; - - my $propertyMap = ""; - if (@_) { - $propertyMap = join "\n", $self->propertyMap(@_); - my $propertyOrder = $self->propertyOrder($propertyMap); - $propertyMap = "property: $propertyMap,\n$propertyOrder,"; - } - - return trim <<_END_; -&_object{ - runtime: runtime, - class: "$name", - objectClass: _classObject, - prototype: runtime.global.ObjectPrototype, - extensible: true, - $propertyMap -} -_END_ -} - -sub globalFunction { - my $self = shift; - my $name = shift; - my $length = shift; - - my $builtin = "builtin${name}"; - my $builtinNew = "builtinNew${name}"; - my $prototype = "runtime.global.${name}Prototype"; - my $propertyMap = ""; - unshift @_, - $self->property("length", $self->numberValue($length), "0"), - $self->property("prototype", $self->objectValue($prototype), "0"), - ; - - if (@_) { - $propertyMap = join "\n", $self->propertyMap(@_); - my $propertyOrder = $self->propertyOrder($propertyMap); - $propertyMap = "property: $propertyMap,\n$propertyOrder,"; - } - - push @postblock, $self->statement( - "$prototype.property[\"constructor\"] =", - $self->property(undef, $self->objectValue("runtime.global.${name}"), "0101"), - ); - - return trim <<_END_; -&_object{ - runtime: runtime, - class: "Function", - objectClass: _classObject, - prototype: runtime.global.FunctionPrototype, - extensible: true, - value: @{[ $self->nativeFunctionOf($name, $builtin, $builtinNew) ]}, - $propertyMap -} -_END_ -} - -sub nativeCallFunction { - my $self = shift; - my $name = shift; - my $func = shift; - return trim <<_END_; -_nativeCallFunction{ "$name", $func } -_END_ -} - -sub globalPrototype { - my $self = shift; - my $class = shift; - my $classObject = shift; - my $prototype = shift; - my $value = shift; - - if (!defined $prototype) { - $prototype = "nil"; - } - - if (!defined $value) { - $value = "nil"; - } - - if ($prototype =~ m/^\./) { - $prototype = "runtime.global$prototype"; - } - - my $propertyMap = ""; - if (@_) { - $propertyMap = join "\n", $self->propertyMap(@_); - my $propertyOrder = $self->propertyOrder($propertyMap); - $propertyMap = "property: $propertyMap,\n$propertyOrder,"; - } - - return trim <<_END_; -&_object{ - runtime: runtime, - class: "$class", - objectClass: $classObject, - prototype: $prototype, - extensible: true, - value: $value, - $propertyMap -} -_END_ -} - -sub newFunction { - my $self = shift; - my $name = shift; - my $func = shift; - my $length = shift; - - my @name = ($name, $name); - if ($name =~ m/^(\w+):(\w+)$/) { - @name = ($1, $2); - $name = $name[0]; - } - - if ($func =~ m/^builtin\w+_$/) { - $func = "$func$name[1]"; - } - - my $propertyOrder = ""; - my @propertyMap = ( - $self->property("length", $self->numberValue($length), "0"), - ); - - if (@propertyMap) { - $propertyOrder = $self->propertyOrder(@propertyMap); - $propertyOrder = "$propertyOrder,"; - } - - my $label = functionLabel($name); - push @preblock, $self->statement( - "$label := @{[ trim <<_END_ ]}", -&_object{ - runtime: runtime, - class: "Function", - objectClass: _classObject, - prototype: runtime.global.FunctionPrototype, - extensible: true, - property: @{[ join "\n", $self->propertyMap(@propertyMap) ]}, - $propertyOrder - value: @{[ $self->nativeFunctionOf($name, $func) ]}, -} -_END_ - ); - - return $name; -} - -sub newObject { - my $self = shift; - - my $propertyMap = join "\n", $self->propertyMap(@_); - my $propertyOrder = $self->propertyOrder($propertyMap); - - return trim <<_END_; -&_object{ - runtime: runtime, - class: "Object", - objectClass: _classObject, - prototype: runtime.global.ObjectPrototype, - extensible: true, - property: $propertyMap, - $propertyOrder, -} -_END_ -} - -sub newPrototypeObject { - my $self = shift; - my $class = shift; - my $objectClass = shift; - my $value = shift; - if (defined $value) { - $value = "value: $value,"; - } - - my $propertyMap = join "\n", $self->propertyMap(@_); - my $propertyOrder = $self->propertyOrder($propertyMap); - - return trim <<_END_; -&_object{ - runtime: runtime, - class: "$class", - objectClass: $objectClass, - prototype: runtime.global.ObjectPrototype, - extensible: true, - property: $propertyMap, - $propertyOrder, - $value -} -_END_ -} - -sub functionProperty { - my $self = shift; - my $name = shift; - - return $self->property( - $name, - $self->objectValue(functionLabel($name)) - ); -} - -sub statement { - my $self = shift; - return join "\n", @_; -} - -sub functionOf { - my $self = shift; - my $call = shift; - my $construct = shift; - if ($construct) { - $construct = "construct: $construct,"; - } else { - $construct = ""; - } - - return trim <<_END_ -_functionObject{ - call: $call, - $construct -} -_END_ -} - -sub nativeFunctionOf { - my $self = shift; - my $name = shift; - my $call = shift; - my $construct = shift; - if ($construct) { - $construct = "construct: $construct,"; - } else { - $construct = ""; - } - - return trim <<_END_ -_nativeFunctionObject{ - name: "$name", - call: $call, - $construct -} -_END_ -} - -sub nameProperty { - my $self = shift; - my $name = shift; - my $value = shift; - - return trim <<_END_; -"$name": _property{ - mode: 0101, - value: $value, -} -_END_ -} - -sub numberValue { - my $self = shift; - my $value = shift; - return trim <<_END_; -Value{ - kind: valueNumber, - value: $value, -} -_END_ -} - -sub property { - my $self = shift; - my $name = shift; - my $value = shift; - my $mode = shift; - $mode = "0101" unless defined $mode; - if (! defined $value) { - $value = "Value{}"; - } - if (defined $name) { - return trim <<_END_; -"$name": _property{ - mode: $mode, - value: $value, -} -_END_ - } else { - return trim <<_END_; -_property{ - mode: $mode, - value: $value, -} -_END_ - } - -} - -sub objectProperty { - my $self = shift; - my $name = shift; - my $value = shift; - - return trim <<_END_; -"$name": _property{ - mode: 0101, - value: @{[ $self->objectValue($value)]}, -} -_END_ -} - -sub objectValue { - my $self = shift; - my $value = shift; - return trim <<_END_ -Value{ - kind: valueObject, - value: $value, -} -_END_ -} - -sub stringValue { - my $self = shift; - my $value = shift; - return trim <<_END_ -Value{ - kind: valueString, - value: "$value", -} -_END_ -} - -sub booleanValue { - my $self = shift; - my $value = shift; - return trim <<_END_ -Value{ - kind: valueBoolean, - value: $value, -} -_END_ -} - -sub undefinedValue { - my $self = shift; - return trim <<_END_ -Value{ - kind: valueUndefined, -} -_END_ -} diff --git a/vendor/github.com/robertkrimen/otto/parser/Makefile b/vendor/github.com/robertkrimen/otto/parser/Makefile deleted file mode 100644 index 766fd4d0b..000000000 --- a/vendor/github.com/robertkrimen/otto/parser/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -.PHONY: test - -test: - go test diff --git a/vendor/github.com/robertkrimen/otto/parser/README.markdown b/vendor/github.com/robertkrimen/otto/parser/README.markdown deleted file mode 100644 index c3cae5b60..000000000 --- a/vendor/github.com/robertkrimen/otto/parser/README.markdown +++ /dev/null @@ -1,190 +0,0 @@ -# parser --- - import "github.com/robertkrimen/otto/parser" - -Package parser implements a parser for JavaScript. - - import ( - "github.com/robertkrimen/otto/parser" - ) - -Parse and return an AST - - filename := "" // A filename is optional - src := ` - // Sample xyzzy example - (function(){ - if (3.14159 > 0) { - console.log("Hello, World."); - return; - } - - var xyzzy = NaN; - console.log("Nothing happens."); - return xyzzy; - })(); - ` - - // Parse some JavaScript, yielding a *ast.Program and/or an ErrorList - program, err := parser.ParseFile(nil, filename, src, 0) - - -### Warning - -The parser and AST interfaces are still works-in-progress (particularly where -node types are concerned) and may change in the future. - -## Usage - -#### func ParseFile - -```go -func ParseFile(fileSet *file.FileSet, filename string, src interface{}, mode Mode) (*ast.Program, error) -``` -ParseFile parses the source code of a single JavaScript/ECMAScript source file -and returns the corresponding ast.Program node. - -If fileSet == nil, ParseFile parses source without a FileSet. If fileSet != nil, -ParseFile first adds filename and src to fileSet. - -The filename argument is optional and is used for labelling errors, etc. - -src may be a string, a byte slice, a bytes.Buffer, or an io.Reader, but it MUST -always be in UTF-8. - - // Parse some JavaScript, yielding a *ast.Program and/or an ErrorList - program, err := parser.ParseFile(nil, "", `if (abc > 1) {}`, 0) - -#### func ParseFunction - -```go -func ParseFunction(parameterList, body string) (*ast.FunctionLiteral, error) -``` -ParseFunction parses a given parameter list and body as a function and returns -the corresponding ast.FunctionLiteral node. - -The parameter list, if any, should be a comma-separated list of identifiers. - -#### func ReadSource - -```go -func ReadSource(filename string, src interface{}) ([]byte, error) -``` - -#### func TransformRegExp - -```go -func TransformRegExp(pattern string) (string, error) -``` -TransformRegExp transforms a JavaScript pattern into a Go "regexp" pattern. - -re2 (Go) cannot do backtracking, so the presence of a lookahead (?=) (?!) or -backreference (\1, \2, ...) will cause an error. - -re2 (Go) has a different definition for \s: [\t\n\f\r ]. The JavaScript -definition, on the other hand, also includes \v, Unicode "Separator, Space", -etc. - -If the pattern is invalid (not valid even in JavaScript), then this function -returns the empty string and an error. - -If the pattern is valid, but incompatible (contains a lookahead or -backreference), then this function returns the transformation (a non-empty -string) AND an error. - -#### type Error - -```go -type Error struct { - Position file.Position - Message string -} -``` - -An Error represents a parsing error. It includes the position where the error -occurred and a message/description. - -#### func (Error) Error - -```go -func (self Error) Error() string -``` - -#### type ErrorList - -```go -type ErrorList []*Error -``` - -ErrorList is a list of *Errors. - -#### func (*ErrorList) Add - -```go -func (self *ErrorList) Add(position file.Position, msg string) -``` -Add adds an Error with given position and message to an ErrorList. - -#### func (ErrorList) Err - -```go -func (self ErrorList) Err() error -``` -Err returns an error equivalent to this ErrorList. If the list is empty, Err -returns nil. - -#### func (ErrorList) Error - -```go -func (self ErrorList) Error() string -``` -Error implements the Error interface. - -#### func (ErrorList) Len - -```go -func (self ErrorList) Len() int -``` - -#### func (ErrorList) Less - -```go -func (self ErrorList) Less(i, j int) bool -``` - -#### func (*ErrorList) Reset - -```go -func (self *ErrorList) Reset() -``` -Reset resets an ErrorList to no errors. - -#### func (ErrorList) Sort - -```go -func (self ErrorList) Sort() -``` - -#### func (ErrorList) Swap - -```go -func (self ErrorList) Swap(i, j int) -``` - -#### type Mode - -```go -type Mode uint -``` - -A Mode value is a set of flags (or 0). They control optional parser -functionality. - -```go -const ( - IgnoreRegExpErrors Mode = 1 << iota // Ignore RegExp compatibility errors (allow backtracking) -) -``` - --- -**godocdown** http://github.com/robertkrimen/godocdown diff --git a/vendor/github.com/robertkrimen/otto/registry/README.markdown b/vendor/github.com/robertkrimen/otto/registry/README.markdown deleted file mode 100644 index ba2d38909..000000000 --- a/vendor/github.com/robertkrimen/otto/registry/README.markdown +++ /dev/null @@ -1,51 +0,0 @@ -# registry --- - import "github.com/robertkrimen/otto/registry" - -Package registry is an expirmental package to facillitate altering the otto -runtime via import. - -This interface can change at any time. - -## Usage - -#### func Apply - -```go -func Apply(callback func(Entry)) -``` - -#### type Entry - -```go -type Entry struct { -} -``` - - -#### func Register - -```go -func Register(source func() string) *Entry -``` - -#### func (*Entry) Disable - -```go -func (self *Entry) Disable() -``` - -#### func (*Entry) Enable - -```go -func (self *Entry) Enable() -``` - -#### func (Entry) Source - -```go -func (self Entry) Source() string -``` - --- -**godocdown** http://github.com/robertkrimen/godocdown diff --git a/vendor/github.com/robertkrimen/otto/token/Makefile b/vendor/github.com/robertkrimen/otto/token/Makefile deleted file mode 100644 index 1e85c7348..000000000 --- a/vendor/github.com/robertkrimen/otto/token/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -token_const.go: tokenfmt - ./$^ | gofmt > $@ diff --git a/vendor/github.com/robertkrimen/otto/token/README.markdown b/vendor/github.com/robertkrimen/otto/token/README.markdown deleted file mode 100644 index ff3b16104..000000000 --- a/vendor/github.com/robertkrimen/otto/token/README.markdown +++ /dev/null @@ -1,171 +0,0 @@ -# token --- - import "github.com/robertkrimen/otto/token" - -Package token defines constants representing the lexical tokens of JavaScript -(ECMA5). - -## Usage - -```go -const ( - ILLEGAL - EOF - COMMENT - KEYWORD - - STRING - BOOLEAN - NULL - NUMBER - IDENTIFIER - - PLUS // + - MINUS // - - MULTIPLY // * - SLASH // / - REMAINDER // % - - AND // & - OR // | - EXCLUSIVE_OR // ^ - SHIFT_LEFT // << - SHIFT_RIGHT // >> - UNSIGNED_SHIFT_RIGHT // >>> - AND_NOT // &^ - - ADD_ASSIGN // += - SUBTRACT_ASSIGN // -= - MULTIPLY_ASSIGN // *= - QUOTIENT_ASSIGN // /= - REMAINDER_ASSIGN // %= - - AND_ASSIGN // &= - OR_ASSIGN // |= - EXCLUSIVE_OR_ASSIGN // ^= - SHIFT_LEFT_ASSIGN // <<= - SHIFT_RIGHT_ASSIGN // >>= - UNSIGNED_SHIFT_RIGHT_ASSIGN // >>>= - AND_NOT_ASSIGN // &^= - - LOGICAL_AND // && - LOGICAL_OR // || - INCREMENT // ++ - DECREMENT // -- - - EQUAL // == - STRICT_EQUAL // === - LESS // < - GREATER // > - ASSIGN // = - NOT // ! - - BITWISE_NOT // ~ - - NOT_EQUAL // != - STRICT_NOT_EQUAL // !== - LESS_OR_EQUAL // <= - GREATER_OR_EQUAL // >= - - LEFT_PARENTHESIS // ( - LEFT_BRACKET // [ - LEFT_BRACE // { - COMMA // , - PERIOD // . - - RIGHT_PARENTHESIS // ) - RIGHT_BRACKET // ] - RIGHT_BRACE // } - SEMICOLON // ; - COLON // : - QUESTION_MARK // ? - - IF - IN - DO - - VAR - FOR - NEW - TRY - - THIS - ELSE - CASE - VOID - WITH - - WHILE - BREAK - CATCH - THROW - - RETURN - TYPEOF - DELETE - SWITCH - - DEFAULT - FINALLY - - FUNCTION - CONTINUE - DEBUGGER - - INSTANCEOF -) -``` - -#### type Token - -```go -type Token int -``` - -Token is the set of lexical tokens in JavaScript (ECMA5). - -#### func IsKeyword - -```go -func IsKeyword(literal string) (Token, bool) -``` -IsKeyword returns the keyword token if literal is a keyword, a KEYWORD token if -the literal is a future keyword (const, let, class, super, ...), or 0 if the -literal is not a keyword. - -If the literal is a keyword, IsKeyword returns a second value indicating if the -literal is considered a future keyword in strict-mode only. - -7.6.1.2 Future Reserved Words: - - const - class - enum - export - extends - import - super - -7.6.1.2 Future Reserved Words (strict): - - implements - interface - let - package - private - protected - public - static - -#### func (Token) String - -```go -func (tkn Token) String() string -``` -String returns the string corresponding to the token. For operators, delimiters, -and keywords the string is the actual token string (e.g., for the token PLUS, -the String() is "+"). For all other tokens the string corresponds to the token -name (e.g. for the token IDENTIFIER, the string is "IDENTIFIER"). - --- -**godocdown** http://github.com/robertkrimen/godocdown diff --git a/vendor/github.com/robertkrimen/otto/token/tokenfmt b/vendor/github.com/robertkrimen/otto/token/tokenfmt deleted file mode 100755 index 63dd5d9e6..000000000 --- a/vendor/github.com/robertkrimen/otto/token/tokenfmt +++ /dev/null @@ -1,222 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; - -my (%token, @order, @keywords); - -{ - my $keywords; - my @const; - push @const, <<_END_; -package token - -const( - _ Token = iota -_END_ - - for (split m/\n/, <<_END_) { -ILLEGAL -EOF -COMMENT -KEYWORD - -STRING -BOOLEAN -NULL -NUMBER -IDENTIFIER - -PLUS + -MINUS - -MULTIPLY * -SLASH / -REMAINDER % - -AND & -OR | -EXCLUSIVE_OR ^ -SHIFT_LEFT << -SHIFT_RIGHT >> -UNSIGNED_SHIFT_RIGHT >>> -AND_NOT &^ - -ADD_ASSIGN += -SUBTRACT_ASSIGN -= -MULTIPLY_ASSIGN *= -QUOTIENT_ASSIGN /= -REMAINDER_ASSIGN %= - -AND_ASSIGN &= -OR_ASSIGN |= -EXCLUSIVE_OR_ASSIGN ^= -SHIFT_LEFT_ASSIGN <<= -SHIFT_RIGHT_ASSIGN >>= -UNSIGNED_SHIFT_RIGHT_ASSIGN >>>= -AND_NOT_ASSIGN &^= - -LOGICAL_AND && -LOGICAL_OR || -INCREMENT ++ -DECREMENT -- - -EQUAL == -STRICT_EQUAL === -LESS < -GREATER > -ASSIGN = -NOT ! - -BITWISE_NOT ~ - -NOT_EQUAL != -STRICT_NOT_EQUAL !== -LESS_OR_EQUAL <= -GREATER_OR_EQUAL <= - -LEFT_PARENTHESIS ( -LEFT_BRACKET [ -LEFT_BRACE { -COMMA , -PERIOD . - -RIGHT_PARENTHESIS ) -RIGHT_BRACKET ] -RIGHT_BRACE } -SEMICOLON ; -COLON : -QUESTION_MARK ? - -firstKeyword -IF -IN -DO - -VAR -FOR -NEW -TRY - -THIS -ELSE -CASE -VOID -WITH - -WHILE -BREAK -CATCH -THROW - -RETURN -TYPEOF -DELETE -SWITCH - -DEFAULT -FINALLY - -FUNCTION -CONTINUE -DEBUGGER - -INSTANCEOF -lastKeyword -_END_ - chomp; - - next if m/^\s*#/; - - my ($name, $symbol) = m/(\w+)\s*(\S+)?/; - - if (defined $symbol) { - push @order, $name; - push @const, "$name // $symbol"; - $token{$name} = $symbol; - } elsif (defined $name) { - $keywords ||= $name eq 'firstKeyword'; - - push @const, $name; - #$const[-1] .= " Token = iota" if 2 == @const; - if ($name =~ m/^([A-Z]+)/) { - push @keywords, $name if $keywords; - push @order, $name; - if ($token{SEMICOLON}) { - $token{$name} = lc $1; - } else { - $token{$name} = $name; - } - } - } else { - push @const, ""; - } - - } - push @const, ")"; - print join "\n", @const, ""; -} - -{ - print <<_END_; - -var token2string = [...]string{ -_END_ - for my $name (@order) { - print "$name: \"$token{$name}\",\n"; - } - print <<_END_; -} -_END_ - - print <<_END_; - -var keywordTable = map[string]_keyword{ -_END_ - for my $name (@keywords) { - print <<_END_ - "@{[ lc $name ]}": _keyword{ - token: $name, - }, -_END_ - } - - for my $name (qw/ - const - class - enum - export - extends - import - super - /) { - print <<_END_ - "$name": _keyword{ - token: KEYWORD, - futureKeyword: true, - }, -_END_ - } - - for my $name (qw/ - implements - interface - let - package - private - protected - public - static - /) { - print <<_END_ - "$name": _keyword{ - token: KEYWORD, - futureKeyword: true, - strict: true, - }, -_END_ - } - - print <<_END_; -} -_END_ -} diff --git a/vendor/github.com/rs/cors/.travis.yml b/vendor/github.com/rs/cors/.travis.yml deleted file mode 100644 index bbb5185a2..000000000 --- a/vendor/github.com/rs/cors/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: go -go: -- 1.3 -- 1.4 diff --git a/vendor/github.com/rs/cors/README.md b/vendor/github.com/rs/cors/README.md deleted file mode 100644 index 4bf56724e..000000000 --- a/vendor/github.com/rs/cors/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Go CORS handler [![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/rs/cors) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/rs/cors/master/LICENSE) [![build](https://img.shields.io/travis/rs/cors.svg?style=flat)](https://travis-ci.org/rs/cors) [![Coverage](http://gocover.io/_badge/github.com/rs/cors)](http://gocover.io/github.com/rs/cors) - -CORS is a `net/http` handler implementing [Cross Origin Resource Sharing W3 specification](http://www.w3.org/TR/cors/) in Golang. - -## Getting Started - -After installing Go and setting up your [GOPATH](http://golang.org/doc/code.html#GOPATH), create your first `.go` file. We'll call it `server.go`. - -```go -package main - -import ( - "net/http" - - "github.com/rs/cors" -) - -func main() { - mux := http.NewServeMux() - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json") - w.Write([]byte("{\"hello\": \"world\"}")) - }) - - // cors.Default() setup the middleware with default options being - // all origins accepted with simple methods (GET, POST). See - // documentation below for more options. - handler := cors.Default().Handler(mux) - http.ListenAndServe(":8080", handler) -} -``` - -Install `cors`: - - go get github.com/rs/cors - -Then run your server: - - go run server.go - -The server now runs on `localhost:8080`: - - $ curl -D - -H 'Origin: http://foo.com' http://localhost:8080/ - HTTP/1.1 200 OK - Access-Control-Allow-Origin: foo.com - Content-Type: application/json - Date: Sat, 25 Oct 2014 03:43:57 GMT - Content-Length: 18 - - {"hello": "world"} - -### More Examples - -* `net/http`: [examples/nethttp/server.go](https://github.com/rs/cors/blob/master/examples/nethttp/server.go) -* [Goji](https://goji.io): [examples/goji/server.go](https://github.com/rs/cors/blob/master/examples/goji/server.go) -* [Martini](http://martini.codegangsta.io): [examples/martini/server.go](https://github.com/rs/cors/blob/master/examples/martini/server.go) -* [Negroni](https://github.com/codegangsta/negroni): [examples/negroni/server.go](https://github.com/rs/cors/blob/master/examples/negroni/server.go) -* [Alice](https://github.com/justinas/alice): [examples/alice/server.go](https://github.com/rs/cors/blob/master/examples/alice/server.go) - -## Parameters - -Parameters are passed to the middleware thru the `cors.New` method as follow: - -```go -c := cors.New(cors.Options{ - AllowedOrigins: []string{"http://foo.com"}, - AllowCredentials: true, -}) - -// Insert the middleware -handler = c.Handler(handler) -``` - -* **AllowedOrigins** `[]string`: A list of origins a cross-domain request can be executed from. If the special `*` value is present in the list, all origins will be allowed. An origin may contain a wildcard (`*`) to replace 0 or more characters (i.e.: `http://*.domain.com`). Usage of wildcards implies a small performance penality. Only one wildcard can be used per origin. The default value is `*`. -* **AllowOriginFunc** `func (origin string) bool`: A custom function to validate the origin. It take the origin as argument and returns true if allowed or false otherwise. If this option is set, the content of `AllowedOrigins` is ignored -* **AllowedMethods** `[]string`: A list of methods the client is allowed to use with cross-domain requests. Default value is simple methods (`GET` and `POST`). -* **AllowedHeaders** `[]string`: A list of non simple headers the client is allowed to use with cross-domain requests. -* **ExposedHeaders** `[]string`: Indicates which headers are safe to expose to the API of a CORS API specification -* **AllowCredentials** `bool`: Indicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates. The default is `false`. -* **MaxAge** `int`: Indicates how long (in seconds) the results of a preflight request can be cached. The default is `0` which stands for no max age. -* **OptionsPassthrough** `bool`: Instructs preflight to let other potential next handlers to process the `OPTIONS` method. Turn this on if your application handles `OPTIONS`. -* **Debug** `bool`: Debugging flag adds additional output to debug server side CORS issues. - -See [API documentation](http://godoc.org/github.com/rs/cors) for more info. - -## Benchmarks - - BenchmarkWithout 20000000 64.6 ns/op 8 B/op 1 allocs/op - BenchmarkDefault 3000000 469 ns/op 114 B/op 2 allocs/op - BenchmarkAllowedOrigin 3000000 608 ns/op 114 B/op 2 allocs/op - BenchmarkPreflight 20000000 73.2 ns/op 0 B/op 0 allocs/op - BenchmarkPreflightHeader 20000000 73.6 ns/op 0 B/op 0 allocs/op - BenchmarkParseHeaderList 2000000 847 ns/op 184 B/op 6 allocs/op - BenchmarkParse…Single 5000000 290 ns/op 32 B/op 3 allocs/op - BenchmarkParse…Normalized 2000000 776 ns/op 160 B/op 6 allocs/op - -## Licenses - -All source code is licensed under the [MIT License](https://raw.github.com/rs/cors/master/LICENSE). diff --git a/vendor/github.com/rs/xhandler/.travis.yml b/vendor/github.com/rs/xhandler/.travis.yml deleted file mode 100644 index b65c7a9f1..000000000 --- a/vendor/github.com/rs/xhandler/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go -go: -- 1.5 -- tip -matrix: - allow_failures: - - go: tip diff --git a/vendor/github.com/rs/xhandler/README.md b/vendor/github.com/rs/xhandler/README.md deleted file mode 100644 index 91c594bd2..000000000 --- a/vendor/github.com/rs/xhandler/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# XHandler - -[![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/rs/xhandler) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/rs/xhandler/master/LICENSE) [![Build Status](https://travis-ci.org/rs/xhandler.svg?branch=master)](https://travis-ci.org/rs/xhandler) [![Coverage](http://gocover.io/_badge/github.com/rs/xhandler)](http://gocover.io/github.com/rs/xhandler) - -XHandler is a bridge between [net/context](https://godoc.org/golang.org/x/net/context) and `http.Handler`. - -It lets you enforce `net/context` in your handlers without sacrificing compatibility with existing `http.Handlers` nor imposing a specific router. - -Thanks to `net/context` deadline management, `xhandler` is able to enforce a per request deadline and will cancel the context when the client closes the connection unexpectedly. - -You may create your own `net/context` aware handler pretty much the same way as you would do with http.Handler. - -Read more about xhandler on [Dailymotion engineering blog](http://engineering.dailymotion.com/our-way-to-go/). - -## Installing - - go get -u github.com/rs/xhandler - -## Usage - -```go -package main - -import ( - "log" - "net/http" - "time" - - "github.com/rs/cors" - "github.com/rs/xhandler" - "golang.org/x/net/context" -) - -type myMiddleware struct { - next xhandler.HandlerC -} - -func (h myMiddleware) ServeHTTPC(ctx context.Context, w http.ResponseWriter, r *http.Request) { - ctx = context.WithValue(ctx, "test", "World") - h.next.ServeHTTPC(ctx, w, r) -} - -func main() { - c := xhandler.Chain{} - - // Add close notifier handler so context is cancelled when the client closes - // the connection - c.UseC(xhandler.CloseHandler) - - // Add timeout handler - c.UseC(xhandler.TimeoutHandler(2 * time.Second)) - - // Middleware putting something in the context - c.UseC(func(next xhandler.HandlerC) xhandler.HandlerC { - return myMiddleware{next: next} - }) - - // Mix it with a non-context-aware middleware handler - c.Use(cors.Default().Handler) - - // Final handler (using handlerFuncC), reading from the context - xh := xhandler.HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) { - value := ctx.Value("test").(string) - w.Write([]byte("Hello " + value)) - }) - - // Bridge context aware handlers with http.Handler using xhandler.Handle() - http.Handle("/test", c.Handler(xh)) - - if err := http.ListenAndServe(":8080", nil); err != nil { - log.Fatal(err) - } -} -``` - -### Using xmux - -Xhandler comes with an optional context aware [muxer](https://github.com/rs/xmux) forked from [httprouter](https://github.com/julienschmidt/httprouter): - -```go -package main - -import ( - "fmt" - "log" - "net/http" - "time" - - "github.com/rs/xhandler" - "github.com/rs/xmux" - "golang.org/x/net/context" -) - -func main() { - c := xhandler.Chain{} - - // Append a context-aware middleware handler - c.UseC(xhandler.CloseHandler) - - // Another context-aware middleware handler - c.UseC(xhandler.TimeoutHandler(2 * time.Second)) - - mux := xmux.New() - - // Use c.Handler to terminate the chain with your final handler - mux.GET("/welcome/:name", xhandler.HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, req *http.Request) { - fmt.Fprintf(w, "Welcome %s!", xmux.Params(ctx).Get("name")) - })) - - if err := http.ListenAndServe(":8080", c.Handler(mux)); err != nil { - log.Fatal(err) - } -} -``` - -See [xmux](https://github.com/rs/xmux) for more examples. - -## Context Aware Middleware - -Here is a list of `net/context` aware middleware handlers implementing `xhandler.HandlerC` interface. - -Feel free to put up a PR linking your middleware if you have built one: - -| Middleware | Author | Description | -| ---------- | ------ | ----------- | -| [xmux](https://github.com/rs/xmux) | [Olivier Poitrey](https://github.com/rs) | HTTP request muxer | -| [xlog](https://github.com/rs/xlog) | [Olivier Poitrey](https://github.com/rs) | HTTP handler logger | -| [xstats](https://github.com/rs/xstats) | [Olivier Poitrey](https://github.com/rs) | A generic client for service instrumentation | -| [xaccess](https://github.com/rs/xaccess) | [Olivier Poitrey](https://github.com/rs) | HTTP handler access logger with [xlog](https://github.com/rs/xlog) and [xstats](https://github.com/rs/xstats) | -| [cors](https://github.com/rs/cors) | [Olivier Poitrey](https://github.com/rs) | [Cross Origin Resource Sharing](http://www.w3.org/TR/cors/) (CORS) support | - -## Licenses - -All source code is licensed under the [MIT License](https://raw.github.com/rs/xhandler/master/LICENSE). diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl deleted file mode 100644 index c5cc66f43..000000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -{{.CommentFormat}} -func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { - return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl deleted file mode 100644 index 99f9acfbb..000000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -{{.CommentWithoutT "a"}} -func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { - return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) -} diff --git a/vendor/github.com/stretchr/testify/require/require.go.tmpl b/vendor/github.com/stretchr/testify/require/require.go.tmpl deleted file mode 100644 index d2c38f6f2..000000000 --- a/vendor/github.com/stretchr/testify/require/require.go.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{.Comment}} -func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { - if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { - t.FailNow() - } -} diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl b/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl deleted file mode 100644 index b93569e0a..000000000 --- a/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -{{.CommentWithoutT "a"}} -func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { - {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) -} diff --git a/vendor/github.com/vishvananda/netlink/.travis.yml b/vendor/github.com/vishvananda/netlink/.travis.yml deleted file mode 100644 index f5c0b3eb5..000000000 --- a/vendor/github.com/vishvananda/netlink/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go -before_script: - # make sure we keep path in tact when we sudo - - sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers - # modprobe ip_gre or else the first gre device can't be deleted - - sudo modprobe ip_gre - # modprobe nf_conntrack for the conntrack testing - - sudo modprobe nf_conntrack - - sudo modprobe nf_conntrack_netlink - - sudo modprobe nf_conntrack_ipv4 - - sudo modprobe nf_conntrack_ipv6 -install: - - go get github.com/vishvananda/netns diff --git a/vendor/github.com/vishvananda/netlink/Makefile b/vendor/github.com/vishvananda/netlink/Makefile deleted file mode 100644 index a0e68e7a9..000000000 --- a/vendor/github.com/vishvananda/netlink/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -DIRS := \ - . \ - nl - -DEPS = \ - github.com/vishvananda/netns \ - golang.org/x/sys/unix - -uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) -testdirs = $(call uniq,$(foreach d,$(1),$(dir $(wildcard $(d)/*_test.go)))) -goroot = $(addprefix ../../../,$(1)) -unroot = $(subst ../../../,,$(1)) -fmt = $(addprefix fmt-,$(1)) - -all: test - -$(call goroot,$(DEPS)): - go get $(call unroot,$@) - -.PHONY: $(call testdirs,$(DIRS)) -$(call testdirs,$(DIRS)): - go test -test.exec sudo -test.parallel 4 -timeout 60s -test.v github.com/vishvananda/netlink/$@ - -$(call fmt,$(call testdirs,$(DIRS))): - ! gofmt -l $(subst fmt-,,$@)/*.go | grep -q . - -.PHONY: fmt -fmt: $(call fmt,$(call testdirs,$(DIRS))) - -test: fmt $(call goroot,$(DEPS)) $(call testdirs,$(DIRS)) diff --git a/vendor/github.com/vishvananda/netlink/README.md b/vendor/github.com/vishvananda/netlink/README.md deleted file mode 100644 index a88e2f418..000000000 --- a/vendor/github.com/vishvananda/netlink/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# netlink - netlink library for go # - -[![Build Status](https://travis-ci.org/vishvananda/netlink.png?branch=master)](https://travis-ci.org/vishvananda/netlink) [![GoDoc](https://godoc.org/github.com/vishvananda/netlink?status.svg)](https://godoc.org/github.com/vishvananda/netlink) - -The netlink package provides a simple netlink library for go. Netlink -is the interface a user-space program in linux uses to communicate with -the kernel. It can be used to add and remove interfaces, set ip addresses -and routes, and configure ipsec. Netlink communication requires elevated -privileges, so in most cases this code needs to be run as root. Since -low-level netlink messages are inscrutable at best, the library attempts -to provide an api that is loosely modeled on the CLI provided by iproute2. -Actions like `ip link add` will be accomplished via a similarly named -function like AddLink(). This library began its life as a fork of the -netlink functionality in -[docker/libcontainer](https://github.com/docker/libcontainer) but was -heavily rewritten to improve testability, performance, and to add new -functionality like ipsec xfrm handling. - -## Local Build and Test ## - -You can use go get command: - - go get github.com/vishvananda/netlink - -Testing dependencies: - - go get github.com/vishvananda/netns - -Testing (requires root): - - sudo -E go test github.com/vishvananda/netlink - -## Examples ## - -Add a new bridge and add eth1 into it: - -```go -package main - -import ( - "fmt" - "github.com/vishvananda/netlink" -) - -func main() { - la := netlink.NewLinkAttrs() - la.Name = "foo" - mybridge := &netlink.Bridge{LinkAttrs: la} - err := netlink.LinkAdd(mybridge) - if err != nil { - fmt.Printf("could not add %s: %v\n", la.Name, err) - } - eth1, _ := netlink.LinkByName("eth1") - netlink.LinkSetMaster(eth1, mybridge) -} - -``` -Note `NewLinkAttrs` constructor, it sets default values in structure. For now -it sets only `TxQLen` to `-1`, so kernel will set default by itself. If you're -using simple initialization(`LinkAttrs{Name: "foo"}`) `TxQLen` will be set to -`0` unless you specify it like `LinkAttrs{Name: "foo", TxQLen: 1000}`. - -Add a new ip address to loopback: - -```go -package main - -import ( - "github.com/vishvananda/netlink" -) - -func main() { - lo, _ := netlink.LinkByName("lo") - addr, _ := netlink.ParseAddr("169.254.169.254/32") - netlink.AddrAdd(lo, addr) -} - -``` - -## Future Work ## - -Many pieces of netlink are not yet fully supported in the high-level -interface. Aspects of virtually all of the high-level objects don't exist. -Many of the underlying primitives are there, so its a matter of putting -the right fields into the high-level objects and making sure that they -are serialized and deserialized correctly in the Add and List methods. - -There are also a few pieces of low level netlink functionality that still -need to be implemented. Routing rules are not in place and some of the -more advanced link types. Hopefully there is decent structure and testing -in place to make these fairly straightforward to add. - diff --git a/vendor/github.com/vishvananda/netns/README.md b/vendor/github.com/vishvananda/netns/README.md deleted file mode 100644 index 66a5f7258..000000000 --- a/vendor/github.com/vishvananda/netns/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# netns - network namespaces in go # - -The netns package provides an ultra-simple interface for handling -network namespaces in go. Changing namespaces requires elevated -privileges, so in most cases this code needs to be run as root. - -## Local Build and Test ## - -You can use go get command: - - go get github.com/vishvananda/netns - -Testing (requires root): - - sudo -E go test github.com/vishvananda/netns - -## Example ## - -```go -package main - -import ( - "fmt" - "net" - "runtime" - "github.com/vishvananda/netns" -) - -func main() { - // Lock the OS Thread so we don't accidentally switch namespaces - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - // Save the current network namespace - origns, _ := netns.Get() - defer origns.Close() - - // Create a new network namespace - newns, _ := netns.New() - netns.Set(newns) - defer newns.Close() - - // Do something with the network namespace - ifaces, _ := net.Interfaces() - fmt.Printf("Interfaces: %v\n", ifaces) - - // Switch back to the original namespace - netns.Set(origns) -} - -``` diff --git a/vendor/golang.org/x/sys/unix/.gitignore b/vendor/golang.org/x/sys/unix/.gitignore deleted file mode 100644 index e3e0fc6f8..000000000 --- a/vendor/golang.org/x/sys/unix/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -_obj/ -unix.test diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md deleted file mode 100644 index bc6f6031f..000000000 --- a/vendor/golang.org/x/sys/unix/README.md +++ /dev/null @@ -1,173 +0,0 @@ -# Building `sys/unix` - -The sys/unix package provides access to the raw system call interface of the -underlying operating system. See: https://godoc.org/golang.org/x/sys/unix - -Porting Go to a new architecture/OS combination or adding syscalls, types, or -constants to an existing architecture/OS pair requires some manual effort; -however, there are tools that automate much of the process. - -## Build Systems - -There are currently two ways we generate the necessary files. We are currently -migrating the build system to use containers so the builds are reproducible. -This is being done on an OS-by-OS basis. Please update this documentation as -components of the build system change. - -### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`) - -The old build system generates the Go files based on the C header files -present on your system. This means that files -for a given GOOS/GOARCH pair must be generated on a system with that OS and -architecture. This also means that the generated code can differ from system -to system, based on differences in the header files. - -To avoid this, if you are using the old build system, only generate the Go -files on an installation with unmodified header files. It is also important to -keep track of which version of the OS the files were generated from (ex. -Darwin 14 vs Darwin 15). This makes it easier to track the progress of changes -and have each OS upgrade correspond to a single change. - -To build the files for your current OS and architecture, make sure GOOS and -GOARCH are set correctly and run `mkall.sh`. This will generate the files for -your specific system. Running `mkall.sh -n` shows the commands that will be run. - -Requirements: bash, perl, go - -### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`) - -The new build system uses a Docker container to generate the go files directly -from source checkouts of the kernel and various system libraries. This means -that on any platform that supports Docker, all the files using the new build -system can be generated at once, and generated files will not change based on -what the person running the scripts has installed on their computer. - -The OS specific files for the new build system are located in the `${GOOS}` -directory, and the build is coordinated by the `${GOOS}/mkall.go` program. When -the kernel or system library updates, modify the Dockerfile at -`${GOOS}/Dockerfile` to checkout the new release of the source. - -To build all the files under the new build system, you must be on an amd64/Linux -system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will -then generate all of the files for all of the GOOS/GOARCH pairs in the new build -system. Running `mkall.sh -n` shows the commands that will be run. - -Requirements: bash, perl, go, docker - -## Component files - -This section describes the various files used in the code generation process. -It also contains instructions on how to modify these files to add a new -architecture/OS or to add additional syscalls, types, or constants. Note that -if you are using the new build system, the scripts cannot be called normally. -They must be called from within the docker container. - -### asm files - -The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system -call dispatch. There are three entry points: -``` - func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) - func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) - func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) -``` -The first and second are the standard ones; they differ only in how many -arguments can be passed to the kernel. The third is for low-level use by the -ForkExec wrapper. Unlike the first two, it does not call into the scheduler to -let it know that a system call is running. - -When porting Go to an new architecture/OS, this file must be implemented for -each GOOS/GOARCH pair. - -### mksysnum - -Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl` -for the old system). This script takes in a list of header files containing the -syscall number declarations and parses them to produce the corresponding list of -Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated -constants. - -Adding new syscall numbers is mostly done by running the build on a sufficiently -new installation of the target OS (or updating the source checkouts for the -new build system). However, depending on the OS, you make need to update the -parsing in mksysnum. - -### mksyscall.pl - -The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are -hand-written Go files which implement system calls (for unix, the specific OS, -or the specific OS/Architecture pair respectively) that need special handling -and list `//sys` comments giving prototypes for ones that can be generated. - -The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts -them into syscalls. This requires the name of the prototype in the comment to -match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function -prototype can be exported (capitalized) or not. - -Adding a new syscall often just requires adding a new `//sys` function prototype -with the desired arguments and a capitalized name so it is exported. However, if -you want the interface to the syscall to be different, often one will make an -unexported `//sys` prototype, an then write a custom wrapper in -`syscall_${GOOS}.go`. - -### types files - -For each OS, there is a hand-written Go file at `${GOOS}/types.go` (or -`types_${GOOS}.go` on the old system). This file includes standard C headers and -creates Go type aliases to the corresponding C types. The file is then fed -through godef to get the Go compatible definitions. Finally, the generated code -is fed though mkpost.go to format the code correctly and remove any hidden or -private identifiers. This cleaned-up code is written to -`ztypes_${GOOS}_${GOARCH}.go`. - -The hardest part about preparing this file is figuring out which headers to -include and which symbols need to be `#define`d to get the actual data -structures that pass through to the kernel system calls. Some C libraries -preset alternate versions for binary compatibility and translate them on the -way in and out of system calls, but there is almost always a `#define` that can -get the real ones. -See `types_darwin.go` and `linux/types.go` for examples. - -To add a new type, add in the necessary include statement at the top of the -file (if it is not already there) and add in a type alias line. Note that if -your type is significantly different on different architectures, you may need -some `#if/#elif` macros in your include statements. - -### mkerrors.sh - -This script is used to generate the system's various constants. This doesn't -just include the error numbers and error strings, but also the signal numbers -an a wide variety of miscellaneous constants. The constants come from the list -of include files in the `includes_${uname}` variable. A regex then picks out -the desired `#define` statements, and generates the corresponding Go constants. -The error numbers and strings are generated from `#include `, and the -signal numbers and strings are generated from `#include `. All of -these constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program, -`_errors.c`, which prints out all the constants. - -To add a constant, add the header that includes it to the appropriate variable. -Then, edit the regex (if necessary) to match the desired constant. Avoid making -the regex too broad to avoid matching unintended constants. - - -## Generated files - -### `zerror_${GOOS}_${GOARCH}.go` - -A file containing all of the system's generated error numbers, error strings, -signal numbers, and constants. Generated by `mkerrors.sh` (see above). - -### `zsyscall_${GOOS}_${GOARCH}.go` - -A file containing all the generated syscalls for a specific GOOS and GOARCH. -Generated by `mksyscall.pl` (see above). - -### `zsysnum_${GOOS}_${GOARCH}.go` - -A list of numeric constants for all the syscall number of the specific GOOS -and GOARCH. Generated by mksysnum (see above). - -### `ztypes_${GOOS}_${GOARCH}.go` - -A file containing Go types for passing into (or returning from) syscalls. -Generated by godefs and the types file (see above). diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh deleted file mode 100755 index 1715122bd..000000000 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -# This script runs or (given -n) prints suggested commands to generate files for -# the Architecture/OS specified by the GOARCH and GOOS environment variables. -# See README.md for more information about how the build system works. - -GOOSARCH="${GOOS}_${GOARCH}" - -# defaults -mksyscall="./mksyscall.pl" -mkerrors="./mkerrors.sh" -zerrors="zerrors_$GOOSARCH.go" -mksysctl="" -zsysctl="zsysctl_$GOOSARCH.go" -mksysnum= -mktypes= -run="sh" -cmd="" - -case "$1" in --syscalls) - for i in zsyscall*go - do - # Run the command line that appears in the first line - # of the generated file to regenerate it. - sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i - rm _$i - done - exit 0 - ;; --n) - run="cat" - cmd="echo" - shift -esac - -case "$#" in -0) - ;; -*) - echo 'usage: mkall.sh [-n]' 1>&2 - exit 2 -esac - -if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then - # Use then new build system - # Files generated through docker (use $cmd so you can Ctl-C the build or run) - $cmd docker build --tag generate:$GOOS $GOOS - $cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS - exit -fi - -GOOSARCH_in=syscall_$GOOSARCH.go -case "$GOOSARCH" in -_* | *_ | _) - echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 - exit 1 - ;; -darwin_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32" - mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -darwin_amd64) - mkerrors="$mkerrors -m64" - mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -darwin_arm) - mkerrors="$mkerrors" - mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -darwin_arm64) - mkerrors="$mkerrors -m64" - mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -dragonfly_amd64) - mkerrors="$mkerrors -m64" - mksyscall="./mksyscall.pl -dragonfly" - mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -freebsd_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32" - mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -freebsd_amd64) - mkerrors="$mkerrors -m64" - mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -freebsd_arm) - mkerrors="$mkerrors" - mksyscall="./mksyscall.pl -l32 -arm" - mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" - # Let the type of C char be signed for making the bare syscall - # API consistent across platforms. - mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" - ;; -linux_sparc64) - GOOSARCH_in=syscall_linux_sparc64.go - unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h - mkerrors="$mkerrors -m64" - mksysnum="./mksysnum_linux.pl $unistd_h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -netbsd_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32 -netbsd" - mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -netbsd_amd64) - mkerrors="$mkerrors -m64" - mksyscall="./mksyscall.pl -netbsd" - mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -netbsd_arm) - mkerrors="$mkerrors" - mksyscall="./mksyscall.pl -l32 -netbsd -arm" - mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" - # Let the type of C char be signed for making the bare syscall - # API consistent across platforms. - mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" - ;; -openbsd_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32 -openbsd" - mksysctl="./mksysctl_openbsd.pl" - mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -openbsd_amd64) - mkerrors="$mkerrors -m64" - mksyscall="./mksyscall.pl -openbsd" - mksysctl="./mksysctl_openbsd.pl" - mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -openbsd_arm) - mkerrors="$mkerrors" - mksyscall="./mksyscall.pl -l32 -openbsd -arm" - mksysctl="./mksysctl_openbsd.pl" - mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" - # Let the type of C char be signed for making the bare syscall - # API consistent across platforms. - mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" - ;; -solaris_amd64) - mksyscall="./mksyscall_solaris.pl" - mkerrors="$mkerrors -m64" - mksysnum= - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -*) - echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2 - exit 1 - ;; -esac - -( - if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi - case "$GOOS" in - *) - syscall_goos="syscall_$GOOS.go" - case "$GOOS" in - darwin | dragonfly | freebsd | netbsd | openbsd) - syscall_goos="syscall_bsd.go $syscall_goos" - ;; - esac - if [ -n "$mksyscall" ]; then echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi - ;; - esac - if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi - if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi - if [ -n "$mktypes" ]; then - echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; - fi -) | $run diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh deleted file mode 100755 index 4dd40c172..000000000 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ /dev/null @@ -1,580 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -# Generate Go code listing errors and other #defined constant -# values (ENAMETOOLONG etc.), by asking the preprocessor -# about the definitions. - -unset LANG -export LC_ALL=C -export LC_CTYPE=C - -if test -z "$GOARCH" -o -z "$GOOS"; then - echo 1>&2 "GOARCH or GOOS not defined in environment" - exit 1 -fi - -# Check that we are using the new build system if we should -if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then - if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then - echo 1>&2 "In the new build system, mkerrors should not be called directly." - echo 1>&2 "See README.md" - exit 1 - fi -fi - -CC=${CC:-cc} - -if [[ "$GOOS" = "solaris" ]]; then - # Assumes GNU versions of utilities in PATH. - export PATH=/usr/gnu/bin:$PATH -fi - -uname=$(uname) - -includes_Darwin=' -#define _DARWIN_C_SOURCE -#define KERNEL -#define _DARWIN_USE_64_BIT_INODE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' - -includes_DragonFly=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' - -includes_FreeBSD=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if __FreeBSD__ >= 10 -#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10 -#undef SIOCAIFADDR -#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data -#undef SIOCSIFPHYADDR -#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data -#endif -' - -includes_Linux=' -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE -#ifndef __LP64__ -#define _FILE_OFFSET_BITS 64 -#endif -#define _GNU_SOURCE - -// is broken on powerpc64, as it fails to include definitions of -// these structures. We just include them copied from . -#if defined(__powerpc__) -struct sgttyb { - char sg_ispeed; - char sg_ospeed; - char sg_erase; - char sg_kill; - short sg_flags; -}; - -struct tchars { - char t_intrc; - char t_quitc; - char t_startc; - char t_stopc; - char t_eofc; - char t_brkc; -}; - -struct ltchars { - char t_suspc; - char t_dsuspc; - char t_rprntc; - char t_flushc; - char t_werasc; - char t_lnextc; -}; -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MSG_FASTOPEN -#define MSG_FASTOPEN 0x20000000 -#endif - -#ifndef PTRACE_GETREGS -#define PTRACE_GETREGS 0xc -#endif - -#ifndef PTRACE_SETREGS -#define PTRACE_SETREGS 0xd -#endif - -#ifndef SOL_NETLINK -#define SOL_NETLINK 270 -#endif - -#ifdef SOL_BLUETOOTH -// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h -// but it is already in bluetooth_linux.go -#undef SOL_BLUETOOTH -#endif - -// Certain constants are missing from the fs/crypto UAPI -#define FS_KEY_DESC_PREFIX "fscrypt:" -#define FS_KEY_DESC_PREFIX_SIZE 8 -#define FS_MAX_KEY_SIZE 64 -' - -includes_NetBSD=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Needed since refers to it... -#define schedppq 1 -' - -includes_OpenBSD=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// We keep some constants not supported in OpenBSD 5.5 and beyond for -// the promise of compatibility. -#define EMUL_ENABLED 0x1 -#define EMUL_NATIVE 0x2 -#define IPV6_FAITH 0x1d -#define IPV6_OPTIONS 0x1 -#define IPV6_RTHDR_STRICT 0x1 -#define IPV6_SOCKOPT_RESERVED1 0x3 -#define SIOCGIFGENERIC 0xc020693a -#define SIOCSIFGENERIC 0x80206939 -#define WALTSIG 0x4 -' - -includes_SunOS=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' - - -includes=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' -ccflags="$@" - -# Write go tool cgo -godefs input. -( - echo package unix - echo - echo '/*' - indirect="includes_$(uname)" - echo "${!indirect} $includes" - echo '*/' - echo 'import "C"' - echo 'import "syscall"' - echo - echo 'const (' - - # The gcc command line prints all the #defines - # it encounters while processing the input - echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags | - awk ' - $1 != "#define" || $2 ~ /\(/ || $3 == "" {next} - - $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers - $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next} - $2 ~ /^(SCM_SRCRT)$/ {next} - $2 ~ /^(MAP_FAILED)$/ {next} - $2 ~ /^ELF_.*$/ {next}# contains ELF_ARCH, etc. - - $2 ~ /^EXTATTR_NAMESPACE_NAMES/ || - $2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next} - - $2 !~ /^ETH_/ && - $2 !~ /^EPROC_/ && - $2 !~ /^EQUIV_/ && - $2 !~ /^EXPR_/ && - $2 ~ /^E[A-Z0-9_]+$/ || - $2 ~ /^B[0-9_]+$/ || - $2 ~ /^(OLD|NEW)DEV$/ || - $2 == "BOTHER" || - $2 ~ /^CI?BAUD(EX)?$/ || - $2 == "IBSHIFT" || - $2 ~ /^V[A-Z0-9]+$/ || - $2 ~ /^CS[A-Z0-9]/ || - $2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ || - $2 ~ /^IGN/ || - $2 ~ /^IX(ON|ANY|OFF)$/ || - $2 ~ /^IN(LCR|PCK)$/ || - $2 ~ /(^FLU?SH)|(FLU?SH$)/ || - $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ || - $2 == "BRKINT" || - $2 == "HUPCL" || - $2 == "PENDIN" || - $2 == "TOSTOP" || - $2 == "XCASE" || - $2 == "ALTWERASE" || - $2 == "NOKERNINFO" || - $2 ~ /^PAR/ || - $2 ~ /^SIG[^_]/ || - $2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ || - $2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ || - $2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ || - $2 ~ /^O?XTABS$/ || - $2 ~ /^TC[IO](ON|OFF)$/ || - $2 ~ /^IN_/ || - $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || - $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || - $2 ~ /^FALLOC_/ || - $2 == "ICMPV6_FILTER" || - $2 == "SOMAXCONN" || - $2 == "NAME_MAX" || - $2 == "IFNAMSIZ" || - $2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ || - $2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ || - $2 ~ /^HW_MACHINE$/ || - $2 ~ /^SYSCTL_VERS/ || - $2 ~ /^(MS|MNT|UMOUNT)_/ || - $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || - $2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ || - $2 ~ /^LINUX_REBOOT_CMD_/ || - $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || - $2 !~ "NLA_TYPE_MASK" && - $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ || - $2 ~ /^SIOC/ || - $2 ~ /^TIOC/ || - $2 ~ /^TCGET/ || - $2 ~ /^TCSET/ || - $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ || - $2 !~ "RTF_BITS" && - $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || - $2 ~ /^BIOC/ || - $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || - $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ || - $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || - $2 ~ /^CLONE_[A-Z_]+/ || - $2 !~ /^(BPF_TIMEVAL)$/ && - $2 ~ /^(BPF|DLT)_/ || - $2 ~ /^CLOCK_/ || - $2 ~ /^CAN_/ || - $2 ~ /^CAP_/ || - $2 ~ /^ALG_/ || - $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ || - $2 ~ /^GRND_/ || - $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || - $2 ~ /^KEYCTL_/ || - $2 ~ /^PERF_EVENT_IOC_/ || - $2 ~ /^SECCOMP_MODE_/ || - $2 ~ /^SPLICE_/ || - $2 ~ /^(VM|VMADDR)_/ || - $2 ~ /^IOCTL_VM_SOCKETS_/ || - $2 ~ /^(TASKSTATS|TS)_/ || - $2 ~ /^CGROUPSTATS_/ || - $2 ~ /^GENL_/ || - $2 ~ /^STATX_/ || - $2 ~ /^UTIME_/ || - $2 ~ /^XATTR_(CREATE|REPLACE)/ || - $2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ || - $2 ~ /^FSOPT_/ || - $2 ~ /^WDIOC_/ || - $2 !~ "WMESGLEN" && - $2 ~ /^W[A-Z0-9]+$/ || - $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)} - $2 ~ /^__WCOREFLAG$/ {next} - $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} - - {next} - ' | sort - - echo ')' -) >_const.go - -# Pull out the error names for later. -errors=$( - echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' | - sort -) - -# Pull out the signal names for later. -signals=$( - echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | - sort -) - -# Again, writing regexps to a file. -echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' | - sort >_error.grep -echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | - sort >_signal.grep - -echo '// mkerrors.sh' "$@" -echo '// Code generated by the command above; see README.md. DO NOT EDIT.' -echo -echo "// +build ${GOARCH},${GOOS}" -echo -go tool cgo -godefs -- "$@" _const.go >_error.out -cat _error.out | grep -vf _error.grep | grep -vf _signal.grep -echo -echo '// Errors' -echo 'const (' -cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/' -echo ')' - -echo -echo '// Signals' -echo 'const (' -cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/' -echo ')' - -# Run C program to print error and syscall strings. -( - echo -E " -#include -#include -#include -#include -#include -#include - -#define nelem(x) (sizeof(x)/sizeof((x)[0])) - -enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below - -int errors[] = { -" - for i in $errors - do - echo -E ' '$i, - done - - echo -E " -}; - -int signals[] = { -" - for i in $signals - do - echo -E ' '$i, - done - - # Use -E because on some systems bash builtin interprets \n itself. - echo -E ' -}; - -static int -intcmp(const void *a, const void *b) -{ - return *(int*)a - *(int*)b; -} - -int -main(void) -{ - int i, e; - char buf[1024], *p; - - printf("\n\n// Error table\n"); - printf("var errors = [...]string {\n"); - qsort(errors, nelem(errors), sizeof errors[0], intcmp); - for(i=0; i 0 && errors[i-1] == e) - continue; - strcpy(buf, strerror(e)); - // lowercase first letter: Bad -> bad, but STREAM -> STREAM. - if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) - buf[0] += a - A; - printf("\t%d: \"%s\",\n", e, buf); - } - printf("}\n\n"); - - printf("\n\n// Signal table\n"); - printf("var signals = [...]string {\n"); - qsort(signals, nelem(signals), sizeof signals[0], intcmp); - for(i=0; i 0 && signals[i-1] == e) - continue; - strcpy(buf, strsignal(e)); - // lowercase first letter: Bad -> bad, but STREAM -> STREAM. - if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) - buf[0] += a - A; - // cut trailing : number. - p = strrchr(buf, ":"[0]); - if(p) - *p = '\0'; - printf("\t%d: \"%s\",\n", e, buf); - } - printf("}\n\n"); - - return 0; -} - -' -) >_errors.c - -$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl deleted file mode 100755 index 73e26cafa..000000000 --- a/vendor/golang.org/x/sys/unix/mksyscall.pl +++ /dev/null @@ -1,340 +0,0 @@ -#!/usr/bin/env perl -# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -# This program reads a file containing function prototypes -# (like syscall_darwin.go) and generates system call bodies. -# The prototypes are marked by lines beginning with "//sys" -# and read like func declarations if //sys is replaced by func, but: -# * The parameter lists must give a name for each argument. -# This includes return parameters. -# * The parameter lists must give a type for each argument: -# the (x, y, z int) shorthand is not allowed. -# * If the return parameter is an error number, it must be named errno. - -# A line beginning with //sysnb is like //sys, except that the -# goroutine will not be suspended during the execution of the system -# call. This must only be used for system calls which can never -# block, as otherwise the system call could cause all goroutines to -# hang. - -use strict; - -my $cmdline = "mksyscall.pl " . join(' ', @ARGV); -my $errors = 0; -my $_32bit = ""; -my $plan9 = 0; -my $openbsd = 0; -my $netbsd = 0; -my $dragonfly = 0; -my $arm = 0; # 64-bit value should use (even, odd)-pair -my $tags = ""; # build tags - -if($ARGV[0] eq "-b32") { - $_32bit = "big-endian"; - shift; -} elsif($ARGV[0] eq "-l32") { - $_32bit = "little-endian"; - shift; -} -if($ARGV[0] eq "-plan9") { - $plan9 = 1; - shift; -} -if($ARGV[0] eq "-openbsd") { - $openbsd = 1; - shift; -} -if($ARGV[0] eq "-netbsd") { - $netbsd = 1; - shift; -} -if($ARGV[0] eq "-dragonfly") { - $dragonfly = 1; - shift; -} -if($ARGV[0] eq "-arm") { - $arm = 1; - shift; -} -if($ARGV[0] eq "-tags") { - shift; - $tags = $ARGV[0]; - shift; -} - -if($ARGV[0] =~ /^-/) { - print STDERR "usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\n"; - exit 1; -} - -# Check that we are using the new build system if we should -if($ENV{'GOOS'} eq "linux" && $ENV{'GOARCH'} ne "sparc64") { - if($ENV{'GOLANG_SYS_BUILD'} ne "docker") { - print STDERR "In the new build system, mksyscall should not be called directly.\n"; - print STDERR "See README.md\n"; - exit 1; - } -} - - -sub parseparamlist($) { - my ($list) = @_; - $list =~ s/^\s*//; - $list =~ s/\s*$//; - if($list eq "") { - return (); - } - return split(/\s*,\s*/, $list); -} - -sub parseparam($) { - my ($p) = @_; - if($p !~ /^(\S*) (\S*)$/) { - print STDERR "$ARGV:$.: malformed parameter: $p\n"; - $errors = 1; - return ("xx", "int"); - } - return ($1, $2); -} - -my $text = ""; -while(<>) { - chomp; - s/\s+/ /g; - s/^\s+//; - s/\s+$//; - my $nonblock = /^\/\/sysnb /; - next if !/^\/\/sys / && !$nonblock; - - # Line must be of the form - # func Open(path string, mode int, perm int) (fd int, errno error) - # Split into name, in params, out params. - if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) { - print STDERR "$ARGV:$.: malformed //sys declaration\n"; - $errors = 1; - next; - } - my ($func, $in, $out, $sysname) = ($2, $3, $4, $5); - - # Split argument lists on comma. - my @in = parseparamlist($in); - my @out = parseparamlist($out); - - # Try in vain to keep people from editing this file. - # The theory is that they jump into the middle of the file - # without reading the header. - $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"; - - # Go function header. - my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : ""; - $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl; - - # Check if err return available - my $errvar = ""; - foreach my $p (@out) { - my ($name, $type) = parseparam($p); - if($type eq "error") { - $errvar = $name; - last; - } - } - - # Prepare arguments to Syscall. - my @args = (); - my $n = 0; - foreach my $p (@in) { - my ($name, $type) = parseparam($p); - if($type =~ /^\*/) { - push @args, "uintptr(unsafe.Pointer($name))"; - } elsif($type eq "string" && $errvar ne "") { - $text .= "\tvar _p$n *byte\n"; - $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n"; - $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type eq "string") { - print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; - $text .= "\tvar _p$n *byte\n"; - $text .= "\t_p$n, _ = BytePtrFromString($name)\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type =~ /^\[\](.*)/) { - # Convert slice into pointer, length. - # Have to be careful not to take address of &a[0] if len == 0: - # pass dummy pointer in that case. - # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0). - $text .= "\tvar _p$n unsafe.Pointer\n"; - $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}"; - $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}"; - $text .= "\n"; - push @args, "uintptr(_p$n)", "uintptr(len($name))"; - $n++; - } elsif($type eq "int64" && ($openbsd || $netbsd)) { - push @args, "0"; - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } elsif($_32bit eq "little-endian") { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } else { - push @args, "uintptr($name)"; - } - } elsif($type eq "int64" && $dragonfly) { - if ($func !~ /^extp(read|write)/i) { - push @args, "0"; - } - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } elsif($_32bit eq "little-endian") { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } else { - push @args, "uintptr($name)"; - } - } elsif($type eq "int64" && $_32bit ne "") { - if(@args % 2 && $arm) { - # arm abi specifies 64-bit argument uses - # (even, odd) pair - push @args, "0" - } - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } else { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } - } else { - push @args, "uintptr($name)"; - } - } - - # Determine which form to use; pad args with zeros. - my $asm = "Syscall"; - if ($nonblock) { - if ($errvar ne "") { - $asm = "RawSyscall"; - } else { - $asm = "RawSyscallNoError"; - } - } else { - if ($errvar eq "") { - $asm = "SyscallNoError"; - } - } - if(@args <= 3) { - while(@args < 3) { - push @args, "0"; - } - } elsif(@args <= 6) { - $asm .= "6"; - while(@args < 6) { - push @args, "0"; - } - } elsif(@args <= 9) { - $asm .= "9"; - while(@args < 9) { - push @args, "0"; - } - } else { - print STDERR "$ARGV:$.: too many arguments to system call\n"; - } - - # System call number. - if($sysname eq "") { - $sysname = "SYS_$func"; - $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar - $sysname =~ y/a-z/A-Z/; - } - - # Actual call. - my $args = join(', ', @args); - my $call = "$asm($sysname, $args)"; - - # Assign return values. - my $body = ""; - my @ret = ("_", "_", "_"); - my $do_errno = 0; - for(my $i=0; $i<@out; $i++) { - my $p = $out[$i]; - my ($name, $type) = parseparam($p); - my $reg = ""; - if($name eq "err" && !$plan9) { - $reg = "e1"; - $ret[2] = $reg; - $do_errno = 1; - } elsif($name eq "err" && $plan9) { - $ret[0] = "r0"; - $ret[2] = "e1"; - next; - } else { - $reg = sprintf("r%d", $i); - $ret[$i] = $reg; - } - if($type eq "bool") { - $reg = "$reg != 0"; - } - if($type eq "int64" && $_32bit ne "") { - # 64-bit number in r1:r0 or r0:r1. - if($i+2 > @out) { - print STDERR "$ARGV:$.: not enough registers for int64 return\n"; - } - if($_32bit eq "big-endian") { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); - } else { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); - } - $ret[$i] = sprintf("r%d", $i); - $ret[$i+1] = sprintf("r%d", $i+1); - } - if($reg ne "e1" || $plan9) { - $body .= "\t$name = $type($reg)\n"; - } - } - if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { - $text .= "\t$call\n"; - } else { - if ($errvar ne "") { - $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; - } else { - $text .= "\t$ret[0], $ret[1] := $call\n"; - } - } - $text .= $body; - - if ($plan9 && $ret[2] eq "e1") { - $text .= "\tif int32(r0) == -1 {\n"; - $text .= "\t\terr = e1\n"; - $text .= "\t}\n"; - } elsif ($do_errno) { - $text .= "\tif e1 != 0 {\n"; - $text .= "\t\terr = errnoErr(e1)\n"; - $text .= "\t}\n"; - } - $text .= "\treturn\n"; - $text .= "}\n\n"; -} - -chomp $text; -chomp $text; - -if($errors) { - exit 1; -} - -print <) { - chomp; - s/\s+/ /g; - s/^\s+//; - s/\s+$//; - $package = $1 if !$package && /^package (\S+)$/; - my $nonblock = /^\/\/sysnb /; - next if !/^\/\/sys / && !$nonblock; - - # Line must be of the form - # func Open(path string, mode int, perm int) (fd int, err error) - # Split into name, in params, out params. - if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) { - print STDERR "$ARGV:$.: malformed //sys declaration\n"; - $errors = 1; - next; - } - my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6); - - # Split argument lists on comma. - my @in = parseparamlist($in); - my @out = parseparamlist($out); - - # So file name. - if($modname eq "") { - $modname = "libc"; - } - - # System call name. - if($sysname eq "") { - $sysname = "$func"; - } - - # System call pointer variable name. - my $sysvarname = "proc$sysname"; - - my $strconvfunc = "BytePtrFromString"; - my $strconvtype = "*byte"; - - $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase. - - # Runtime import of function to allow cross-platform builds. - $dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n"; - # Link symbol to proc address variable. - $linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n"; - # Library proc address variable. - push @vars, $sysvarname; - - # Go function header. - $out = join(', ', @out); - if($out ne "") { - $out = " ($out)"; - } - if($text ne "") { - $text .= "\n" - } - $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out; - - # Check if err return available - my $errvar = ""; - foreach my $p (@out) { - my ($name, $type) = parseparam($p); - if($type eq "error") { - $errvar = $name; - last; - } - } - - # Prepare arguments to Syscall. - my @args = (); - my $n = 0; - foreach my $p (@in) { - my ($name, $type) = parseparam($p); - if($type =~ /^\*/) { - push @args, "uintptr(unsafe.Pointer($name))"; - } elsif($type eq "string" && $errvar ne "") { - $text .= "\tvar _p$n $strconvtype\n"; - $text .= "\t_p$n, $errvar = $strconvfunc($name)\n"; - $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type eq "string") { - print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; - $text .= "\tvar _p$n $strconvtype\n"; - $text .= "\t_p$n, _ = $strconvfunc($name)\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type =~ /^\[\](.*)/) { - # Convert slice into pointer, length. - # Have to be careful not to take address of &a[0] if len == 0: - # pass nil in that case. - $text .= "\tvar _p$n *$1\n"; - $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))"; - $n++; - } elsif($type eq "int64" && $_32bit ne "") { - if($_32bit eq "big-endian") { - push @args, "uintptr($name >> 32)", "uintptr($name)"; - } else { - push @args, "uintptr($name)", "uintptr($name >> 32)"; - } - } elsif($type eq "bool") { - $text .= "\tvar _p$n uint32\n"; - $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n"; - push @args, "uintptr(_p$n)"; - $n++; - } else { - push @args, "uintptr($name)"; - } - } - my $nargs = @args; - - # Determine which form to use; pad args with zeros. - my $asm = "sysvicall6"; - if ($nonblock) { - $asm = "rawSysvicall6"; - } - if(@args <= 6) { - while(@args < 6) { - push @args, "0"; - } - } else { - print STDERR "$ARGV:$.: too many arguments to system call\n"; - } - - # Actual call. - my $args = join(', ', @args); - my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)"; - - # Assign return values. - my $body = ""; - my $failexpr = ""; - my @ret = ("_", "_", "_"); - my @pout= (); - my $do_errno = 0; - for(my $i=0; $i<@out; $i++) { - my $p = $out[$i]; - my ($name, $type) = parseparam($p); - my $reg = ""; - if($name eq "err") { - $reg = "e1"; - $ret[2] = $reg; - $do_errno = 1; - } else { - $reg = sprintf("r%d", $i); - $ret[$i] = $reg; - } - if($type eq "bool") { - $reg = "$reg != 0"; - } - if($type eq "int64" && $_32bit ne "") { - # 64-bit number in r1:r0 or r0:r1. - if($i+2 > @out) { - print STDERR "$ARGV:$.: not enough registers for int64 return\n"; - } - if($_32bit eq "big-endian") { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); - } else { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); - } - $ret[$i] = sprintf("r%d", $i); - $ret[$i+1] = sprintf("r%d", $i+1); - } - if($reg ne "e1") { - $body .= "\t$name = $type($reg)\n"; - } - } - if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { - $text .= "\t$call\n"; - } else { - $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; - } - $text .= $body; - - if ($do_errno) { - $text .= "\tif e1 != 0 {\n"; - $text .= "\t\terr = e1\n"; - $text .= "\t}\n"; - } - $text .= "\treturn\n"; - $text .= "}\n"; -} - -if($errors) { - exit 1; -} - -print < "net.inet", - "net.inet.ipproto" => "net.inet", - "net.inet6.ipv6proto" => "net.inet6", - "net.inet6.ipv6" => "net.inet6.ip6", - "net.inet.icmpv6" => "net.inet6.icmp6", - "net.inet6.divert6" => "net.inet6.divert", - "net.inet6.tcp6" => "net.inet.tcp", - "net.inet6.udp6" => "net.inet.udp", - "mpls" => "net.mpls", - "swpenc" => "vm.swapencrypt" -); - -# Node mappings -my %node_map = ( - "net.inet.ip.ifq" => "net.ifq", - "net.inet.pfsync" => "net.pfsync", - "net.mpls.ifq" => "net.ifq" -); - -my $ctlname; -my %mib = (); -my %sysctl = (); -my $node; - -sub debug() { - print STDERR "$_[0]\n" if $debug; -} - -# Walk the MIB and build a sysctl name to OID mapping. -sub build_sysctl() { - my ($node, $name, $oid) = @_; - my %node = %{$node}; - my @oid = @{$oid}; - - foreach my $key (sort keys %node) { - my @node = @{$node{$key}}; - my $nodename = $name.($name ne '' ? '.' : '').$key; - my @nodeoid = (@oid, $node[0]); - if ($node[1] eq 'CTLTYPE_NODE') { - if (exists $node_map{$nodename}) { - $node = \%mib; - $ctlname = $node_map{$nodename}; - foreach my $part (split /\./, $ctlname) { - $node = \%{@{$$node{$part}}[2]}; - } - } else { - $node = $node[2]; - } - &build_sysctl($node, $nodename, \@nodeoid); - } elsif ($node[1] ne '') { - $sysctl{$nodename} = \@nodeoid; - } - } -} - -foreach my $ctl (@ctls) { - $ctls{$ctl} = $ctl; -} - -# Build MIB -foreach my $header (@headers) { - &debug("Processing $header..."); - open HEADER, "/usr/include/$header" || - print STDERR "Failed to open $header\n"; - while (
) { - if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ || - $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ || - $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) { - if ($1 eq 'CTL_NAMES') { - # Top level. - $node = \%mib; - } else { - # Node. - my $nodename = lc($2); - if ($header =~ /^netinet\//) { - $ctlname = "net.inet.$nodename"; - } elsif ($header =~ /^netinet6\//) { - $ctlname = "net.inet6.$nodename"; - } elsif ($header =~ /^net\//) { - $ctlname = "net.$nodename"; - } else { - $ctlname = "$nodename"; - $ctlname =~ s/^(fs|net|kern)_/$1\./; - } - if (exists $ctl_map{$ctlname}) { - $ctlname = $ctl_map{$ctlname}; - } - if (not exists $ctls{$ctlname}) { - &debug("Ignoring $ctlname..."); - next; - } - - # Walk down from the top of the MIB. - $node = \%mib; - foreach my $part (split /\./, $ctlname) { - if (not exists $$node{$part}) { - &debug("Missing node $part"); - $$node{$part} = [ 0, '', {} ]; - } - $node = \%{@{$$node{$part}}[2]}; - } - } - - # Populate current node with entries. - my $i = -1; - while (defined($_) && $_ !~ /^}/) { - $_ =
; - $i++ if $_ =~ /{.*}/; - next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/; - $$node{$1} = [ $i, $2, {} ]; - } - } - } - close HEADER; -} - -&build_sysctl(\%mib, "", []); - -print <){ - if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ - my $name = $1; - my $num = $2; - $name =~ y/a-z/A-Z/; - print " SYS_$name = $num;" - } -} - -print <){ - if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ - my $num = $1; - my $proto = $2; - my $name = "SYS_$3"; - $name =~ y/a-z/A-Z/; - - # There are multiple entries for enosys and nosys, so comment them out. - if($name =~ /^SYS_E?NOSYS$/){ - $name = "// $name"; - } - if($name eq 'SYS_SYS_EXIT'){ - $name = 'SYS_EXIT'; - } - - print " $name = $num; // $proto\n"; - } -} - -print <){ - if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){ - my $num = $1; - my $proto = $2; - my $name = "SYS_$3"; - $name =~ y/a-z/A-Z/; - - # There are multiple entries for enosys and nosys, so comment them out. - if($name =~ /^SYS_E?NOSYS$/){ - $name = "// $name"; - } - if($name eq 'SYS_SYS_EXIT'){ - $name = 'SYS_EXIT'; - } - - print " $name = $num; // $proto\n"; - } -} - -print <){ - if($line =~ /^(.*)\\$/) { - # Handle continuation - $line = $1; - $_ =~ s/^\s+//; - $line .= $_; - } else { - # New line - $line = $_; - } - next if $line =~ /\\$/; - if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) { - my $num = $1; - my $proto = $6; - my $compat = $8; - my $name = "$7_$9"; - - $name = "$7_$11" if $11 ne ''; - $name =~ y/a-z/A-Z/; - - if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') { - print " $name = $num; // $proto\n"; - } - } -} - -print <){ - if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ - my $num = $1; - my $proto = $3; - my $name = $4; - $name =~ y/a-z/A-Z/; - - # There are multiple entries for enosys and nosys, so comment them out. - if($name =~ /^SYS_E?NOSYS$/){ - $name = "// $name"; - } - if($name eq 'SYS_SYS_EXIT'){ - $name = 'SYS_EXIT'; - } - - print " $name = $num; // $proto\n"; - } -} - -print < tables.go - gofmt -w -s tables.go - -# Build (but do not run) maketables during testing, -# just to make sure it still compiles. -testshort: maketables diff --git a/vendor/gopkg.in/fatih/set.v0/.travis.yml b/vendor/gopkg.in/fatih/set.v0/.travis.yml deleted file mode 100644 index b05e4c53f..000000000 --- a/vendor/gopkg.in/fatih/set.v0/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: go -go: 1.2 - diff --git a/vendor/gopkg.in/fatih/set.v0/README.md b/vendor/gopkg.in/fatih/set.v0/README.md deleted file mode 100644 index 23afdd98d..000000000 --- a/vendor/gopkg.in/fatih/set.v0/README.md +++ /dev/null @@ -1,245 +0,0 @@ -# Set [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/gopkg.in/fatih/set.v0) [![Build Status](http://img.shields.io/travis/fatih/set.svg?style=flat-square)](https://travis-ci.org/fatih/set) - -Set is a basic and simple, hash-based, **Set** data structure implementation -in Go (Golang). - -Set provides both threadsafe and non-threadsafe implementations of a generic -set data structure. The thread safety encompasses all operations on one set. -Operations on multiple sets are consistent in that the elements of each set -used was valid at exactly one point in time between the start and the end of -the operation. Because it's thread safe, you can use it concurrently with your -goroutines. - -For usage see examples below or click on the godoc badge. - -## Install and Usage - -Install the package with: - -```bash -go get gopkg.in/fatih/set.v0 -``` - -Import it with: - -```go -import "gopkg.in/fatih/set.v0" -``` - -and use `set` as the package name inside the code. - -## Examples - -#### Initialization of a new Set - -```go - -// create a set with zero items -s := set.New() -s := set.NewNonTS() // non thread-safe version - -// ... or with some initial values -s := set.New("istanbul", "frankfurt", 30.123, "san francisco", 1234) -s := set.NewNonTS("kenya", "ethiopia", "sumatra") - -``` - -#### Basic Operations - -```go -// add items -s.Add("istanbul") -s.Add("istanbul") // nothing happens if you add duplicate item - -// add multiple items -s.Add("ankara", "san francisco", 3.14) - -// remove item -s.Remove("frankfurt") -s.Remove("frankfurt") // nothing happes if you remove a nonexisting item - -// remove multiple items -s.Remove("barcelona", 3.14, "ankara") - -// removes an arbitary item and return it -item := s.Pop() - -// create a new copy -other := s.Copy() - -// remove all items -s.Clear() - -// number of items in the set -len := s.Size() - -// return a list of items -items := s.List() - -// string representation of set -fmt.Printf("set is %s", s.String()) - -``` - -#### Check Operations - -```go -// check for set emptiness, returns true if set is empty -s.IsEmpty() - -// check for a single item exist -s.Has("istanbul") - -// ... or for multiple items. This will return true if all of the items exist. -s.Has("istanbul", "san francisco", 3.14) - -// create two sets for the following checks... -s := s.New("1", "2", "3", "4", "5") -t := s.New("1", "2", "3") - - -// check if they are the same -if !s.IsEqual(t) { - fmt.Println("s is not equal to t") -} - -// if s contains all elements of t -if s.IsSubset(t) { - fmt.Println("t is a subset of s") -} - -// ... or if s is a superset of t -if t.IsSuperset(s) { - fmt.Println("s is a superset of t") -} - - -``` - -#### Set Operations - - -```go -// let us initialize two sets with some values -a := set.New("ankara", "berlin", "san francisco") -b := set.New("frankfurt", "berlin") - -// creates a new set with the items in a and b combined. -// [frankfurt, berlin, ankara, san francisco] -c := set.Union(a, b) - -// contains items which is in both a and b -// [berlin] -c := set.Intersection(a, b) - -// contains items which are in a but not in b -// [ankara, san francisco] -c := set.Difference(a, b) - -// contains items which are in one of either, but not in both. -// [frankfurt, ankara, san francisco] -c := set.SymmetricDifference(a, b) - -``` - -```go -// like Union but saves the result back into a. -a.Merge(b) - -// removes the set items which are in b from a and saves the result back into a. -a.Separate(b) - -``` - -#### Multiple Set Operations - -```go -a := set.New("1", "3", "4", "5") -b := set.New("2", "3", "4", "5") -c := set.New("4", "5", "6", "7") - -// creates a new set with items in a, b and c -// [1 2 3 4 5 6 7] -u := set.Union(a, b, c) - -// creates a new set with items in a but not in b and c -// [1] -u := set.Difference(a, b, c) - -// creates a new set with items that are common to a, b and c -// [5] -u := set.Intersection(a, b, c) -``` - -#### Helper methods - -The Slice functions below are a convenient way to extract or convert your Set data -into basic data types. - - -```go -// create a set of mixed types -s := set.New("ankara", "5", "8", "san francisco", 13, 21) - - -// convert s into a slice of strings (type is []string) -// [ankara 5 8 san francisco] -t := set.StringSlice(s) - - -// u contains a slice of ints (type is []int) -// [13, 21] -u := set.IntSlice(s) - -``` - -#### Concurrent safe usage - -Below is an example of a concurrent way that uses set. We call ten functions -concurrently and wait until they are finished. It basically creates a new -string for each goroutine and adds it to our set. - -```go -package main - -import ( - "fmt" - "github.com/fatih/set" - "strconv" - "sync" -) - -func main() { - var wg sync.WaitGroup // this is just for waiting until all goroutines finish - - // Initialize our thread safe Set - s := set.New() - - // Add items concurrently (item1, item2, and so on) - for i := 0; i < 10; i++ { - wg.Add(1) - go func(i int) { - item := "item" + strconv.Itoa(i) - fmt.Println("adding", item) - s.Add(item) - wg.Done() - }(i) - } - - // Wait until all concurrent calls finished and print our set - wg.Wait() - fmt.Println(s) -} -``` - -## Credits - - * [Fatih Arslan](https://github.com/fatih) - * [Arne Hormann](https://github.com/arnehormann) - * [Sam Boyer](https://github.com/sdboyer) - * [Ralph Loizzo](https://github.com/friartech) - -## License - -The MIT License (MIT) - see LICENSE.md for more details - diff --git a/vendor/gopkg.in/go-playground/validator.v9/.gitignore b/vendor/gopkg.in/go-playground/validator.v9/.gitignore deleted file mode 100644 index 792ca00d2..000000000 --- a/vendor/gopkg.in/go-playground/validator.v9/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof -*.test -*.out -*.txt -cover.html -README.html \ No newline at end of file diff --git a/vendor/gopkg.in/go-playground/validator.v9/README.md b/vendor/gopkg.in/go-playground/validator.v9/README.md deleted file mode 100644 index e7837254b..000000000 --- a/vendor/gopkg.in/go-playground/validator.v9/README.md +++ /dev/null @@ -1,149 +0,0 @@ -Package validator -================ -[![Join the chat at https://gitter.im/go-playground/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -![Project status](https://img.shields.io/badge/version-9.9.3-green.svg) -[![Build Status](https://semaphoreci.com/api/v1/joeybloggs/validator/branches/v9/badge.svg)](https://semaphoreci.com/joeybloggs/validator) -[![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=v9&service=github)](https://coveralls.io/github/go-playground/validator?branch=v9) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator) -[![GoDoc](https://godoc.org/gopkg.in/go-playground/validator.v9?status.svg)](https://godoc.org/gopkg.in/go-playground/validator.v9) -![License](https://img.shields.io/dub/l/vibe-d.svg) - -Package validator implements value validations for structs and individual fields based on tags. - -It has the following **unique** features: - -- Cross Field and Cross Struct validations by using validation tags or custom validators. -- Slice, Array and Map diving, which allows any or all levels of a multidimensional field to be validated. -- Ability to dive into both map keys and values for validation -- Handles type interface by determining it's underlying type prior to validation. -- Handles custom field types such as sql driver Valuer see [Valuer](https://golang.org/src/database/sql/driver/types.go?s=1210:1293#L29) -- Alias validation tags, which allows for mapping of several validations to a single tag for easier defining of validations on structs -- Extraction of custom defined Field Name e.g. can specify to extract the JSON name while validating and have it available in the resulting FieldError -- Customizable i18n aware error messages. -- Default validator for the [gin](https://github.com/gin-gonic/gin) web framework; upgrading from v8 to v9 in gin see [here](https://github.com/go-playground/validator/tree/v9/_examples/gin-upgrading-overriding) - -Installation ------------- - -Use go get. - - go get gopkg.in/go-playground/validator.v9 - -Then import the validator package into your own code. - - import "gopkg.in/go-playground/validator.v9" - -Error Return Value -------- - -Validation functions return type error - -They return type error to avoid the issue discussed in the following, where err is always != nil: - -* http://stackoverflow.com/a/29138676/3158232 -* https://github.com/go-playground/validator/issues/134 - -Validator only InvalidValidationError for bad validation input, nil or ValidationErrors as type error; so, in your code all you need to do is check if the error returned is not nil, and if it's not check if error is InvalidValidationError ( if necessary, most of the time it isn't ) type cast it to type ValidationErrors like so: - -```go -err := validate.Struct(mystruct) -validationErrors := err.(validator.ValidationErrors) - ``` - -Usage and documentation ------- - -Please see http://godoc.org/gopkg.in/go-playground/validator.v9 for detailed usage docs. - -##### Examples: - -- [Simple](https://github.com/go-playground/validator/blob/v9/_examples/simple/main.go) -- [Custom Field Types](https://github.com/go-playground/validator/blob/v9/_examples/custom/main.go) -- [Struct Level](https://github.com/go-playground/validator/blob/v9/_examples/struct-level/main.go) -- [Translations & Custom Errors](https://github.com/go-playground/validator/blob/v9/_examples/translations/main.go) -- [Gin upgrade and/or override validator](https://github.com/go-playground/validator/tree/v9/_examples/gin-upgrading-overriding) -- [wash - an example application putting it all together](https://github.com/bluesuncorp/wash) - -Benchmarks ------- -###### Run on MacBook Pro (15-inch, 2017) Go version go1.9.2 darwin/amd64 -```go -go test -bench=. -benchmem=true -BenchmarkFieldSuccess-8 20000000 79.9 ns/op 0 B/op 0 allocs/op -BenchmarkFieldSuccessParallel-8 50000000 25.0 ns/op 0 B/op 0 allocs/op -BenchmarkFieldFailure-8 5000000 281 ns/op 208 B/op 4 allocs/op -BenchmarkFieldFailureParallel-8 20000000 97.0 ns/op 208 B/op 4 allocs/op -BenchmarkFieldArrayDiveSuccess-8 3000000 591 ns/op 201 B/op 11 allocs/op -BenchmarkFieldArrayDiveSuccessParallel-8 10000000 195 ns/op 201 B/op 11 allocs/op -BenchmarkFieldArrayDiveFailure-8 2000000 878 ns/op 412 B/op 16 allocs/op -BenchmarkFieldArrayDiveFailureParallel-8 5000000 274 ns/op 413 B/op 16 allocs/op -BenchmarkFieldMapDiveSuccess-8 1000000 1279 ns/op 432 B/op 18 allocs/op -BenchmarkFieldMapDiveSuccessParallel-8 5000000 401 ns/op 432 B/op 18 allocs/op -BenchmarkFieldMapDiveFailure-8 1000000 1060 ns/op 512 B/op 16 allocs/op -BenchmarkFieldMapDiveFailureParallel-8 5000000 334 ns/op 512 B/op 16 allocs/op -BenchmarkFieldMapDiveWithKeysSuccess-8 1000000 1462 ns/op 480 B/op 21 allocs/op -BenchmarkFieldMapDiveWithKeysSuccessParallel-8 3000000 463 ns/op 480 B/op 21 allocs/op -BenchmarkFieldMapDiveWithKeysFailure-8 1000000 1414 ns/op 721 B/op 21 allocs/op -BenchmarkFieldMapDiveWithKeysFailureParallel-8 3000000 446 ns/op 721 B/op 21 allocs/op -BenchmarkFieldCustomTypeSuccess-8 10000000 211 ns/op 32 B/op 2 allocs/op -BenchmarkFieldCustomTypeSuccessParallel-8 20000000 65.9 ns/op 32 B/op 2 allocs/op -BenchmarkFieldCustomTypeFailure-8 5000000 270 ns/op 208 B/op 4 allocs/op -BenchmarkFieldCustomTypeFailureParallel-8 20000000 93.3 ns/op 208 B/op 4 allocs/op -BenchmarkFieldOrTagSuccess-8 2000000 729 ns/op 16 B/op 1 allocs/op -BenchmarkFieldOrTagSuccessParallel-8 5000000 367 ns/op 16 B/op 1 allocs/op -BenchmarkFieldOrTagFailure-8 3000000 472 ns/op 224 B/op 5 allocs/op -BenchmarkFieldOrTagFailureParallel-8 5000000 373 ns/op 224 B/op 5 allocs/op -BenchmarkStructLevelValidationSuccess-8 10000000 201 ns/op 32 B/op 2 allocs/op -BenchmarkStructLevelValidationSuccessParallel-8 20000000 66.3 ns/op 32 B/op 2 allocs/op -BenchmarkStructLevelValidationFailure-8 3000000 468 ns/op 304 B/op 8 allocs/op -BenchmarkStructLevelValidationFailureParallel-8 10000000 172 ns/op 304 B/op 8 allocs/op -BenchmarkStructSimpleCustomTypeSuccess-8 5000000 376 ns/op 32 B/op 2 allocs/op -BenchmarkStructSimpleCustomTypeSuccessParallel-8 20000000 126 ns/op 32 B/op 2 allocs/op -BenchmarkStructSimpleCustomTypeFailure-8 2000000 646 ns/op 424 B/op 9 allocs/op -BenchmarkStructSimpleCustomTypeFailureParallel-8 10000000 240 ns/op 440 B/op 10 allocs/op -BenchmarkStructFilteredSuccess-8 3000000 582 ns/op 288 B/op 9 allocs/op -BenchmarkStructFilteredSuccessParallel-8 10000000 198 ns/op 288 B/op 9 allocs/op -BenchmarkStructFilteredFailure-8 3000000 447 ns/op 256 B/op 7 allocs/op -BenchmarkStructFilteredFailureParallel-8 10000000 156 ns/op 256 B/op 7 allocs/op -BenchmarkStructPartialSuccess-8 3000000 536 ns/op 256 B/op 6 allocs/op -BenchmarkStructPartialSuccessParallel-8 10000000 175 ns/op 256 B/op 6 allocs/op -BenchmarkStructPartialFailure-8 2000000 738 ns/op 480 B/op 11 allocs/op -BenchmarkStructPartialFailureParallel-8 5000000 256 ns/op 480 B/op 11 allocs/op -BenchmarkStructExceptSuccess-8 2000000 835 ns/op 496 B/op 12 allocs/op -BenchmarkStructExceptSuccessParallel-8 10000000 163 ns/op 240 B/op 5 allocs/op -BenchmarkStructExceptFailure-8 2000000 682 ns/op 464 B/op 10 allocs/op -BenchmarkStructExceptFailureParallel-8 10000000 244 ns/op 464 B/op 10 allocs/op -BenchmarkStructSimpleCrossFieldSuccess-8 5000000 392 ns/op 72 B/op 3 allocs/op -BenchmarkStructSimpleCrossFieldSuccessParallel-8 20000000 126 ns/op 72 B/op 3 allocs/op -BenchmarkStructSimpleCrossFieldFailure-8 2000000 611 ns/op 304 B/op 8 allocs/op -BenchmarkStructSimpleCrossFieldFailureParallel-8 10000000 214 ns/op 304 B/op 8 allocs/op -BenchmarkStructSimpleCrossStructCrossFieldSuccess-8 3000000 567 ns/op 80 B/op 4 allocs/op -BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-8 10000000 177 ns/op 80 B/op 4 allocs/op -BenchmarkStructSimpleCrossStructCrossFieldFailure-8 2000000 807 ns/op 320 B/op 9 allocs/op -BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-8 5000000 268 ns/op 320 B/op 9 allocs/op -BenchmarkStructSimpleSuccess-8 5000000 256 ns/op 0 B/op 0 allocs/op -BenchmarkStructSimpleSuccessParallel-8 20000000 76.3 ns/op 0 B/op 0 allocs/op -BenchmarkStructSimpleFailure-8 2000000 625 ns/op 424 B/op 9 allocs/op -BenchmarkStructSimpleFailureParallel-8 10000000 219 ns/op 424 B/op 9 allocs/op -BenchmarkStructComplexSuccess-8 1000000 1431 ns/op 128 B/op 8 allocs/op -BenchmarkStructComplexSuccessParallel-8 3000000 427 ns/op 128 B/op 8 allocs/op -BenchmarkStructComplexFailure-8 300000 4065 ns/op 3041 B/op 53 allocs/op -BenchmarkStructComplexFailureParallel-8 1000000 1478 ns/op 3041 B/op 53 allocs/op -``` - -Complementary Software ----------------------- - -Here is a list of software that complements using this library either pre or post validation. - -* [form](https://github.com/go-playground/form) - Decodes url.Values into Go value(s) and Encodes Go value(s) into url.Values. Dual Array and Full map support. -* [mold](https://github.com/go-playground/mold) - A general library to help modify or set data within data structures and other objects - -How to Contribute ------- - -Make a pull request... - -License ------- -Distributed under MIT License, please see license file within the code for more details. diff --git a/vendor/gopkg.in/go-playground/validator.v9/logo.png b/vendor/gopkg.in/go-playground/validator.v9/logo.png deleted file mode 100644 index 355000f5247d50e979cf5db5de38188ef4649a34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13443 zcmbVz^LHiB^LK39wrv|5-`KWoTN~T9%?&s9Mte8f*xWeZ`~Lg^&kxU>)6-|>Om|IH zcUM=vsybFxSr!?A009gP3|U@IN*z>Z{#W2&KzAW<*L_e0I`lYd#@osT8GH952<>}$=#%H%txCM^!YLYIPG*~?*PoX}XfpXD#$r$vg% zUJ@M8Sa6}E0bs?J()q&Aj2!Xx^!*X7wf45!j09TZ!t8tmiZrhYa~rM!hkOgG3jNOL z$t%hsiEZp{`uZS=pUq3db%5@e>LpqUR%RzF4Fp&XYtszH3NMj(x&yBfN!B@dDe(i*$ zFaI9z`VK(*+SzZ3Km$V|gFS(NfPUS&ND}#zKM&MsZR;zy@SJwDwy5moK{eH84yz0`{Dhd+jynpps_Wzr*Rl)ctU%7jk!=>D(g}(sK zP}YV(B1|d_4NeR~4qlx?36qk5ng9u-wt+@fOTlvqhk>WQ%HxtjxBspSS(-6OpP;_x z73LX72W9oA=yUj&B*sjt0z}2U44ACNztdo!tbwR&pl8vCLjf!@HDwcP;p{h$JYsrk zE3Pp7L^A>!xwNPSX+2zrQgJ8|CCr11n`u|=C}{? zlHLN%{DxBD;+;&!6Se$BciUB@EQ~Y8_ZT-Q&4p}|A3l`R=AVR9Kt+V~a3a3V{l=)gHBK2op+X}BW7o(X1K2eRTZ^; ziO?#OmuWkXeCj2*{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BSGkUqgbqYuem+;8++@MM(|;Eh?pTI_O&4Gy6PBOnIB)^cWfo! V^Rh-@K?jDw - } - fmt.Fprintf(conn, "Hi server!\n") - msg, err := bufio.NewReader(conn).ReadString('\n') - ... - -The Listen function creates servers: - - - ln, err := npipe.Listen(`\\.\pipe\mypipename`) - if err != nil { - // handle error - } - for { - conn, err := ln.Accept() - if err != nil { - // handle error - continue - } - go handleConnection(conn) - } - - - - - -## Variables -``` go -var ErrClosed = PipeError{"Pipe has been closed.", false} -``` -ErrClosed is the error returned by PipeListener.Accept when Close is called -on the PipeListener. - - - -## type PipeAddr -``` go -type PipeAddr string -``` -PipeAddr represents the address of a named pipe. - - - - - - - - - - - -### func (PipeAddr) Network -``` go -func (a PipeAddr) Network() string -``` -Network returns the address's network name, "pipe". - - - -### func (PipeAddr) String -``` go -func (a PipeAddr) String() string -``` -String returns the address of the pipe - - - -## type PipeConn -``` go -type PipeConn struct { - // contains filtered or unexported fields -} -``` -PipeConn is the implementation of the net.Conn interface for named pipe connections. - - - - - - - - - -### func Dial -``` go -func Dial(address string) (*PipeConn, error) -``` -Dial connects to a named pipe with the given address. If the specified pipe is not available, -it will wait indefinitely for the pipe to become available. - -The address must be of the form \\.\\pipe\ for local pipes and \\\pipe\ -for remote pipes. - -Dial will return a PipeError if you pass in a badly formatted pipe name. - -Examples: - - - // local pipe - conn, err := Dial(`\\.\pipe\mypipename`) - - // remote pipe - conn, err := Dial(`\\othercomp\pipe\mypipename`) - - -### func DialTimeout -``` go -func DialTimeout(address string, timeout time.Duration) (*PipeConn, error) -``` -DialTimeout acts like Dial, but will time out after the duration of timeout - - - - -### func (\*PipeConn) Close -``` go -func (c *PipeConn) Close() error -``` -Close closes the connection. - - - -### func (\*PipeConn) LocalAddr -``` go -func (c *PipeConn) LocalAddr() net.Addr -``` -LocalAddr returns the local network address. - - - -### func (\*PipeConn) Read -``` go -func (c *PipeConn) Read(b []byte) (int, error) -``` -Read implements the net.Conn Read method. - - - -### func (\*PipeConn) RemoteAddr -``` go -func (c *PipeConn) RemoteAddr() net.Addr -``` -RemoteAddr returns the remote network address. - - - -### func (\*PipeConn) SetDeadline -``` go -func (c *PipeConn) SetDeadline(t time.Time) error -``` -SetDeadline implements the net.Conn SetDeadline method. -Note that timeouts are only supported on Windows Vista/Server 2008 and above - - - -### func (\*PipeConn) SetReadDeadline -``` go -func (c *PipeConn) SetReadDeadline(t time.Time) error -``` -SetReadDeadline implements the net.Conn SetReadDeadline method. -Note that timeouts are only supported on Windows Vista/Server 2008 and above - - - -### func (\*PipeConn) SetWriteDeadline -``` go -func (c *PipeConn) SetWriteDeadline(t time.Time) error -``` -SetWriteDeadline implements the net.Conn SetWriteDeadline method. -Note that timeouts are only supported on Windows Vista/Server 2008 and above - - - -### func (\*PipeConn) Write -``` go -func (c *PipeConn) Write(b []byte) (int, error) -``` -Write implements the net.Conn Write method. - - - -## type PipeError -``` go -type PipeError struct { - // contains filtered or unexported fields -} -``` -PipeError is an error related to a call to a pipe - - - - - - - - - - - -### func (PipeError) Error -``` go -func (e PipeError) Error() string -``` -Error implements the error interface - - - -### func (PipeError) Temporary -``` go -func (e PipeError) Temporary() bool -``` -Temporary implements net.AddrError.Temporary() - - - -### func (PipeError) Timeout -``` go -func (e PipeError) Timeout() bool -``` -Timeout implements net.AddrError.Timeout() - - - -## type PipeListener -``` go -type PipeListener struct { - // contains filtered or unexported fields -} -``` -PipeListener is a named pipe listener. Clients should typically -use variables of type net.Listener instead of assuming named pipe. - - - - - - - - - -### func Listen -``` go -func Listen(address string) (*PipeListener, error) -``` -Listen returns a new PipeListener that will listen on a pipe with the given -address. The address must be of the form \\.\pipe\ - -Listen will return a PipeError for an incorrectly formatted pipe name. - - - - -### func (\*PipeListener) Accept -``` go -func (l *PipeListener) Accept() (net.Conn, error) -``` -Accept implements the Accept method in the net.Listener interface; it -waits for the next call and returns a generic net.Conn. - - - -### func (\*PipeListener) AcceptPipe -``` go -func (l *PipeListener) AcceptPipe() (*PipeConn, error) -``` -AcceptPipe accepts the next incoming call and returns the new connection. - - - -### func (\*PipeListener) Addr -``` go -func (l *PipeListener) Addr() net.Addr -``` -Addr returns the listener's network address, a PipeAddr. - - - -### func (\*PipeListener) Close -``` go -func (l *PipeListener) Close() error -``` -Close stops listening on the address. -Already Accepted connections are not closed. diff --git a/vendor/gopkg.in/sourcemap.v1/.travis.yml b/vendor/gopkg.in/sourcemap.v1/.travis.yml deleted file mode 100644 index 229abef36..000000000 --- a/vendor/gopkg.in/sourcemap.v1/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -sudo: false -language: go - -go: - - 1.6 - - 1.7 - - tip - -matrix: - allow_failures: - - go: tip - -install: - - mkdir -p $HOME/gopath/src/gopkg.in - - mv $HOME/gopath/src/github.com/go-sourcemap/sourcemap $HOME/gopath/src/gopkg.in/sourcemap.v1 - - cd $HOME/gopath/src/gopkg.in/sourcemap.v1 diff --git a/vendor/gopkg.in/sourcemap.v1/Makefile b/vendor/gopkg.in/sourcemap.v1/Makefile deleted file mode 100644 index 161c4fd0f..000000000 --- a/vendor/gopkg.in/sourcemap.v1/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -all: - go test ./... - go test ./... -short -race - go vet diff --git a/vendor/gopkg.in/sourcemap.v1/README.md b/vendor/gopkg.in/sourcemap.v1/README.md deleted file mode 100644 index fb319d20f..000000000 --- a/vendor/gopkg.in/sourcemap.v1/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Source Maps consumer for Golang [![Build Status](https://travis-ci.org/go-sourcemap/sourcemap.svg?branch=v1)](https://travis-ci.org/go-sourcemap/sourcemap) - -## Installation - -Install: - - go get gopkg.in/sourcemap.v1 - -## Quickstart - -```go -func ExampleParse() { - mapURL := "http://code.jquery.com/jquery-2.0.3.min.map" - resp, err := http.Get(mapURL) - if err != nil { - panic(err) - } - defer resp.Body.Close() - - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - panic(err) - } - - smap, err := sourcemap.Parse(mapURL, b) - if err != nil { - panic(err) - } - - line, column := 5, 6789 - file, fn, line, col, ok := smap.Source(line, column) - fmt.Println(file, fn, line, col, ok) - // Output: http://code.jquery.com/jquery-2.0.3.js apply 4360 27 true -} -``` diff --git a/vendor/gopkg.in/urfave/cli.v1/.flake8 b/vendor/gopkg.in/urfave/cli.v1/.flake8 deleted file mode 100644 index 6deafc261..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length = 120 diff --git a/vendor/gopkg.in/urfave/cli.v1/.gitignore b/vendor/gopkg.in/urfave/cli.v1/.gitignore deleted file mode 100644 index faf70c4c2..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.coverprofile -node_modules/ diff --git a/vendor/gopkg.in/urfave/cli.v1/.travis.yml b/vendor/gopkg.in/urfave/cli.v1/.travis.yml deleted file mode 100644 index cf8d0980d..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: go -sudo: false -dist: trusty -osx_image: xcode8.3 -go: 1.8.x - -os: -- linux -- osx - -cache: - directories: - - node_modules - -before_script: -- go get github.com/urfave/gfmrun/... || true -- go get golang.org/x/tools/cmd/goimports -- if [ ! -f node_modules/.bin/markdown-toc ] ; then - npm install markdown-toc ; - fi - -script: -- ./runtests gen -- ./runtests vet -- ./runtests test -- ./runtests gfmrun -- ./runtests toc diff --git a/vendor/gopkg.in/urfave/cli.v1/CHANGELOG.md b/vendor/gopkg.in/urfave/cli.v1/CHANGELOG.md deleted file mode 100644 index 401eae5a2..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/CHANGELOG.md +++ /dev/null @@ -1,435 +0,0 @@ -# Change Log - -**ATTN**: This project uses [semantic versioning](http://semver.org/). - -## [Unreleased] - -## 1.20.0 - 2017-08-10 - -### Fixed - -* `HandleExitCoder` is now correctly iterates over all errors in - a `MultiError`. The exit code is the exit code of the last error or `1` if - there are no `ExitCoder`s in the `MultiError`. -* Fixed YAML file loading on Windows (previously would fail validate the file path) -* Subcommand `Usage`, `Description`, `ArgsUsage`, `OnUsageError` correctly - propogated -* `ErrWriter` is now passed downwards through command structure to avoid the - need to redefine it -* Pass `Command` context into `OnUsageError` rather than parent context so that - all fields are avaiable -* Errors occuring in `Before` funcs are no longer double printed -* Use `UsageText` in the help templates for commands and subcommands if - defined; otherwise build the usage as before (was previously ignoring this - field) -* `IsSet` and `GlobalIsSet` now correctly return whether a flag is set if - a program calls `Set` or `GlobalSet` directly after flag parsing (would - previously only return `true` if the flag was set during parsing) - -### Changed - -* No longer exit the program on command/subcommand error if the error raised is - not an `OsExiter`. This exiting behavior was introduced in 1.19.0, but was - determined to be a regression in functionality. See [the - PR](https://github.com/urfave/cli/pull/595) for discussion. - -### Added - -* `CommandsByName` type was added to make it easy to sort `Command`s by name, - alphabetically -* `altsrc` now handles loading of string and int arrays from TOML -* Support for definition of custom help templates for `App` via - `CustomAppHelpTemplate` -* Support for arbitrary key/value fields on `App` to be used with - `CustomAppHelpTemplate` via `ExtraInfo` -* `HelpFlag`, `VersionFlag`, and `BashCompletionFlag` changed to explictly be - `cli.Flag`s allowing for the use of custom flags satisfying the `cli.Flag` - interface to be used. - - -## [1.19.1] - 2016-11-21 - -### Fixed - -- Fixes regression introduced in 1.19.0 where using an `ActionFunc` as - the `Action` for a command would cause it to error rather than calling the - function. Should not have a affected declarative cases using `func(c - *cli.Context) err)`. -- Shell completion now handles the case where the user specifies - `--generate-bash-completion` immediately after a flag that takes an argument. - Previously it call the application with `--generate-bash-completion` as the - flag value. - -## [1.19.0] - 2016-11-19 -### Added -- `FlagsByName` was added to make it easy to sort flags (e.g. `sort.Sort(cli.FlagsByName(app.Flags))`) -- A `Description` field was added to `App` for a more detailed description of - the application (similar to the existing `Description` field on `Command`) -- Flag type code generation via `go generate` -- Write to stderr and exit 1 if action returns non-nil error -- Added support for TOML to the `altsrc` loader -- `SkipArgReorder` was added to allow users to skip the argument reordering. - This is useful if you want to consider all "flags" after an argument as - arguments rather than flags (the default behavior of the stdlib `flag` - library). This is backported functionality from the [removal of the flag - reordering](https://github.com/urfave/cli/pull/398) in the unreleased version - 2 -- For formatted errors (those implementing `ErrorFormatter`), the errors will - be formatted during output. Compatible with `pkg/errors`. - -### Changed -- Raise minimum tested/supported Go version to 1.2+ - -### Fixed -- Consider empty environment variables as set (previously environment variables - with the equivalent of `""` would be skipped rather than their value used). -- Return an error if the value in a given environment variable cannot be parsed - as the flag type. Previously these errors were silently swallowed. -- Print full error when an invalid flag is specified (which includes the invalid flag) -- `App.Writer` defaults to `stdout` when `nil` -- If no action is specified on a command or app, the help is now printed instead of `panic`ing -- `App.Metadata` is initialized automatically now (previously was `nil` unless initialized) -- Correctly show help message if `-h` is provided to a subcommand -- `context.(Global)IsSet` now respects environment variables. Previously it - would return `false` if a flag was specified in the environment rather than - as an argument -- Removed deprecation warnings to STDERR to avoid them leaking to the end-user -- `altsrc`s import paths were updated to use `gopkg.in/urfave/cli.v1`. This - fixes issues that occurred when `gopkg.in/urfave/cli.v1` was imported as well - as `altsrc` where Go would complain that the types didn't match - -## [1.18.1] - 2016-08-28 -### Fixed -- Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported) - -## [1.18.0] - 2016-06-27 -### Added -- `./runtests` test runner with coverage tracking by default -- testing on OS X -- testing on Windows -- `UintFlag`, `Uint64Flag`, and `Int64Flag` types and supporting code - -### Changed -- Use spaces for alignment in help/usage output instead of tabs, making the - output alignment consistent regardless of tab width - -### Fixed -- Printing of command aliases in help text -- Printing of visible flags for both struct and struct pointer flags -- Display the `help` subcommand when using `CommandCategories` -- No longer swallows `panic`s that occur within the `Action`s themselves when - detecting the signature of the `Action` field - -## [1.17.1] - 2016-08-28 -### Fixed -- Removed deprecation warnings to STDERR to avoid them leaking to the end-user - -## [1.17.0] - 2016-05-09 -### Added -- Pluggable flag-level help text rendering via `cli.DefaultFlagStringFunc` -- `context.GlobalBoolT` was added as an analogue to `context.GlobalBool` -- Support for hiding commands by setting `Hidden: true` -- this will hide the - commands in help output - -### Changed -- `Float64Flag`, `IntFlag`, and `DurationFlag` default values are no longer - quoted in help text output. -- All flag types now include `(default: {value})` strings following usage when a - default value can be (reasonably) detected. -- `IntSliceFlag` and `StringSliceFlag` usage strings are now more consistent - with non-slice flag types -- Apps now exit with a code of 3 if an unknown subcommand is specified - (previously they printed "No help topic for...", but still exited 0. This - makes it easier to script around apps built using `cli` since they can trust - that a 0 exit code indicated a successful execution. -- cleanups based on [Go Report Card - feedback](https://goreportcard.com/report/github.com/urfave/cli) - -## [1.16.1] - 2016-08-28 -### Fixed -- Removed deprecation warnings to STDERR to avoid them leaking to the end-user - -## [1.16.0] - 2016-05-02 -### Added -- `Hidden` field on all flag struct types to omit from generated help text - -### Changed -- `BashCompletionFlag` (`--enable-bash-completion`) is now omitted from -generated help text via the `Hidden` field - -### Fixed -- handling of error values in `HandleAction` and `HandleExitCoder` - -## [1.15.0] - 2016-04-30 -### Added -- This file! -- Support for placeholders in flag usage strings -- `App.Metadata` map for arbitrary data/state management -- `Set` and `GlobalSet` methods on `*cli.Context` for altering values after -parsing. -- Support for nested lookup of dot-delimited keys in structures loaded from -YAML. - -### Changed -- The `App.Action` and `Command.Action` now prefer a return signature of -`func(*cli.Context) error`, as defined by `cli.ActionFunc`. If a non-nil -`error` is returned, there may be two outcomes: - - If the error fulfills `cli.ExitCoder`, then `os.Exit` will be called - automatically - - Else the error is bubbled up and returned from `App.Run` -- Specifying an `Action` with the legacy return signature of -`func(*cli.Context)` will produce a deprecation message to stderr -- Specifying an `Action` that is not a `func` type will produce a non-zero exit -from `App.Run` -- Specifying an `Action` func that has an invalid (input) signature will -produce a non-zero exit from `App.Run` - -### Deprecated -- -`cli.App.RunAndExitOnError`, which should now be done by returning an error -that fulfills `cli.ExitCoder` to `cli.App.Run`. -- the legacy signature for -`cli.App.Action` of `func(*cli.Context)`, which should now have a return -signature of `func(*cli.Context) error`, as defined by `cli.ActionFunc`. - -### Fixed -- Added missing `*cli.Context.GlobalFloat64` method - -## [1.14.0] - 2016-04-03 (backfilled 2016-04-25) -### Added -- Codebeat badge -- Support for categorization via `CategorizedHelp` and `Categories` on app. - -### Changed -- Use `filepath.Base` instead of `path.Base` in `Name` and `HelpName`. - -### Fixed -- Ensure version is not shown in help text when `HideVersion` set. - -## [1.13.0] - 2016-03-06 (backfilled 2016-04-25) -### Added -- YAML file input support. -- `NArg` method on context. - -## [1.12.0] - 2016-02-17 (backfilled 2016-04-25) -### Added -- Custom usage error handling. -- Custom text support in `USAGE` section of help output. -- Improved help messages for empty strings. -- AppVeyor CI configuration. - -### Changed -- Removed `panic` from default help printer func. -- De-duping and optimizations. - -### Fixed -- Correctly handle `Before`/`After` at command level when no subcommands. -- Case of literal `-` argument causing flag reordering. -- Environment variable hints on Windows. -- Docs updates. - -## [1.11.1] - 2015-12-21 (backfilled 2016-04-25) -### Changed -- Use `path.Base` in `Name` and `HelpName` -- Export `GetName` on flag types. - -### Fixed -- Flag parsing when skipping is enabled. -- Test output cleanup. -- Move completion check to account for empty input case. - -## [1.11.0] - 2015-11-15 (backfilled 2016-04-25) -### Added -- Destination scan support for flags. -- Testing against `tip` in Travis CI config. - -### Changed -- Go version in Travis CI config. - -### Fixed -- Removed redundant tests. -- Use correct example naming in tests. - -## [1.10.2] - 2015-10-29 (backfilled 2016-04-25) -### Fixed -- Remove unused var in bash completion. - -## [1.10.1] - 2015-10-21 (backfilled 2016-04-25) -### Added -- Coverage and reference logos in README. - -### Fixed -- Use specified values in help and version parsing. -- Only display app version and help message once. - -## [1.10.0] - 2015-10-06 (backfilled 2016-04-25) -### Added -- More tests for existing functionality. -- `ArgsUsage` at app and command level for help text flexibility. - -### Fixed -- Honor `HideHelp` and `HideVersion` in `App.Run`. -- Remove juvenile word from README. - -## [1.9.0] - 2015-09-08 (backfilled 2016-04-25) -### Added -- `FullName` on command with accompanying help output update. -- Set default `$PROG` in bash completion. - -### Changed -- Docs formatting. - -### Fixed -- Removed self-referential imports in tests. - -## [1.8.0] - 2015-06-30 (backfilled 2016-04-25) -### Added -- Support for `Copyright` at app level. -- `Parent` func at context level to walk up context lineage. - -### Fixed -- Global flag processing at top level. - -## [1.7.1] - 2015-06-11 (backfilled 2016-04-25) -### Added -- Aggregate errors from `Before`/`After` funcs. -- Doc comments on flag structs. -- Include non-global flags when checking version and help. -- Travis CI config updates. - -### Fixed -- Ensure slice type flags have non-nil values. -- Collect global flags from the full command hierarchy. -- Docs prose. - -## [1.7.0] - 2015-05-03 (backfilled 2016-04-25) -### Changed -- `HelpPrinter` signature includes output writer. - -### Fixed -- Specify go 1.1+ in docs. -- Set `Writer` when running command as app. - -## [1.6.0] - 2015-03-23 (backfilled 2016-04-25) -### Added -- Multiple author support. -- `NumFlags` at context level. -- `Aliases` at command level. - -### Deprecated -- `ShortName` at command level. - -### Fixed -- Subcommand help output. -- Backward compatible support for deprecated `Author` and `Email` fields. -- Docs regarding `Names`/`Aliases`. - -## [1.5.0] - 2015-02-20 (backfilled 2016-04-25) -### Added -- `After` hook func support at app and command level. - -### Fixed -- Use parsed context when running command as subcommand. -- Docs prose. - -## [1.4.1] - 2015-01-09 (backfilled 2016-04-25) -### Added -- Support for hiding `-h / --help` flags, but not `help` subcommand. -- Stop flag parsing after `--`. - -### Fixed -- Help text for generic flags to specify single value. -- Use double quotes in output for defaults. -- Use `ParseInt` instead of `ParseUint` for int environment var values. -- Use `0` as base when parsing int environment var values. - -## [1.4.0] - 2014-12-12 (backfilled 2016-04-25) -### Added -- Support for environment variable lookup "cascade". -- Support for `Stdout` on app for output redirection. - -### Fixed -- Print command help instead of app help in `ShowCommandHelp`. - -## [1.3.1] - 2014-11-13 (backfilled 2016-04-25) -### Added -- Docs and example code updates. - -### Changed -- Default `-v / --version` flag made optional. - -## [1.3.0] - 2014-08-10 (backfilled 2016-04-25) -### Added -- `FlagNames` at context level. -- Exposed `VersionPrinter` var for more control over version output. -- Zsh completion hook. -- `AUTHOR` section in default app help template. -- Contribution guidelines. -- `DurationFlag` type. - -## [1.2.0] - 2014-08-02 -### Added -- Support for environment variable defaults on flags plus tests. - -## [1.1.0] - 2014-07-15 -### Added -- Bash completion. -- Optional hiding of built-in help command. -- Optional skipping of flag parsing at command level. -- `Author`, `Email`, and `Compiled` metadata on app. -- `Before` hook func support at app and command level. -- `CommandNotFound` func support at app level. -- Command reference available on context. -- `GenericFlag` type. -- `Float64Flag` type. -- `BoolTFlag` type. -- `IsSet` flag helper on context. -- More flag lookup funcs at context level. -- More tests & docs. - -### Changed -- Help template updates to account for presence/absence of flags. -- Separated subcommand help template. -- Exposed `HelpPrinter` var for more control over help output. - -## [1.0.0] - 2013-11-01 -### Added -- `help` flag in default app flag set and each command flag set. -- Custom handling of argument parsing errors. -- Command lookup by name at app level. -- `StringSliceFlag` type and supporting `StringSlice` type. -- `IntSliceFlag` type and supporting `IntSlice` type. -- Slice type flag lookups by name at context level. -- Export of app and command help functions. -- More tests & docs. - -## 0.1.0 - 2013-07-22 -### Added -- Initial implementation. - -[Unreleased]: https://github.com/urfave/cli/compare/v1.18.0...HEAD -[1.18.0]: https://github.com/urfave/cli/compare/v1.17.0...v1.18.0 -[1.17.0]: https://github.com/urfave/cli/compare/v1.16.0...v1.17.0 -[1.16.0]: https://github.com/urfave/cli/compare/v1.15.0...v1.16.0 -[1.15.0]: https://github.com/urfave/cli/compare/v1.14.0...v1.15.0 -[1.14.0]: https://github.com/urfave/cli/compare/v1.13.0...v1.14.0 -[1.13.0]: https://github.com/urfave/cli/compare/v1.12.0...v1.13.0 -[1.12.0]: https://github.com/urfave/cli/compare/v1.11.1...v1.12.0 -[1.11.1]: https://github.com/urfave/cli/compare/v1.11.0...v1.11.1 -[1.11.0]: https://github.com/urfave/cli/compare/v1.10.2...v1.11.0 -[1.10.2]: https://github.com/urfave/cli/compare/v1.10.1...v1.10.2 -[1.10.1]: https://github.com/urfave/cli/compare/v1.10.0...v1.10.1 -[1.10.0]: https://github.com/urfave/cli/compare/v1.9.0...v1.10.0 -[1.9.0]: https://github.com/urfave/cli/compare/v1.8.0...v1.9.0 -[1.8.0]: https://github.com/urfave/cli/compare/v1.7.1...v1.8.0 -[1.7.1]: https://github.com/urfave/cli/compare/v1.7.0...v1.7.1 -[1.7.0]: https://github.com/urfave/cli/compare/v1.6.0...v1.7.0 -[1.6.0]: https://github.com/urfave/cli/compare/v1.5.0...v1.6.0 -[1.5.0]: https://github.com/urfave/cli/compare/v1.4.1...v1.5.0 -[1.4.1]: https://github.com/urfave/cli/compare/v1.4.0...v1.4.1 -[1.4.0]: https://github.com/urfave/cli/compare/v1.3.1...v1.4.0 -[1.3.1]: https://github.com/urfave/cli/compare/v1.3.0...v1.3.1 -[1.3.0]: https://github.com/urfave/cli/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/urfave/cli/compare/v1.1.0...v1.2.0 -[1.1.0]: https://github.com/urfave/cli/compare/v1.0.0...v1.1.0 -[1.0.0]: https://github.com/urfave/cli/compare/v0.1.0...v1.0.0 diff --git a/vendor/gopkg.in/urfave/cli.v1/README.md b/vendor/gopkg.in/urfave/cli.v1/README.md deleted file mode 100644 index 2bbbd8ea9..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/README.md +++ /dev/null @@ -1,1381 +0,0 @@ -cli -=== - -[![Build Status](https://travis-ci.org/urfave/cli.svg?branch=master)](https://travis-ci.org/urfave/cli) -[![Windows Build Status](https://ci.appveyor.com/api/projects/status/rtgk5xufi932pb2v?svg=true)](https://ci.appveyor.com/project/urfave/cli) -[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://godoc.org/github.com/urfave/cli) -[![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli) -[![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli) -[![top level coverage](https://gocover.io/_badge/github.com/urfave/cli?0 "top level coverage")](http://gocover.io/github.com/urfave/cli) / -[![altsrc coverage](https://gocover.io/_badge/github.com/urfave/cli/altsrc?0 "altsrc coverage")](http://gocover.io/github.com/urfave/cli/altsrc) - -**Notice:** This is the library formerly known as -`github.com/codegangsta/cli` -- Github will automatically redirect requests -to this repository, but we recommend updating your references for clarity. - -cli is a simple, fast, and fun package for building command line apps in Go. The -goal is to enable developers to write fast and distributable command line -applications in an expressive way. - - - -- [Overview](#overview) -- [Installation](#installation) - * [Supported platforms](#supported-platforms) - * [Using the `v2` branch](#using-the-v2-branch) - * [Pinning to the `v1` releases](#pinning-to-the-v1-releases) -- [Getting Started](#getting-started) -- [Examples](#examples) - * [Arguments](#arguments) - * [Flags](#flags) - + [Placeholder Values](#placeholder-values) - + [Alternate Names](#alternate-names) - + [Ordering](#ordering) - + [Values from the Environment](#values-from-the-environment) - + [Values from alternate input sources (YAML, TOML, and others)](#values-from-alternate-input-sources-yaml-toml-and-others) - * [Subcommands](#subcommands) - * [Subcommands categories](#subcommands-categories) - * [Exit code](#exit-code) - * [Bash Completion](#bash-completion) - + [Enabling](#enabling) - + [Distribution](#distribution) - + [Customization](#customization) - * [Generated Help Text](#generated-help-text) - + [Customization](#customization-1) - * [Version Flag](#version-flag) - + [Customization](#customization-2) - + [Full API Example](#full-api-example) -- [Contribution Guidelines](#contribution-guidelines) - - - -## Overview - -Command line apps are usually so tiny that there is absolutely no reason why -your code should *not* be self-documenting. Things like generating help text and -parsing command flags/options should not hinder productivity when writing a -command line app. - -**This is where cli comes into play.** cli makes command line programming fun, -organized, and expressive! - -## Installation - -Make sure you have a working Go environment. Go version 1.2+ is supported. [See -the install instructions for Go](http://golang.org/doc/install.html). - -To install cli, simply run: -``` -$ go get github.com/urfave/cli -``` - -Make sure your `PATH` includes the `$GOPATH/bin` directory so your commands can -be easily used: -``` -export PATH=$PATH:$GOPATH/bin -``` - -### Supported platforms - -cli is tested against multiple versions of Go on Linux, and against the latest -released version of Go on OS X and Windows. For full details, see -[`./.travis.yml`](./.travis.yml) and [`./appveyor.yml`](./appveyor.yml). - -### Using the `v2` branch - -**Warning**: The `v2` branch is currently unreleased and considered unstable. - -There is currently a long-lived branch named `v2` that is intended to land as -the new `master` branch once development there has settled down. The current -`master` branch (mirrored as `v1`) is being manually merged into `v2` on -an irregular human-based schedule, but generally if one wants to "upgrade" to -`v2` *now* and accept the volatility (read: "awesomeness") that comes along with -that, please use whatever version pinning of your preference, such as via -`gopkg.in`: - -``` -$ go get gopkg.in/urfave/cli.v2 -``` - -``` go -... -import ( - "gopkg.in/urfave/cli.v2" // imports as package "cli" -) -... -``` - -### Pinning to the `v1` releases - -Similarly to the section above describing use of the `v2` branch, if one wants -to avoid any unexpected compatibility pains once `v2` becomes `master`, then -pinning to `v1` is an acceptable option, e.g.: - -``` -$ go get gopkg.in/urfave/cli.v1 -``` - -``` go -... -import ( - "gopkg.in/urfave/cli.v1" // imports as package "cli" -) -... -``` - -This will pull the latest tagged `v1` release (e.g. `v1.18.1` at the time of writing). - -## Getting Started - -One of the philosophies behind cli is that an API should be playful and full of -discovery. So a cli app can be as little as one line of code in `main()`. - - -``` go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - cli.NewApp().Run(os.Args) -} -``` - -This app will run and show help text, but is not very useful. Let's give an -action to execute and some help documentation: - - -``` go -package main - -import ( - "fmt" - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - app.Name = "boom" - app.Usage = "make an explosive entrance" - app.Action = func(c *cli.Context) error { - fmt.Println("boom! I say!") - return nil - } - - app.Run(os.Args) -} -``` - -Running this already gives you a ton of functionality, plus support for things -like subcommands and flags, which are covered below. - -## Examples - -Being a programmer can be a lonely job. Thankfully by the power of automation -that is not the case! Let's create a greeter app to fend off our demons of -loneliness! - -Start by creating a directory named `greet`, and within it, add a file, -`greet.go` with the following code in it: - - -``` go -package main - -import ( - "fmt" - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - app.Name = "greet" - app.Usage = "fight the loneliness!" - app.Action = func(c *cli.Context) error { - fmt.Println("Hello friend!") - return nil - } - - app.Run(os.Args) -} -``` - -Install our command to the `$GOPATH/bin` directory: - -``` -$ go install -``` - -Finally run our new command: - -``` -$ greet -Hello friend! -``` - -cli also generates neat help text: - -``` -$ greet help -NAME: - greet - fight the loneliness! - -USAGE: - greet [global options] command [command options] [arguments...] - -VERSION: - 0.0.0 - -COMMANDS: - help, h Shows a list of commands or help for one command - -GLOBAL OPTIONS - --version Shows version information -``` - -### Arguments - -You can lookup arguments by calling the `Args` function on `cli.Context`, e.g.: - - -``` go -package main - -import ( - "fmt" - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Action = func(c *cli.Context) error { - fmt.Printf("Hello %q", c.Args().Get(0)) - return nil - } - - app.Run(os.Args) -} -``` - -### Flags - -Setting and querying flags is simple. - - -``` go -package main - -import ( - "fmt" - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Flags = []cli.Flag { - cli.StringFlag{ - Name: "lang", - Value: "english", - Usage: "language for the greeting", - }, - } - - app.Action = func(c *cli.Context) error { - name := "Nefertiti" - if c.NArg() > 0 { - name = c.Args().Get(0) - } - if c.String("lang") == "spanish" { - fmt.Println("Hola", name) - } else { - fmt.Println("Hello", name) - } - return nil - } - - app.Run(os.Args) -} -``` - -You can also set a destination variable for a flag, to which the content will be -scanned. - - -``` go -package main - -import ( - "os" - "fmt" - - "github.com/urfave/cli" -) - -func main() { - var language string - - app := cli.NewApp() - - app.Flags = []cli.Flag { - cli.StringFlag{ - Name: "lang", - Value: "english", - Usage: "language for the greeting", - Destination: &language, - }, - } - - app.Action = func(c *cli.Context) error { - name := "someone" - if c.NArg() > 0 { - name = c.Args()[0] - } - if language == "spanish" { - fmt.Println("Hola", name) - } else { - fmt.Println("Hello", name) - } - return nil - } - - app.Run(os.Args) -} -``` - -See full list of flags at http://godoc.org/github.com/urfave/cli - -#### Placeholder Values - -Sometimes it's useful to specify a flag's value within the usage string itself. -Such placeholders are indicated with back quotes. - -For example this: - - -```go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Flags = []cli.Flag{ - cli.StringFlag{ - Name: "config, c", - Usage: "Load configuration from `FILE`", - }, - } - - app.Run(os.Args) -} -``` - -Will result in help output like: - -``` ---config FILE, -c FILE Load configuration from FILE -``` - -Note that only the first placeholder is used. Subsequent back-quoted words will -be left as-is. - -#### Alternate Names - -You can set alternate (or short) names for flags by providing a comma-delimited -list for the `Name`. e.g. - - -``` go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Flags = []cli.Flag { - cli.StringFlag{ - Name: "lang, l", - Value: "english", - Usage: "language for the greeting", - }, - } - - app.Run(os.Args) -} -``` - -That flag can then be set with `--lang spanish` or `-l spanish`. Note that -giving two different forms of the same flag in the same command invocation is an -error. - -#### Ordering - -Flags for the application and commands are shown in the order they are defined. -However, it's possible to sort them from outside this library by using `FlagsByName` -or `CommandsByName` with `sort`. - -For example this: - - -``` go -package main - -import ( - "os" - "sort" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Flags = []cli.Flag { - cli.StringFlag{ - Name: "lang, l", - Value: "english", - Usage: "Language for the greeting", - }, - cli.StringFlag{ - Name: "config, c", - Usage: "Load configuration from `FILE`", - }, - } - - app.Commands = []cli.Command{ - { - Name: "complete", - Aliases: []string{"c"}, - Usage: "complete a task on the list", - Action: func(c *cli.Context) error { - return nil - }, - }, - { - Name: "add", - Aliases: []string{"a"}, - Usage: "add a task to the list", - Action: func(c *cli.Context) error { - return nil - }, - }, - } - - sort.Sort(cli.FlagsByName(app.Flags)) - sort.Sort(cli.CommandsByName(app.Commands)) - - app.Run(os.Args) -} -``` - -Will result in help output like: - -``` ---config FILE, -c FILE Load configuration from FILE ---lang value, -l value Language for the greeting (default: "english") -``` - -#### Values from the Environment - -You can also have the default value set from the environment via `EnvVar`. e.g. - - -``` go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Flags = []cli.Flag { - cli.StringFlag{ - Name: "lang, l", - Value: "english", - Usage: "language for the greeting", - EnvVar: "APP_LANG", - }, - } - - app.Run(os.Args) -} -``` - -The `EnvVar` may also be given as a comma-delimited "cascade", where the first -environment variable that resolves is used as the default. - - -``` go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Flags = []cli.Flag { - cli.StringFlag{ - Name: "lang, l", - Value: "english", - Usage: "language for the greeting", - EnvVar: "LEGACY_COMPAT_LANG,APP_LANG,LANG", - }, - } - - app.Run(os.Args) -} -``` - -#### Values from alternate input sources (YAML, TOML, and others) - -There is a separate package altsrc that adds support for getting flag values -from other file input sources. - -Currently supported input source formats: -* YAML -* TOML - -In order to get values for a flag from an alternate input source the following -code would be added to wrap an existing cli.Flag like below: - -``` go - altsrc.NewIntFlag(cli.IntFlag{Name: "test"}) -``` - -Initialization must also occur for these flags. Below is an example initializing -getting data from a yaml file below. - -``` go - command.Before = altsrc.InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load")) -``` - -The code above will use the "load" string as a flag name to get the file name of -a yaml file from the cli.Context. It will then use that file name to initialize -the yaml input source for any flags that are defined on that command. As a note -the "load" flag used would also have to be defined on the command flags in order -for this code snipped to work. - -Currently only the aboved specified formats are supported but developers can -add support for other input sources by implementing the -altsrc.InputSourceContext for their given sources. - -Here is a more complete sample of a command using YAML support: - - -``` go -package notmain - -import ( - "fmt" - "os" - - "github.com/urfave/cli" - "github.com/urfave/cli/altsrc" -) - -func main() { - app := cli.NewApp() - - flags := []cli.Flag{ - altsrc.NewIntFlag(cli.IntFlag{Name: "test"}), - cli.StringFlag{Name: "load"}, - } - - app.Action = func(c *cli.Context) error { - fmt.Println("yaml ist rad") - return nil - } - - app.Before = altsrc.InitInputSourceWithContext(flags, altsrc.NewYamlSourceFromFlagFunc("load")) - app.Flags = flags - - app.Run(os.Args) -} -``` - -### Subcommands - -Subcommands can be defined for a more git-like command line app. - - -```go -package main - -import ( - "fmt" - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Commands = []cli.Command{ - { - Name: "add", - Aliases: []string{"a"}, - Usage: "add a task to the list", - Action: func(c *cli.Context) error { - fmt.Println("added task: ", c.Args().First()) - return nil - }, - }, - { - Name: "complete", - Aliases: []string{"c"}, - Usage: "complete a task on the list", - Action: func(c *cli.Context) error { - fmt.Println("completed task: ", c.Args().First()) - return nil - }, - }, - { - Name: "template", - Aliases: []string{"t"}, - Usage: "options for task templates", - Subcommands: []cli.Command{ - { - Name: "add", - Usage: "add a new template", - Action: func(c *cli.Context) error { - fmt.Println("new task template: ", c.Args().First()) - return nil - }, - }, - { - Name: "remove", - Usage: "remove an existing template", - Action: func(c *cli.Context) error { - fmt.Println("removed task template: ", c.Args().First()) - return nil - }, - }, - }, - }, - } - - app.Run(os.Args) -} -``` - -### Subcommands categories - -For additional organization in apps that have many subcommands, you can -associate a category for each command to group them together in the help -output. - -E.g. - -```go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - - app.Commands = []cli.Command{ - { - Name: "noop", - }, - { - Name: "add", - Category: "template", - }, - { - Name: "remove", - Category: "template", - }, - } - - app.Run(os.Args) -} -``` - -Will include: - -``` -COMMANDS: - noop - - Template actions: - add - remove -``` - -### Exit code - -Calling `App.Run` will not automatically call `os.Exit`, which means that by -default the exit code will "fall through" to being `0`. An explicit exit code -may be set by returning a non-nil error that fulfills `cli.ExitCoder`, *or* a -`cli.MultiError` that includes an error that fulfills `cli.ExitCoder`, e.g.: - -``` go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - app := cli.NewApp() - app.Flags = []cli.Flag{ - cli.BoolTFlag{ - Name: "ginger-crouton", - Usage: "is it in the soup?", - }, - } - app.Action = func(ctx *cli.Context) error { - if !ctx.Bool("ginger-crouton") { - return cli.NewExitError("it is not in the soup", 86) - } - return nil - } - - app.Run(os.Args) -} -``` - -### Bash Completion - -You can enable completion commands by setting the `EnableBashCompletion` -flag on the `App` object. By default, this setting will only auto-complete to -show an app's subcommands, but you can write your own completion methods for -the App or its subcommands. - - -``` go -package main - -import ( - "fmt" - "os" - - "github.com/urfave/cli" -) - -func main() { - tasks := []string{"cook", "clean", "laundry", "eat", "sleep", "code"} - - app := cli.NewApp() - app.EnableBashCompletion = true - app.Commands = []cli.Command{ - { - Name: "complete", - Aliases: []string{"c"}, - Usage: "complete a task on the list", - Action: func(c *cli.Context) error { - fmt.Println("completed task: ", c.Args().First()) - return nil - }, - BashComplete: func(c *cli.Context) { - // This will complete if no args are passed - if c.NArg() > 0 { - return - } - for _, t := range tasks { - fmt.Println(t) - } - }, - }, - } - - app.Run(os.Args) -} -``` - -#### Enabling - -Source the `autocomplete/bash_autocomplete` file in your `.bashrc` file while -setting the `PROG` variable to the name of your program: - -`PROG=myprogram source /.../cli/autocomplete/bash_autocomplete` - -#### Distribution - -Copy `autocomplete/bash_autocomplete` into `/etc/bash_completion.d/` and rename -it to the name of the program you wish to add autocomplete support for (or -automatically install it there if you are distributing a package). Don't forget -to source the file to make it active in the current shell. - -``` -sudo cp src/bash_autocomplete /etc/bash_completion.d/ -source /etc/bash_completion.d/ -``` - -Alternatively, you can just document that users should source the generic -`autocomplete/bash_autocomplete` in their bash configuration with `$PROG` set -to the name of their program (as above). - -#### Customization - -The default bash completion flag (`--generate-bash-completion`) is defined as -`cli.BashCompletionFlag`, and may be redefined if desired, e.g.: - - -``` go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - cli.BashCompletionFlag = cli.BoolFlag{ - Name: "compgen", - Hidden: true, - } - - app := cli.NewApp() - app.EnableBashCompletion = true - app.Commands = []cli.Command{ - { - Name: "wat", - }, - } - app.Run(os.Args) -} -``` - -### Generated Help Text - -The default help flag (`-h/--help`) is defined as `cli.HelpFlag` and is checked -by the cli internals in order to print generated help text for the app, command, -or subcommand, and break execution. - -#### Customization - -All of the help text generation may be customized, and at multiple levels. The -templates are exposed as variables `AppHelpTemplate`, `CommandHelpTemplate`, and -`SubcommandHelpTemplate` which may be reassigned or augmented, and full override -is possible by assigning a compatible func to the `cli.HelpPrinter` variable, -e.g.: - - -``` go -package main - -import ( - "fmt" - "io" - "os" - - "github.com/urfave/cli" -) - -func main() { - // EXAMPLE: Append to an existing template - cli.AppHelpTemplate = fmt.Sprintf(`%s - -WEBSITE: http://awesometown.example.com - -SUPPORT: support@awesometown.example.com - -`, cli.AppHelpTemplate) - - // EXAMPLE: Override a template - cli.AppHelpTemplate = `NAME: - {{.Name}} - {{.Usage}} -USAGE: - {{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}} - {{if len .Authors}} -AUTHOR: - {{range .Authors}}{{ . }}{{end}} - {{end}}{{if .Commands}} -COMMANDS: -{{range .Commands}}{{if not .HideHelp}} {{join .Names ", "}}{{ "\t"}}{{.Usage}}{{ "\n" }}{{end}}{{end}}{{end}}{{if .VisibleFlags}} -GLOBAL OPTIONS: - {{range .VisibleFlags}}{{.}} - {{end}}{{end}}{{if .Copyright }} -COPYRIGHT: - {{.Copyright}} - {{end}}{{if .Version}} -VERSION: - {{.Version}} - {{end}} -` - - // EXAMPLE: Replace the `HelpPrinter` func - cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) { - fmt.Println("Ha HA. I pwnd the help!!1") - } - - cli.NewApp().Run(os.Args) -} -``` - -The default flag may be customized to something other than `-h/--help` by -setting `cli.HelpFlag`, e.g.: - - -``` go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - cli.HelpFlag = cli.BoolFlag{ - Name: "halp, haaaaalp", - Usage: "HALP", - EnvVar: "SHOW_HALP,HALPPLZ", - } - - cli.NewApp().Run(os.Args) -} -``` - -### Version Flag - -The default version flag (`-v/--version`) is defined as `cli.VersionFlag`, which -is checked by the cli internals in order to print the `App.Version` via -`cli.VersionPrinter` and break execution. - -#### Customization - -The default flag may be customized to something other than `-v/--version` by -setting `cli.VersionFlag`, e.g.: - - -``` go -package main - -import ( - "os" - - "github.com/urfave/cli" -) - -func main() { - cli.VersionFlag = cli.BoolFlag{ - Name: "print-version, V", - Usage: "print only the version", - } - - app := cli.NewApp() - app.Name = "partay" - app.Version = "19.99.0" - app.Run(os.Args) -} -``` - -Alternatively, the version printer at `cli.VersionPrinter` may be overridden, e.g.: - - -``` go -package main - -import ( - "fmt" - "os" - - "github.com/urfave/cli" -) - -var ( - Revision = "fafafaf" -) - -func main() { - cli.VersionPrinter = func(c *cli.Context) { - fmt.Printf("version=%s revision=%s\n", c.App.Version, Revision) - } - - app := cli.NewApp() - app.Name = "partay" - app.Version = "19.99.0" - app.Run(os.Args) -} -``` - -#### Full API Example - -**Notice**: This is a contrived (functioning) example meant strictly for API -demonstration purposes. Use of one's imagination is encouraged. - - -``` go -package main - -import ( - "errors" - "flag" - "fmt" - "io" - "io/ioutil" - "os" - "time" - - "github.com/urfave/cli" -) - -func init() { - cli.AppHelpTemplate += "\nCUSTOMIZED: you bet ur muffins\n" - cli.CommandHelpTemplate += "\nYMMV\n" - cli.SubcommandHelpTemplate += "\nor something\n" - - cli.HelpFlag = cli.BoolFlag{Name: "halp"} - cli.BashCompletionFlag = cli.BoolFlag{Name: "compgen", Hidden: true} - cli.VersionFlag = cli.BoolFlag{Name: "print-version, V"} - - cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) { - fmt.Fprintf(w, "best of luck to you\n") - } - cli.VersionPrinter = func(c *cli.Context) { - fmt.Fprintf(c.App.Writer, "version=%s\n", c.App.Version) - } - cli.OsExiter = func(c int) { - fmt.Fprintf(cli.ErrWriter, "refusing to exit %d\n", c) - } - cli.ErrWriter = ioutil.Discard - cli.FlagStringer = func(fl cli.Flag) string { - return fmt.Sprintf("\t\t%s", fl.GetName()) - } -} - -type hexWriter struct{} - -func (w *hexWriter) Write(p []byte) (int, error) { - for _, b := range p { - fmt.Printf("%x", b) - } - fmt.Printf("\n") - - return len(p), nil -} - -type genericType struct{ - s string -} - -func (g *genericType) Set(value string) error { - g.s = value - return nil -} - -func (g *genericType) String() string { - return g.s -} - -func main() { - app := cli.NewApp() - app.Name = "kənˈtrīv" - app.Version = "19.99.0" - app.Compiled = time.Now() - app.Authors = []cli.Author{ - cli.Author{ - Name: "Example Human", - Email: "human@example.com", - }, - } - app.Copyright = "(c) 1999 Serious Enterprise" - app.HelpName = "contrive" - app.Usage = "demonstrate available API" - app.UsageText = "contrive - demonstrating the available API" - app.ArgsUsage = "[args and such]" - app.Commands = []cli.Command{ - cli.Command{ - Name: "doo", - Aliases: []string{"do"}, - Category: "motion", - Usage: "do the doo", - UsageText: "doo - does the dooing", - Description: "no really, there is a lot of dooing to be done", - ArgsUsage: "[arrgh]", - Flags: []cli.Flag{ - cli.BoolFlag{Name: "forever, forevvarr"}, - }, - Subcommands: cli.Commands{ - cli.Command{ - Name: "wop", - Action: wopAction, - }, - }, - SkipFlagParsing: false, - HideHelp: false, - Hidden: false, - HelpName: "doo!", - BashComplete: func(c *cli.Context) { - fmt.Fprintf(c.App.Writer, "--better\n") - }, - Before: func(c *cli.Context) error { - fmt.Fprintf(c.App.Writer, "brace for impact\n") - return nil - }, - After: func(c *cli.Context) error { - fmt.Fprintf(c.App.Writer, "did we lose anyone?\n") - return nil - }, - Action: func(c *cli.Context) error { - c.Command.FullName() - c.Command.HasName("wop") - c.Command.Names() - c.Command.VisibleFlags() - fmt.Fprintf(c.App.Writer, "dodododododoodododddooooododododooo\n") - if c.Bool("forever") { - c.Command.Run(c) - } - return nil - }, - OnUsageError: func(c *cli.Context, err error, isSubcommand bool) error { - fmt.Fprintf(c.App.Writer, "for shame\n") - return err - }, - }, - } - app.Flags = []cli.Flag{ - cli.BoolFlag{Name: "fancy"}, - cli.BoolTFlag{Name: "fancier"}, - cli.DurationFlag{Name: "howlong, H", Value: time.Second * 3}, - cli.Float64Flag{Name: "howmuch"}, - cli.GenericFlag{Name: "wat", Value: &genericType{}}, - cli.Int64Flag{Name: "longdistance"}, - cli.Int64SliceFlag{Name: "intervals"}, - cli.IntFlag{Name: "distance"}, - cli.IntSliceFlag{Name: "times"}, - cli.StringFlag{Name: "dance-move, d"}, - cli.StringSliceFlag{Name: "names, N"}, - cli.UintFlag{Name: "age"}, - cli.Uint64Flag{Name: "bigage"}, - } - app.EnableBashCompletion = true - app.HideHelp = false - app.HideVersion = false - app.BashComplete = func(c *cli.Context) { - fmt.Fprintf(c.App.Writer, "lipstick\nkiss\nme\nlipstick\nringo\n") - } - app.Before = func(c *cli.Context) error { - fmt.Fprintf(c.App.Writer, "HEEEERE GOES\n") - return nil - } - app.After = func(c *cli.Context) error { - fmt.Fprintf(c.App.Writer, "Phew!\n") - return nil - } - app.CommandNotFound = func(c *cli.Context, command string) { - fmt.Fprintf(c.App.Writer, "Thar be no %q here.\n", command) - } - app.OnUsageError = func(c *cli.Context, err error, isSubcommand bool) error { - if isSubcommand { - return err - } - - fmt.Fprintf(c.App.Writer, "WRONG: %#v\n", err) - return nil - } - app.Action = func(c *cli.Context) error { - cli.DefaultAppComplete(c) - cli.HandleExitCoder(errors.New("not an exit coder, though")) - cli.ShowAppHelp(c) - cli.ShowCommandCompletions(c, "nope") - cli.ShowCommandHelp(c, "also-nope") - cli.ShowCompletions(c) - cli.ShowSubcommandHelp(c) - cli.ShowVersion(c) - - categories := c.App.Categories() - categories.AddCommand("sounds", cli.Command{ - Name: "bloop", - }) - - for _, category := range c.App.Categories() { - fmt.Fprintf(c.App.Writer, "%s\n", category.Name) - fmt.Fprintf(c.App.Writer, "%#v\n", category.Commands) - fmt.Fprintf(c.App.Writer, "%#v\n", category.VisibleCommands()) - } - - fmt.Printf("%#v\n", c.App.Command("doo")) - if c.Bool("infinite") { - c.App.Run([]string{"app", "doo", "wop"}) - } - - if c.Bool("forevar") { - c.App.RunAsSubcommand(c) - } - c.App.Setup() - fmt.Printf("%#v\n", c.App.VisibleCategories()) - fmt.Printf("%#v\n", c.App.VisibleCommands()) - fmt.Printf("%#v\n", c.App.VisibleFlags()) - - fmt.Printf("%#v\n", c.Args().First()) - if len(c.Args()) > 0 { - fmt.Printf("%#v\n", c.Args()[1]) - } - fmt.Printf("%#v\n", c.Args().Present()) - fmt.Printf("%#v\n", c.Args().Tail()) - - set := flag.NewFlagSet("contrive", 0) - nc := cli.NewContext(c.App, set, c) - - fmt.Printf("%#v\n", nc.Args()) - fmt.Printf("%#v\n", nc.Bool("nope")) - fmt.Printf("%#v\n", nc.BoolT("nerp")) - fmt.Printf("%#v\n", nc.Duration("howlong")) - fmt.Printf("%#v\n", nc.Float64("hay")) - fmt.Printf("%#v\n", nc.Generic("bloop")) - fmt.Printf("%#v\n", nc.Int64("bonk")) - fmt.Printf("%#v\n", nc.Int64Slice("burnks")) - fmt.Printf("%#v\n", nc.Int("bips")) - fmt.Printf("%#v\n", nc.IntSlice("blups")) - fmt.Printf("%#v\n", nc.String("snurt")) - fmt.Printf("%#v\n", nc.StringSlice("snurkles")) - fmt.Printf("%#v\n", nc.Uint("flub")) - fmt.Printf("%#v\n", nc.Uint64("florb")) - fmt.Printf("%#v\n", nc.GlobalBool("global-nope")) - fmt.Printf("%#v\n", nc.GlobalBoolT("global-nerp")) - fmt.Printf("%#v\n", nc.GlobalDuration("global-howlong")) - fmt.Printf("%#v\n", nc.GlobalFloat64("global-hay")) - fmt.Printf("%#v\n", nc.GlobalGeneric("global-bloop")) - fmt.Printf("%#v\n", nc.GlobalInt("global-bips")) - fmt.Printf("%#v\n", nc.GlobalIntSlice("global-blups")) - fmt.Printf("%#v\n", nc.GlobalString("global-snurt")) - fmt.Printf("%#v\n", nc.GlobalStringSlice("global-snurkles")) - - fmt.Printf("%#v\n", nc.FlagNames()) - fmt.Printf("%#v\n", nc.GlobalFlagNames()) - fmt.Printf("%#v\n", nc.GlobalIsSet("wat")) - fmt.Printf("%#v\n", nc.GlobalSet("wat", "nope")) - fmt.Printf("%#v\n", nc.NArg()) - fmt.Printf("%#v\n", nc.NumFlags()) - fmt.Printf("%#v\n", nc.Parent()) - - nc.Set("wat", "also-nope") - - ec := cli.NewExitError("ohwell", 86) - fmt.Fprintf(c.App.Writer, "%d", ec.ExitCode()) - fmt.Printf("made it!\n") - return ec - } - - if os.Getenv("HEXY") != "" { - app.Writer = &hexWriter{} - app.ErrWriter = &hexWriter{} - } - - app.Metadata = map[string]interface{}{ - "layers": "many", - "explicable": false, - "whatever-values": 19.99, - } - - app.Run(os.Args) -} - -func wopAction(c *cli.Context) error { - fmt.Fprintf(c.App.Writer, ":wave: over here, eh\n") - return nil -} -``` - -## Contribution Guidelines - -Feel free to put up a pull request to fix a bug or maybe add a feature. I will -give it a code review and make sure that it does not break backwards -compatibility. If I or any other collaborators agree that it is in line with -the vision of the project, we will work with you to get the code into -a mergeable state and merge it into the master branch. - -If you have contributed something significant to the project, we will most -likely add you as a collaborator. As a collaborator you are given the ability -to merge others pull requests. It is very important that new code does not -break existing code, so be careful about what code you do choose to merge. - -If you feel like you have contributed to the project but have not yet been -added as a collaborator, we probably forgot to add you, please open an issue. diff --git a/vendor/gopkg.in/urfave/cli.v1/appveyor.yml b/vendor/gopkg.in/urfave/cli.v1/appveyor.yml deleted file mode 100644 index 1e1489c36..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/appveyor.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: "{build}" - -os: Windows Server 2016 - -image: Visual Studio 2017 - -clone_folder: c:\gopath\src\github.com\urfave\cli - -environment: - GOPATH: C:\gopath - GOVERSION: 1.8.x - PYTHON: C:\Python36-x64 - PYTHON_VERSION: 3.6.x - PYTHON_ARCH: 64 - -install: -- set PATH=%GOPATH%\bin;C:\go\bin;%PATH% -- go version -- go env -- go get github.com/urfave/gfmrun/... -- go get -v -t ./... - -build_script: -- python runtests vet -- python runtests test -- python runtests gfmrun diff --git a/vendor/gopkg.in/urfave/cli.v1/flag-types.json b/vendor/gopkg.in/urfave/cli.v1/flag-types.json deleted file mode 100644 index 122310785..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/flag-types.json +++ /dev/null @@ -1,93 +0,0 @@ -[ - { - "name": "Bool", - "type": "bool", - "value": false, - "context_default": "false", - "parser": "strconv.ParseBool(f.Value.String())" - }, - { - "name": "BoolT", - "type": "bool", - "value": false, - "doctail": " that is true by default", - "context_default": "false", - "parser": "strconv.ParseBool(f.Value.String())" - }, - { - "name": "Duration", - "type": "time.Duration", - "doctail": " (see https://golang.org/pkg/time/#ParseDuration)", - "context_default": "0", - "parser": "time.ParseDuration(f.Value.String())" - }, - { - "name": "Float64", - "type": "float64", - "context_default": "0", - "parser": "strconv.ParseFloat(f.Value.String(), 64)" - }, - { - "name": "Generic", - "type": "Generic", - "dest": false, - "context_default": "nil", - "context_type": "interface{}" - }, - { - "name": "Int64", - "type": "int64", - "context_default": "0", - "parser": "strconv.ParseInt(f.Value.String(), 0, 64)" - }, - { - "name": "Int", - "type": "int", - "context_default": "0", - "parser": "strconv.ParseInt(f.Value.String(), 0, 64)", - "parser_cast": "int(parsed)" - }, - { - "name": "IntSlice", - "type": "*IntSlice", - "dest": false, - "context_default": "nil", - "context_type": "[]int", - "parser": "(f.Value.(*IntSlice)).Value(), error(nil)" - }, - { - "name": "Int64Slice", - "type": "*Int64Slice", - "dest": false, - "context_default": "nil", - "context_type": "[]int64", - "parser": "(f.Value.(*Int64Slice)).Value(), error(nil)" - }, - { - "name": "String", - "type": "string", - "context_default": "\"\"", - "parser": "f.Value.String(), error(nil)" - }, - { - "name": "StringSlice", - "type": "*StringSlice", - "dest": false, - "context_default": "nil", - "context_type": "[]string", - "parser": "(f.Value.(*StringSlice)).Value(), error(nil)" - }, - { - "name": "Uint64", - "type": "uint64", - "context_default": "0", - "parser": "strconv.ParseUint(f.Value.String(), 0, 64)" - }, - { - "name": "Uint", - "type": "uint", - "context_default": "0", - "parser": "strconv.ParseUint(f.Value.String(), 0, 64)", - "parser_cast": "uint(parsed)" - } -] diff --git a/vendor/gopkg.in/urfave/cli.v1/generate-flag-types b/vendor/gopkg.in/urfave/cli.v1/generate-flag-types deleted file mode 100755 index 7147381ce..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/generate-flag-types +++ /dev/null @@ -1,255 +0,0 @@ -#!/usr/bin/env python -""" -The flag types that ship with the cli library have many things in common, and -so we can take advantage of the `go generate` command to create much of the -source code from a list of definitions. These definitions attempt to cover -the parts that vary between flag types, and should evolve as needed. - -An example of the minimum definition needed is: - - { - "name": "SomeType", - "type": "sometype", - "context_default": "nil" - } - -In this example, the code generated for the `cli` package will include a type -named `SomeTypeFlag` that is expected to wrap a value of type `sometype`. -Fetching values by name via `*cli.Context` will default to a value of `nil`. - -A more complete, albeit somewhat redundant, example showing all available -definition keys is: - - { - "name": "VeryMuchType", - "type": "*VeryMuchType", - "value": true, - "dest": false, - "doctail": " which really only wraps a []float64, oh well!", - "context_type": "[]float64", - "context_default": "nil", - "parser": "parseVeryMuchType(f.Value.String())", - "parser_cast": "[]float64(parsed)" - } - -The meaning of each field is as follows: - - name (string) - The type "name", which will be suffixed with - `Flag` when generating the type definition - for `cli` and the wrapper type for `altsrc` - type (string) - The type that the generated `Flag` type for `cli` - is expected to "contain" as its `.Value` member - value (bool) - Should the generated `cli` type have a `Value` - member? - dest (bool) - Should the generated `cli` type support a - destination pointer? - doctail (string) - Additional docs for the `cli` flag type comment - context_type (string) - The literal type used in the `*cli.Context` - reader func signature - context_default (string) - The literal value used as the default by the - `*cli.Context` reader funcs when no value is - present - parser (string) - Literal code used to parse the flag `f`, - expected to have a return signature of - (value, error) - parser_cast (string) - Literal code used to cast the `parsed` value - returned from the `parser` code -""" - -from __future__ import print_function, unicode_literals - -import argparse -import json -import os -import subprocess -import sys -import tempfile -import textwrap - - -class _FancyFormatter(argparse.ArgumentDefaultsHelpFormatter, - argparse.RawDescriptionHelpFormatter): - pass - - -def main(sysargs=sys.argv[:]): - parser = argparse.ArgumentParser( - description='Generate flag type code!', - formatter_class=_FancyFormatter) - parser.add_argument( - 'package', - type=str, default='cli', choices=_WRITEFUNCS.keys(), - help='Package for which flag types will be generated' - ) - parser.add_argument( - '-i', '--in-json', - type=argparse.FileType('r'), - default=sys.stdin, - help='Input JSON file which defines each type to be generated' - ) - parser.add_argument( - '-o', '--out-go', - type=argparse.FileType('w'), - default=sys.stdout, - help='Output file/stream to which generated source will be written' - ) - parser.epilog = __doc__ - - args = parser.parse_args(sysargs[1:]) - _generate_flag_types(_WRITEFUNCS[args.package], args.out_go, args.in_json) - return 0 - - -def _generate_flag_types(writefunc, output_go, input_json): - types = json.load(input_json) - - tmp = tempfile.NamedTemporaryFile(suffix='.go', delete=False) - writefunc(tmp, types) - tmp.close() - - new_content = subprocess.check_output( - ['goimports', tmp.name] - ).decode('utf-8') - - print(new_content, file=output_go, end='') - output_go.flush() - os.remove(tmp.name) - - -def _set_typedef_defaults(typedef): - typedef.setdefault('doctail', '') - typedef.setdefault('context_type', typedef['type']) - typedef.setdefault('dest', True) - typedef.setdefault('value', True) - typedef.setdefault('parser', 'f.Value, error(nil)') - typedef.setdefault('parser_cast', 'parsed') - - -def _write_cli_flag_types(outfile, types): - _fwrite(outfile, """\ - package cli - - // WARNING: This file is generated! - - """) - - for typedef in types: - _set_typedef_defaults(typedef) - - _fwrite(outfile, """\ - // {name}Flag is a flag with type {type}{doctail} - type {name}Flag struct {{ - Name string - Usage string - EnvVar string - Hidden bool - """.format(**typedef)) - - if typedef['value']: - _fwrite(outfile, """\ - Value {type} - """.format(**typedef)) - - if typedef['dest']: - _fwrite(outfile, """\ - Destination *{type} - """.format(**typedef)) - - _fwrite(outfile, "\n}\n\n") - - _fwrite(outfile, """\ - // String returns a readable representation of this value - // (for usage defaults) - func (f {name}Flag) String() string {{ - return FlagStringer(f) - }} - - // GetName returns the name of the flag - func (f {name}Flag) GetName() string {{ - return f.Name - }} - - // {name} looks up the value of a local {name}Flag, returns - // {context_default} if not found - func (c *Context) {name}(name string) {context_type} {{ - return lookup{name}(name, c.flagSet) - }} - - // Global{name} looks up the value of a global {name}Flag, returns - // {context_default} if not found - func (c *Context) Global{name}(name string) {context_type} {{ - if fs := lookupGlobalFlagSet(name, c); fs != nil {{ - return lookup{name}(name, fs) - }} - return {context_default} - }} - - func lookup{name}(name string, set *flag.FlagSet) {context_type} {{ - f := set.Lookup(name) - if f != nil {{ - parsed, err := {parser} - if err != nil {{ - return {context_default} - }} - return {parser_cast} - }} - return {context_default} - }} - """.format(**typedef)) - - -def _write_altsrc_flag_types(outfile, types): - _fwrite(outfile, """\ - package altsrc - - import ( - "gopkg.in/urfave/cli.v1" - ) - - // WARNING: This file is generated! - - """) - - for typedef in types: - _set_typedef_defaults(typedef) - - _fwrite(outfile, """\ - // {name}Flag is the flag type that wraps cli.{name}Flag to allow - // for other values to be specified - type {name}Flag struct {{ - cli.{name}Flag - set *flag.FlagSet - }} - - // New{name}Flag creates a new {name}Flag - func New{name}Flag(fl cli.{name}Flag) *{name}Flag {{ - return &{name}Flag{{{name}Flag: fl, set: nil}} - }} - - // Apply saves the flagSet for later usage calls, then calls the - // wrapped {name}Flag.Apply - func (f *{name}Flag) Apply(set *flag.FlagSet) {{ - f.set = set - f.{name}Flag.Apply(set) - }} - - // ApplyWithError saves the flagSet for later usage calls, then calls the - // wrapped {name}Flag.ApplyWithError - func (f *{name}Flag) ApplyWithError(set *flag.FlagSet) error {{ - f.set = set - return f.{name}Flag.ApplyWithError(set) - }} - """.format(**typedef)) - - -def _fwrite(outfile, text): - print(textwrap.dedent(text), end='', file=outfile) - - -_WRITEFUNCS = { - 'cli': _write_cli_flag_types, - 'altsrc': _write_altsrc_flag_types -} - -if __name__ == '__main__': - sys.exit(main()) diff --git a/vendor/gopkg.in/urfave/cli.v1/runtests b/vendor/gopkg.in/urfave/cli.v1/runtests deleted file mode 100755 index ee22bdeed..000000000 --- a/vendor/gopkg.in/urfave/cli.v1/runtests +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function - -import argparse -import os -import sys -import tempfile - -from subprocess import check_call, check_output - - -PACKAGE_NAME = os.environ.get( - 'CLI_PACKAGE_NAME', 'github.com/urfave/cli' -) - - -def main(sysargs=sys.argv[:]): - targets = { - 'vet': _vet, - 'test': _test, - 'gfmrun': _gfmrun, - 'toc': _toc, - 'gen': _gen, - } - - parser = argparse.ArgumentParser() - parser.add_argument( - 'target', nargs='?', choices=tuple(targets.keys()), default='test' - ) - args = parser.parse_args(sysargs[1:]) - - targets[args.target]() - return 0 - - -def _test(): - if check_output('go version'.split()).split()[2] < 'go1.2': - _run('go test -v .') - return - - coverprofiles = [] - for subpackage in ['', 'altsrc']: - coverprofile = 'cli.coverprofile' - if subpackage != '': - coverprofile = '{}.coverprofile'.format(subpackage) - - coverprofiles.append(coverprofile) - - _run('go test -v'.split() + [ - '-coverprofile={}'.format(coverprofile), - ('{}/{}'.format(PACKAGE_NAME, subpackage)).rstrip('/') - ]) - - combined_name = _combine_coverprofiles(coverprofiles) - _run('go tool cover -func={}'.format(combined_name)) - os.remove(combined_name) - - -def _gfmrun(): - go_version = check_output('go version'.split()).split()[2] - if go_version < 'go1.3': - print('runtests: skip on {}'.format(go_version), file=sys.stderr) - return - _run(['gfmrun', '-c', str(_gfmrun_count()), '-s', 'README.md']) - - -def _vet(): - _run('go vet ./...') - - -def _toc(): - _run('node_modules/.bin/markdown-toc -i README.md') - _run('git diff --exit-code') - - -def _gen(): - go_version = check_output('go version'.split()).split()[2] - if go_version < 'go1.5': - print('runtests: skip on {}'.format(go_version), file=sys.stderr) - return - - _run('go generate ./...') - _run('git diff --exit-code') - - -def _run(command): - if hasattr(command, 'split'): - command = command.split() - print('runtests: {}'.format(' '.join(command)), file=sys.stderr) - check_call(command) - - -def _gfmrun_count(): - with open('README.md') as infile: - lines = infile.read().splitlines() - return len(filter(_is_go_runnable, lines)) - - -def _is_go_runnable(line): - return line.startswith('package main') - - -def _combine_coverprofiles(coverprofiles): - combined = tempfile.NamedTemporaryFile( - suffix='.coverprofile', delete=False - ) - combined.write('mode: set\n') - - for coverprofile in coverprofiles: - with open(coverprofile, 'r') as infile: - for line in infile.readlines(): - if not line.startswith('mode: '): - combined.write(line) - - combined.flush() - name = combined.name - combined.close() - return name - - -if __name__ == '__main__': - sys.exit(main())