├── .gitignore
├── .travis.yml
├── Gopkg.lock
├── Gopkg.toml
├── LICENSE
├── README.md
├── cache.go
├── cmd
└── proxy-in-a-box
│ └── main.go
├── crawler
├── 66ip.go
├── crawler.go
├── kuai.go
├── verify.go
└── xici.go
├── examples
└── main.go
├── mitm
├── cert.go
├── dump.go
├── listener.go
└── mitm.go
├── proxy.go
├── proxyinabox.go
├── service
├── memcache.go
└── proxy.go
└── vendor
├── github.com
├── PuerkitoBio
│ └── goquery
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── array.go
│ │ ├── doc.go
│ │ ├── expand.go
│ │ ├── filter.go
│ │ ├── iteration.go
│ │ ├── manipulation.go
│ │ ├── property.go
│ │ ├── query.go
│ │ ├── traversal.go
│ │ ├── type.go
│ │ └── utilities.go
├── andybalholm
│ └── cascadia
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── go.mod
│ │ ├── parser.go
│ │ └── selector.go
├── fsnotify
│ └── fsnotify
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── fen.go
│ │ ├── fsnotify.go
│ │ ├── inotify.go
│ │ ├── inotify_poller.go
│ │ ├── kqueue.go
│ │ ├── open_mode_bsd.go
│ │ ├── open_mode_darwin.go
│ │ └── windows.go
├── getlantern
│ ├── byteexec
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── LICENSE_miniupnpc
│ │ ├── README.md
│ │ ├── byteexec.go
│ │ ├── byteexec_test_stub.go
│ │ ├── byteexec_test_windows.go
│ │ ├── helloworld_darwin.go
│ │ ├── helloworld_linux_386.go
│ │ ├── helloworld_linux_amd64.go
│ │ ├── helloworld_windows.go
│ │ ├── rename_darwin.go
│ │ ├── rename_stub.go
│ │ └── rename_windows.go
│ ├── context
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── context.go
│ │ └── gotrack.go
│ ├── elevate
│ │ ├── README.md
│ │ ├── bin
│ │ │ ├── cocoasudo_darwin.go
│ │ │ └── elevate_windows.go
│ │ ├── command.go
│ │ ├── command_darwin.go
│ │ ├── command_linux.go
│ │ ├── command_windows.go
│ │ ├── embedbinaries.bash
│ │ └── lantern.icns
│ ├── errors
│ │ ├── errors.go
│ │ └── hide.go
│ ├── filepersist
│ │ └── filepersist.go
│ ├── golog
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── golog.go
│ ├── hex
│ │ └── hex.go
│ ├── hidden
│ │ └── hidden.go
│ ├── keyman
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── certimporter
│ │ │ ├── CertImporter.sln
│ │ │ └── certimporter.go
│ │ ├── embedbinaries.bash
│ │ ├── keyman.go
│ │ ├── keyman_trust_darwin.go
│ │ ├── keyman_trust_linux.go
│ │ ├── keyman_trust_stub.go
│ │ └── keyman_trust_windows.go
│ ├── ops
│ │ └── ops.go
│ └── stack
│ │ ├── .travis.yml
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ └── stack.go
├── go-redis
│ └── redis
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── cluster.go
│ │ ├── cluster_commands.go
│ │ ├── command.go
│ │ ├── commands.go
│ │ ├── doc.go
│ │ ├── internal
│ │ ├── consistenthash
│ │ │ └── consistenthash.go
│ │ ├── error.go
│ │ ├── hashtag
│ │ │ └── hashtag.go
│ │ ├── internal.go
│ │ ├── log.go
│ │ ├── once.go
│ │ ├── pool
│ │ │ ├── conn.go
│ │ │ ├── pool.go
│ │ │ ├── pool_single.go
│ │ │ └── pool_sticky.go
│ │ ├── proto
│ │ │ ├── reader.go
│ │ │ ├── scan.go
│ │ │ └── write_buffer.go
│ │ ├── singleflight
│ │ │ └── singleflight.go
│ │ ├── util.go
│ │ └── util
│ │ │ ├── safe.go
│ │ │ ├── strconv.go
│ │ │ └── unsafe.go
│ │ ├── iterator.go
│ │ ├── options.go
│ │ ├── parser.go
│ │ ├── pipeline.go
│ │ ├── pubsub.go
│ │ ├── redis.go
│ │ ├── result.go
│ │ ├── ring.go
│ │ ├── script.go
│ │ ├── sentinel.go
│ │ ├── tx.go
│ │ └── universal.go
├── go-sql-driver
│ └── mysql
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── appengine.go
│ │ ├── auth.go
│ │ ├── buffer.go
│ │ ├── collations.go
│ │ ├── connection.go
│ │ ├── connection_go18.go
│ │ ├── const.go
│ │ ├── driver.go
│ │ ├── dsn.go
│ │ ├── errors.go
│ │ ├── fields.go
│ │ ├── infile.go
│ │ ├── packets.go
│ │ ├── result.go
│ │ ├── rows.go
│ │ ├── statement.go
│ │ ├── transaction.go
│ │ ├── utils.go
│ │ ├── utils_go17.go
│ │ └── utils_go18.go
├── hashicorp
│ └── hcl
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── decoder.go
│ │ ├── hcl.go
│ │ ├── hcl
│ │ ├── ast
│ │ │ ├── ast.go
│ │ │ └── walk.go
│ │ ├── parser
│ │ │ ├── error.go
│ │ │ └── parser.go
│ │ ├── printer
│ │ │ ├── nodes.go
│ │ │ └── printer.go
│ │ ├── scanner
│ │ │ └── scanner.go
│ │ ├── strconv
│ │ │ └── quote.go
│ │ └── token
│ │ │ ├── position.go
│ │ │ └── token.go
│ │ ├── json
│ │ ├── parser
│ │ │ ├── flatten.go
│ │ │ └── parser.go
│ │ ├── scanner
│ │ │ └── scanner.go
│ │ └── token
│ │ │ ├── position.go
│ │ │ └── token.go
│ │ ├── lex.go
│ │ └── parse.go
├── inconshreveable
│ └── mousetrap
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── trap_others.go
│ │ ├── trap_windows.go
│ │ └── trap_windows_1.4.go
├── jinzhu
│ ├── gorm
│ │ ├── .codeclimate.yml
│ │ ├── .gitignore
│ │ ├── License
│ │ ├── README.md
│ │ ├── association.go
│ │ ├── callback.go
│ │ ├── callback_create.go
│ │ ├── callback_delete.go
│ │ ├── callback_query.go
│ │ ├── callback_query_preload.go
│ │ ├── callback_row_query.go
│ │ ├── callback_save.go
│ │ ├── callback_update.go
│ │ ├── dialect.go
│ │ ├── dialect_common.go
│ │ ├── dialect_mysql.go
│ │ ├── dialect_postgres.go
│ │ ├── dialect_sqlite3.go
│ │ ├── docker-compose.yml
│ │ ├── errors.go
│ │ ├── field.go
│ │ ├── interface.go
│ │ ├── join_table_handler.go
│ │ ├── logger.go
│ │ ├── main.go
│ │ ├── model.go
│ │ ├── model_struct.go
│ │ ├── scope.go
│ │ ├── search.go
│ │ ├── test_all.sh
│ │ ├── utils.go
│ │ └── wercker.yml
│ └── inflection
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── inflections.go
│ │ └── wercker.yml
├── magiconair
│ └── properties
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── decode.go
│ │ ├── doc.go
│ │ ├── integrate.go
│ │ ├── lex.go
│ │ ├── load.go
│ │ ├── parser.go
│ │ ├── properties.go
│ │ └── rangecheck.go
├── mitchellh
│ └── mapstructure
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── decode_hooks.go
│ │ ├── error.go
│ │ └── mapstructure.go
├── moul
│ └── http2curl
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ └── http2curl.go
├── naiba
│ └── com
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── crypto.go
│ │ ├── errors.go
│ │ ├── excel.go
│ │ ├── fake.go
│ │ ├── holiday.go
│ │ ├── http.go
│ │ ├── regex.go
│ │ └── url.go
├── oxtoacart
│ └── bpool
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bpool.go
│ │ ├── bufferpool.go
│ │ ├── bytepool.go
│ │ └── sizedbufferpool.go
├── parnurzeal
│ └── gorequest
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── gorequest.go
├── patrickmn
│ └── go-cache
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── cache.go
│ │ └── sharded.go
├── pelletier
│ └── go-toml
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── benchmark.json
│ │ ├── benchmark.sh
│ │ ├── benchmark.toml
│ │ ├── benchmark.yml
│ │ ├── doc.go
│ │ ├── example-crlf.toml
│ │ ├── example.toml
│ │ ├── fuzz.go
│ │ ├── fuzz.sh
│ │ ├── keysparsing.go
│ │ ├── lexer.go
│ │ ├── marshal.go
│ │ ├── marshal_test.toml
│ │ ├── parser.go
│ │ ├── position.go
│ │ ├── test.sh
│ │ ├── token.go
│ │ ├── toml.go
│ │ ├── tomltree_create.go
│ │ └── tomltree_write.go
├── pkg
│ └── errors
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── errors.go
│ │ └── stack.go
├── robfig
│ └── cron
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── constantdelay.go
│ │ ├── cron.go
│ │ ├── doc.go
│ │ ├── parser.go
│ │ └── spec.go
├── spf13
│ ├── afero
│ │ ├── .travis.yml
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── afero.go
│ │ ├── appveyor.yml
│ │ ├── basepath.go
│ │ ├── cacheOnReadFs.go
│ │ ├── const_bsds.go
│ │ ├── const_win_unix.go
│ │ ├── copyOnWriteFs.go
│ │ ├── httpFs.go
│ │ ├── ioutil.go
│ │ ├── lstater.go
│ │ ├── match.go
│ │ ├── mem
│ │ │ ├── dir.go
│ │ │ ├── dirmap.go
│ │ │ └── file.go
│ │ ├── memmap.go
│ │ ├── os.go
│ │ ├── path.go
│ │ ├── readonlyfs.go
│ │ ├── regexpfs.go
│ │ ├── unionFile.go
│ │ └── util.go
│ ├── cast
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── cast.go
│ │ └── caste.go
│ ├── cobra
│ │ ├── .gitignore
│ │ ├── .mailmap
│ │ ├── .travis.yml
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── args.go
│ │ ├── bash_completions.go
│ │ ├── bash_completions.md
│ │ ├── cobra.go
│ │ ├── cobra
│ │ │ └── cmd
│ │ │ │ ├── license_agpl.go
│ │ │ │ ├── license_apache_2.go
│ │ │ │ ├── license_bsd_clause_2.go
│ │ │ │ ├── license_bsd_clause_3.go
│ │ │ │ ├── license_gpl_2.go
│ │ │ │ ├── license_gpl_3.go
│ │ │ │ ├── license_lgpl.go
│ │ │ │ ├── license_mit.go
│ │ │ │ ├── licenses.go
│ │ │ │ └── testdata
│ │ │ │ └── LICENSE.golden
│ │ ├── command.go
│ │ ├── command_notwin.go
│ │ ├── command_win.go
│ │ └── zsh_completions.go
│ ├── jwalterweatherman
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── default_notepad.go
│ │ ├── log_counter.go
│ │ └── notepad.go
│ ├── pflag
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bool.go
│ │ ├── bool_slice.go
│ │ ├── bytes.go
│ │ ├── count.go
│ │ ├── duration.go
│ │ ├── duration_slice.go
│ │ ├── flag.go
│ │ ├── float32.go
│ │ ├── float64.go
│ │ ├── golangflag.go
│ │ ├── int.go
│ │ ├── int16.go
│ │ ├── int32.go
│ │ ├── int64.go
│ │ ├── int8.go
│ │ ├── int_slice.go
│ │ ├── ip.go
│ │ ├── ip_slice.go
│ │ ├── ipmask.go
│ │ ├── ipnet.go
│ │ ├── string.go
│ │ ├── string_array.go
│ │ ├── string_slice.go
│ │ ├── uint.go
│ │ ├── uint16.go
│ │ ├── uint32.go
│ │ ├── uint64.go
│ │ ├── uint8.go
│ │ └── uint_slice.go
│ └── viper
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── flags.go
│ │ ├── util.go
│ │ └── viper.go
└── xuri
│ └── excelize
│ ├── .travis.yml
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── README_zh.md
│ ├── cell.go
│ ├── chart.go
│ ├── col.go
│ ├── comment.go
│ ├── date.go
│ ├── excelize.go
│ ├── excelize.png
│ ├── file.go
│ ├── lib.go
│ ├── logo.png
│ ├── picture.go
│ ├── rows.go
│ ├── shape.go
│ ├── sheet.go
│ ├── sheetpr.go
│ ├── sheetview.go
│ ├── styles.go
│ ├── table.go
│ ├── templates.go
│ ├── vmlDrawing.go
│ ├── xmlChart.go
│ ├── xmlComments.go
│ ├── xmlContentTypes.go
│ ├── xmlDecodeDrawing.go
│ ├── xmlDrawing.go
│ ├── xmlSharedStrings.go
│ ├── xmlStyles.go
│ ├── xmlTable.go
│ ├── xmlWorkbook.go
│ └── xmlWorksheet.go
├── golang.org
└── x
│ ├── net
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── html
│ │ ├── atom
│ │ │ ├── atom.go
│ │ │ ├── gen.go
│ │ │ └── table.go
│ │ ├── const.go
│ │ ├── doc.go
│ │ ├── doctype.go
│ │ ├── entity.go
│ │ ├── escape.go
│ │ ├── foreign.go
│ │ ├── node.go
│ │ ├── parse.go
│ │ ├── render.go
│ │ └── token.go
│ ├── idna
│ │ ├── idna.go
│ │ ├── punycode.go
│ │ ├── tables.go
│ │ ├── trie.go
│ │ └── trieval.go
│ └── publicsuffix
│ │ ├── gen.go
│ │ ├── list.go
│ │ └── table.go
│ ├── sys
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ └── unix
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── asm_darwin_386.s
│ │ ├── asm_darwin_amd64.s
│ │ ├── asm_darwin_arm.s
│ │ ├── asm_darwin_arm64.s
│ │ ├── asm_dragonfly_amd64.s
│ │ ├── asm_freebsd_386.s
│ │ ├── asm_freebsd_amd64.s
│ │ ├── asm_freebsd_arm.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_netbsd_386.s
│ │ ├── asm_netbsd_amd64.s
│ │ ├── asm_netbsd_arm.s
│ │ ├── asm_openbsd_386.s
│ │ ├── asm_openbsd_amd64.s
│ │ ├── asm_openbsd_arm.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── bluetooth_linux.go
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_darwin.go
│ │ ├── dev_dragonfly.go
│ │ ├── dev_freebsd.go
│ │ ├── dev_linux.go
│ │ ├── dev_netbsd.go
│ │ ├── dev_openbsd.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── errors_freebsd_386.go
│ │ ├── errors_freebsd_amd64.go
│ │ ├── errors_freebsd_arm.go
│ │ ├── fcntl.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mkpost.go
│ │ ├── mksyscall.pl
│ │ ├── mksyscall_solaris.pl
│ │ ├── mksysctl_openbsd.pl
│ │ ├── mksysnum_darwin.pl
│ │ ├── mksysnum_dragonfly.pl
│ │ ├── mksysnum_freebsd.pl
│ │ ├── mksysnum_netbsd.pl
│ │ ├── mksysnum_openbsd.pl
│ │ ├── openbsd_pledge.go
│ │ ├── pagesize_unix.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_386.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_gc.go
│ │ ├── syscall_linux_gc_386.go
│ │ ├── syscall_linux_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── timestruct.go
│ │ ├── types_darwin.go
│ │ ├── types_dragonfly.go
│ │ ├── types_freebsd.go
│ │ ├── types_netbsd.go
│ │ ├── types_openbsd.go
│ │ ├── types_solaris.go
│ │ ├── zerrors_darwin_386.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zptrace386_linux.go
│ │ ├── zptracearm_linux.go
│ │ ├── zptracemips_linux.go
│ │ ├── zptracemipsle_linux.go
│ │ ├── zsyscall_darwin_386.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_arm.go
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysnum_darwin_386.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── ztypes_darwin_386.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ └── ztypes_solaris_amd64.go
│ └── text
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── collate
│ ├── build
│ │ ├── builder.go
│ │ ├── colelem.go
│ │ ├── contract.go
│ │ ├── order.go
│ │ ├── table.go
│ │ └── trie.go
│ ├── collate.go
│ ├── index.go
│ ├── maketables.go
│ ├── option.go
│ ├── sort.go
│ └── tables.go
│ ├── internal
│ ├── colltab
│ │ ├── collelem.go
│ │ ├── colltab.go
│ │ ├── contract.go
│ │ ├── iter.go
│ │ ├── numeric.go
│ │ ├── table.go
│ │ ├── trie.go
│ │ └── weighter.go
│ ├── gen
│ │ ├── code.go
│ │ └── gen.go
│ ├── tag
│ │ └── tag.go
│ ├── triegen
│ │ ├── compact.go
│ │ ├── print.go
│ │ └── triegen.go
│ └── ucd
│ │ └── ucd.go
│ ├── language
│ ├── Makefile
│ ├── common.go
│ ├── coverage.go
│ ├── doc.go
│ ├── gen.go
│ ├── gen_common.go
│ ├── gen_index.go
│ ├── go1_1.go
│ ├── go1_2.go
│ ├── index.go
│ ├── language.go
│ ├── lookup.go
│ ├── match.go
│ ├── parse.go
│ ├── tables.go
│ └── tags.go
│ ├── secure
│ └── bidirule
│ │ ├── bidirule.go
│ │ ├── bidirule10.0.0.go
│ │ └── bidirule9.0.0.go
│ ├── transform
│ └── transform.go
│ └── unicode
│ ├── bidi
│ ├── bidi.go
│ ├── bracket.go
│ ├── core.go
│ ├── gen.go
│ ├── gen_ranges.go
│ ├── gen_trieval.go
│ ├── prop.go
│ ├── tables10.0.0.go
│ ├── tables9.0.0.go
│ └── trieval.go
│ ├── cldr
│ ├── base.go
│ ├── cldr.go
│ ├── collate.go
│ ├── decode.go
│ ├── makexml.go
│ ├── resolve.go
│ ├── slice.go
│ └── xml.go
│ ├── norm
│ ├── composition.go
│ ├── forminfo.go
│ ├── input.go
│ ├── iter.go
│ ├── maketables.go
│ ├── normalize.go
│ ├── readwriter.go
│ ├── tables10.0.0.go
│ ├── tables9.0.0.go
│ ├── transform.go
│ ├── trie.go
│ └── triegen.go
│ └── rangetable
│ ├── gen.go
│ ├── merge.go
│ ├── rangetable.go
│ ├── tables10.0.0.go
│ └── tables9.0.0.go
├── google.golang.org
└── appengine
│ ├── LICENSE
│ └── cloudsql
│ ├── cloudsql.go
│ ├── cloudsql_classic.go
│ └── cloudsql_vm.go
└── gopkg.in
└── yaml.v2
├── .travis.yml
├── LICENSE
├── LICENSE.libyaml
├── NOTICE
├── README.md
├── apic.go
├── decode.go
├── emitterc.go
├── encode.go
├── go.mod
├── parserc.go
├── readerc.go
├── resolve.go
├── scannerc.go
├── sorter.go
├── writerc.go
├── yaml.go
├── yamlh.go
└── yamlprivateh.go
/.gitignore:
--------------------------------------------------------------------------------
1 | /pkg
2 | .DS_Store
3 | *.key
4 | *.pem
5 | cmd/proxy-in-a-box/proxy-in-a-box
6 | pb.yaml
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - master
4 | before_install:
5 | - go get golang.org/x/lint/golint
6 | script:
7 | - go list ./... | xargs -L1 golint
8 | - go test -v -race -cover ./...
9 | - cd cmd/proxy-in-a-box
10 | - go build
--------------------------------------------------------------------------------
/Gopkg.toml:
--------------------------------------------------------------------------------
1 | # Gopkg.toml example
2 | #
3 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
4 | # for detailed Gopkg.toml documentation.
5 | #
6 | # required = ["github.com/user/thing/cmd/thing"]
7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
8 | #
9 | # [[constraint]]
10 | # name = "github.com/user/project"
11 | # version = "1.0.0"
12 | #
13 | # [[constraint]]
14 | # name = "github.com/user/project2"
15 | # branch = "dev"
16 | # source = "github.com/myfork/project2"
17 | #
18 | # [[override]]
19 | # name = "github.com/x/y"
20 | # version = "2.4.0"
21 | #
22 | # [prune]
23 | # non-go = false
24 | # go-tests = true
25 | # unused-packages = true
26 |
27 |
28 | [prune]
29 | go-tests = true
30 | unused-packages = true
31 |
32 | [[constraint]]
33 | name = "github.com/parnurzeal/gorequest"
34 | version = "0.2.15"
35 |
36 | [[constraint]]
37 | name = "github.com/PuerkitoBio/goquery"
38 | version = "1.4.1"
39 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 奶爸
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/cache.go:
--------------------------------------------------------------------------------
1 | package proxyinabox
2 |
3 | import (
4 | "net/http"
5 | )
6 |
7 | //Cache rt
8 | type Cache interface {
9 | PickProxy(req *http.Request) (string, error)
10 | IPLimiter(req *http.Request) bool
11 | HostLimiter(req *http.Request) bool
12 | HasProxy(p string) bool
13 | SaveProxy(p Proxy) error
14 | DeleteProxy(p Proxy)
15 | }
16 |
--------------------------------------------------------------------------------
/crawler/66ip.go:
--------------------------------------------------------------------------------
1 | package crawler
2 |
3 | import (
4 | "fmt"
5 | "strings"
6 | "time"
7 |
8 | "github.com/naiba/com"
9 | "github.com/naiba/proxyinabox"
10 | "github.com/parnurzeal/gorequest"
11 | )
12 |
13 | //P66IP 66ip site
14 | type P66IP struct {
15 | urls []string
16 | }
17 |
18 | func new66IP() *P66IP {
19 | this := new(P66IP)
20 | this.urls = []string{
21 | "http://www.66ip.cn/mo.php?tqsl=200",
22 | "http://www.66ip.cn/nmtq.php?getnum=200",
23 | }
24 | return this
25 | }
26 |
27 | //Fetch fetch all proxies
28 | func (p *P66IP) Fetch() error {
29 | for _, pageURL := range p.urls {
30 | for i := 0; i < 50; i++ {
31 | num := 0
32 | _, body, errs := gorequest.New().Get(pageURL).
33 | Set("User-Agent", com.RandomUserAgent()).
34 | Retry(3, time.Second*3).
35 | End()
36 | if len(errs) != 0 {
37 | fmt.Println("[PIAB]", "66ip", "[❎]", "crawler", errs)
38 | continue
39 | }
40 | lines := strings.Split(string(body), "
")
41 | for _, line := range lines {
42 | ipinfo := strings.Split(strings.TrimSpace(line), ":")
43 | if len(ipinfo) == 2 && com.IsIPv4(ipinfo[0]) {
44 | var p proxyinabox.Proxy
45 | p.IP = ipinfo[0]
46 | p.Port = ipinfo[1]
47 | p.Platform = 1
48 | p.HTTPS = false
49 | num++
50 | validateJobs <- p
51 | }
52 | }
53 | fmt.Println("[PIAB]", "66ip", "[🍾]", "crawler", num, "proxies.")
54 | //delay
55 | time.Sleep(time.Second * 3)
56 | }
57 | }
58 | return nil
59 | }
60 |
--------------------------------------------------------------------------------
/crawler/verify.go:
--------------------------------------------------------------------------------
1 | package crawler
2 |
3 | import (
4 | "net/http"
5 | "time"
6 |
7 | "github.com/naiba/proxyinabox"
8 | "github.com/naiba/proxyinabox/service"
9 | "github.com/parnurzeal/gorequest"
10 | )
11 |
12 | var verifyJob chan proxyinabox.Proxy
13 | var proxyServiceInstance proxyinabox.ProxyService
14 |
15 | //Init crawler
16 | func Init() {
17 | initV()
18 | initC()
19 | }
20 |
21 | func initV() {
22 | proxyServiceInstance = &service.ProxyService{DB: proxyinabox.DB}
23 | verifyJob = make(chan proxyinabox.Proxy, proxyinabox.Config.Sys.ProxyVerifyWorker)
24 | for i := 0; i < proxyinabox.Config.Sys.ProxyVerifyWorker; i++ {
25 | go getDelay(verifyJob)
26 | }
27 | }
28 |
29 | //Verify verify proxies in database
30 | func Verify() {
31 | list, _ := proxyServiceInstance.GetUnVerified()
32 | for _, p := range list {
33 | verifyJob <- p
34 | }
35 | }
36 |
37 | func getDelay(pc chan proxyinabox.Proxy) {
38 | for p := range pc {
39 | proxy := p.URI()
40 | start := time.Now().Unix()
41 | var resp validateJSON
42 | _, _, errs := gorequest.New().Timeout(time.Second*5).Retry(3, time.Second*2, http.StatusInternalServerError).Proxy(proxy).Get("http://api.ip.la/cn?json").EndStruct(&resp)
43 | delay := time.Now().Unix() - start
44 | if len(errs) != 0 || resp.IP != p.IP {
45 | proxyinabox.CI.DeleteProxy(p)
46 | continue
47 | }
48 | proxyinabox.DB.Model(&p).Update("delay", delay)
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/mitm/listener.go:
--------------------------------------------------------------------------------
1 | package mitm
2 |
3 | import (
4 | "io"
5 | "net"
6 | )
7 |
8 | type mitmListener struct {
9 | conn net.Conn
10 | }
11 |
12 | func (listener *mitmListener) Accept() (net.Conn, error) {
13 | if listener.conn != nil {
14 | conn := listener.conn
15 | listener.conn = nil
16 | return conn, nil
17 | }
18 | return nil, io.EOF
19 | }
20 |
21 | func (listener *mitmListener) Close() error {
22 | return nil
23 | }
24 |
25 | func (listener *mitmListener) Addr() net.Addr {
26 | return nil
27 | }
28 |
--------------------------------------------------------------------------------
/proxy.go:
--------------------------------------------------------------------------------
1 | package proxyinabox
2 |
3 | import (
4 | "fmt"
5 | "time"
6 |
7 | "github.com/jinzhu/gorm"
8 | )
9 |
10 | //Proxy proxy model
11 | type Proxy struct {
12 | gorm.Model
13 | IP string `gorm:"type:varchar(15);unique_index"`
14 | Port string `gorm:"type:varchar(5)"`
15 | Country string `gorm:"type:varchar(15)"`
16 | Provence string `gorm:"type:varchar(15)"`
17 | Platform int
18 | HTTPS bool
19 | Delay int64
20 | LastVerify time.Time
21 | }
22 |
23 | //ProxyService proxy service
24 | type ProxyService interface {
25 | GetUnVerified() ([]Proxy, error)
26 | }
27 |
28 | func (p Proxy) String() string {
29 | return fmt.Sprintf("[PIAB] proxy [🐲] { id:%d %s:%s country:%s provence:%s HTTPS:%t delay:%d platform:%d }",
30 | p.ID, p.IP, p.Port, p.Country, p.Provence, !p.HTTPS, p.Delay, p.Platform)
31 | }
32 |
33 | //URI get uri
34 | func (p Proxy) URI() string {
35 | var proxy string
36 | if p.HTTPS {
37 | proxy = "https://"
38 | } else {
39 | proxy = "http://"
40 | }
41 | return proxy + p.IP + ":" + p.Port
42 | }
43 |
44 | //ProxyCrawler proxy crawler
45 | type ProxyCrawler interface {
46 | Fetch() error
47 | }
48 |
--------------------------------------------------------------------------------
/service/proxy.go:
--------------------------------------------------------------------------------
1 | package service
2 |
3 | import (
4 | "time"
5 |
6 | "github.com/jinzhu/gorm"
7 | "github.com/naiba/proxyinabox"
8 | )
9 |
10 | //ProxyService mysql proxy service
11 | type ProxyService struct {
12 | DB *gorm.DB
13 | }
14 |
15 | //GetUnVerified get un verified proxies
16 | func (ps *ProxyService) GetUnVerified() (p []proxyinabox.Proxy, e error) {
17 | e = ps.DB.Select("ip,port,id,last_verify").Where("last_verify < ?", time.Now().Add(time.Minute*time.Duration((proxyinabox.Config.Sys.VerifyDuration-5))*-1)).Find(&p).Error
18 | return
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/PuerkitoBio/goquery/.gitattributes:
--------------------------------------------------------------------------------
1 | testdata/* linguist-vendored
2 |
--------------------------------------------------------------------------------
/vendor/github.com/PuerkitoBio/goquery/.gitignore:
--------------------------------------------------------------------------------
1 | # editor temporary files
2 | *.sublime-*
3 | .DS_Store
4 | *.swp
5 | #*.*#
6 | tags
7 |
8 | # direnv config
9 | .env*
10 |
11 | # test binaries
12 | *.test
13 |
14 | # coverage and profilte outputs
15 | *.out
16 |
17 |
--------------------------------------------------------------------------------
/vendor/github.com/PuerkitoBio/goquery/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.1
5 | - 1.2.x
6 | - 1.3.x
7 | - 1.4.x
8 | - 1.5.x
9 | - 1.6.x
10 | - 1.7.x
11 | - 1.8.x
12 | - 1.9.x
13 | - "1.10.x"
14 | - tip
15 |
16 |
--------------------------------------------------------------------------------
/vendor/github.com/PuerkitoBio/goquery/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012-2016, Martin Angers & Contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5 |
6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7 |
8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9 |
10 | * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11 |
12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 |
--------------------------------------------------------------------------------
/vendor/github.com/andybalholm/cascadia/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.3
5 | - 1.4
6 |
7 | install:
8 | - go get github.com/andybalholm/cascadia
9 |
10 | script:
11 | - go test -v
12 |
13 | notifications:
14 | email: false
15 |
--------------------------------------------------------------------------------
/vendor/github.com/andybalholm/cascadia/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011 Andy Balholm. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/vendor/github.com/andybalholm/cascadia/README.md:
--------------------------------------------------------------------------------
1 | # cascadia
2 |
3 | [](https://travis-ci.org/andybalholm/cascadia)
4 |
5 | The Cascadia package implements CSS selectors for use with the parse trees produced by the html package.
6 |
7 | To test CSS selectors without writing Go code, check out [cascadia](https://github.com/suntong/cascadia) the command line tool, a thin wrapper around this package.
8 |
--------------------------------------------------------------------------------
/vendor/github.com/andybalholm/cascadia/go.mod:
--------------------------------------------------------------------------------
1 | module "github.com/andybalholm/cascadia"
2 |
3 | require "golang.org/x/net" v0.0.0-20180218175443-cbe0f9307d01
4 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = tab
5 | indent_size = 4
6 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/.gitignore:
--------------------------------------------------------------------------------
1 | # Setup a Global .gitignore for OS and editor generated files:
2 | # https://help.github.com/articles/ignoring-files
3 | # git config --global core.excludesfile ~/.gitignore_global
4 |
5 | .vagrant
6 | *.sublime-project
7 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 |
4 | go:
5 | - 1.8.x
6 | - 1.9.x
7 | - tip
8 |
9 | matrix:
10 | allow_failures:
11 | - go: tip
12 | fast_finish: true
13 |
14 | before_script:
15 | - go get -u github.com/golang/lint/golint
16 |
17 | script:
18 | - go test -v --race ./...
19 |
20 | after_script:
21 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
22 | - test -z "$(golint ./... | tee /dev/stderr)"
23 | - go vet ./...
24 |
25 | os:
26 | - linux
27 | - osx
28 |
29 | notifications:
30 | email: false
31 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/fen.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build solaris
6 |
7 | package fsnotify
8 |
9 | import (
10 | "errors"
11 | )
12 |
13 | // Watcher watches a set of files, delivering events to a channel.
14 | type Watcher struct {
15 | Events chan Event
16 | Errors chan error
17 | }
18 |
19 | // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
20 | func NewWatcher() (*Watcher, error) {
21 | return nil, errors.New("FEN based watcher not yet supported for fsnotify\n")
22 | }
23 |
24 | // Close removes all watches and closes the events channel.
25 | func (w *Watcher) Close() error {
26 | return nil
27 | }
28 |
29 | // Add starts watching the named file or directory (non-recursively).
30 | func (w *Watcher) Add(name string) error {
31 | return nil
32 | }
33 |
34 | // Remove stops watching the the named file or directory (non-recursively).
35 | func (w *Watcher) Remove(name string) error {
36 | return nil
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build freebsd openbsd netbsd dragonfly
6 |
7 | package fsnotify
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | const openMode = unix.O_NONBLOCK | unix.O_RDONLY
12 |
--------------------------------------------------------------------------------
/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin
6 |
7 | package fsnotify
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | // note: this constant is not defined on BSD
12 | const openMode = unix.O_EVTONLY
13 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/byteexec/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.4.1
5 |
6 | install:
7 | - go get -d -t -v ./...
8 | - go build -v ./...
9 | - go get golang.org/x/tools/cmd/cover
10 | - go get -v github.com/axw/gocov/gocov
11 | - go get -v github.com/mattn/goveralls
12 |
13 | script:
14 | - $HOME/gopath/bin/goveralls -v -service travis-ci github.com/getlantern/byteexec
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/byteexec/README.md:
--------------------------------------------------------------------------------
1 | byteexec [](https://travis-ci.org/getlantern/byteexec) [](https://coveralls.io/r/getlantern/byteexec) [](http://godoc.org/github.com/getlantern/byteexec)
2 | ==========
3 | byteexec provides a Golang package that allows executing files that are stored
4 | as Go byte arrays. This is handy when combined with
5 | [go-bindata](https://github.com/jteeuwen/go-bindata).
6 |
7 | To install:
8 |
9 | `go get github.com/getlantern/byteexec`
10 |
11 | For docs:
12 |
13 | `godoc github.com/getlantern/byteexec`
14 |
15 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/byteexec/byteexec_test_stub.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package byteexec
4 |
5 | const linefeed = "\n"
6 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/byteexec/byteexec_test_windows.go:
--------------------------------------------------------------------------------
1 | package byteexec
2 |
3 | const linefeed = "\r\n"
4 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/byteexec/rename_darwin.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package byteexec
4 |
5 | func renameExecutable(orig string) string {
6 | return orig
7 | }
8 |
9 | func pathForRelativeFiles() (string, error) {
10 | return inHomeDir("Library/Application Support/byteexec")
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/byteexec/rename_stub.go:
--------------------------------------------------------------------------------
1 | // +build !windows,!darwin
2 |
3 | package byteexec
4 |
5 | func renameExecutable(orig string) string {
6 | return orig
7 | }
8 |
9 | func pathForRelativeFiles() (string, error) {
10 | return inHomeDir(".byteexec")
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/byteexec/rename_windows.go:
--------------------------------------------------------------------------------
1 | package byteexec
2 |
3 | import (
4 | "os"
5 | "path/filepath"
6 | )
7 |
8 | func renameExecutable(orig string) string {
9 | return orig + ".exe"
10 | }
11 |
12 | func pathForRelativeFiles() (string, error) {
13 | return filepath.Join(os.Getenv("APPDATA"), "byteexec"), nil
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/context/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.6.2
5 |
6 | install:
7 | - go get -d -t -v ./...
8 | - go build -v ./...
9 | - go get golang.org/x/tools/cmd/cover
10 | - go get -v github.com/axw/gocov/gocov
11 | - go get -v github.com/mattn/goveralls
12 |
13 | script:
14 | - go test -race -v -covermode=atomic -coverprofile=profile.cov
15 | - $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci
16 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/context/README.md:
--------------------------------------------------------------------------------
1 | # context [](https://travis-ci.org/getlantern/context) [](https://coveralls.io/r/getlantern/context)
2 |
3 | Provides goroutine-based context state inspired by https://github.com/tylerb/gls
4 | and https://github.com/jtolds/gls. It uses the same basic hack as tylerb's
5 | library, but adds a stack abstraction that allows nested contexts similar to
6 | jtolds' library, but using `Enter()` and `Exit()` instead of callback functions.
7 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/elevate/README.md:
--------------------------------------------------------------------------------
1 | [Godoc](http://godoc.org/github.com/getlantern/elevate)
2 |
3 | elevate currently only works for OS X and Windows. The Windows support
4 | currently uses a Visual Basic script that ends up displaying a confusing prompt
5 | and is generally hoaky - it will be replaced by a C++ program that does the same
6 | thing but with a better prompt.
7 |
8 | On OS X, it uses cocoasudo from here - https://github.com/getlantern/cocoasudo,
9 | forked from https://github.com/kalikaneko/cocoasudo to explicitly support OSX
10 | 10.6.
11 |
12 | On Windows, it uses elevate from here - http://code.kliu.org/misc/elevate/. The
13 | source code lives in elevate-1.3.0/src and can be built from a Visual Studio
14 | command line by running `nmake elevat.mak`. The elevate makefile has been
15 | modified from the original to 1. build as a windows GUI app instead of a console
16 | app, 2. always build as 32 bit and 3. statically link the runtime. `elevate.c`
17 | was modified to include a WinMain function.
18 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/elevate/command.go:
--------------------------------------------------------------------------------
1 | // package elevate provides support for executing commands with elevated
2 | // privileges.
3 | package elevate
4 |
5 | import (
6 | "os/exec"
7 | )
8 |
9 | type CommandBuilder struct {
10 | prompt string
11 | icon string
12 | }
13 |
14 | func WithPrompt(prompt string) *CommandBuilder {
15 | return &CommandBuilder{
16 | prompt: prompt,
17 | }
18 | }
19 |
20 | func WithIcon(icon string) *CommandBuilder {
21 | return &CommandBuilder{
22 | icon: icon,
23 | }
24 | }
25 |
26 | func (b *CommandBuilder) WithPrompt(prompt string) *CommandBuilder {
27 | return &CommandBuilder{
28 | prompt: prompt,
29 | icon: b.icon,
30 | }
31 | }
32 |
33 | func (b *CommandBuilder) WithIcon(icon string) *CommandBuilder {
34 | return &CommandBuilder{
35 | prompt: b.prompt,
36 | icon: icon,
37 | }
38 | }
39 |
40 | func (b *CommandBuilder) Command(name string, args ...string) *exec.Cmd {
41 | cmd, err := buildCommand(b.prompt, b.icon, name, args...)
42 | if err != nil {
43 | panic(err)
44 | }
45 | return cmd
46 | }
47 |
48 | // Command is like exec.Command, except that it runs the given command with
49 | // elevated privileges.
50 | func Command(name string, args ...string) *exec.Cmd {
51 | b := &CommandBuilder{}
52 | return b.Command(name, args...)
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/elevate/command_darwin.go:
--------------------------------------------------------------------------------
1 | package elevate
2 |
3 | import (
4 | "fmt"
5 | "os"
6 | "os/exec"
7 | "path/filepath"
8 |
9 | "github.com/getlantern/byteexec"
10 | "github.com/getlantern/elevate/bin"
11 | )
12 |
13 | func buildCommand(prompt string, icon string, name string, args ...string) (*exec.Cmd, error) {
14 | argsLen := len(args)
15 | if icon != "" {
16 | argsLen += 1
17 | }
18 | if prompt != "" {
19 | argsLen += 1
20 | }
21 | allArgs := make([]string, 0, argsLen)
22 | if icon != "" {
23 | allArgs = append(allArgs, "--icon="+icon)
24 | }
25 | if prompt != "" {
26 | allArgs = append(allArgs, "--prompt="+prompt)
27 | }
28 | allArgs = append(allArgs, name)
29 | allArgs = append(allArgs, args...)
30 | cocoasudo, err := bin.Asset("cocoasudo")
31 | if err != nil {
32 | return nil, fmt.Errorf("Unable to load cocoasudo: %v", err)
33 | }
34 | _, program := filepath.Split(os.Args[0])
35 | be, err := byteexec.New(cocoasudo, program)
36 | if err != nil {
37 | return nil, fmt.Errorf("Unable to build byteexec for cocoasudo: %v", err)
38 | }
39 |
40 | return be.Command(allArgs...), nil
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/elevate/command_linux.go:
--------------------------------------------------------------------------------
1 | package elevate
2 |
3 | import (
4 | "os/exec"
5 | )
6 |
7 | // No op
8 | func buildCommand(prompt string, icon string, name string, args ...string) (*exec.Cmd, error) {
9 | return nil, nil
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/elevate/command_windows.go:
--------------------------------------------------------------------------------
1 | package elevate
2 |
3 | import (
4 | "fmt"
5 | "os"
6 | "os/exec"
7 | "path/filepath"
8 |
9 | "github.com/getlantern/byteexec"
10 | "github.com/getlantern/elevate/bin"
11 | )
12 |
13 | func buildCommand(prompt string, icon string, name string, args ...string) (*exec.Cmd, error) {
14 | argsLen := len(args)
15 | if icon != "" {
16 | argsLen += 1
17 | }
18 | if prompt != "" {
19 | argsLen += 1
20 | }
21 | allArgs := make([]string, 0, argsLen)
22 | allArgs = append(allArgs, "-w") // wait for termination
23 | allArgs = append(allArgs, name)
24 | allArgs = append(allArgs, args...)
25 | cocoasudo, err := bin.Asset("elevate.exe")
26 | if err != nil {
27 | return nil, fmt.Errorf("Unable to load elevate.exe: %v", err)
28 | }
29 | _, program := filepath.Split(os.Args[0])
30 | be, err := byteexec.New(cocoasudo, program)
31 | if err != nil {
32 | return nil, fmt.Errorf("Unable to build byteexec for cocoasudo: %v", err)
33 | }
34 |
35 | return be.Command(allArgs...), nil
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/elevate/embedbinaries.bash:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ###############################################################################
4 | #
5 | # This script regenerates the source files that embed the platform-specific
6 | # executables.
7 | #
8 | ###############################################################################
9 |
10 | function die() {
11 | echo $*
12 | exit 1
13 | }
14 |
15 | if [ -z "$BNS_CERT" ] || [ -z "$BNS_CERT_PASS" ]
16 | then
17 | die "$0: Please set BNS_CERT and BNS_CERT_PASS to the bns_cert.p12 signing key and the password for that key"
18 | fi
19 |
20 | osslsigncode sign -pkcs12 "$BNS_CERT" -pass "$BNS_CERT_PASS" -in binaries/windows_unsigned/elevate_unsigned.exe -out binaries/windows/elevate.exe || die "Could not sign windows"
21 | codesign -s "Developer ID Application: Brave New Software Project, Inc" -f binaries/osx/cocoasudo || die "Could not sign macintosh"
22 |
23 | go-bindata -nomemcopy -nocompress -pkg bin -prefix binaries/osx -o bin/cocoasudo_darwin.go binaries/osx
24 | #go-bindata -nomemcopy -nocompress -pkg bin -prefix binaries/linux_386 -o natty/bin/linux_386.go binaries/linux_386
25 | #go-bindata -nomemcopy -nocompress -pkg bin -prefix binaries/linux_amd64 -o natty/bin/linux_amd64.go binaries/linux_amd64
26 | go-bindata -nomemcopy -nocompress -pkg bin -prefix binaries/windows -o bin/elevate_windows.go binaries/windows
27 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/elevate/lantern.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/naiba-archived/proxy-in-a-box/6b8208f05b918054e49ff16301d28375171680b7/vendor/github.com/getlantern/elevate/lantern.icns
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/errors/hide.go:
--------------------------------------------------------------------------------
1 | package errors
2 |
3 | import (
4 | "encoding/binary"
5 | "sync"
6 |
7 | "github.com/getlantern/hidden"
8 | )
9 |
10 | var (
11 | hiddenErrors = make([]*structured, 100)
12 | nextID = uint64(0)
13 | hiddenMutex sync.RWMutex
14 | )
15 |
16 | // This trick saves the error to a ring buffer and embeds a non-printing
17 | // hiddenID in the error's description, so that if the errors is later wrapped
18 | // by a standard error using something like
19 | // fmt.Errorf("An error occurred: %v", thisError), we can subsequently extract
20 | // the error simply using the hiddenID in the string.
21 | func (e *structured) save() {
22 | hiddenMutex.Lock()
23 | b := make([]byte, 8)
24 | binary.BigEndian.PutUint64(b, nextID)
25 | e.id = nextID
26 | e.hiddenID = hidden.ToString(b)
27 | hiddenErrors[idxForID(nextID)] = e
28 | nextID++
29 | hiddenMutex.Unlock()
30 | }
31 |
32 | func get(hiddenID []byte) Error {
33 | if len(hiddenID) != 8 {
34 | return nil
35 | }
36 | id := binary.BigEndian.Uint64(hiddenID)
37 | hiddenMutex.RLock()
38 | err := hiddenErrors[idxForID(id)]
39 | hiddenMutex.RUnlock()
40 | if err != nil && err.id == id {
41 | // Found it!
42 | return err
43 | }
44 | // buffer has rolled over
45 | return nil
46 | }
47 |
48 | func idxForID(id uint64) int {
49 | return int(id % uint64(len(hiddenErrors)))
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/golog/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.4.1
5 |
6 | install:
7 | - go get -d -t -v ./...
8 | - go build -v ./...
9 | - go get golang.org/x/tools/cmd/cover
10 | - go get -v github.com/axw/gocov/gocov
11 | - go get -v github.com/mattn/goveralls
12 |
13 | script:
14 | - $HOME/gopath/bin/goveralls -v -service travis-ci github.com/getlantern/golog
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/golog/README.md:
--------------------------------------------------------------------------------
1 | golog [](https://travis-ci.org/getlantern/golog) [](https://coveralls.io/r/getlantern/golog) [](http://godoc.org/github.com/getlantern/golog)
2 | ==========
3 | Provides logging used in many getlantern components.
4 |
5 | [GoDoc](https://godoc.org/github.com/getlantern/golog)
6 |
7 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/keyman/.gitignore:
--------------------------------------------------------------------------------
1 | certimporter/.vs/
2 | certimporter/CertImporter.ncb
3 | certimporter/CertImporter/.vs/
4 | certimporter/CertImporter/CertImporter.vcxproj
5 | certimporter/CertImporter/CertImporter.vcxproj.filters
6 | certimporter/CertImporter/Debug/
7 | certimporter/CertImporter/Release/
8 | certimporter/Debug/
9 | certimporter/Release/certimporter.pdb
10 | certimporter/UpgradeLog.htm
11 | certimporter/CertImporter.suo
12 | certimporter/CertImporter/CertImporter.vcproj.*
13 | keyman.test.exe
14 | trustdemo/trustdemo*
15 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/keyman/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.4.1
5 |
6 | install:
7 | - go get -d -t -v ./...
8 | - go build -v ./...
9 | - go get golang.org/x/tools/cmd/cover
10 | - go get -v github.com/axw/gocov/gocov
11 | - go get -v github.com/mattn/goveralls
12 |
13 | script:
14 | - $HOME/gopath/bin/goveralls -v -service travis-ci github.com/getlantern/keyman
15 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/keyman/README.md:
--------------------------------------------------------------------------------
1 | keyman [](https://travis-ci.org/getlantern/keyman) [](https://coveralls.io/r/getlantern/keyman) [](http://godoc.org/github.com/getlantern/keyman)
2 | ======
3 |
4 | Easy golang RSA key and certificate management.
5 |
6 | API documentation available on [godoc](https://godoc.org/github.com/getlantern/keyman).
7 |
8 | ### Build Notes
9 |
10 | On Windows, keyman uses a custom executable for importing certificates into the
11 | system trust store. This executable is built using Visual Studio from this
12 | [solution](certimporter).
13 |
14 | The resulting executable is packaged into go using `embedbinaries.bash`.
15 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/keyman/certimporter/CertImporter.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CertImporter", "CertImporter\CertImporter.vcproj", "{B993ECE2-7A55-4B25-88F4-F162C27DFA6D}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {B993ECE2-7A55-4B25-88F4-F162C27DFA6D}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {B993ECE2-7A55-4B25-88F4-F162C27DFA6D}.Debug|Win32.Build.0 = Debug|Win32
14 | {B993ECE2-7A55-4B25-88F4-F162C27DFA6D}.Release|Win32.ActiveCfg = Release|Win32
15 | {B993ECE2-7A55-4B25-88F4-F162C27DFA6D}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/keyman/embedbinaries.bash:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ###############################################################################
4 | #
5 | # This script regenerates the source files that embed the platform-specific
6 | # executables.
7 | #
8 | ###############################################################################
9 |
10 | function die() {
11 | echo $*
12 | exit 1
13 | }
14 |
15 | if [ -z "$BNS_CERT" ] || [ -z "$BNS_CERT_PASS" ]
16 | then
17 | die "$0: Please set BNS_CERT and BNS_CERT_PASS to the bns_cert.p12 signing key and the password for that key"
18 | fi
19 |
20 | osslsigncode sign -pkcs12 "$BNS_CERT" -pass "$BNS_CERT_PASS" -in certimporter/Release/certimporter.exe -out binaries/windows/certimporter.exe || die "Could not sign windows"
21 | go-bindata -nomemcopy -nocompress -prefix binaries/windows -o ./certimporter/certimporter.go -pkg certimporter binaries/windows
22 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/keyman/keyman_trust_stub.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!windows,!linux
2 |
3 | package keyman
4 |
5 | import (
6 | "fmt"
7 | )
8 |
9 | func DeleteTrustedRootByName(commonName string, prompt string) error {
10 | return fmt.Errorf("DeleteTrustedRootByName is not supported on this platform")
11 | }
12 |
13 | // AddAsTrustedRoot adds the certificate to the user's trust store as a trusted
14 | // root CA. If prompt is provided, privilege escalation will be requested (if
15 | // required) and the user will be prompted with the given text.
16 | func (cert *Certificate) AddAsTrustedRoot(prompt string) error {
17 | return fmt.Errorf("AddToUserTrustStore is not supported on this platform")
18 | }
19 |
20 | func (cert *Certificate) IsInstalled() (bool, error) {
21 | return false, fmt.Errorf("IsInstalled is not supported on this platform")
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/stack/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.0.3
5 | - 1.1.2
6 | - 1.2.2
7 | - 1.3.3
8 | - 1.4.3
9 | - 1.5.3
10 | - release
11 | - tip
12 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/stack/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright 2014 Chris Hines
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/vendor/github.com/getlantern/stack/README.md:
--------------------------------------------------------------------------------
1 | [](https://godoc.org/github.com/go-stack/stack) [](https://goreportcard.com/report/go-stack/stack)
2 |
3 | # stack
4 |
5 | Package stack implements utilities to capture, manipulate, and format call
6 | stacks. It provides a simpler API than package runtime.
7 |
8 | The implementation takes care of the minutia and special cases of interpreting
9 | the program counter (pc) values returned by runtime.Callers.
10 |
11 | ## Versioning
12 |
13 | Package stack publishes releases via [semver](http://semver.org/) compatible Git
14 | tags prefixed with a single 'v'. The master branch always contains the latest
15 | release. The develop branch contains unreleased commits.
16 |
17 | ## Formatting
18 |
19 | Package stack's types implement fmt.Formatter, which provides a simple and
20 | flexible way to declaratively configure formatting when used with logging or
21 | error tracking packages.
22 |
23 | ```go
24 | func DoTheThing() {
25 | c := stack.Caller(0)
26 | log.Print(c) // "source.go:10"
27 | log.Printf("%+v", c) // "pkg/path/source.go:10"
28 | log.Printf("%n", c) // "DoTheThing"
29 |
30 | s := stack.Trace().TrimRuntime()
31 | log.Print(s) // "[source.go:15 caller.go:42 main.go:14]"
32 | }
33 | ```
34 |
35 | See the docs for all of the supported formatting options.
36 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/.gitignore:
--------------------------------------------------------------------------------
1 | *.rdb
2 | testdata/*/
3 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 |
4 | services:
5 | - redis-server
6 |
7 | go:
8 | - 1.7.x
9 | - 1.8.x
10 | - 1.9.x
11 | - 1.10.x
12 | - tip
13 |
14 | matrix:
15 | allow_failures:
16 | - go: tip
17 |
18 | install:
19 | - go get github.com/onsi/ginkgo
20 | - go get github.com/onsi/gomega
21 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## v6.13
4 |
5 | - Ring got new options called `HashReplicas` and `Hash`. It is recommended to set `HashReplicas = 1000` for better keys distribution between shards.
6 | - Cluster client was optimized to use much less memory when reloading cluster state.
7 | - ReceiveMessage is re-worked to not use ReceiveTimeout so it does not lose data when timeout occurres.
8 |
9 | ## v6.12
10 |
11 | - ClusterClient got new option called `ClusterSlots` which allows to build cluster of normal Redis Servers that don't have cluster mode enabled. See https://godoc.org/github.com/go-redis/redis#example-NewClusterClient--ManualSetup
12 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 The github.com/go-redis/redis Authors.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following disclaimer
12 | in the documentation and/or other materials provided with the
13 | distribution.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/Makefile:
--------------------------------------------------------------------------------
1 | all: testdeps
2 | go test ./...
3 | go test ./... -short -race
4 | env GOOS=linux GOARCH=386 go test ./...
5 | go vet
6 |
7 | testdeps: testdata/redis/src/redis-server
8 |
9 | bench: testdeps
10 | go test ./... -test.run=NONE -test.bench=. -test.benchmem
11 |
12 | .PHONY: all test testdeps bench
13 |
14 | testdata/redis:
15 | mkdir -p $@
16 | wget -qO- https://github.com/antirez/redis/archive/unstable.tar.gz | tar xvz --strip-components=1 -C $@
17 |
18 | testdata/redis/src/redis-server: testdata/redis
19 | sed -i.bak 's/libjemalloc.a/libjemalloc.a -lrt/g' $ maxBackoff || backoff < minBackoff {
17 | backoff = maxBackoff
18 | }
19 |
20 | if backoff == 0 {
21 | return 0
22 | }
23 | return time.Duration(rand.Int63n(int64(backoff)))
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/internal/log.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | )
7 |
8 | var Logger *log.Logger
9 |
10 | func Logf(s string, args ...interface{}) {
11 | if Logger == nil {
12 | return
13 | }
14 | Logger.Output(2, fmt.Sprintf(s, args...))
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/internal/pool/pool_single.go:
--------------------------------------------------------------------------------
1 | package pool
2 |
3 | type SingleConnPool struct {
4 | cn *Conn
5 | }
6 |
7 | var _ Pooler = (*SingleConnPool)(nil)
8 |
9 | func NewSingleConnPool(cn *Conn) *SingleConnPool {
10 | return &SingleConnPool{
11 | cn: cn,
12 | }
13 | }
14 |
15 | func (p *SingleConnPool) NewConn() (*Conn, error) {
16 | panic("not implemented")
17 | }
18 |
19 | func (p *SingleConnPool) CloseConn(*Conn) error {
20 | panic("not implemented")
21 | }
22 |
23 | func (p *SingleConnPool) Get() (*Conn, error) {
24 | return p.cn, nil
25 | }
26 |
27 | func (p *SingleConnPool) Put(cn *Conn) {
28 | if p.cn != cn {
29 | panic("p.cn != cn")
30 | }
31 | }
32 |
33 | func (p *SingleConnPool) Remove(cn *Conn) {
34 | if p.cn != cn {
35 | panic("p.cn != cn")
36 | }
37 | }
38 |
39 | func (p *SingleConnPool) Len() int {
40 | return 1
41 | }
42 |
43 | func (p *SingleConnPool) IdleLen() int {
44 | return 0
45 | }
46 |
47 | func (p *SingleConnPool) Stats() *Stats {
48 | return nil
49 | }
50 |
51 | func (p *SingleConnPool) Close() error {
52 | return nil
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/internal/util.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import "github.com/go-redis/redis/internal/util"
4 |
5 | func ToLower(s string) string {
6 | if isLower(s) {
7 | return s
8 | }
9 |
10 | b := make([]byte, len(s))
11 | for i := range b {
12 | c := s[i]
13 | if c >= 'A' && c <= 'Z' {
14 | c += 'a' - 'A'
15 | }
16 | b[i] = c
17 | }
18 | return util.BytesToString(b)
19 | }
20 |
21 | func isLower(s string) bool {
22 | for i := 0; i < len(s); i++ {
23 | c := s[i]
24 | if c >= 'A' && c <= 'Z' {
25 | return false
26 | }
27 | }
28 | return true
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/internal/util/safe.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | package util
4 |
5 | func BytesToString(b []byte) string {
6 | return string(b)
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/internal/util/strconv.go:
--------------------------------------------------------------------------------
1 | package util
2 |
3 | import "strconv"
4 |
5 | func Atoi(b []byte) (int, error) {
6 | return strconv.Atoi(BytesToString(b))
7 | }
8 |
9 | func ParseInt(b []byte, base int, bitSize int) (int64, error) {
10 | return strconv.ParseInt(BytesToString(b), base, bitSize)
11 | }
12 |
13 | func ParseUint(b []byte, base int, bitSize int) (uint64, error) {
14 | return strconv.ParseUint(BytesToString(b), base, bitSize)
15 | }
16 |
17 | func ParseFloat(b []byte, bitSize int) (float64, error) {
18 | return strconv.ParseFloat(BytesToString(b), bitSize)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-redis/redis/internal/util/unsafe.go:
--------------------------------------------------------------------------------
1 | // +build !appengine
2 |
3 | package util
4 |
5 | import (
6 | "unsafe"
7 | )
8 |
9 | // BytesToString converts byte slice to string.
10 | func BytesToString(b []byte) string {
11 | return *(*string)(unsafe.Pointer(&b))
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/go-sql-driver/mysql/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .DS_Store?
3 | ._*
4 | .Spotlight-V100
5 | .Trashes
6 | Icon?
7 | ehthumbs.db
8 | Thumbs.db
9 | .idea
10 |
--------------------------------------------------------------------------------
/vendor/github.com/go-sql-driver/mysql/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing Guidelines
2 |
3 | ## Reporting Issues
4 |
5 | Before creating a new Issue, please check first if a similar Issue [already exists](https://github.com/go-sql-driver/mysql/issues?state=open) or was [recently closed](https://github.com/go-sql-driver/mysql/issues?direction=desc&page=1&sort=updated&state=closed).
6 |
7 | ## Contributing Code
8 |
9 | By contributing to this project, you share your code under the Mozilla Public License 2, as specified in the LICENSE file.
10 | Don't forget to add yourself to the AUTHORS file.
11 |
12 | ### Code Review
13 |
14 | Everyone is invited to review and comment on pull requests.
15 | If it looks fine to you, comment with "LGTM" (Looks good to me).
16 |
17 | If changes are required, notice the reviewers with "PTAL" (Please take another look) after committing the fixes.
18 |
19 | Before merging the Pull Request, at least one [team member](https://github.com/go-sql-driver?tab=members) must have commented with "LGTM".
20 |
21 | ## Development Ideas
22 |
23 | If you are looking for ideas for code contributions, please check our [Development Ideas](https://github.com/go-sql-driver/mysql/wiki/Development-Ideas) Wiki page.
24 |
--------------------------------------------------------------------------------
/vendor/github.com/go-sql-driver/mysql/appengine.go:
--------------------------------------------------------------------------------
1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package
2 | //
3 | // Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
4 | //
5 | // This Source Code Form is subject to the terms of the Mozilla Public
6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file,
7 | // You can obtain one at http://mozilla.org/MPL/2.0/.
8 |
9 | // +build appengine
10 |
11 | package mysql
12 |
13 | import (
14 | "google.golang.org/appengine/cloudsql"
15 | )
16 |
17 | func init() {
18 | RegisterDial("cloudsql", cloudsql.Dial)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-sql-driver/mysql/result.go:
--------------------------------------------------------------------------------
1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package
2 | //
3 | // Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
4 | //
5 | // This Source Code Form is subject to the terms of the Mozilla Public
6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file,
7 | // You can obtain one at http://mozilla.org/MPL/2.0/.
8 |
9 | package mysql
10 |
11 | type mysqlResult struct {
12 | affectedRows int64
13 | insertId int64
14 | }
15 |
16 | func (res *mysqlResult) LastInsertId() (int64, error) {
17 | return res.insertId, nil
18 | }
19 |
20 | func (res *mysqlResult) RowsAffected() (int64, error) {
21 | return res.affectedRows, nil
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/go-sql-driver/mysql/transaction.go:
--------------------------------------------------------------------------------
1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package
2 | //
3 | // Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved.
4 | //
5 | // This Source Code Form is subject to the terms of the Mozilla Public
6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file,
7 | // You can obtain one at http://mozilla.org/MPL/2.0/.
8 |
9 | package mysql
10 |
11 | type mysqlTx struct {
12 | mc *mysqlConn
13 | }
14 |
15 | func (tx *mysqlTx) Commit() (err error) {
16 | if tx.mc == nil || tx.mc.closed.IsSet() {
17 | return ErrInvalidConn
18 | }
19 | err = tx.mc.exec("COMMIT")
20 | tx.mc = nil
21 | return
22 | }
23 |
24 | func (tx *mysqlTx) Rollback() (err error) {
25 | if tx.mc == nil || tx.mc.closed.IsSet() {
26 | return ErrInvalidConn
27 | }
28 | err = tx.mc.exec("ROLLBACK")
29 | tx.mc = nil
30 | return
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/.gitignore:
--------------------------------------------------------------------------------
1 | y.output
2 |
3 | # ignore intellij files
4 | .idea
5 | *.iml
6 | *.ipr
7 | *.iws
8 |
9 | *.test
10 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: go
4 |
5 | go:
6 | - 1.x
7 | - tip
8 |
9 | branches:
10 | only:
11 | - master
12 |
13 | script: make test
14 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/Makefile:
--------------------------------------------------------------------------------
1 | TEST?=./...
2 |
3 | default: test
4 |
5 | fmt: generate
6 | go fmt ./...
7 |
8 | test: generate
9 | go get -t ./...
10 | go test $(TEST) $(TESTARGS)
11 |
12 | generate:
13 | go generate ./...
14 |
15 | updatedeps:
16 | go get -u golang.org/x/tools/cmd/stringer
17 |
18 | .PHONY: default generate test updatedeps
19 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: "build-{branch}-{build}"
2 | image: Visual Studio 2015
3 | clone_folder: c:\gopath\src\github.com\hashicorp\hcl
4 | environment:
5 | GOPATH: c:\gopath
6 | init:
7 | - git config --global core.autocrlf false
8 | install:
9 | - cmd: >-
10 | echo %Path%
11 |
12 | go version
13 |
14 | go env
15 |
16 | go get -t ./...
17 |
18 | build_script:
19 | - cmd: go test -v ./...
20 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/hcl.go:
--------------------------------------------------------------------------------
1 | // Package hcl decodes HCL into usable Go structures.
2 | //
3 | // hcl input can come in either pure HCL format or JSON format.
4 | // It can be parsed into an AST, and then decoded into a structure,
5 | // or it can be decoded directly from a string into a structure.
6 | //
7 | // If you choose to parse HCL into a raw AST, the benefit is that you
8 | // can write custom visitor implementations to implement custom
9 | // semantic checks. By default, HCL does not perform any semantic
10 | // checks.
11 | package hcl
12 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go:
--------------------------------------------------------------------------------
1 | package ast
2 |
3 | import "fmt"
4 |
5 | // WalkFunc describes a function to be called for each node during a Walk. The
6 | // returned node can be used to rewrite the AST. Walking stops the returned
7 | // bool is false.
8 | type WalkFunc func(Node) (Node, bool)
9 |
10 | // Walk traverses an AST in depth-first order: It starts by calling fn(node);
11 | // node must not be nil. If fn returns true, Walk invokes fn recursively for
12 | // each of the non-nil children of node, followed by a call of fn(nil). The
13 | // returned node of fn can be used to rewrite the passed node to fn.
14 | func Walk(node Node, fn WalkFunc) Node {
15 | rewritten, ok := fn(node)
16 | if !ok {
17 | return rewritten
18 | }
19 |
20 | switch n := node.(type) {
21 | case *File:
22 | n.Node = Walk(n.Node, fn)
23 | case *ObjectList:
24 | for i, item := range n.Items {
25 | n.Items[i] = Walk(item, fn).(*ObjectItem)
26 | }
27 | case *ObjectKey:
28 | // nothing to do
29 | case *ObjectItem:
30 | for i, k := range n.Keys {
31 | n.Keys[i] = Walk(k, fn).(*ObjectKey)
32 | }
33 |
34 | if n.Val != nil {
35 | n.Val = Walk(n.Val, fn)
36 | }
37 | case *LiteralType:
38 | // nothing to do
39 | case *ListType:
40 | for i, l := range n.List {
41 | n.List[i] = Walk(l, fn)
42 | }
43 | case *ObjectType:
44 | n.List = Walk(n.List, fn).(*ObjectList)
45 | default:
46 | // should we panic here?
47 | fmt.Printf("unknown type: %T\n", n)
48 | }
49 |
50 | fn(nil)
51 | return rewritten
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/hcl/parser/error.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/hashicorp/hcl/hcl/token"
7 | )
8 |
9 | // PosError is a parse error that contains a position.
10 | type PosError struct {
11 | Pos token.Pos
12 | Err error
13 | }
14 |
15 | func (e *PosError) Error() string {
16 | return fmt.Sprintf("At %s: %s", e.Pos, e.Err)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/hcl/token/position.go:
--------------------------------------------------------------------------------
1 | package token
2 |
3 | import "fmt"
4 |
5 | // Pos describes an arbitrary source position
6 | // including the file, line, and column location.
7 | // A Position is valid if the line number is > 0.
8 | type Pos struct {
9 | Filename string // filename, if any
10 | Offset int // offset, starting at 0
11 | Line int // line number, starting at 1
12 | Column int // column number, starting at 1 (character count)
13 | }
14 |
15 | // IsValid returns true if the position is valid.
16 | func (p *Pos) IsValid() bool { return p.Line > 0 }
17 |
18 | // String returns a string in one of several forms:
19 | //
20 | // file:line:column valid position with file name
21 | // line:column valid position without file name
22 | // file invalid position with file name
23 | // - invalid position without file name
24 | func (p Pos) String() string {
25 | s := p.Filename
26 | if p.IsValid() {
27 | if s != "" {
28 | s += ":"
29 | }
30 | s += fmt.Sprintf("%d:%d", p.Line, p.Column)
31 | }
32 | if s == "" {
33 | s = "-"
34 | }
35 | return s
36 | }
37 |
38 | // Before reports whether the position p is before u.
39 | func (p Pos) Before(u Pos) bool {
40 | return u.Offset > p.Offset || u.Line > p.Line
41 | }
42 |
43 | // After reports whether the position p is after u.
44 | func (p Pos) After(u Pos) bool {
45 | return u.Offset < p.Offset || u.Line < p.Line
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/json/token/position.go:
--------------------------------------------------------------------------------
1 | package token
2 |
3 | import "fmt"
4 |
5 | // Pos describes an arbitrary source position
6 | // including the file, line, and column location.
7 | // A Position is valid if the line number is > 0.
8 | type Pos struct {
9 | Filename string // filename, if any
10 | Offset int // offset, starting at 0
11 | Line int // line number, starting at 1
12 | Column int // column number, starting at 1 (character count)
13 | }
14 |
15 | // IsValid returns true if the position is valid.
16 | func (p *Pos) IsValid() bool { return p.Line > 0 }
17 |
18 | // String returns a string in one of several forms:
19 | //
20 | // file:line:column valid position with file name
21 | // line:column valid position without file name
22 | // file invalid position with file name
23 | // - invalid position without file name
24 | func (p Pos) String() string {
25 | s := p.Filename
26 | if p.IsValid() {
27 | if s != "" {
28 | s += ":"
29 | }
30 | s += fmt.Sprintf("%d:%d", p.Line, p.Column)
31 | }
32 | if s == "" {
33 | s = "-"
34 | }
35 | return s
36 | }
37 |
38 | // Before reports whether the position p is before u.
39 | func (p Pos) Before(u Pos) bool {
40 | return u.Offset > p.Offset || u.Line > p.Line
41 | }
42 |
43 | // After reports whether the position p is after u.
44 | func (p Pos) After(u Pos) bool {
45 | return u.Offset < p.Offset || u.Line < p.Line
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/lex.go:
--------------------------------------------------------------------------------
1 | package hcl
2 |
3 | import (
4 | "unicode"
5 | "unicode/utf8"
6 | )
7 |
8 | type lexModeValue byte
9 |
10 | const (
11 | lexModeUnknown lexModeValue = iota
12 | lexModeHcl
13 | lexModeJson
14 | )
15 |
16 | // lexMode returns whether we're going to be parsing in JSON
17 | // mode or HCL mode.
18 | func lexMode(v []byte) lexModeValue {
19 | var (
20 | r rune
21 | w int
22 | offset int
23 | )
24 |
25 | for {
26 | r, w = utf8.DecodeRune(v[offset:])
27 | offset += w
28 | if unicode.IsSpace(r) {
29 | continue
30 | }
31 | if r == '{' {
32 | return lexModeJson
33 | }
34 | break
35 | }
36 |
37 | return lexModeHcl
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/hcl/parse.go:
--------------------------------------------------------------------------------
1 | package hcl
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/hashicorp/hcl/hcl/ast"
7 | hclParser "github.com/hashicorp/hcl/hcl/parser"
8 | jsonParser "github.com/hashicorp/hcl/json/parser"
9 | )
10 |
11 | // ParseBytes accepts as input byte slice and returns ast tree.
12 | //
13 | // Input can be either JSON or HCL
14 | func ParseBytes(in []byte) (*ast.File, error) {
15 | return parse(in)
16 | }
17 |
18 | // ParseString accepts input as a string and returns ast tree.
19 | func ParseString(input string) (*ast.File, error) {
20 | return parse([]byte(input))
21 | }
22 |
23 | func parse(in []byte) (*ast.File, error) {
24 | switch lexMode(in) {
25 | case lexModeHcl:
26 | return hclParser.Parse(in)
27 | case lexModeJson:
28 | return jsonParser.Parse(in)
29 | }
30 |
31 | return nil, fmt.Errorf("unknown config format")
32 | }
33 |
34 | // Parse parses the given input and returns the root object.
35 | //
36 | // The input format can be either HCL or JSON.
37 | func Parse(input string) (*ast.File, error) {
38 | return parse([]byte(input))
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2014 Alan Shreve
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/README.md:
--------------------------------------------------------------------------------
1 | # mousetrap
2 |
3 | mousetrap is a tiny library that answers a single question.
4 |
5 | On a Windows machine, was the process invoked by someone double clicking on
6 | the executable file while browsing in explorer?
7 |
8 | ### Motivation
9 |
10 | Windows developers unfamiliar with command line tools will often "double-click"
11 | the executable for a tool. Because most CLI tools print the help and then exit
12 | when invoked without arguments, this is often very frustrating for those users.
13 |
14 | mousetrap provides a way to detect these invocations so that you can provide
15 | more helpful behavior and instructions on how to run the CLI tool. To see what
16 | this looks like, both from an organizational and a technical perspective, see
17 | https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/
18 |
19 | ### The interface
20 |
21 | The library exposes a single interface:
22 |
23 | func StartedByExplorer() (bool)
24 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/trap_others.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package mousetrap
4 |
5 | // StartedByExplorer returns true if the program was invoked by the user
6 | // double-clicking on the executable from explorer.exe
7 | //
8 | // It is conservative and returns false if any of the internal calls fail.
9 | // It does not guarantee that the program was run from a terminal. It only can tell you
10 | // whether it was launched from explorer.exe
11 | //
12 | // On non-Windows platforms, it always returns false.
13 | func StartedByExplorer() bool {
14 | return false
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 | // +build go1.4
3 |
4 | package mousetrap
5 |
6 | import (
7 | "os"
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) {
13 | snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0)
14 | if err != nil {
15 | return nil, err
16 | }
17 | defer syscall.CloseHandle(snapshot)
18 | var procEntry syscall.ProcessEntry32
19 | procEntry.Size = uint32(unsafe.Sizeof(procEntry))
20 | if err = syscall.Process32First(snapshot, &procEntry); err != nil {
21 | return nil, err
22 | }
23 | for {
24 | if procEntry.ProcessID == uint32(pid) {
25 | return &procEntry, nil
26 | }
27 | err = syscall.Process32Next(snapshot, &procEntry)
28 | if err != nil {
29 | return nil, err
30 | }
31 | }
32 | }
33 |
34 | // StartedByExplorer returns true if the program was invoked by the user double-clicking
35 | // on the executable from explorer.exe
36 | //
37 | // It is conservative and returns false if any of the internal calls fail.
38 | // It does not guarantee that the program was run from a terminal. It only can tell you
39 | // whether it was launched from explorer.exe
40 | func StartedByExplorer() bool {
41 | pe, err := getProcessEntry(os.Getppid())
42 | if err != nil {
43 | return false
44 | }
45 | return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:])
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/gorm/.codeclimate.yml:
--------------------------------------------------------------------------------
1 | ---
2 | engines:
3 | gofmt:
4 | enabled: true
5 | govet:
6 | enabled: true
7 | golint:
8 | enabled: true
9 | ratings:
10 | paths:
11 | - "**.go"
12 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/gorm/.gitignore:
--------------------------------------------------------------------------------
1 | documents
2 | _book
3 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/gorm/License:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013-NOW Jinzhu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/gorm/callback_row_query.go:
--------------------------------------------------------------------------------
1 | package gorm
2 |
3 | import "database/sql"
4 |
5 | // Define callbacks for row query
6 | func init() {
7 | DefaultCallback.RowQuery().Register("gorm:row_query", rowQueryCallback)
8 | }
9 |
10 | type RowQueryResult struct {
11 | Row *sql.Row
12 | }
13 |
14 | type RowsQueryResult struct {
15 | Rows *sql.Rows
16 | Error error
17 | }
18 |
19 | // queryCallback used to query data from database
20 | func rowQueryCallback(scope *Scope) {
21 | if result, ok := scope.InstanceGet("row_query_result"); ok {
22 | scope.prepareQuerySQL()
23 |
24 | if rowResult, ok := result.(*RowQueryResult); ok {
25 | rowResult.Row = scope.SQLDB().QueryRow(scope.SQL, scope.SQLVars...)
26 | } else if rowsResult, ok := result.(*RowsQueryResult); ok {
27 | rowsResult.Rows, rowsResult.Error = scope.SQLDB().Query(scope.SQL, scope.SQLVars...)
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/gorm/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 |
3 | services:
4 | mysql:
5 | image: 'mysql:latest'
6 | ports:
7 | - 9910:3306
8 | environment:
9 | - MYSQL_DATABASE=gorm
10 | - MYSQL_USER=gorm
11 | - MYSQL_PASSWORD=gorm
12 | - MYSQL_RANDOM_ROOT_PASSWORD="yes"
13 | postgres:
14 | image: 'postgres:latest'
15 | ports:
16 | - 9920:5432
17 | environment:
18 | - POSTGRES_USER=gorm
19 | - POSTGRES_DB=gorm
20 | - POSTGRES_PASSWORD=gorm
21 | mssql:
22 | image: 'mcmoe/mssqldocker:latest'
23 | ports:
24 | - 9930:1433
25 | environment:
26 | - ACCEPT_EULA=Y
27 | - SA_PASSWORD=LoremIpsum86
28 | - MSSQL_DB=gorm
29 | - MSSQL_USER=gorm
30 | - MSSQL_PASSWORD=LoremIpsum86
31 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/gorm/interface.go:
--------------------------------------------------------------------------------
1 | package gorm
2 |
3 | import "database/sql"
4 |
5 | // SQLCommon is the minimal database connection functionality gorm requires. Implemented by *sql.DB.
6 | type SQLCommon interface {
7 | Exec(query string, args ...interface{}) (sql.Result, error)
8 | Prepare(query string) (*sql.Stmt, error)
9 | Query(query string, args ...interface{}) (*sql.Rows, error)
10 | QueryRow(query string, args ...interface{}) *sql.Row
11 | }
12 |
13 | type sqlDb interface {
14 | Begin() (*sql.Tx, error)
15 | }
16 |
17 | type sqlTx interface {
18 | Commit() error
19 | Rollback() error
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/gorm/model.go:
--------------------------------------------------------------------------------
1 | package gorm
2 |
3 | import "time"
4 |
5 | // Model base model definition, including fields `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embedded in your models
6 | // type User struct {
7 | // gorm.Model
8 | // }
9 | type Model struct {
10 | ID uint `gorm:"primary_key"`
11 | CreatedAt time.Time
12 | UpdatedAt time.Time
13 | DeletedAt *time.Time `sql:"index"`
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/gorm/test_all.sh:
--------------------------------------------------------------------------------
1 | dialects=("postgres" "mysql" "mssql" "sqlite")
2 |
3 | for dialect in "${dialects[@]}" ; do
4 | DEBUG=false GORM_DIALECT=${dialect} go test
5 | done
6 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/inflection/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 - Jinzhu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/jinzhu/inflection/wercker.yml:
--------------------------------------------------------------------------------
1 | box: golang
2 |
3 | build:
4 | steps:
5 | - setup-go-workspace
6 |
7 | # Gets the dependencies
8 | - script:
9 | name: go get
10 | code: |
11 | go get
12 |
13 | # Build the project
14 | - script:
15 | name: go build
16 | code: |
17 | go build ./...
18 |
19 | # Test the project
20 | - script:
21 | name: go test
22 | code: |
23 | go test ./...
24 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/.gitignore:
--------------------------------------------------------------------------------
1 | *.sublime-project
2 | *.sublime-workspace
3 | *.un~
4 | *.swp
5 | .idea/
6 | *.iml
7 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.4.x
4 | - 1.5.x
5 | - 1.6.x
6 | - 1.7.x
7 | - 1.8.x
8 | - 1.9.x
9 | - "1.10.x"
10 | - tip
11 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/LICENSE:
--------------------------------------------------------------------------------
1 | goproperties - properties file decoder for Go
2 |
3 | Copyright (c) 2013-2018 - Frank Schroeder
4 |
5 | All rights reserved.
6 |
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions are met:
9 |
10 | 1. Redistributions of source code must retain the above copyright notice, this
11 | list of conditions and the following disclaimer.
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/integrate.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Frank Schroeder. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package properties
6 |
7 | import "flag"
8 |
9 | // MustFlag sets flags that are skipped by dst.Parse when p contains
10 | // the respective key for flag.Flag.Name.
11 | //
12 | // It's use is recommended with command line arguments as in:
13 | // flag.Parse()
14 | // p.MustFlag(flag.CommandLine)
15 | func (p *Properties) MustFlag(dst *flag.FlagSet) {
16 | m := make(map[string]*flag.Flag)
17 | dst.VisitAll(func(f *flag.Flag) {
18 | m[f.Name] = f
19 | })
20 | dst.Visit(func(f *flag.Flag) {
21 | delete(m, f.Name) // overridden
22 | })
23 |
24 | for name, f := range m {
25 | v, ok := p.Get(name)
26 | if !ok {
27 | continue
28 | }
29 |
30 | if err := f.Value.Set(v); err != nil {
31 | ErrorHandler(err)
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/magiconair/properties/rangecheck.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Frank Schroeder. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package properties
6 |
7 | import (
8 | "fmt"
9 | "math"
10 | )
11 |
12 | // make this a var to overwrite it in a test
13 | var is32Bit = ^uint(0) == math.MaxUint32
14 |
15 | // intRangeCheck checks if the value fits into the int type and
16 | // panics if it does not.
17 | func intRangeCheck(key string, v int64) int {
18 | if is32Bit && (v < math.MinInt32 || v > math.MaxInt32) {
19 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key))
20 | }
21 | return int(v)
22 | }
23 |
24 | // uintRangeCheck checks if the value fits into the uint type and
25 | // panics if it does not.
26 | func uintRangeCheck(key string, v uint64) uint {
27 | if is32Bit && v > math.MaxUint32 {
28 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key))
29 | }
30 | return uint(v)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/mapstructure/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.9.x
5 | - tip
6 |
7 | script:
8 | - go test
9 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/mapstructure/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Mitchell Hashimoto
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/mitchellh/mapstructure/error.go:
--------------------------------------------------------------------------------
1 | package mapstructure
2 |
3 | import (
4 | "errors"
5 | "fmt"
6 | "sort"
7 | "strings"
8 | )
9 |
10 | // Error implements the error interface and can represents multiple
11 | // errors that occur in the course of a single decode.
12 | type Error struct {
13 | Errors []string
14 | }
15 |
16 | func (e *Error) Error() string {
17 | points := make([]string, len(e.Errors))
18 | for i, err := range e.Errors {
19 | points[i] = fmt.Sprintf("* %s", err)
20 | }
21 |
22 | sort.Strings(points)
23 | return fmt.Sprintf(
24 | "%d error(s) decoding:\n\n%s",
25 | len(e.Errors), strings.Join(points, "\n"))
26 | }
27 |
28 | // WrappedErrors implements the errwrap.Wrapper interface to make this
29 | // return value more useful with the errwrap and go-multierror libraries.
30 | func (e *Error) WrappedErrors() []error {
31 | if e == nil {
32 | return nil
33 | }
34 |
35 | result := make([]error, len(e.Errors))
36 | for i, e := range e.Errors {
37 | result[i] = errors.New(e)
38 | }
39 |
40 | return result
41 | }
42 |
43 | func appendErrors(errors []string, err error) []string {
44 | switch e := err.(type) {
45 | case *Error:
46 | return append(errors, e.Errors...)
47 | default:
48 | return append(errors, e.Error())
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/github.com/moul/http2curl/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/moul/http2curl/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.7.3
5 | - tip
6 |
7 | env:
8 | - GO15VENDOREXPERIMENT=1
9 |
10 | matrix:
11 | allow_failures:
12 | - go: tip
13 |
14 | before_install:
15 | - go get -u github.com/axw/gocov/gocov
16 | - go get -u github.com/mattn/goveralls
17 | - go get golang.org/x/tools/cmd/cover
18 |
19 | script:
20 | - make build
21 | - make test
22 | - make cover
23 | - goveralls -service=travis-ci -v -covermode=count -coverprofile=profile.out
24 |
--------------------------------------------------------------------------------
/vendor/github.com/moul/http2curl/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Manfred Touron
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/vendor/github.com/moul/http2curl/Makefile:
--------------------------------------------------------------------------------
1 | # Project-specific variables
2 | CONVEY_PORT ?= 9042
3 |
4 |
5 | # Common variables
6 | SOURCES := $(shell find . -type f -name "*.go")
7 | COMMANDS := $(shell go list ./... | grep -v /vendor/ | grep /cmd/)
8 | PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /cmd/)
9 | GOENV ?= GO15VENDOREXPERIMENT=1
10 | GO ?= $(GOENV) go
11 | GODEP ?= $(GOENV) godep
12 | USER ?= $(shell whoami)
13 |
14 |
15 | all: build
16 |
17 |
18 | .PHONY: build
19 | build:
20 | echo "nothing to do"
21 |
22 |
23 | .PHONY: test
24 | test:
25 | $(GO) get -t .
26 | $(GO) test -v .
27 |
28 |
29 | .PHONY: godep-save
30 | godep-save:
31 | $(GODEP) save $(PACKAGES) $(COMMANDS)
32 |
33 |
34 | .PHONY: re
35 | re: clean all
36 |
37 |
38 | .PHONY: convey
39 | convey:
40 | $(GO) get github.com/smartystreets/goconvey
41 | goconvey -cover -port=$(CONVEY_PORT) -workDir="$(realpath .)" -depth=1
42 |
43 |
44 | .PHONY: cover
45 | cover: profile.out
46 |
47 |
48 | profile.out: $(SOURCES)
49 | rm -f $@
50 | $(GO) test -covermode=count -coverpkg=. -coverprofile=$@ .
51 |
--------------------------------------------------------------------------------
/vendor/github.com/moul/http2curl/README.md:
--------------------------------------------------------------------------------
1 | # http2curl
2 | :triangular_ruler: Convert Golang's http.Request to CURL command line
3 |
4 | [](https://travis-ci.org/moul/http2curl)
5 | [](https://godoc.org/github.com/moul/http2curl)
6 | [](https://coveralls.io/github/moul/http2curl)
7 |
8 | To do the reverse, check out [mholt/curl-to-go](https://github.com/mholt/curl-to-go).
9 |
10 | ## Example
11 |
12 | ```go
13 | import "http"
14 | import "github.com/moul/http2curl"
15 |
16 | data := bytes.NewBufferString(`{"hello":"world","answer":42}`)
17 | req, _ := http.NewRequest("PUT", "http://www.example.com/abc/def.ghi?jlk=mno&pqr=stu", data)
18 | req.Header.Set("Content-Type", "application/json")
19 |
20 | command, _ := http2curl.GetCurlCommand(req)
21 | fmt.Println(command)
22 | // Output: curl -X PUT -d "{\"hello\":\"world\",\"answer\":42}" -H "Content-Type: application/json" http://www.example.com/abc/def.ghi?jlk=mno&pqr=stu
23 | ```
24 |
25 | ## Install
26 |
27 | ```php
28 | $ go get github.com/moul/http2curl
29 | ```
30 |
31 | ## Usages
32 |
33 | - https://github.com/parnurzeal/gorequest
34 | - https://github.com/scaleway/scaleway-cli
35 | - https://github.com/nmonterroso/cowsay-slackapp
36 | - https://github.com/moul/as-a-service
37 | - https://github.com/gavv/httpexpect
38 | - https://github.com/smallnest/goreq
39 |
40 | ## License
41 |
42 | MIT
43 |
--------------------------------------------------------------------------------
/vendor/github.com/naiba/com/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea
--------------------------------------------------------------------------------
/vendor/github.com/naiba/com/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - master
4 | before_install:
5 | - go get golang.org/x/lint/golint
6 | script:
7 | - go list ./... | xargs -L1 golint
8 | - go test -v -race -cover ./...
--------------------------------------------------------------------------------
/vendor/github.com/naiba/com/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Naiba
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/naiba/com/README.md:
--------------------------------------------------------------------------------
1 | [](https://goreportcard.com/report/github.com/naiba/com) [](https://travis-ci.com/naiba/com)
--------------------------------------------------------------------------------
/vendor/github.com/naiba/com/errors.go:
--------------------------------------------------------------------------------
1 | package com
2 |
3 | //PanicIfNotNil panic if not nil
4 | func PanicIfNotNil(err error) {
5 | if err != nil {
6 | panic(err)
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/naiba/com/http.go:
--------------------------------------------------------------------------------
1 | package com
2 |
3 | import (
4 | "fmt"
5 | "io"
6 | "net/http"
7 | "os"
8 | )
9 |
10 | //Downloader simple http downloader
11 | func Downloader(url, save string) error {
12 |
13 | // Create the file
14 | out, err := os.Create(save)
15 | if err != nil {
16 | return err
17 | }
18 | defer out.Close()
19 |
20 | // Get the data
21 | resp, err := http.Get(url)
22 | if err != nil {
23 | return err
24 | }
25 | defer resp.Body.Close()
26 |
27 | // Check server response
28 | if resp.StatusCode != http.StatusOK {
29 | return fmt.Errorf("bad status: %s", resp.Status)
30 | }
31 |
32 | // Writer the body to file
33 | _, err = io.Copy(out, resp.Body)
34 | if err != nil {
35 | return err
36 | }
37 |
38 | return nil
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/naiba/com/regex.go:
--------------------------------------------------------------------------------
1 | package com
2 |
3 | import "regexp"
4 |
5 | //IsDomain is valid domain
6 | func IsDomain(domain string) bool {
7 | is, _ := regexp.Match(`^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$`, []byte(domain))
8 | return is
9 | }
10 |
11 | //IsIPv4 is valid ipv4
12 | func IsIPv4(ipv4 string) bool {
13 | is, _ := regexp.Match(`^(2[0-5]{2}|2[0-4][0-9]|1?[0-9]{1,2}).(2[0-5]{2}|2[0-4][0-9]|1?[0-9]{1,2}).(2[0-5]{2}|2[0-4][0-9]|1?[0-9]{1,2}).(2[0-5]{2}|2[0-4][0-9]|1?[0-9]{1,2})$`, []byte(ipv4))
14 | return is
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/naiba/com/url.go:
--------------------------------------------------------------------------------
1 | package com
2 |
3 | import (
4 | "encoding/base64"
5 | "net/url"
6 | )
7 |
8 | //URLEncode url encode string, is + not %20
9 | func URLEncode(str string) string {
10 | return url.QueryEscape(str)
11 | }
12 |
13 | //URLDecode url decode string
14 | func URLDecode(str string) (string, error) {
15 | return url.QueryUnescape(str)
16 | }
17 |
18 | //Base64Encode base64 encode
19 | func Base64Encode(str string) string {
20 | return base64.StdEncoding.EncodeToString([]byte(str))
21 | }
22 |
23 | //Base64Decode base64 decode
24 | func Base64Decode(str string) (string, error) {
25 | s, e := base64.StdEncoding.DecodeString(str)
26 | return string(s), e
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/oxtoacart/bpool/bpool.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package bpool implements leaky pools of byte arrays and Buffers as bounded
3 | channels. It is based on the leaky buffer example from the Effective Go
4 | documentation: http://golang.org/doc/effective_go.html#leaky_buffer
5 | */
6 | package bpool
7 |
--------------------------------------------------------------------------------
/vendor/github.com/oxtoacart/bpool/bufferpool.go:
--------------------------------------------------------------------------------
1 | package bpool
2 |
3 | import (
4 | "bytes"
5 | )
6 |
7 | // BufferPool implements a pool of bytes.Buffers in the form of a bounded
8 | // channel.
9 | type BufferPool struct {
10 | c chan *bytes.Buffer
11 | }
12 |
13 | // NewBufferPool creates a new BufferPool bounded to the given size.
14 | func NewBufferPool(size int) (bp *BufferPool) {
15 | return &BufferPool{
16 | c: make(chan *bytes.Buffer, size),
17 | }
18 | }
19 |
20 | // Get gets a Buffer from the BufferPool, or creates a new one if none are
21 | // available in the pool.
22 | func (bp *BufferPool) Get() (b *bytes.Buffer) {
23 | select {
24 | case b = <-bp.c:
25 | // reuse existing buffer
26 | default:
27 | // create new buffer
28 | b = bytes.NewBuffer([]byte{})
29 | }
30 | return
31 | }
32 |
33 | // Put returns the given Buffer to the BufferPool.
34 | func (bp *BufferPool) Put(b *bytes.Buffer) {
35 | b.Reset()
36 | select {
37 | case bp.c <- b:
38 | default: // Discard the buffer if the pool is full.
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/github.com/oxtoacart/bpool/bytepool.go:
--------------------------------------------------------------------------------
1 | package bpool
2 |
3 | // BytePool implements a leaky pool of []byte in the form of a bounded
4 | // channel.
5 | type BytePool struct {
6 | c chan []byte
7 | w int
8 | }
9 |
10 | // NewBytePool creates a new BytePool bounded to the given maxSize, with new
11 | // byte arrays sized based on width.
12 | func NewBytePool(maxSize int, width int) (bp *BytePool) {
13 | return &BytePool{
14 | c: make(chan []byte, maxSize),
15 | w: width,
16 | }
17 | }
18 |
19 | // Get gets a []byte from the BytePool, or creates a new one if none are
20 | // available in the pool.
21 | func (bp *BytePool) Get() (b []byte) {
22 | select {
23 | case b = <-bp.c:
24 | // reuse existing buffer
25 | default:
26 | // create new buffer
27 | b = make([]byte, bp.w)
28 | }
29 | return
30 | }
31 |
32 | // Put returns the given Buffer to the BytePool.
33 | func (bp *BytePool) Put(b []byte) {
34 | select {
35 | case bp.c <- b:
36 | // buffer went back into pool
37 | default:
38 | // buffer didn't go back into pool, just discard
39 | }
40 | }
41 |
42 | // Width returns the width of the byte arrays in this pool.
43 | func (bp *BytePool) Width() (n int) {
44 | return bp.w
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/github.com/parnurzeal/gorequest/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 | .idea
10 |
11 | # Architecture specific extensions/prefixes
12 | *.[568vq]
13 | [568vq].out
14 |
15 | *.cgo1.go
16 | *.cgo2.c
17 | _cgo_defun.c
18 | _cgo_gotypes.go
19 | _cgo_export.*
20 |
21 | _testmain.go
22 |
23 | *.exe
24 | tags
25 |
--------------------------------------------------------------------------------
/vendor/github.com/parnurzeal/gorequest/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.7
4 | - 1.6
5 | - 1.5
6 | - 1.4
7 | - 1.3
8 | - 1.2
9 | install:
10 | - go get -t -v ./...
11 | notifications:
12 | email:
13 | recipients: parnurzeal@gmail.com
14 | on_success: change
15 | on_failure: always
16 |
--------------------------------------------------------------------------------
/vendor/github.com/parnurzeal/gorequest/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Theeraphol Wattanavekin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/vendor/github.com/patrickmn/go-cache/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | This is a list of people who have contributed code to go-cache. They, or their
2 | employers, are the copyright holders of the contributed code. Contributed code
3 | is subject to the license restrictions listed in LICENSE (as they were when the
4 | code was contributed.)
5 |
6 | Dustin Sallings
7 | Jason Mooberry
8 | Sergey Shepelev
9 | Alex Edwards
10 |
--------------------------------------------------------------------------------
/vendor/github.com/patrickmn/go-cache/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012-2017 Patrick Mylund Nielsen and the go-cache contributors
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/.gitignore:
--------------------------------------------------------------------------------
1 | test_program/test_program_bin
2 | fuzz/
3 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 | go:
4 | - 1.8.x
5 | - 1.9.x
6 | - 1.10.x
7 | - tip
8 | matrix:
9 | allow_failures:
10 | - go: tip
11 | fast_finish: true
12 | script:
13 | - if [ -n "$(go fmt ./...)" ]; then exit 1; fi
14 | - ./test.sh
15 | - ./benchmark.sh $TRAVIS_BRANCH https://github.com/$TRAVIS_REPO_SLUG.git
16 | before_install:
17 | - go get github.com/axw/gocov/gocov
18 | - go get github.com/mattn/goveralls
19 | - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
20 | branches:
21 | only: [master]
22 | after_success:
23 | - $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken $COVERALLS_TOKEN
24 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 - 2017 Thomas Pelletier, Eric Anderton
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/benchmark.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | reference_ref=${1:-master}
6 | reference_git=${2:-.}
7 |
8 | if ! `hash benchstat 2>/dev/null`; then
9 | echo "Installing benchstat"
10 | go get golang.org/x/perf/cmd/benchstat
11 | go install golang.org/x/perf/cmd/benchstat
12 | fi
13 |
14 | tempdir=`mktemp -d /tmp/go-toml-benchmark-XXXXXX`
15 | ref_tempdir="${tempdir}/ref"
16 | ref_benchmark="${ref_tempdir}/benchmark-`echo -n ${reference_ref}|tr -s '/' '-'`.txt"
17 | local_benchmark="`pwd`/benchmark-local.txt"
18 |
19 | echo "=== ${reference_ref} (${ref_tempdir})"
20 | git clone ${reference_git} ${ref_tempdir} >/dev/null 2>/dev/null
21 | pushd ${ref_tempdir} >/dev/null
22 | git checkout ${reference_ref} >/dev/null 2>/dev/null
23 | go test -bench=. -benchmem | tee ${ref_benchmark}
24 | popd >/dev/null
25 |
26 | echo ""
27 | echo "=== local"
28 | go test -bench=. -benchmem | tee ${local_benchmark}
29 |
30 | echo ""
31 | echo "=== diff"
32 | benchstat -delta-test=none ${ref_benchmark} ${local_benchmark}
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/doc.go:
--------------------------------------------------------------------------------
1 | // Package toml is a TOML parser and manipulation library.
2 | //
3 | // This version supports the specification as described in
4 | // https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md
5 | //
6 | // Marshaling
7 | //
8 | // Go-toml can marshal and unmarshal TOML documents from and to data
9 | // structures.
10 | //
11 | // TOML document as a tree
12 | //
13 | // Go-toml can operate on a TOML document as a tree. Use one of the Load*
14 | // functions to parse TOML data and obtain a Tree instance, then one of its
15 | // methods to manipulate the tree.
16 | //
17 | // JSONPath-like queries
18 | //
19 | // The package github.com/pelletier/go-toml/query implements a system
20 | // similar to JSONPath to quickly retrieve elements of a TOML document using a
21 | // single expression. See the package documentation for more information.
22 | //
23 | package toml
24 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/example-crlf.toml:
--------------------------------------------------------------------------------
1 | # This is a TOML document. Boom.
2 |
3 | title = "TOML Example"
4 |
5 | [owner]
6 | name = "Tom Preston-Werner"
7 | organization = "GitHub"
8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not?
10 |
11 | [database]
12 | server = "192.168.1.1"
13 | ports = [ 8001, 8001, 8002 ]
14 | connection_max = 5000
15 | enabled = true
16 |
17 | [servers]
18 |
19 | # You can indent as you please. Tabs or spaces. TOML don't care.
20 | [servers.alpha]
21 | ip = "10.0.0.1"
22 | dc = "eqdc10"
23 |
24 | [servers.beta]
25 | ip = "10.0.0.2"
26 | dc = "eqdc10"
27 |
28 | [clients]
29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
30 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/example.toml:
--------------------------------------------------------------------------------
1 | # This is a TOML document. Boom.
2 |
3 | title = "TOML Example"
4 |
5 | [owner]
6 | name = "Tom Preston-Werner"
7 | organization = "GitHub"
8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not?
10 |
11 | [database]
12 | server = "192.168.1.1"
13 | ports = [ 8001, 8001, 8002 ]
14 | connection_max = 5000
15 | enabled = true
16 |
17 | [servers]
18 |
19 | # You can indent as you please. Tabs or spaces. TOML don't care.
20 | [servers.alpha]
21 | ip = "10.0.0.1"
22 | dc = "eqdc10"
23 |
24 | [servers.beta]
25 | ip = "10.0.0.2"
26 | dc = "eqdc10"
27 |
28 | [clients]
29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
30 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/fuzz.go:
--------------------------------------------------------------------------------
1 | // +build gofuzz
2 |
3 | package toml
4 |
5 | func Fuzz(data []byte) int {
6 | tree, err := LoadBytes(data)
7 | if err != nil {
8 | if tree != nil {
9 | panic("tree must be nil if there is an error")
10 | }
11 | return 0
12 | }
13 |
14 | str, err := tree.ToTomlString()
15 | if err != nil {
16 | if str != "" {
17 | panic(`str must be "" if there is an error`)
18 | }
19 | panic(err)
20 | }
21 |
22 | tree, err = Load(str)
23 | if err != nil {
24 | if tree != nil {
25 | panic("tree must be nil if there is an error")
26 | }
27 | return 0
28 | }
29 |
30 | return 1
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/fuzz.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | set -eu
3 |
4 | go get github.com/dvyukov/go-fuzz/go-fuzz
5 | go get github.com/dvyukov/go-fuzz/go-fuzz-build
6 |
7 | if [ ! -e toml-fuzz.zip ]; then
8 | go-fuzz-build github.com/pelletier/go-toml
9 | fi
10 |
11 | rm -fr fuzz
12 | mkdir -p fuzz/corpus
13 | cp *.toml fuzz/corpus
14 |
15 | go-fuzz -bin=toml-fuzz.zip -workdir=fuzz
16 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/marshal_test.toml:
--------------------------------------------------------------------------------
1 | title = "TOML Marshal Testing"
2 |
3 | [basic]
4 | bool = true
5 | date = 1979-05-27T07:32:00Z
6 | float = 123.4
7 | int = 5000
8 | string = "Bite me"
9 | uint = 5001
10 |
11 | [basic_lists]
12 | bools = [true,false,true]
13 | dates = [1979-05-27T07:32:00Z,1980-05-27T07:32:00Z]
14 | floats = [12.3,45.6,78.9]
15 | ints = [8001,8001,8002]
16 | strings = ["One","Two","Three"]
17 | uints = [5002,5003]
18 |
19 | [basic_map]
20 | one = "one"
21 | two = "two"
22 |
23 | [subdoc]
24 |
25 | [subdoc.first]
26 | name = "First"
27 |
28 | [subdoc.second]
29 | name = "Second"
30 |
31 | [[subdoclist]]
32 | name = "List.First"
33 |
34 | [[subdoclist]]
35 | name = "List.Second"
36 |
37 | [[subdocptrs]]
38 | name = "Second"
39 |
--------------------------------------------------------------------------------
/vendor/github.com/pelletier/go-toml/position.go:
--------------------------------------------------------------------------------
1 | // Position support for go-toml
2 |
3 | package toml
4 |
5 | import (
6 | "fmt"
7 | )
8 |
9 | // Position of a document element within a TOML document.
10 | //
11 | // Line and Col are both 1-indexed positions for the element's line number and
12 | // column number, respectively. Values of zero or less will cause Invalid(),
13 | // to return true.
14 | type Position struct {
15 | Line int // line within the document
16 | Col int // column within the line
17 | }
18 |
19 | // String representation of the position.
20 | // Displays 1-indexed line and column numbers.
21 | func (p Position) String() string {
22 | return fmt.Sprintf("(%d, %d)", p.Line, p.Col)
23 | }
24 |
25 | // Invalid returns whether or not the position is valid (i.e. with negative or
26 | // null values)
27 | func (p Position) Invalid() bool {
28 | return p.Line <= 0 || p.Col <= 0
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go_import_path: github.com/pkg/errors
3 | go:
4 | - 1.4.3
5 | - 1.5.4
6 | - 1.6.2
7 | - 1.7.1
8 | - tip
9 |
10 | script:
11 | - go test -v ./...
12 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015, Dave Cheney
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: build-{build}.{branch}
2 |
3 | clone_folder: C:\gopath\src\github.com\pkg\errors
4 | shallow_clone: true # for startup speed
5 |
6 | environment:
7 | GOPATH: C:\gopath
8 |
9 | platform:
10 | - x64
11 |
12 | # http://www.appveyor.com/docs/installed-software
13 | install:
14 | # some helpful output for debugging builds
15 | - go version
16 | - go env
17 | # pre-installed MinGW at C:\MinGW is 32bit only
18 | # but MSYS2 at C:\msys64 has mingw64
19 | - set PATH=C:\msys64\mingw64\bin;%PATH%
20 | - gcc --version
21 | - g++ --version
22 |
23 | build_script:
24 | - go install -v ./...
25 |
26 | test_script:
27 | - set PATH=C:\gopath\bin;%PATH%
28 | - go test -v ./...
29 |
30 | #artifacts:
31 | # - path: '%GOPATH%\bin\*.exe'
32 | deploy: off
33 |
--------------------------------------------------------------------------------
/vendor/github.com/robfig/cron/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
--------------------------------------------------------------------------------
/vendor/github.com/robfig/cron/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
--------------------------------------------------------------------------------
/vendor/github.com/robfig/cron/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2012 Rob Figueiredo
2 | All Rights Reserved.
3 |
4 | MIT LICENSE
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | this software and associated documentation files (the "Software"), to deal in
8 | the Software without restriction, including without limitation the rights to
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | the Software, and to permit persons to whom the Software is furnished to do so,
11 | subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/robfig/cron/README.md:
--------------------------------------------------------------------------------
1 | [](http://godoc.org/github.com/robfig/cron)
2 | [](https://travis-ci.org/robfig/cron)
3 |
4 | # cron
5 |
6 | Documentation here: https://godoc.org/github.com/robfig/cron
7 |
--------------------------------------------------------------------------------
/vendor/github.com/robfig/cron/constantdelay.go:
--------------------------------------------------------------------------------
1 | package cron
2 |
3 | import "time"
4 |
5 | // ConstantDelaySchedule represents a simple recurring duty cycle, e.g. "Every 5 minutes".
6 | // It does not support jobs more frequent than once a second.
7 | type ConstantDelaySchedule struct {
8 | Delay time.Duration
9 | }
10 |
11 | // Every returns a crontab Schedule that activates once every duration.
12 | // Delays of less than a second are not supported (will round up to 1 second).
13 | // Any fields less than a Second are truncated.
14 | func Every(duration time.Duration) ConstantDelaySchedule {
15 | if duration < time.Second {
16 | duration = time.Second
17 | }
18 | return ConstantDelaySchedule{
19 | Delay: duration - time.Duration(duration.Nanoseconds())%time.Second,
20 | }
21 | }
22 |
23 | // Next returns the next time this should be run.
24 | // This rounds so that the next activation time will be on the second.
25 | func (schedule ConstantDelaySchedule) Next(t time.Time) time.Time {
26 | return t.Add(schedule.Delay - time.Duration(t.Nanosecond())*time.Nanosecond)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 |
4 | go:
5 | - 1.9
6 | - "1.10"
7 | - tip
8 |
9 | os:
10 | - linux
11 | - osx
12 |
13 | matrix:
14 | allow_failures:
15 | - go: tip
16 | fast_finish: true
17 |
18 | script:
19 | - go build
20 | - go test -race -v ./...
21 |
22 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: '{build}'
2 | clone_folder: C:\gopath\src\github.com\spf13\afero
3 | environment:
4 | GOPATH: C:\gopath
5 | build_script:
6 | - cmd: >-
7 | go version
8 |
9 | go env
10 |
11 | go get -v github.com/spf13/afero/...
12 |
13 | go build github.com/spf13/afero
14 | test_script:
15 | - cmd: go test -race -v github.com/spf13/afero/...
16 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/const_bsds.go:
--------------------------------------------------------------------------------
1 | // Copyright © 2016 Steve Francia .
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | // +build darwin openbsd freebsd netbsd dragonfly
15 |
16 | package afero
17 |
18 | import (
19 | "syscall"
20 | )
21 |
22 | const BADFD = syscall.EBADF
23 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/const_win_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright © 2016 Steve Francia .
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 | // +build !darwin
14 | // +build !openbsd
15 | // +build !freebsd
16 | // +build !dragonfly
17 | // +build !netbsd
18 |
19 | package afero
20 |
21 | import (
22 | "syscall"
23 | )
24 |
25 | const BADFD = syscall.EBADFD
26 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/lstater.go:
--------------------------------------------------------------------------------
1 | // Copyright © 2018 Steve Francia .
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | package afero
15 |
16 | import (
17 | "os"
18 | )
19 |
20 | // Lstater is an optional interface in Afero. It is only implemented by the
21 | // filesystems saying so.
22 | // It will call Lstat if the filesystem iself is, or it delegates to, the os filesystem.
23 | // Else it will call Stat.
24 | // In addtion to the FileInfo, it will return a boolean telling whether Lstat was called or not.
25 | type Lstater interface {
26 | LstatIfPossible(name string) (os.FileInfo, bool, error)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/afero/mem/dir.go:
--------------------------------------------------------------------------------
1 | // Copyright © 2014 Steve Francia .
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | // http://www.apache.org/licenses/LICENSE-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing, software
9 | // distributed under the License is distributed on an "AS IS" BASIS,
10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | // See the License for the specific language governing permissions and
12 | // limitations under the License.
13 |
14 | package mem
15 |
16 | type Dir interface {
17 | Len() int
18 | Names() []string
19 | Files() []*FileData
20 | Add(*FileData)
21 | Remove(*FileData)
22 | }
23 |
24 | func RemoveFromMemDir(dir *FileData, f *FileData) {
25 | dir.memDir.Remove(f)
26 | }
27 |
28 | func AddToMemDir(dir *FileData, f *FileData) {
29 | dir.memDir.Add(f)
30 | }
31 |
32 | func InitializeDir(d *FileData) {
33 | if d.memDir == nil {
34 | d.dir = true
35 | d.memDir = &DirMap{}
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 |
25 | *.bench
26 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: required
3 | go:
4 | - 1.7.5
5 | - 1.8
6 | - tip
7 | os:
8 | - linux
9 | matrix:
10 | allow_failures:
11 | - go: tip
12 | fast_finish: true
13 | script:
14 | - make check
15 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Steve Francia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cast/Makefile:
--------------------------------------------------------------------------------
1 | # A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
2 |
3 | .PHONY: check fmt lint test test-race vet test-cover-html help
4 | .DEFAULT_GOAL := help
5 |
6 | check: test-race fmt vet lint ## Run tests and linters
7 |
8 | test: ## Run tests
9 | go test ./...
10 |
11 | test-race: ## Run tests with race detector
12 | go test -race ./...
13 |
14 | fmt: ## Run gofmt linter
15 | @for d in `go list` ; do \
16 | if [ "`gofmt -l -s $$GOPATH/src/$$d | tee /dev/stderr`" ]; then \
17 | echo "^ improperly formatted go files" && echo && exit 1; \
18 | fi \
19 | done
20 |
21 | lint: ## Run golint linter
22 | @for d in `go list` ; do \
23 | if [ "`golint $$d | tee /dev/stderr`" ]; then \
24 | echo "^ golint errors!" && echo && exit 1; \
25 | fi \
26 | done
27 |
28 | vet: ## Run go vet linter
29 | @if [ "`go vet | tee /dev/stderr`" ]; then \
30 | echo "^ go vet errors!" && echo && exit 1; \
31 | fi
32 |
33 | test-cover-html: ## Generate test coverage report
34 | go test -coverprofile=coverage.out -covermode=count
35 | go tool cover -func=coverage.out
36 |
37 | help:
38 | @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
39 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | # Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
23 | # swap
24 | [._]*.s[a-w][a-z]
25 | [._]s[a-w][a-z]
26 | # session
27 | Session.vim
28 | # temporary
29 | .netrwhist
30 | *~
31 | # auto-generated tag files
32 | tags
33 |
34 | *.exe
35 |
36 | cobra.test
37 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.mailmap:
--------------------------------------------------------------------------------
1 | Steve Francia
2 | Bjørn Erik Pedersen
3 | Fabiano Franz
4 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | matrix:
4 | include:
5 | - go: 1.9.4
6 | - go: 1.10.0
7 | - go: tip
8 | allow_failures:
9 | - go: tip
10 |
11 | before_install:
12 | - mkdir -p bin
13 | - curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.3/shellcheck
14 | - chmod +x bin/shellcheck
15 | script:
16 | - PATH=$PATH:$PWD/bin go test -v ./...
17 | - go build
18 | - diff -u <(echo -n) <(gofmt -d -s .)
19 | - if [ -z $NOVET ]; then
20 | diff -u <(echo -n) <(go tool vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint');
21 | fi
22 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/command_notwin.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package cobra
4 |
5 | var preExecHookFn func(*Command)
6 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/command_win.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package cobra
4 |
5 | import (
6 | "os"
7 | "time"
8 |
9 | "github.com/inconshreveable/mousetrap"
10 | )
11 |
12 | var preExecHookFn = preExecHook
13 |
14 | func preExecHook(c *Command) {
15 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
16 | c.Print(MousetrapHelpText)
17 | time.Sleep(5 * time.Second)
18 | os.Exit(1)
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/jwalterweatherman/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/jwalterweatherman/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Steve Francia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/spf13/pflag/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/*
2 |
3 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/pflag/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: go
4 |
5 | go:
6 | - 1.7.3
7 | - 1.8.1
8 | - tip
9 |
10 | matrix:
11 | allow_failures:
12 | - go: tip
13 |
14 | install:
15 | - go get github.com/golang/lint/golint
16 | - export PATH=$GOPATH/bin:$PATH
17 | - go install ./...
18 |
19 | script:
20 | - verify/all.sh -v
21 | - go test ./...
22 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/viper/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.bench
--------------------------------------------------------------------------------
/vendor/github.com/spf13/viper/.travis.yml:
--------------------------------------------------------------------------------
1 | go_import_path: github.com/spf13/viper
2 |
3 | language: go
4 | go:
5 | - 1.7.x
6 | - 1.8.x
7 | - 1.9.x
8 | - tip
9 |
10 | os:
11 | - linux
12 | - osx
13 |
14 | matrix:
15 | allow_failures:
16 | - go: tip
17 | fast_finish: true
18 |
19 | script:
20 | - go install ./...
21 | - diff -u <(echo -n) <(gofmt -d .)
22 | - go test -v ./...
23 |
24 | after_success:
25 | - go get -u -d github.com/spf13/hugo
26 | - cd $GOPATH/src/github.com/spf13/hugo && make && ./hugo -s docs && cd -
27 |
28 | sudo: false
29 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/viper/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Steve Francia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/xuri/excelize/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | install:
4 | - go get -d -t -v ./... && go build -v ./...
5 |
6 | go:
7 | - 1.8.x
8 | - 1.9.x
9 |
10 | script:
11 | - go vet ./...
12 | - go test ./... -v -coverprofile=coverage.txt -covermode=atomic
13 |
14 | after_success:
15 | - bash <(curl -s https://codecov.io/bash)
16 |
--------------------------------------------------------------------------------
/vendor/github.com/xuri/excelize/excelize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/naiba-archived/proxy-in-a-box/6b8208f05b918054e49ff16301d28375171680b7/vendor/github.com/xuri/excelize/excelize.png
--------------------------------------------------------------------------------
/vendor/github.com/xuri/excelize/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/naiba-archived/proxy-in-a-box/6b8208f05b918054e49ff16301d28375171680b7/vendor/github.com/xuri/excelize/logo.png
--------------------------------------------------------------------------------
/vendor/github.com/xuri/excelize/xmlContentTypes.go:
--------------------------------------------------------------------------------
1 | package excelize
2 |
3 | import "encoding/xml"
4 |
5 | // xlsxTypes directly maps the types element of content types for relationship
6 | // parts, it takes a Multipurpose Internet Mail Extension (MIME) media type as a
7 | // value.
8 | type xlsxTypes struct {
9 | XMLName xml.Name `xml:"http://schemas.openxmlformats.org/package/2006/content-types Types"`
10 | Overrides []xlsxOverride `xml:"Override"`
11 | Defaults []xlsxDefault `xml:"Default"`
12 | }
13 |
14 | // xlsxOverride directly maps the override element in the namespace
15 | // http://schemas.openxmlformats.org/package/2006/content-types
16 | type xlsxOverride struct {
17 | PartName string `xml:",attr"`
18 | ContentType string `xml:",attr"`
19 | }
20 |
21 | // xlsxDefault directly maps the default element in the namespace
22 | // http://schemas.openxmlformats.org/package/2006/content-types
23 | type xlsxDefault struct {
24 | Extension string `xml:",attr"`
25 | ContentType string `xml:",attr"`
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for ARM, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-28
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm64,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for AMD64, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-56
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, DragonFly
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for AMD64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | CALL runtime·entersyscall(SB)
24 | MOVQ a1+8(FP), DI
25 | MOVQ a2+16(FP), SI
26 | MOVQ a3+24(FP), DX
27 | MOVQ $0, R10
28 | MOVQ $0, R8
29 | MOVQ $0, R9
30 | MOVQ trap+0(FP), AX // syscall entry
31 | SYSCALL
32 | MOVQ AX, r1+32(FP)
33 | MOVQ DX, r2+40(FP)
34 | CALL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVQ a1+8(FP), DI
45 | MOVQ a2+16(FP), SI
46 | MOVQ a3+24(FP), DX
47 | MOVQ $0, R10
48 | MOVQ $0, R8
49 | MOVQ $0, R9
50 | MOVQ trap+0(FP), AX // syscall entry
51 | SYSCALL
52 | MOVQ AX, r1+32(FP)
53 | MOVQ DX, r2+40(FP)
54 | RET
55 |
56 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16
57 | JMP syscall·gettimeofday(SB)
58 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
23 | BL runtime·entersyscall(SB)
24 | MOVW trap+0(FP), R7
25 | MOVW a1+4(FP), R0
26 | MOVW a2+8(FP), R1
27 | MOVW a3+12(FP), R2
28 | MOVW $0, R3
29 | MOVW $0, R4
30 | MOVW $0, R5
31 | SWI $0
32 | MOVW R0, r1+16(FP)
33 | MOVW $0, R0
34 | MOVW R0, r2+20(FP)
35 | BL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | B syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | B syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW trap+0(FP), R7 // syscall entry
46 | MOVW a1+4(FP), R0
47 | MOVW a2+8(FP), R1
48 | MOVW a3+12(FP), R2
49 | SWI $0
50 | MOVW R0, r1+16(FP)
51 | MOVW $0, R0
52 | MOVW R0, r2+20(FP)
53 | RET
54 |
55 | TEXT ·seek(SB),NOSPLIT,$0-28
56 | B syscall·seek(SB)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build arm64
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
21 | BL runtime·entersyscall(SB)
22 | MOVD a1+8(FP), R0
23 | MOVD a2+16(FP), R1
24 | MOVD a3+24(FP), R2
25 | MOVD $0, R3
26 | MOVD $0, R4
27 | MOVD $0, R5
28 | MOVD trap+0(FP), R8 // syscall entry
29 | SVC
30 | MOVD R0, r1+32(FP) // r1
31 | MOVD R1, r2+40(FP) // r2
32 | BL runtime·exitsyscall(SB)
33 | RET
34 |
35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
36 | B syscall·RawSyscall(SB)
37 |
38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
39 | B syscall·RawSyscall6(SB)
40 |
41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
42 | MOVD a1+8(FP), R0
43 | MOVD a2+16(FP), R1
44 | MOVD a3+24(FP), R2
45 | MOVD $0, R3
46 | MOVD $0, R4
47 | MOVD $0, R5
48 | MOVD trap+0(FP), R8 // syscall entry
49 | SVC
50 | MOVD R0, r1+32(FP)
51 | MOVD R1, r2+40(FP)
52 | RET
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips64 mips64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | JAL runtime·entersyscall(SB)
26 | MOVV a1+8(FP), R4
27 | MOVV a2+16(FP), R5
28 | MOVV a3+24(FP), R6
29 | MOVV R0, R7
30 | MOVV R0, R8
31 | MOVV R0, R9
32 | MOVV trap+0(FP), R2 // syscall entry
33 | SYSCALL
34 | MOVV R2, r1+32(FP)
35 | MOVV R3, r2+40(FP)
36 | JAL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | JMP syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | JMP syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVV a1+8(FP), R4
47 | MOVV a2+16(FP), R5
48 | MOVV a3+24(FP), R6
49 | MOVV R0, R7
50 | MOVV R0, R8
51 | MOVV R0, R9
52 | MOVV trap+0(FP), R2 // syscall entry
53 | SYSCALL
54 | MOVV R2, r1+32(FP)
55 | MOVV R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips mipsle
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-28
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
25 | JMP syscall·Syscall9(SB)
26 |
27 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
28 | JAL runtime·entersyscall(SB)
29 | MOVW a1+4(FP), R4
30 | MOVW a2+8(FP), R5
31 | MOVW a3+12(FP), R6
32 | MOVW R0, R7
33 | MOVW trap+0(FP), R2 // syscall entry
34 | SYSCALL
35 | MOVW R2, r1+16(FP) // r1
36 | MOVW R3, r2+20(FP) // r2
37 | JAL runtime·exitsyscall(SB)
38 | RET
39 |
40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
41 | JMP syscall·RawSyscall(SB)
42 |
43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
44 | JMP syscall·RawSyscall6(SB)
45 |
46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
47 | MOVW a1+4(FP), R4
48 | MOVW a2+8(FP), R5
49 | MOVW a3+12(FP), R6
50 | MOVW trap+0(FP), R2 // syscall entry
51 | SYSCALL
52 | MOVW R2, r1+16(FP)
53 | MOVW R3, r2+20(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64 ppc64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for ppc64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | BL runtime·entersyscall(SB)
26 | MOVD a1+8(FP), R3
27 | MOVD a2+16(FP), R4
28 | MOVD a3+24(FP), R5
29 | MOVD R0, R6
30 | MOVD R0, R7
31 | MOVD R0, R8
32 | MOVD trap+0(FP), R9 // syscall entry
33 | SYSCALL R9
34 | MOVD R3, r1+32(FP)
35 | MOVD R4, r2+40(FP)
36 | BL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | BR syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | BR syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVD a1+8(FP), R3
47 | MOVD a2+16(FP), R4
48 | MOVD a3+24(FP), R5
49 | MOVD R0, R6
50 | MOVD R0, R7
51 | MOVD R0, R8
52 | MOVD trap+0(FP), R9 // syscall entry
53 | SYSCALL R9
54 | MOVD R3, r1+32(FP)
55 | MOVD R4, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build s390x
6 | // +build linux
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for s390x, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | BL runtime·entersyscall(SB)
26 | MOVD a1+8(FP), R2
27 | MOVD a2+16(FP), R3
28 | MOVD a3+24(FP), R4
29 | MOVD $0, R5
30 | MOVD $0, R6
31 | MOVD $0, R7
32 | MOVD trap+0(FP), R1 // syscall entry
33 | SYSCALL
34 | MOVD R2, r1+32(FP)
35 | MOVD R3, r2+40(FP)
36 | BL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | BR syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | BR syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVD a1+8(FP), R2
47 | MOVD a2+16(FP), R3
48 | MOVD a3+24(FP), R4
49 | MOVD $0, R5
50 | MOVD $0, R6
51 | MOVD $0, R7
52 | MOVD trap+0(FP), R1 // syscall entry
53 | SYSCALL
54 | MOVD R2, r1+32(FP)
55 | MOVD R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 |
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | )
27 |
28 | // Socketoption Level
29 | const (
30 | SOL_BLUETOOTH = 0x112
31 | SOL_HCI = 0x0
32 | SOL_L2CAP = 0x6
33 | SOL_RFCOMM = 0x12
34 | SOL_SCO = 0x11
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Darwin's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a Darwin device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev >> 24) & 0xff)
13 | }
14 |
15 | // Minor returns the minor component of a Darwin device number.
16 | func Minor(dev uint64) uint32 {
17 | return uint32(dev & 0xffffff)
18 | }
19 |
20 | // Mkdev returns a Darwin device number generated from the given major and minor
21 | // components.
22 | func Mkdev(major, minor uint32) uint64 {
23 | return (uint64(major) << 24) | uint64(minor)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Dragonfly's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a DragonFlyBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a DragonFlyBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_freebsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in FreeBSD's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a FreeBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a FreeBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a FreeBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in NetBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a NetBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x000fff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dirent.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // ParseDirent parses up to max directory entries in buf,
12 | // appending the names to names. It returns the number of
13 | // bytes consumed from buf, the number of entries added
14 | // to names, and the new names slice.
15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
16 | return syscall.ParseDirent(buf, max, names)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build ppc64 s390x mips mips64
6 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
6 |
7 | package unix
8 |
9 | const isBigEndian = false
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64.
13 | var fcntl64Syscall uintptr = SYS_FCNTL
14 |
15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
18 | var err error
19 | if errno != 0 {
20 | err = errno
21 | }
22 | return int(valptr), err
23 | }
24 |
25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
28 | if errno == 0 {
29 | return nil
30 | }
31 | return errno
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // +build linux,386 linux,arm linux,mips linux,mipsle
2 |
3 | // Copyright 2014 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package unix
8 |
9 | func init() {
10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | fcntl64Syscall = SYS_FCNTL64
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_c.c:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | #define _STRINGIFY2_(x) #x
12 | #define _STRINGIFY_(x) _STRINGIFY2_(x)
13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
14 |
15 | // Call syscall from C code because the gccgo support for calling from
16 | // Go to C does not support varargs functions.
17 |
18 | struct ret {
19 | uintptr_t r;
20 | uintptr_t err;
21 | };
22 |
23 | struct ret
24 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
25 | {
26 | struct ret r;
27 |
28 | errno = 0;
29 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
30 | r.err = errno;
31 | return r;
32 | }
33 |
34 | uintptr_t
35 | gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
36 | {
37 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo,linux,amd64
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 |
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | r := realGettimeofday(tv, nil)
16 | if r < 0 {
17 | return syscall.GetErrno()
18 | }
19 | return 0
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 | # Copyright 2009 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 | #
6 | # Generate system call table for Darwin from sys/syscall.h
7 |
8 | use strict;
9 |
10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
11 | print STDERR "GOARCH or GOOS not defined in environment\n";
12 | exit 1;
13 | }
14 |
15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
16 |
17 | print <){
29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
30 | my $name = $1;
31 | my $num = $2;
32 | $name =~ y/a-z/A-Z/;
33 | print " SYS_$name = $num;"
34 | }
35 | }
36 |
37 | print <){
30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $2;
33 | my $name = "SYS_$3";
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <){
30 | if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $2;
33 | my $name = "SYS_$3";
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <){
31 | if($line =~ /^(.*)\\$/) {
32 | # Handle continuation
33 | $line = $1;
34 | $_ =~ s/^\s+//;
35 | $line .= $_;
36 | } else {
37 | # New line
38 | $line = $_;
39 | }
40 | next if $line =~ /\\$/;
41 | if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
42 | my $num = $1;
43 | my $proto = $6;
44 | my $compat = $8;
45 | my $name = "$7_$9";
46 |
47 | $name = "$7_$11" if $11 ne '';
48 | $name =~ y/a-z/A-Z/;
49 |
50 | if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') {
51 | print " $name = $num; // $proto\n";
52 | }
53 | }
54 | }
55 |
56 | print <){
30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $3;
33 | my $name = $4;
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <= 10 {
20 | buf[i] = byte(val%10 + '0')
21 | i--
22 | val /= 10
23 | }
24 | buf[i] = byte(val + '0')
25 | return string(buf[i:])
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,linux
6 | // +build !gccgo
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //go:noescape
13 | func gettimeofday(tv *Timeval) (err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo
6 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo,386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,386
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (cmsg *Cmsghdr) SetLen(length int) {
22 | cmsg.Len = uint32(length)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build !gccgo
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptracearm_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build arm arm64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsArm is the registers used by arm binaries.
11 | type PtraceRegsArm struct {
12 | Uregs [18]uint32
13 | }
14 |
15 | // PtraceGetRegsArm fetches the registers used by arm binaries.
16 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
17 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
18 | }
19 |
20 | // PtraceSetRegsArm sets the registers used by arm binaries.
21 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
22 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
23 | }
24 |
25 | // PtraceRegsArm64 is the registers used by arm64 binaries.
26 | type PtraceRegsArm64 struct {
27 | Regs [31]uint64
28 | Sp uint64
29 | Pc uint64
30 | Pstate uint64
31 | }
32 |
33 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
34 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
35 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
36 | }
37 |
38 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
39 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
40 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/collate/index.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package collate
6 |
7 | import "golang.org/x/text/internal/colltab"
8 |
9 | const blockSize = 64
10 |
11 | func getTable(t tableIndex) *colltab.Table {
12 | return &colltab.Table{
13 | Index: colltab.Trie{
14 | Index0: mainLookup[:][blockSize*t.lookupOffset:],
15 | Values0: mainValues[:][blockSize*t.valuesOffset:],
16 | Index: mainLookup[:],
17 | Values: mainValues[:],
18 | },
19 | ExpandElem: mainExpandElem[:],
20 | ContractTries: colltab.ContractTrieSet(mainCTEntries[:]),
21 | ContractElem: mainContractElem[:],
22 | MaxContractLen: 18,
23 | VariableTop: varTop,
24 | }
25 | }
26 |
27 | // tableIndex holds information for constructing a table
28 | // for a certain locale based on the main table.
29 | type tableIndex struct {
30 | lookupOffset uint32
31 | valuesOffset uint32
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/internal/colltab/weighter.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package colltab // import "golang.org/x/text/internal/colltab"
6 |
7 | // A Weighter can be used as a source for Collator and Searcher.
8 | type Weighter interface {
9 | // Start finds the start of the segment that includes position p.
10 | Start(p int, b []byte) int
11 |
12 | // StartString finds the start of the segment that includes position p.
13 | StartString(p int, s string) int
14 |
15 | // AppendNext appends Elems to buf corresponding to the longest match
16 | // of a single character or contraction from the start of s.
17 | // It returns the new buf and the number of bytes consumed.
18 | AppendNext(buf []Elem, s []byte) (ce []Elem, n int)
19 |
20 | // AppendNextString appends Elems to buf corresponding to the longest match
21 | // of a single character or contraction from the start of s.
22 | // It returns the new buf and the number of bytes consumed.
23 | AppendNextString(buf []Elem, s string) (ce []Elem, n int)
24 |
25 | // Domain returns a slice of all single characters and contractions for which
26 | // collation elements are defined in this table.
27 | Domain() []string
28 |
29 | // Top returns the highest variable primary value.
30 | Top() uint32
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2013 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | CLEANFILES+=maketables
6 |
7 | maketables: maketables.go
8 | go build $^
9 |
10 | tables: maketables
11 | ./maketables > tables.go
12 | gofmt -w -s tables.go
13 |
14 | # Build (but do not run) maketables during testing,
15 | # just to make sure it still compiles.
16 | testshort: maketables
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/common.go:
--------------------------------------------------------------------------------
1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
2 |
3 | package language
4 |
5 | // This file contains code common to the maketables.go and the package code.
6 |
7 | // langAliasType is the type of an alias in langAliasMap.
8 | type langAliasType int8
9 |
10 | const (
11 | langDeprecated langAliasType = iota
12 | langMacro
13 | langLegacy
14 |
15 | langAliasTypeUnknown langAliasType = -1
16 | )
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/gen_common.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build ignore
6 |
7 | package main
8 |
9 | // This file contains code common to the maketables.go and the package code.
10 |
11 | // langAliasType is the type of an alias in langAliasMap.
12 | type langAliasType int8
13 |
14 | const (
15 | langDeprecated langAliasType = iota
16 | langMacro
17 | langLegacy
18 |
19 | langAliasTypeUnknown langAliasType = -1
20 | )
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/go1_1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.2
6 |
7 | package language
8 |
9 | import "sort"
10 |
11 | func sortStable(s sort.Interface) {
12 | ss := stableSort{
13 | s: s,
14 | pos: make([]int, s.Len()),
15 | }
16 | for i := range ss.pos {
17 | ss.pos[i] = i
18 | }
19 | sort.Sort(&ss)
20 | }
21 |
22 | type stableSort struct {
23 | s sort.Interface
24 | pos []int
25 | }
26 |
27 | func (s *stableSort) Len() int {
28 | return len(s.pos)
29 | }
30 |
31 | func (s *stableSort) Less(i, j int) bool {
32 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j]
33 | }
34 |
35 | func (s *stableSort) Swap(i, j int) {
36 | s.s.Swap(i, j)
37 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i]
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/language/go1_2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.2
6 |
7 | package language
8 |
9 | import "sort"
10 |
11 | var sortStable = sort.Stable
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.10
6 |
7 | package bidirule
8 |
9 | func (t *Transformer) isFinal() bool {
10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.10
6 |
7 | package bidirule
8 |
9 | func (t *Transformer) isFinal() bool {
10 | if !t.isRTL() {
11 | return true
12 | }
13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/unicode/norm/trie.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package norm
6 |
7 | type valueRange struct {
8 | value uint16 // header: value:stride
9 | lo, hi byte // header: lo:n
10 | }
11 |
12 | type sparseBlocks struct {
13 | values []valueRange
14 | offset []uint16
15 | }
16 |
17 | var nfcSparse = sparseBlocks{
18 | values: nfcSparseValues[:],
19 | offset: nfcSparseOffset[:],
20 | }
21 |
22 | var nfkcSparse = sparseBlocks{
23 | values: nfkcSparseValues[:],
24 | offset: nfkcSparseOffset[:],
25 | }
26 |
27 | var (
28 | nfcData = newNfcTrie(0)
29 | nfkcData = newNfkcTrie(0)
30 | )
31 |
32 | // lookupValue determines the type of block n and looks up the value for b.
33 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block
34 | // is a list of ranges with an accompanying value. Given a matching range r,
35 | // the value for b is by r.value + (b - r.lo) * stride.
36 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 {
37 | offset := t.offset[n]
38 | header := t.values[offset]
39 | lo := offset + 1
40 | hi := lo + uint16(header.lo)
41 | for lo < hi {
42 | m := lo + (hi-lo)/2
43 | r := t.values[m]
44 | if r.lo <= b && b <= r.hi {
45 | return r.value + uint16(b-r.lo)*header.value
46 | }
47 | if b < r.lo {
48 | hi = m
49 | } else {
50 | lo = m + 1
51 | }
52 | }
53 | return 0
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/appengine/cloudsql/cloudsql_classic.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 Google Inc. All rights reserved.
2 | // Use of this source code is governed by the Apache 2.0
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build appengine
6 |
7 | package cloudsql
8 |
9 | import (
10 | "net"
11 |
12 | "appengine/cloudsql"
13 | )
14 |
15 | func connect(instance string) (net.Conn, error) {
16 | return cloudsql.Dial(instance)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/google.golang.org/appengine/cloudsql/cloudsql_vm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 Google Inc. All rights reserved.
2 | // Use of this source code is governed by the Apache 2.0
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !appengine
6 |
7 | package cloudsql
8 |
9 | import (
10 | "errors"
11 | "net"
12 | )
13 |
14 | func connect(instance string) (net.Conn, error) {
15 | return nil, errors.New(`cloudsql: not supported in App Engine "flexible environment"`)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.4
5 | - 1.5
6 | - 1.6
7 | - 1.7
8 | - 1.8
9 | - 1.9
10 | - tip
11 |
12 | go_import_path: gopkg.in/yaml.v2
13 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/LICENSE.libyaml:
--------------------------------------------------------------------------------
1 | The following files were ported to Go from C files of libyaml, and thus
2 | are still covered by their original copyright and license:
3 |
4 | apic.go
5 | emitterc.go
6 | parserc.go
7 | readerc.go
8 | scannerc.go
9 | writerc.go
10 | yamlh.go
11 | yamlprivateh.go
12 |
13 | Copyright (c) 2006 Kirill Simonov
14 |
15 | Permission is hereby granted, free of charge, to any person obtaining a copy of
16 | this software and associated documentation files (the "Software"), to deal in
17 | the Software without restriction, including without limitation the rights to
18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
19 | of the Software, and to permit persons to whom the Software is furnished to do
20 | so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all
23 | copies or substantial portions of the Software.
24 |
25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 | SOFTWARE.
32 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/NOTICE:
--------------------------------------------------------------------------------
1 | Copyright 2011-2016 Canonical Ltd.
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/go.mod:
--------------------------------------------------------------------------------
1 | module "gopkg.in/yaml.v2"
2 |
3 | require (
4 | "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405
5 | )
6 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/writerc.go:
--------------------------------------------------------------------------------
1 | package yaml
2 |
3 | // Set the writer error and return false.
4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool {
5 | emitter.error = yaml_WRITER_ERROR
6 | emitter.problem = problem
7 | return false
8 | }
9 |
10 | // Flush the output buffer.
11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool {
12 | if emitter.write_handler == nil {
13 | panic("write handler not set")
14 | }
15 |
16 | // Check if the buffer is empty.
17 | if emitter.buffer_pos == 0 {
18 | return true
19 | }
20 |
21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil {
22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error())
23 | }
24 | emitter.buffer_pos = 0
25 | return true
26 | }
27 |
--------------------------------------------------------------------------------