├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ ├── codeql-analysis.yml │ └── go.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── assets ├── bairesdev.png ├── biggopher.png ├── bulma.0.0.23.min.css ├── cooperpress.png ├── digitalocean.svg ├── dotcom-monitor-logo-brightGB.svg ├── favicon.ico ├── font-awesome │ ├── HELP-US-OUT.txt │ ├── css │ │ ├── font-awesome.css │ │ └── font-awesome.min.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── less │ │ ├── animated.less │ │ ├── bordered-pulled.less │ │ ├── core.less │ │ ├── fixed-width.less │ │ ├── font-awesome.less │ │ ├── icons.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── mixins.less │ │ ├── path.less │ │ ├── rotated-flipped.less │ │ ├── screen-reader.less │ │ ├── stacked.less │ │ └── variables.less │ └── scss │ │ ├── _animated.scss │ │ ├── _bordered-pulled.scss │ │ ├── _core.scss │ │ ├── _fixed-width.scss │ │ ├── _icons.scss │ │ ├── _larger.scss │ │ ├── _list.scss │ │ ├── _mixins.scss │ │ ├── _path.scss │ │ ├── _rotated-flipped.scss │ │ ├── _screen-reader.scss │ │ ├── _stacked.scss │ │ ├── _variables.scss │ │ └── font-awesome.scss ├── gopherhat.jpg ├── goreportcard.css └── templates │ ├── 404.html │ ├── about.html │ ├── base.html │ ├── high_scores.html │ ├── home.html │ ├── report.html │ └── supporters.html ├── check ├── check.go ├── check_test.go ├── errcheck.go ├── go_vet.go ├── gocyclo.go ├── gofmt.go ├── golint.go ├── grade.go ├── ineffassign.go ├── license.go ├── license_test.go ├── misspell.go ├── staticcheck.go ├── testdata │ ├── testfiles │ │ ├── Godeps │ │ │ ├── a.go │ │ │ ├── b.go │ │ │ └── c.go │ │ ├── LICENCE.txt │ │ ├── a.go │ │ ├── a.pb.go │ │ ├── a.pb.gw.go │ │ ├── b.go │ │ ├── c.go │ │ ├── d.go │ │ ├── testdata │ │ │ └── a.go │ │ ├── third_party │ │ │ ├── a.go │ │ │ ├── b.go │ │ │ └── c.go │ │ └── vendor │ │ │ ├── a.go │ │ │ ├── b.go │ │ │ └── c.go │ └── testrepo@v0.1.0 │ │ └── a.go ├── utils.go └── utils_test.go ├── cmd └── goreportcard-cli │ └── main.go ├── download ├── download.go ├── download_test.go ├── proxy.go └── proxy_test.go ├── go.mod ├── go.sum ├── handlers ├── about.go ├── badge.go ├── badge_test.go ├── check.go ├── checks.go ├── checks_test.go ├── error.go ├── grc.go ├── high_scores.go ├── home.go ├── report.go ├── score_heap.go ├── supporters.go └── templates.go ├── main.go ├── scripts ├── gofmt.sh └── make-install.sh ├── tools ├── clean-repos │ └── main.go ├── db │ └── main.go └── tools.go └── vendor ├── github.com ├── BurntSushi │ └── toml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── COMPATIBLE │ │ ├── COPYING │ │ ├── Makefile │ │ ├── README.md │ │ ├── decode.go │ │ ├── decode_meta.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── encoding_types.go │ │ ├── encoding_types_1.1.go │ │ ├── lex.go │ │ ├── parse.go │ │ ├── session.vim │ │ ├── type_check.go │ │ └── type_fields.go ├── DataDog │ └── zstd │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ZSTD_LICENSE │ │ ├── bitstream.h │ │ ├── compiler.h │ │ ├── cover.c │ │ ├── cover.h │ │ ├── cpu.h │ │ ├── debug.c │ │ ├── debug.h │ │ ├── divsufsort.c │ │ ├── divsufsort.h │ │ ├── entropy_common.c │ │ ├── error_private.c │ │ ├── error_private.h │ │ ├── errors.go │ │ ├── fastcover.c │ │ ├── fse.h │ │ ├── fse_compress.c │ │ ├── fse_decompress.c │ │ ├── hist.c │ │ ├── hist.h │ │ ├── huf.h │ │ ├── huf_compress.c │ │ ├── huf_decompress.c │ │ ├── mem.h │ │ ├── pool.c │ │ ├── pool.h │ │ ├── threading.c │ │ ├── threading.h │ │ ├── travis_test_32.sh │ │ ├── update.txt │ │ ├── xxhash.c │ │ ├── xxhash.h │ │ ├── zbuff.h │ │ ├── zbuff_common.c │ │ ├── zbuff_compress.c │ │ ├── zbuff_decompress.c │ │ ├── zdict.c │ │ ├── zdict.h │ │ ├── zstd.go │ │ ├── zstd.h │ │ ├── zstd_common.c │ │ ├── zstd_compress.c │ │ ├── zstd_compress_internal.h │ │ ├── zstd_compress_literals.c │ │ ├── zstd_compress_literals.h │ │ ├── zstd_compress_sequences.c │ │ ├── zstd_compress_sequences.h │ │ ├── zstd_compress_superblock.c │ │ ├── zstd_compress_superblock.h │ │ ├── zstd_ctx.go │ │ ├── zstd_cwksp.h │ │ ├── zstd_ddict.c │ │ ├── zstd_ddict.h │ │ ├── zstd_decompress.c │ │ ├── zstd_decompress_block.c │ │ ├── zstd_decompress_block.h │ │ ├── zstd_decompress_internal.h │ │ ├── zstd_deps.h │ │ ├── zstd_double_fast.c │ │ ├── zstd_double_fast.h │ │ ├── zstd_errors.h │ │ ├── zstd_fast.c │ │ ├── zstd_fast.h │ │ ├── zstd_internal.h │ │ ├── zstd_lazy.c │ │ ├── zstd_lazy.h │ │ ├── zstd_ldm.c │ │ ├── zstd_ldm.h │ │ ├── zstd_legacy.h │ │ ├── zstd_opt.c │ │ ├── zstd_opt.h │ │ ├── zstd_stream.go │ │ ├── zstd_v01.c │ │ ├── zstd_v01.h │ │ ├── zstd_v02.c │ │ ├── zstd_v02.h │ │ ├── zstd_v03.c │ │ ├── zstd_v03.h │ │ ├── zstd_v04.c │ │ ├── zstd_v04.h │ │ ├── zstd_v05.c │ │ ├── zstd_v05.h │ │ ├── zstd_v06.c │ │ ├── zstd_v06.h │ │ ├── zstd_v07.c │ │ ├── zstd_v07.h │ │ ├── zstdmt_compress.c │ │ └── zstdmt_compress.h ├── alecthomas │ ├── gometalinter │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── COPYING │ │ ├── README.md │ │ ├── checkstyle.go │ │ └── main.go │ ├── template │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── exec.go │ │ ├── funcs.go │ │ ├── helper.go │ │ ├── parse │ │ │ ├── lex.go │ │ │ ├── node.go │ │ │ └── parse.go │ │ └── template.go │ └── units │ │ ├── COPYING │ │ ├── README.md │ │ ├── bytes.go │ │ ├── doc.go │ │ ├── si.go │ │ └── util.go ├── beorn7 │ └── perks │ │ ├── LICENSE │ │ └── quantile │ │ ├── exampledata.txt │ │ └── stream.go ├── cespare │ └── xxhash │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── rotate.go │ │ ├── rotate19.go │ │ ├── v2 │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── xxhash.go │ │ ├── xxhash_amd64.go │ │ ├── xxhash_amd64.s │ │ ├── xxhash_other.go │ │ ├── xxhash_safe.go │ │ └── xxhash_unsafe.go │ │ ├── xxhash.go │ │ ├── xxhash_amd64.go │ │ ├── xxhash_amd64.s │ │ ├── xxhash_other.go │ │ ├── xxhash_safe.go │ │ └── xxhash_unsafe.go ├── client9 │ └── misspell │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── Dockerfile │ │ ├── Gopkg.lock │ │ ├── Gopkg.toml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── RELEASE-HOWTO.md │ │ ├── ascii.go │ │ ├── case.go │ │ ├── cmd │ │ └── misspell │ │ │ └── main.go │ │ ├── goreleaser.yml │ │ ├── install-misspell.sh │ │ ├── legal.go │ │ ├── mime.go │ │ ├── notwords.go │ │ ├── replace.go │ │ ├── stringreplacer.go │ │ ├── stringreplacer_test.gox │ │ ├── url.go │ │ └── words.go ├── dgraph-io │ ├── badger │ │ └── v2 │ │ │ ├── .deepsource.toml │ │ │ ├── .gitignore │ │ │ ├── .golangci.yml │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── VERSIONING.md │ │ │ ├── appveyor.yml │ │ │ ├── backup.go │ │ │ ├── batch.go │ │ │ ├── compaction.go │ │ │ ├── db.go │ │ │ ├── dir_unix.go │ │ │ ├── dir_windows.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── histogram.go │ │ │ ├── iterator.go │ │ │ ├── key_registry.go │ │ │ ├── level_handler.go │ │ │ ├── levels.go │ │ │ ├── logger.go │ │ │ ├── managed_db.go │ │ │ ├── manifest.go │ │ │ ├── merge.go │ │ │ ├── options.go │ │ │ ├── options │ │ │ └── options.go │ │ │ ├── pb │ │ │ ├── gen.sh │ │ │ ├── pb.pb.go │ │ │ └── pb.proto │ │ │ ├── publisher.go │ │ │ ├── skl │ │ │ ├── README.md │ │ │ ├── arena.go │ │ │ └── skl.go │ │ │ ├── stream.go │ │ │ ├── stream_writer.go │ │ │ ├── structs.go │ │ │ ├── table │ │ │ ├── README.md │ │ │ ├── builder.go │ │ │ ├── iterator.go │ │ │ ├── merge_iterator.go │ │ │ └── table.go │ │ │ ├── test.sh │ │ │ ├── trie │ │ │ └── trie.go │ │ │ ├── txn.go │ │ │ ├── util.go │ │ │ ├── value.go │ │ │ └── y │ │ │ ├── checksum.go │ │ │ ├── encrypt.go │ │ │ ├── error.go │ │ │ ├── event_log.go │ │ │ ├── file_dsync.go │ │ │ ├── file_nodsync.go │ │ │ ├── iterator.go │ │ │ ├── metrics.go │ │ │ ├── mmap.go │ │ │ ├── mmap_darwin.go │ │ │ ├── mmap_unix.go │ │ │ ├── mmap_windows.go │ │ │ ├── watermark.go │ │ │ ├── y.go │ │ │ ├── zstd_cgo.go │ │ │ └── zstd_nocgo.go │ └── ristretto │ │ ├── .deepsource.toml │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cache.go │ │ ├── policy.go │ │ ├── ring.go │ │ ├── sketch.go │ │ ├── store.go │ │ ├── ttl.go │ │ └── z │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bbloom.go │ │ ├── rtutil.go │ │ ├── rtutil.s │ │ └── z.go ├── dgryski │ └── go-farm │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── VERSION │ │ ├── basics.go │ │ ├── farmhashcc.go │ │ ├── farmhashmk.go │ │ ├── farmhashna.go │ │ ├── farmhashuo.go │ │ ├── farmhashxo.go │ │ ├── fp_amd64.s │ │ ├── fp_generic.go │ │ └── fp_stub.go ├── dustin │ └── go-humanize │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.markdown │ │ ├── big.go │ │ ├── bigbytes.go │ │ ├── bytes.go │ │ ├── comma.go │ │ ├── commaf.go │ │ ├── ftoa.go │ │ ├── humanize.go │ │ ├── number.go │ │ ├── ordinals.go │ │ ├── si.go │ │ └── times.go ├── fzipp │ └── gocyclo │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── analyze.go │ │ ├── cmd │ │ └── gocyclo │ │ │ └── main.go │ │ ├── complexity.go │ │ ├── directives.go │ │ └── stats.go ├── golang │ ├── protobuf │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── proto │ │ │ ├── buffer.go │ │ │ ├── defaults.go │ │ │ ├── deprecated.go │ │ │ ├── discard.go │ │ │ ├── extensions.go │ │ │ ├── properties.go │ │ │ ├── proto.go │ │ │ ├── registry.go │ │ │ ├── text_decode.go │ │ │ ├── text_encode.go │ │ │ ├── wire.go │ │ │ └── wrappers.go │ │ └── ptypes │ │ │ └── timestamp │ │ │ └── timestamp.pb.go │ └── snappy │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README │ │ ├── decode.go │ │ ├── decode_amd64.s │ │ ├── decode_arm64.s │ │ ├── decode_asm.go │ │ ├── decode_other.go │ │ ├── encode.go │ │ ├── encode_amd64.s │ │ ├── encode_arm64.s │ │ ├── encode_asm.go │ │ ├── encode_other.go │ │ └── snappy.go ├── google │ └── shlex │ │ ├── COPYING │ │ ├── README │ │ └── shlex.go ├── gordonklaus │ └── ineffassign │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bugs │ │ ├── ineffassign.go │ │ ├── list │ │ ├── liststd │ │ └── pkg │ │ └── ineffassign │ │ └── ineffassign.go ├── matttproud │ └── golang_protobuf_extensions │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── pbutil │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── decode.go │ │ ├── doc.go │ │ └── encode.go ├── pkg │ └── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ ├── go113.go │ │ └── stack.go └── prometheus │ ├── client_golang │ ├── LICENSE │ ├── NOTICE │ └── prometheus │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build_info_collector.go │ │ ├── collector.go │ │ ├── counter.go │ │ ├── desc.go │ │ ├── doc.go │ │ ├── expvar_collector.go │ │ ├── fnv.go │ │ ├── gauge.go │ │ ├── get_pid.go │ │ ├── get_pid_gopherjs.go │ │ ├── go_collector.go │ │ ├── go_collector_go116.go │ │ ├── go_collector_latest.go │ │ ├── histogram.go │ │ ├── internal │ │ ├── almost_equal.go │ │ ├── difflib.go │ │ ├── go_collector_options.go │ │ ├── go_runtime_metrics.go │ │ └── metric.go │ │ ├── labels.go │ │ ├── metric.go │ │ ├── num_threads.go │ │ ├── num_threads_gopherjs.go │ │ ├── observer.go │ │ ├── process_collector.go │ │ ├── process_collector_js.go │ │ ├── process_collector_other.go │ │ ├── process_collector_windows.go │ │ ├── promhttp │ │ ├── delegator.go │ │ ├── http.go │ │ ├── instrument_client.go │ │ ├── instrument_server.go │ │ └── option.go │ │ ├── registry.go │ │ ├── summary.go │ │ ├── timer.go │ │ ├── untyped.go │ │ ├── value.go │ │ ├── vec.go │ │ └── wrap.go │ ├── client_model │ ├── LICENSE │ ├── NOTICE │ └── go │ │ └── metrics.pb.go │ ├── common │ ├── LICENSE │ ├── NOTICE │ ├── expfmt │ │ ├── decode.go │ │ ├── encode.go │ │ ├── expfmt.go │ │ ├── fuzz.go │ │ ├── openmetrics_create.go │ │ ├── text_create.go │ │ └── text_parse.go │ ├── internal │ │ └── bitbucket.org │ │ │ └── ww │ │ │ └── goautoneg │ │ │ ├── README.txt │ │ │ └── autoneg.go │ └── model │ │ ├── alert.go │ │ ├── fingerprinting.go │ │ ├── fnv.go │ │ ├── labels.go │ │ ├── labelset.go │ │ ├── metric.go │ │ ├── model.go │ │ ├── signature.go │ │ ├── silence.go │ │ ├── time.go │ │ └── value.go │ └── procfs │ ├── .gitignore │ ├── .golangci.yml │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── MAINTAINERS.md │ ├── Makefile │ ├── Makefile.common │ ├── NOTICE │ ├── README.md │ ├── SECURITY.md │ ├── arp.go │ ├── buddyinfo.go │ ├── cmdline.go │ ├── cpuinfo.go │ ├── cpuinfo_armx.go │ ├── cpuinfo_mipsx.go │ ├── cpuinfo_others.go │ ├── cpuinfo_ppcx.go │ ├── cpuinfo_riscvx.go │ ├── cpuinfo_s390x.go │ ├── cpuinfo_x86.go │ ├── crypto.go │ ├── doc.go │ ├── fs.go │ ├── fscache.go │ ├── internal │ ├── fs │ │ └── fs.go │ └── util │ │ ├── parse.go │ │ ├── readfile.go │ │ ├── sysreadfile.go │ │ ├── sysreadfile_compat.go │ │ └── valueparser.go │ ├── ipvs.go │ ├── kernel_random.go │ ├── loadavg.go │ ├── mdstat.go │ ├── meminfo.go │ ├── mountinfo.go │ ├── mountstats.go │ ├── net_conntrackstat.go │ ├── net_dev.go │ ├── net_ip_socket.go │ ├── net_protocols.go │ ├── net_sockstat.go │ ├── net_softnet.go │ ├── net_tcp.go │ ├── net_udp.go │ ├── net_unix.go │ ├── net_xfrm.go │ ├── netstat.go │ ├── proc.go │ ├── proc_cgroup.go │ ├── proc_cgroups.go │ ├── proc_environ.go │ ├── proc_fdinfo.go │ ├── proc_io.go │ ├── proc_limits.go │ ├── proc_maps.go │ ├── proc_netstat.go │ ├── proc_ns.go │ ├── proc_psi.go │ ├── proc_smaps.go │ ├── proc_snmp.go │ ├── proc_snmp6.go │ ├── proc_stat.go │ ├── proc_status.go │ ├── proc_sys.go │ ├── schedstat.go │ ├── slab.go │ ├── softirqs.go │ ├── stat.go │ ├── swaps.go │ ├── ttar │ ├── vm.go │ └── zoneinfo.go ├── golang.org └── x │ ├── lint │ ├── .travis.yml │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── golint │ │ ├── golint.go │ │ ├── import.go │ │ └── importcomment.go │ └── lint.go │ ├── mod │ ├── LICENSE │ ├── PATENTS │ └── semver │ │ └── semver.go │ ├── net │ ├── LICENSE │ ├── PATENTS │ ├── internal │ │ └── timeseries │ │ │ └── timeseries.go │ └── trace │ │ ├── events.go │ │ ├── histogram.go │ │ └── trace.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ ├── execabs │ │ ├── execabs.go │ │ ├── execabs_go118.go │ │ └── execabs_go119.go │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_bsd_ppc64.s │ │ ├── asm_bsd_riscv64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── auxv.go │ │ ├── auxv_unsupported.go │ │ ├── bluetooth_linux.go │ │ ├── bpxsvc_zos.go │ │ ├── bpxsvc_zos.s │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_signed.go │ │ ├── ioctl_unsigned.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mmap_nomremap.go │ │ ├── mremap.go │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── sockcmsg_zos.go │ │ ├── symaddr_zos_s390x.s │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_freebsd_riscv64.go │ │ ├── syscall_hurd.go │ │ ├── syscall_hurd_386.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.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_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.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_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_libc.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_openbsd_ppc64.go │ │ ├── syscall_openbsd_riscv64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── vgetrandom_linux.go │ │ ├── vgetrandom_unsupported.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_freebsd_riscv64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_openbsd_ppc64.go │ │ ├── zerrors_openbsd_riscv64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsymaddr_zos_s390x.s │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_freebsd_riscv64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_386.s │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_amd64.s │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm.s │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_arm64.s │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_openbsd_mips64.s │ │ ├── zsyscall_openbsd_ppc64.go │ │ ├── zsyscall_openbsd_ppc64.s │ │ ├── zsyscall_openbsd_riscv64.go │ │ ├── zsyscall_openbsd_riscv64.s │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysctl_openbsd_ppc64.go │ │ ├── zsysctl_openbsd_riscv64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_freebsd_riscv64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_openbsd_ppc64.go │ │ ├── zsysnum_openbsd_riscv64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_freebsd_riscv64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_openbsd_ppc64.go │ │ ├── ztypes_openbsd_riscv64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── windows │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── setupapi_windows.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── types_windows_arm.go │ │ ├── types_windows_arm64.go │ │ ├── zerrors_windows.go │ │ ├── zknownfolderids_windows.go │ │ └── zsyscall_windows.go │ ├── tools │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── go │ │ ├── analysis │ │ │ ├── analysis.go │ │ │ ├── diagnostic.go │ │ │ ├── doc.go │ │ │ ├── passes │ │ │ │ └── inspect │ │ │ │ │ └── inspect.go │ │ │ └── validate.go │ │ ├── ast │ │ │ ├── astutil │ │ │ │ ├── enclosing.go │ │ │ │ ├── imports.go │ │ │ │ ├── rewrite.go │ │ │ │ └── util.go │ │ │ └── inspector │ │ │ │ ├── inspector.go │ │ │ │ └── typeof.go │ │ ├── buildutil │ │ │ ├── allpackages.go │ │ │ ├── fakecontext.go │ │ │ ├── overlay.go │ │ │ ├── tags.go │ │ │ └── util.go │ │ ├── gcexportdata │ │ │ ├── gcexportdata.go │ │ │ └── importer.go │ │ ├── internal │ │ │ ├── cgo │ │ │ │ ├── cgo.go │ │ │ │ └── cgo_pkgconfig.go │ │ │ ├── gcimporter │ │ │ │ ├── bexport.go │ │ │ │ ├── bimport.go │ │ │ │ ├── exportdata.go │ │ │ │ ├── gcimporter.go │ │ │ │ ├── iexport.go │ │ │ │ ├── iimport.go │ │ │ │ ├── newInterface10.go │ │ │ │ ├── newInterface11.go │ │ │ │ ├── support_go117.go │ │ │ │ └── support_go118.go │ │ │ └── packagesdriver │ │ │ │ └── sizes.go │ │ ├── loader │ │ │ ├── doc.go │ │ │ ├── loader.go │ │ │ └── util.go │ │ ├── packages │ │ │ ├── doc.go │ │ │ ├── external.go │ │ │ ├── golist.go │ │ │ ├── golist_overlay.go │ │ │ ├── loadmode_string.go │ │ │ ├── packages.go │ │ │ └── visit.go │ │ └── types │ │ │ ├── objectpath │ │ │ └── objectpath.go │ │ │ └── typeutil │ │ │ ├── callee.go │ │ │ ├── imports.go │ │ │ ├── map.go │ │ │ ├── methodsetcache.go │ │ │ └── ui.go │ └── internal │ │ ├── analysisinternal │ │ └── analysis.go │ │ ├── event │ │ ├── core │ │ │ ├── event.go │ │ │ ├── export.go │ │ │ └── fast.go │ │ ├── doc.go │ │ ├── event.go │ │ ├── keys │ │ │ ├── keys.go │ │ │ └── standard.go │ │ └── label │ │ │ └── label.go │ │ ├── gocommand │ │ ├── invoke.go │ │ ├── vendor.go │ │ └── version.go │ │ ├── lsp │ │ └── fuzzy │ │ │ ├── input.go │ │ │ ├── matcher.go │ │ │ └── symbol.go │ │ ├── packagesinternal │ │ └── packages.go │ │ ├── typeparams │ │ ├── common.go │ │ ├── enabled_go117.go │ │ ├── enabled_go118.go │ │ ├── normalize.go │ │ ├── termlist.go │ │ ├── typeparams_go117.go │ │ ├── typeparams_go118.go │ │ └── typeterm.go │ │ └── typesinternal │ │ ├── errorcode.go │ │ ├── errorcode_string.go │ │ ├── types.go │ │ └── types_118.go │ └── xerrors │ ├── LICENSE │ ├── PATENTS │ ├── README │ ├── adaptor.go │ ├── codereview.cfg │ ├── doc.go │ ├── errors.go │ ├── fmt.go │ ├── format.go │ ├── frame.go │ ├── internal │ └── internal.go │ └── wrap.go ├── google.golang.org └── protobuf │ ├── LICENSE │ ├── PATENTS │ ├── encoding │ ├── prototext │ │ ├── decode.go │ │ ├── doc.go │ │ └── encode.go │ └── protowire │ │ └── wire.go │ ├── internal │ ├── descfmt │ │ └── stringer.go │ ├── descopts │ │ └── options.go │ ├── detrand │ │ └── rand.go │ ├── editiondefaults │ │ ├── defaults.go │ │ └── editions_defaults.binpb │ ├── encoding │ │ ├── defval │ │ │ └── default.go │ │ ├── messageset │ │ │ └── messageset.go │ │ ├── tag │ │ │ └── tag.go │ │ └── text │ │ │ ├── decode.go │ │ │ ├── decode_number.go │ │ │ ├── decode_string.go │ │ │ ├── decode_token.go │ │ │ ├── doc.go │ │ │ └── encode.go │ ├── errors │ │ ├── errors.go │ │ ├── is_go112.go │ │ └── is_go113.go │ ├── filedesc │ │ ├── build.go │ │ ├── desc.go │ │ ├── desc_init.go │ │ ├── desc_lazy.go │ │ ├── desc_list.go │ │ ├── desc_list_gen.go │ │ ├── editions.go │ │ └── placeholder.go │ ├── filetype │ │ └── build.go │ ├── flags │ │ ├── flags.go │ │ ├── proto_legacy_disable.go │ │ └── proto_legacy_enable.go │ ├── genid │ │ ├── any_gen.go │ │ ├── api_gen.go │ │ ├── descriptor_gen.go │ │ ├── doc.go │ │ ├── duration_gen.go │ │ ├── empty_gen.go │ │ ├── field_mask_gen.go │ │ ├── go_features_gen.go │ │ ├── goname.go │ │ ├── map_entry.go │ │ ├── source_context_gen.go │ │ ├── struct_gen.go │ │ ├── timestamp_gen.go │ │ ├── type_gen.go │ │ ├── wrappers.go │ │ └── wrappers_gen.go │ ├── impl │ │ ├── api_export.go │ │ ├── checkinit.go │ │ ├── codec_extension.go │ │ ├── codec_field.go │ │ ├── codec_gen.go │ │ ├── codec_map.go │ │ ├── codec_map_go111.go │ │ ├── codec_map_go112.go │ │ ├── codec_message.go │ │ ├── codec_messageset.go │ │ ├── codec_reflect.go │ │ ├── codec_tables.go │ │ ├── codec_unsafe.go │ │ ├── convert.go │ │ ├── convert_list.go │ │ ├── convert_map.go │ │ ├── decode.go │ │ ├── encode.go │ │ ├── enum.go │ │ ├── extension.go │ │ ├── legacy_enum.go │ │ ├── legacy_export.go │ │ ├── legacy_extension.go │ │ ├── legacy_file.go │ │ ├── legacy_message.go │ │ ├── merge.go │ │ ├── merge_gen.go │ │ ├── message.go │ │ ├── message_reflect.go │ │ ├── message_reflect_field.go │ │ ├── message_reflect_gen.go │ │ ├── pointer_reflect.go │ │ ├── pointer_unsafe.go │ │ ├── validate.go │ │ └── weak.go │ ├── order │ │ ├── order.go │ │ └── range.go │ ├── pragma │ │ └── pragma.go │ ├── set │ │ └── ints.go │ ├── strs │ │ ├── strings.go │ │ ├── strings_pure.go │ │ ├── strings_unsafe_go120.go │ │ └── strings_unsafe_go121.go │ └── version │ │ └── version.go │ ├── proto │ ├── checkinit.go │ ├── decode.go │ ├── decode_gen.go │ ├── doc.go │ ├── encode.go │ ├── encode_gen.go │ ├── equal.go │ ├── extension.go │ ├── merge.go │ ├── messageset.go │ ├── proto.go │ ├── proto_methods.go │ ├── proto_reflect.go │ ├── reset.go │ ├── size.go │ ├── size_gen.go │ └── wrappers.go │ ├── reflect │ ├── protodesc │ │ ├── desc.go │ │ ├── desc_init.go │ │ ├── desc_resolve.go │ │ ├── desc_validate.go │ │ ├── editions.go │ │ └── proto.go │ ├── protoreflect │ │ ├── methods.go │ │ ├── proto.go │ │ ├── source.go │ │ ├── source_gen.go │ │ ├── type.go │ │ ├── value.go │ │ ├── value_equal.go │ │ ├── value_pure.go │ │ ├── value_union.go │ │ ├── value_unsafe_go120.go │ │ └── value_unsafe_go121.go │ └── protoregistry │ │ └── registry.go │ ├── runtime │ ├── protoiface │ │ ├── legacy.go │ │ └── methods.go │ └── protoimpl │ │ ├── impl.go │ │ └── version.go │ └── types │ ├── descriptorpb │ └── descriptor.pb.go │ ├── gofeaturespb │ ├── go_features.pb.go │ └── go_features.proto │ └── known │ └── timestamppb │ └── timestamp.pb.go ├── gopkg.in └── alecthomas │ └── kingpin.v2 │ ├── .travis.yml │ ├── COPYING │ ├── README.md │ ├── actions.go │ ├── app.go │ ├── args.go │ ├── cmd.go │ ├── completions.go │ ├── doc.go │ ├── envar.go │ ├── flags.go │ ├── global.go │ ├── guesswidth.go │ ├── guesswidth_unix.go │ ├── model.go │ ├── parser.go │ ├── parsers.go │ ├── templates.go │ ├── usage.go │ ├── values.go │ ├── values.json │ └── values_generated.go ├── honnef.co └── go │ └── tools │ ├── LICENSE │ ├── LICENSE-THIRD-PARTY │ ├── analysis │ ├── code │ │ ├── code.go │ │ └── visit.go │ ├── edit │ │ └── edit.go │ ├── facts │ │ ├── deprecated.go │ │ ├── directives.go │ │ ├── generated.go │ │ ├── nilness │ │ │ └── nilness.go │ │ ├── purity.go │ │ ├── token.go │ │ └── typedness │ │ │ └── typedness.go │ ├── lint │ │ └── lint.go │ └── report │ │ └── report.go │ ├── cmd │ └── staticcheck │ │ ├── README.md │ │ └── staticcheck.go │ ├── config │ ├── config.go │ └── example.conf │ ├── go │ ├── ast │ │ └── astutil │ │ │ └── util.go │ ├── ir │ │ ├── LICENSE │ │ ├── blockopt.go │ │ ├── builder.go │ │ ├── const.go │ │ ├── create.go │ │ ├── doc.go │ │ ├── dom.go │ │ ├── emit.go │ │ ├── exits.go │ │ ├── func.go │ │ ├── html.go │ │ ├── identical.go │ │ ├── identical_17.go │ │ ├── irutil │ │ │ ├── load.go │ │ │ ├── loops.go │ │ │ ├── stub.go │ │ │ ├── switch.go │ │ │ ├── terminates.go │ │ │ ├── util.go │ │ │ └── visit.go │ │ ├── lift.go │ │ ├── lvalue.go │ │ ├── methods.go │ │ ├── mode.go │ │ ├── print.go │ │ ├── sanity.go │ │ ├── source.go │ │ ├── ssa.go │ │ ├── staticcheck.conf │ │ ├── util.go │ │ ├── wrappers.go │ │ └── write.go │ ├── loader │ │ ├── buildid.go │ │ ├── hash.go │ │ ├── loader.go │ │ └── note.go │ └── types │ │ └── typeutil │ │ ├── callee.go │ │ ├── imports.go │ │ ├── methodsetcache.go │ │ ├── ui.go │ │ └── util.go │ ├── internal │ ├── cache │ │ ├── cache.go │ │ ├── default.go │ │ └── hash.go │ ├── go │ │ └── gcimporter │ │ │ ├── exportdata.go │ │ │ ├── gcimporter.go │ │ │ ├── iimport.go │ │ │ ├── newInterface10.go │ │ │ └── newInterface11.go │ ├── passes │ │ └── buildir │ │ │ └── buildir.go │ ├── renameio │ │ └── renameio.go │ ├── robustio │ │ ├── robustio.go │ │ ├── robustio_darwin.go │ │ ├── robustio_flaky.go │ │ ├── robustio_other.go │ │ └── robustio_windows.go │ ├── sharedcheck │ │ └── lint.go │ └── sync │ │ └── sync.go │ ├── knowledge │ ├── arg.go │ └── deprecated.go │ ├── lintcmd │ ├── cmd.go │ ├── directives.go │ ├── format.go │ ├── runner │ │ ├── runner.go │ │ └── stats.go │ ├── stats.go │ ├── stats_bsd.go │ ├── stats_posix.go │ └── version │ │ ├── buildinfo.go │ │ ├── buildinfo111.go │ │ └── version.go │ ├── pattern │ ├── convert.go │ ├── doc.go │ ├── fuzz.go │ ├── lexer.go │ ├── match.go │ ├── parser.go │ └── pattern.go │ ├── printf │ ├── fuzz.go │ └── printf.go │ ├── simple │ ├── analysis.go │ ├── doc.go │ └── lint.go │ ├── staticcheck │ ├── analysis.go │ ├── buildtag.go │ ├── doc.go │ ├── lint.go │ ├── rules.go │ └── structtag.go │ ├── stylecheck │ ├── analysis.go │ ├── doc.go │ ├── lint.go │ └── names.go │ └── unused │ ├── edge.go │ ├── edgekind_string.go │ ├── implements.go │ ├── typemap │ ├── identical.go │ └── map.go │ └── unused.go └── modules.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | assets/* linguist-vendored 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: goreportcard 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/workflows/go.yml: -------------------------------------------------------------------------------- 1 | name: Go 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v4 11 | 12 | - name: Set up Go 13 | uses: actions/setup-go@v5 14 | with: 15 | go-version: '1.24.x' 16 | 17 | - name: Install 18 | run: make install 19 | 20 | - name: Lint 21 | run: make lint 22 | 23 | - name: Test 24 | run: go test ./... 25 | -------------------------------------------------------------------------------- /.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 | 26 | *.swp 27 | *.DS_Store 28 | _repos 29 | 30 | goreportcard.db 31 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.16.3-alpine 2 | 3 | RUN apk add --update --no-cache git make \ 4 | && go get golang.org/x/tools/go/vcs 5 | 6 | RUN apk add build-base 7 | 8 | COPY . $GOPATH/src/github.com/gojp/goreportcard 9 | 10 | WORKDIR $GOPATH/src/github.com/gojp/goreportcard 11 | 12 | RUN ./scripts/make-install.sh 13 | 14 | EXPOSE 8000 15 | 16 | CMD ["make", "start"] 17 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: lint build test 2 | 3 | build: 4 | go build ./... 5 | 6 | install: 7 | ./scripts/make-install.sh 8 | 9 | lint: fmt vet staticcheck misspell 10 | 11 | fmt: 12 | ./scripts/gofmt.sh 13 | 14 | vet: 15 | go vet ./check ./cmd/... ./download ./handlers ./tools/... 16 | go vet ./main.go 17 | 18 | staticcheck: 19 | @[ -x "$(shell which staticcheck)" ] || go install honnef.co/go/tools/cmd/staticcheck@master 20 | staticcheck ./... 21 | 22 | test: 23 | go test -cover ./... 24 | 25 | start: 26 | go run main.go 27 | 28 | misspell: 29 | @[ -x "$(shell which misspell)" ] || go install ./vendor/github.com/client9/misspell/cmd/misspell 30 | find . -name '*.go' -not -path './vendor/*' -not -path './_repos/*' -not -path './download/test_downloads/*' -not -path './check/testdata/*' | xargs misspell -error 31 | -------------------------------------------------------------------------------- /assets/bairesdev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/bairesdev.png -------------------------------------------------------------------------------- /assets/biggopher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/biggopher.png -------------------------------------------------------------------------------- /assets/cooperpress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/cooperpress.png -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/favicon.ico -------------------------------------------------------------------------------- /assets/font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /assets/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /assets/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /assets/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /assets/font-awesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /assets/font-awesome/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /assets/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /assets/font-awesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /assets/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /assets/font-awesome/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /assets/font-awesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /assets/font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /assets/font-awesome/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /assets/font-awesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /assets/font-awesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /assets/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /assets/gopherhat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/assets/gopherhat.jpg -------------------------------------------------------------------------------- /assets/templates/about.html: -------------------------------------------------------------------------------- 1 | [[ define "content" ]] 2 |
3 |
4 |

About

5 |

Go Report Card was initially developed during Gopher Gala 2015. It is free, open source and run by volunteers. If you feel like there is something that could be improved, we encourage you to open an issue or contribute on GitHub!

6 |
7 |

Credits

8 |

The Go gopher on the home page was designed by Renée French.

9 |

Go Report Card relies on the excellent Go Meta Linter tool.

10 |
11 |
12 | [[ end ]] 13 | -------------------------------------------------------------------------------- /assets/templates/supporters.html: -------------------------------------------------------------------------------- 1 | [[ define "content" ]] 2 |
3 |
4 |

Supporters

5 | 16 |
17 |
18 | [[ end ]] 19 | -------------------------------------------------------------------------------- /check/check_test.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestRun(t *testing.T) { 8 | cr, err := Run("testdata/testrepo@v0.1.0", false) 9 | if err != nil { 10 | t.Fatal(err) 11 | } 12 | 13 | if cr.Issues != 2 { 14 | t.Errorf("got cr.Issues = %d, want %d", cr.Issues, 2) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /check/errcheck.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | // ErrCheck is the check for the errcheck command 4 | type ErrCheck struct { 5 | Dir string 6 | Filenames []string 7 | } 8 | 9 | // Name returns the name of the display name of the command 10 | func (c ErrCheck) Name() string { 11 | return "errcheck" 12 | } 13 | 14 | // Weight returns the weight this check has in the overall average 15 | func (c ErrCheck) Weight() float64 { 16 | return .15 17 | } 18 | 19 | // Percentage returns the percentage of .go files that pass gofmt 20 | func (c ErrCheck) Percentage() (float64, []FileSummary, error) { 21 | return GoTool(c.Dir, c.Filenames, []string{"gometalinter", "--deadline=180s", "--disable-all", "--linter='errch:errcheck {path}:PATH:LINE:MESSAGE'", "--enable=errch"}) 22 | } 23 | 24 | // Description returns the description of gofmt 25 | func (c ErrCheck) Description() string { 26 | return `errcheck finds unchecked errors in go programs` 27 | } 28 | -------------------------------------------------------------------------------- /check/go_vet.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | // GoVet is the check for the go vet command 4 | type GoVet struct { 5 | Dir string 6 | Filenames []string 7 | } 8 | 9 | // Name returns the name of the display name of the command 10 | func (g GoVet) Name() string { 11 | return "go_vet" 12 | } 13 | 14 | // Weight returns the weight this check has in the overall average 15 | func (g GoVet) Weight() float64 { 16 | return .30 17 | } 18 | 19 | // Percentage returns the percentage of .go files that pass go vet 20 | func (g GoVet) Percentage() (float64, []FileSummary, error) { 21 | return GoTool(g.Dir, g.Filenames, []string{"gometalinter", "--deadline=180s", "--disable-all", "--enable=vet"}) 22 | } 23 | 24 | // Description returns the description of go lint 25 | func (g GoVet) Description() string { 26 | return `go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.` 27 | } 28 | -------------------------------------------------------------------------------- /check/gofmt.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | // GoFmt is the check for the go fmt command 4 | type GoFmt struct { 5 | Dir string 6 | Filenames []string 7 | } 8 | 9 | // Name returns the name of the display name of the command 10 | func (g GoFmt) Name() string { 11 | return "gofmt" 12 | } 13 | 14 | // Weight returns the weight this check has in the overall average 15 | func (g GoFmt) Weight() float64 { 16 | return .30 17 | } 18 | 19 | // Percentage returns the percentage of .go files that pass gofmt 20 | func (g GoFmt) Percentage() (float64, []FileSummary, error) { 21 | return GoTool(g.Dir, g.Filenames, []string{"gometalinter", "--deadline=180s", "--disable-all", "--enable=gofmt"}) 22 | // return GoFmtNative(g.Dir, g.Filenames) 23 | } 24 | 25 | // Description returns the description of gofmt 26 | func (g GoFmt) Description() string { 27 | return `Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command` 28 | } 29 | -------------------------------------------------------------------------------- /check/golint.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | // GoLint is the check for the go lint command 4 | type GoLint struct { 5 | Dir string 6 | Filenames []string 7 | } 8 | 9 | // Name returns the name of the display name of the command 10 | func (g GoLint) Name() string { 11 | return "golint" 12 | } 13 | 14 | // Weight returns the weight this check has in the overall average 15 | func (g GoLint) Weight() float64 { 16 | return .10 17 | } 18 | 19 | // Percentage returns the percentage of .go files that pass golint 20 | func (g GoLint) Percentage() (float64, []FileSummary, error) { 21 | return GoTool(g.Dir, g.Filenames, []string{"gometalinter", "--deadline=180s", "--disable-all", "--enable=golint", "--min-confidence=0.85", "--vendor"}) 22 | } 23 | 24 | // Description returns the description of go lint 25 | func (g GoLint) Description() string { 26 | return `Golint is a linter for Go source code.` 27 | } 28 | -------------------------------------------------------------------------------- /check/grade.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | // Grade represents a grade returned by the server, which is normally 4 | // somewhere between A+ (highest) and F (lowest). 5 | type Grade string 6 | 7 | // The Grade constants below indicate the current available 8 | // grades. 9 | const ( 10 | GradeAPlus = "A+" 11 | GradeA = "A" 12 | GradeB = "B" 13 | GradeC = "C" 14 | GradeD = "D" 15 | GradeE = "E" 16 | GradeF = "F" 17 | ) 18 | 19 | // GradeFromPercentage gets the Grade for a percentage 20 | func GradeFromPercentage(percentage float64) Grade { 21 | switch { 22 | case percentage > 90: 23 | return GradeAPlus 24 | case percentage > 80: 25 | return GradeA 26 | case percentage > 70: 27 | return GradeB 28 | case percentage > 60: 29 | return GradeC 30 | case percentage > 50: 31 | return GradeD 32 | case percentage > 40: 33 | return GradeE 34 | default: 35 | return GradeF 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /check/ineffassign.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | // IneffAssign is the check for the ineffassign command 4 | type IneffAssign struct { 5 | Dir string 6 | Filenames []string 7 | } 8 | 9 | // Name returns the name of the display name of the command 10 | func (g IneffAssign) Name() string { 11 | return "ineffassign" 12 | } 13 | 14 | // Weight returns the weight this check has in the overall average 15 | func (g IneffAssign) Weight() float64 { 16 | return 0.10 17 | } 18 | 19 | // Percentage returns the percentage of .go files that pass gofmt 20 | func (g IneffAssign) Percentage() (float64, []FileSummary, error) { 21 | return GoTool(g.Dir, g.Filenames, []string{"gometalinter", "--deadline=180s", "--disable-all", "--enable=ineffassign"}) 22 | } 23 | 24 | // Description returns the description of IneffAssign 25 | func (g IneffAssign) Description() string { 26 | return `IneffAssign detects ineffectual assignments in Go code.` 27 | } 28 | -------------------------------------------------------------------------------- /check/license_test.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | import "testing" 4 | 5 | func TestPercentage(t *testing.T) { 6 | g := License{"testdata/testfiles", []string{}} 7 | p, _, err := g.Percentage() 8 | if err != nil { 9 | t.Fatal(err) 10 | } 11 | if p != 1.0 { 12 | t.Errorf("License check failed") 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /check/misspell.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | // Misspell is the check for the misspell command 4 | type Misspell struct { 5 | Dir string 6 | Filenames []string 7 | } 8 | 9 | // Name returns the name of the display name of the command 10 | func (g Misspell) Name() string { 11 | return "misspell" 12 | } 13 | 14 | // Weight returns the weight this check has in the overall average 15 | func (g Misspell) Weight() float64 { 16 | return 0.0 17 | } 18 | 19 | // Percentage returns the percentage of .go files that pass gofmt 20 | func (g Misspell) Percentage() (float64, []FileSummary, error) { 21 | return GoTool(g.Dir, g.Filenames, []string{"gometalinter", "--deadline=180s", "--disable-all", "--enable=misspell"}) 22 | } 23 | 24 | // Description returns the description of Misspell 25 | func (g Misspell) Description() string { 26 | return `Misspell Finds commonly misspelled English words` 27 | } 28 | -------------------------------------------------------------------------------- /check/staticcheck.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | // Staticcheck is the check for the staticcheck command 4 | type Staticcheck struct { 5 | Dir string 6 | Filenames []string 7 | } 8 | 9 | // Name returns the name of the display name of the command 10 | func (g Staticcheck) Name() string { 11 | return "staticcheck" 12 | } 13 | 14 | // Weight returns the weight this check has in the overall average 15 | func (g Staticcheck) Weight() float64 { 16 | return 0.15 17 | } 18 | 19 | // Percentage returns the percentage of .go files that pass 20 | func (g Staticcheck) Percentage() (float64, []FileSummary, error) { 21 | return GoTool(g.Dir, g.Filenames, []string{"gometalinter", "--deadline=180s", "--disable-all", "--enable=staticcheck"}) 22 | } 23 | 24 | // Description returns the description of Staticcheck 25 | func (g Staticcheck) Description() string { 26 | return `Staticcheck finds bugs, performance issues, and more` 27 | } 28 | -------------------------------------------------------------------------------- /check/testdata/testfiles/Godeps/a.go: -------------------------------------------------------------------------------- 1 | package godeps 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/Godeps/b.go: -------------------------------------------------------------------------------- 1 | package godeps 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/Godeps/c.go: -------------------------------------------------------------------------------- 1 | package godeps 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/LICENCE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/check/testdata/testfiles/LICENCE.txt -------------------------------------------------------------------------------- /check/testdata/testfiles/a.go: -------------------------------------------------------------------------------- 1 | package testfiles 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/a.pb.go: -------------------------------------------------------------------------------- 1 | package testfiles 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/a.pb.gw.go: -------------------------------------------------------------------------------- 1 | package testfiles 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/b.go: -------------------------------------------------------------------------------- 1 | package testfiles 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/c.go: -------------------------------------------------------------------------------- 1 | package testfiles 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/d.go: -------------------------------------------------------------------------------- 1 | package testfiles 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | ) 7 | 8 | func foo() { 9 | a := time.Now() 10 | b := a.Sub(time.Now()) 11 | fmt.Println(a, b) 12 | } 13 | -------------------------------------------------------------------------------- /check/testdata/testfiles/testdata/a.go: -------------------------------------------------------------------------------- 1 | package testdata 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/third_party/a.go: -------------------------------------------------------------------------------- 1 | package thirdparty 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/third_party/b.go: -------------------------------------------------------------------------------- 1 | package thirdparty 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/third_party/c.go: -------------------------------------------------------------------------------- 1 | package thirdparty 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/vendor/a.go: -------------------------------------------------------------------------------- 1 | package vendor 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/vendor/b.go: -------------------------------------------------------------------------------- 1 | package vendor 2 | -------------------------------------------------------------------------------- /check/testdata/testfiles/vendor/c.go: -------------------------------------------------------------------------------- 1 | package vendor 2 | -------------------------------------------------------------------------------- /check/testdata/testrepo@v0.1.0/a.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | // obivous typo 7 | fmt.Println("invalid %s") 8 | } 9 | -------------------------------------------------------------------------------- /download/download.go: -------------------------------------------------------------------------------- 1 | package download 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // Clean trims any URL parts, like the scheme or username, that might be present 8 | // in a user-submitted URL 9 | func Clean(path string) string { 10 | return trimUsername(trimScheme(path)) 11 | } 12 | 13 | // trimScheme removes a scheme (e.g. https://) from the URL for more 14 | // convenient pasting from browsers. 15 | func trimScheme(repo string) string { 16 | schemeSep := "://" 17 | schemeSepIdx := strings.Index(repo, schemeSep) 18 | if schemeSepIdx > -1 { 19 | return repo[schemeSepIdx+len(schemeSep):] 20 | } 21 | 22 | return repo 23 | } 24 | 25 | // trimUsername removes the username for a URL, if it is present 26 | func trimUsername(repo string) string { 27 | usernameSep := "@" 28 | usernameSepIdx := strings.Index(repo, usernameSep) 29 | if usernameSepIdx > -1 { 30 | return repo[usernameSepIdx+len(usernameSep):] 31 | } 32 | 33 | return repo 34 | } 35 | -------------------------------------------------------------------------------- /download/download_test.go: -------------------------------------------------------------------------------- 1 | package download 2 | 3 | import "testing" 4 | 5 | func TestClean(t *testing.T) { 6 | cases := []struct { 7 | path string 8 | want string 9 | }{ 10 | {"github.com/foo/bar", "github.com/foo/bar"}, 11 | {"https://github.com/foo/bar", "github.com/foo/bar"}, 12 | {"https://user@github.com/foo/bar", "github.com/foo/bar"}, 13 | {"github.com/foo/bar/v2", "github.com/foo/bar/v2"}, 14 | {"https://github.com/foo/bar/v2", "github.com/foo/bar/v2"}, 15 | {"https://user@github.com/foo/bar/v2", "github.com/foo/bar/v2"}, 16 | } 17 | 18 | for _, tt := range cases { 19 | got := Clean(tt.path) 20 | 21 | if got != tt.want { 22 | t.Errorf("Clean(%q) = %q, want %q", tt.path, got, tt.want) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /handlers/about.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | ) 7 | 8 | // AboutHandler handles the about page 9 | func (gh *GRCHandler) AboutHandler(w http.ResponseWriter, r *http.Request) { 10 | t, err := gh.loadTemplate("templates/about.html") 11 | if err != nil { 12 | log.Println("ERROR: could not get about template: ", err) 13 | http.Error(w, err.Error(), 500) 14 | return 15 | } 16 | 17 | if err := t.ExecuteTemplate(w, "base", map[string]interface{}{ 18 | "google_analytics_key": googleAnalyticsKey, 19 | }); err != nil { 20 | log.Println("ERROR:", err) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /handlers/checks_test.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | import "testing" 4 | 5 | var dirNameTests = []struct { 6 | url string 7 | ver string 8 | want string 9 | }{ 10 | {"github.com/foo/bar", "v0.1.0", "_repos/src/github.com/foo/bar@v0.1.0"}, 11 | } 12 | 13 | func TestDirName(t *testing.T) { 14 | for _, tt := range dirNameTests { 15 | if got := dirName(tt.url, tt.ver); got != tt.want { 16 | t.Errorf("dirName(%q, %q) = %q, want %q", tt.url, tt.ver, got, tt.want) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /handlers/error.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | ) 7 | 8 | func (gh *GRCHandler) errorHandler(w http.ResponseWriter, r *http.Request, status int) { 9 | w.WriteHeader(status) 10 | if status == http.StatusNotFound { 11 | t, err := gh.loadTemplate("/templates/404.html") 12 | if err != nil { 13 | log.Println("ERROR: could not get 404 template: ", err) 14 | http.Error(w, err.Error(), 500) 15 | return 16 | } 17 | 18 | if err := t.ExecuteTemplate(w, "base", nil); err != nil { 19 | log.Println("ERROR:", err) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /handlers/grc.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | import "net/http" 4 | 5 | // GRCHandler contains fields shared among the different handlers 6 | type GRCHandler struct { 7 | AssetsFS http.FileSystem 8 | } 9 | -------------------------------------------------------------------------------- /handlers/score_heap.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | type scoreItem struct { 4 | Repo string `json:"repo"` 5 | Score float64 `json:"score"` 6 | Files int `json:"files"` 7 | } 8 | 9 | // An ScoreHeap is a min-heap of ints. 10 | type ScoreHeap []scoreItem 11 | 12 | func (h ScoreHeap) Len() int { return len(h) } 13 | func (h ScoreHeap) Less(i, j int) bool { return h[i].Score < h[j].Score } 14 | func (h ScoreHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] } 15 | 16 | // Push onto the heap 17 | func (h *ScoreHeap) Push(x interface{}) { 18 | // Push and Pop use pointer receivers because they modify the slice's length, 19 | // not just its contents. 20 | *h = append(*h, x.(scoreItem)) 21 | } 22 | 23 | // Pop item off of the heap 24 | func (h *ScoreHeap) Pop() interface{} { 25 | old := *h 26 | n := len(old) 27 | x := old[n-1] 28 | *h = old[0 : n-1] 29 | return x 30 | } 31 | -------------------------------------------------------------------------------- /handlers/supporters.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | ) 7 | 8 | // SupportersHandler handles the supporters page 9 | func (gh *GRCHandler) SupportersHandler(w http.ResponseWriter, r *http.Request) { 10 | t, err := gh.loadTemplate("/templates/supporters.html") 11 | if err != nil { 12 | log.Println("ERROR: could not get supporters template: ", err) 13 | http.Error(w, err.Error(), 500) 14 | return 15 | } 16 | 17 | if err := t.ExecuteTemplate(w, "base", map[string]interface{}{ 18 | "google_analytics_key": googleAnalyticsKey, 19 | }); err != nil { 20 | log.Println("ERROR:", err) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /scripts/gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | need_gofmt=$(gofmt -s -l `find . -name '*.go' | grep -v vendor | grep -v _repos | grep -v testrepo`) 4 | 5 | if [[ -n ${need_gofmt} ]]; then 6 | echo "These files fail gofmt -s:" 7 | echo "${need_gofmt}" 8 | exit 1 9 | fi 10 | 11 | 12 | -------------------------------------------------------------------------------- /scripts/make-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | go install ./vendor/github.com/alecthomas/gometalinter 4 | 5 | go install ./vendor/golang.org/x/lint/golint 6 | go install ./vendor/github.com/fzipp/gocyclo/cmd/gocyclo 7 | go install ./vendor/github.com/gordonklaus/ineffassign 8 | go install ./vendor/github.com/client9/misspell/cmd/misspell 9 | -------------------------------------------------------------------------------- /tools/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | package tools 5 | 6 | import ( 7 | _ "github.com/alecthomas/gometalinter" 8 | _ "github.com/client9/misspell/cmd/misspell" 9 | _ "github.com/fzipp/gocyclo/cmd/gocyclo" 10 | _ "github.com/gordonklaus/ineffassign" 11 | _ "golang.org/x/lint/golint" 12 | _ "honnef.co/go/tools/cmd/staticcheck" 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | tags 3 | .*.swp 4 | tomlcheck/tomlcheck 5 | toml.test 6 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - tip 10 | install: 11 | - go install ./... 12 | - go get github.com/BurntSushi/toml-test 13 | script: 14 | - export PATH="$PATH:$HOME/gopath/bin" 15 | - make test 16 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/COMPATIBLE: -------------------------------------------------------------------------------- 1 | Compatible with TOML version 2 | [v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md) 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | go install ./... 3 | 4 | test: install 5 | go test -v 6 | toml-test toml-test-decoder 7 | toml-test -encoder toml-test-encoder 8 | 9 | fmt: 10 | gofmt -w *.go */*.go 11 | colcheck *.go */*.go 12 | 13 | tags: 14 | find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS 15 | 16 | push: 17 | git push origin master 18 | git push github master 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package toml 4 | 5 | // In order to support Go 1.1, we define our own TextMarshaler and 6 | // TextUnmarshaler types. For Go 1.2+, we just alias them with the 7 | // standard library interfaces. 8 | 9 | import ( 10 | "encoding" 11 | ) 12 | 13 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 14 | // so that Go 1.1 can be supported. 15 | type TextMarshaler encoding.TextMarshaler 16 | 17 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 18 | // here so that Go 1.1 can be supported. 19 | type TextUnmarshaler encoding.TextUnmarshaler 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types_1.1.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package toml 4 | 5 | // These interfaces were introduced in Go 1.2, so we add them manually when 6 | // compiling for Go 1.1. 7 | 8 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 9 | // so that Go 1.1 can be supported. 10 | type TextMarshaler interface { 11 | MarshalText() (text []byte, err error) 12 | } 13 | 14 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 15 | // here so that Go 1.1 can be supported. 16 | type TextUnmarshaler interface { 17 | UnmarshalText(text []byte) error 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/session.vim: -------------------------------------------------------------------------------- 1 | au BufWritePost *.go silent!make tags > /dev/null 2>&1 2 | -------------------------------------------------------------------------------- /vendor/github.com/DataDog/zstd/debug.c: -------------------------------------------------------------------------------- 1 | /* ****************************************************************** 2 | * debug 3 | * Part of FSE library 4 | * Copyright (c) 2013-2020, Yann Collet, Facebook, Inc. 5 | * 6 | * You can contact the author at : 7 | * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy 8 | * 9 | * This source code is licensed under both the BSD-style license (found in the 10 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 11 | * in the COPYING file in the root directory of this source tree). 12 | * You may select, at your option, one of the above-listed licenses. 13 | ****************************************************************** */ 14 | 15 | 16 | /* 17 | * This module only hosts one global variable 18 | * which can be used to dynamically influence the verbosity of traces, 19 | * such as DEBUGLOG and RAWLOG 20 | */ 21 | 22 | #include "debug.h" 23 | 24 | int g_debuglevel = DEBUGLEVEL; 25 | -------------------------------------------------------------------------------- /vendor/github.com/DataDog/zstd/errors.go: -------------------------------------------------------------------------------- 1 | package zstd 2 | 3 | /* 4 | #define ZSTD_STATIC_LINKING_ONLY 5 | #include "zstd.h" 6 | */ 7 | import "C" 8 | 9 | // ErrorCode is an error returned by the zstd library. 10 | type ErrorCode int 11 | 12 | // Error returns the error string given by zstd 13 | func (e ErrorCode) Error() string { 14 | return C.GoString(C.ZSTD_getErrorName(C.size_t(e))) 15 | } 16 | 17 | func cIsError(code int) bool { 18 | return int(C.ZSTD_isError(C.size_t(code))) != 0 19 | } 20 | 21 | // getError returns an error for the return code, or nil if it's not an error 22 | func getError(code int) error { 23 | if code < 0 && cIsError(code) { 24 | return ErrorCode(code) 25 | } 26 | return nil 27 | } 28 | 29 | // IsDstSizeTooSmallError returns whether the error correspond to zstd standard sDstSizeTooSmall error 30 | func IsDstSizeTooSmallError(e error) bool { 31 | if e != nil && e.Error() == "Destination buffer is too small" { 32 | return true 33 | } 34 | return false 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/DataDog/zstd/travis_test_32.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Get utilities 3 | #yum -y -q -e 0 install wget tar unzip gcc 4 | apt-get update 5 | apt-get -y install wget tar unzip gcc 6 | 7 | # Get Go 8 | wget -q https://dl.google.com/go/go1.13.linux-386.tar.gz 9 | tar -C /usr/local -xzf go1.13.linux-386.tar.gz 10 | export PATH=$PATH:/usr/local/go/bin 11 | 12 | # Get payload 13 | wget -q https://github.com/DataDog/zstd/files/2246767/mr.zip 14 | unzip mr.zip 15 | 16 | # Build and run tests 17 | go build 18 | DISABLE_BIG_TESTS=1 PAYLOAD=$(pwd)/mr go test -v 19 | DISABLE_BIG_TESTS=1 PAYLOAD=$(pwd)/mr go test -bench . 20 | -------------------------------------------------------------------------------- /vendor/github.com/DataDog/zstd/zbuff_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | /*-************************************* 12 | * Dependencies 13 | ***************************************/ 14 | #include "error_private.h" 15 | #include "zbuff.h" 16 | 17 | /*-**************************************** 18 | * ZBUFF Error Management (deprecated) 19 | ******************************************/ 20 | 21 | /*! ZBUFF_isError() : 22 | * tells if a return value is an error code */ 23 | unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); } 24 | /*! ZBUFF_getErrorName() : 25 | * provides error code string from function result (useful for debugging) */ 26 | const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); } 27 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/gometalinter/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/bin 2 | vendor/pkg 3 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/gometalinter/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | install: 4 | - go get -t -v . ./regressiontests 5 | - gometalinter --install 6 | go: 1.7 7 | script: go test -v . ./regressiontests 8 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/template/README.md: -------------------------------------------------------------------------------- 1 | # Go's `text/template` package with newline elision 2 | 3 | This is a fork of Go 1.4's [text/template](http://golang.org/pkg/text/template/) package with one addition: a backslash immediately after a closing delimiter will delete all subsequent newlines until a non-newline. 4 | 5 | eg. 6 | 7 | ``` 8 | {{if true}}\ 9 | hello 10 | {{end}}\ 11 | ``` 12 | 13 | Will result in: 14 | 15 | ``` 16 | hello\n 17 | ``` 18 | 19 | Rather than: 20 | 21 | ``` 22 | \n 23 | hello\n 24 | \n 25 | ``` 26 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Alec Thomas 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | 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 THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/README.md: -------------------------------------------------------------------------------- 1 | # Units - Helpful unit multipliers and functions for Go 2 | 3 | The goal of this package is to have functionality similar to the [time](http://golang.org/pkg/time/) package. 4 | 5 | It allows for code like this: 6 | 7 | ```go 8 | n, err := ParseBase2Bytes("1KB") 9 | // n == 1024 10 | n = units.Mebibyte * 512 11 | ``` 12 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/doc.go: -------------------------------------------------------------------------------- 1 | // Package units provides helpful unit multipliers and functions for Go. 2 | // 3 | // The goal of this package is to have functionality similar to the time [1] package. 4 | // 5 | // 6 | // [1] http://golang.org/pkg/time/ 7 | // 8 | // It allows for code like this: 9 | // 10 | // n, err := ParseBase2Bytes("1KB") 11 | // // n == 1024 12 | // n = units.Mebibyte * 512 13 | package units 14 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/rotate.go: -------------------------------------------------------------------------------- 1 | // +build !go1.9 2 | 3 | package xxhash 4 | 5 | // TODO(caleb): After Go 1.10 comes out, remove this fallback code. 6 | 7 | func rol1(x uint64) uint64 { return (x << 1) | (x >> (64 - 1)) } 8 | func rol7(x uint64) uint64 { return (x << 7) | (x >> (64 - 7)) } 9 | func rol11(x uint64) uint64 { return (x << 11) | (x >> (64 - 11)) } 10 | func rol12(x uint64) uint64 { return (x << 12) | (x >> (64 - 12)) } 11 | func rol18(x uint64) uint64 { return (x << 18) | (x >> (64 - 18)) } 12 | func rol23(x uint64) uint64 { return (x << 23) | (x >> (64 - 23)) } 13 | func rol27(x uint64) uint64 { return (x << 27) | (x >> (64 - 27)) } 14 | func rol31(x uint64) uint64 { return (x << 31) | (x >> (64 - 31)) } 15 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/rotate19.go: -------------------------------------------------------------------------------- 1 | // +build go1.9 2 | 3 | package xxhash 4 | 5 | import "math/bits" 6 | 7 | func rol1(x uint64) uint64 { return bits.RotateLeft64(x, 1) } 8 | func rol7(x uint64) uint64 { return bits.RotateLeft64(x, 7) } 9 | func rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) } 10 | func rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) } 11 | func rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) } 12 | func rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) } 13 | func rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) } 14 | func rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) } 15 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | // +build gc 3 | // +build !purego 4 | 5 | package xxhash 6 | 7 | // Sum64 computes the 64-bit xxHash digest of b. 8 | // 9 | //go:noescape 10 | func Sum64(b []byte) uint64 11 | 12 | //go:noescape 13 | func writeBlocks(d *Digest, b []byte) int 14 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/v2/xxhash_safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | // This file contains the safe implementations of otherwise unsafe-using code. 4 | 5 | package xxhash 6 | 7 | // Sum64String computes the 64-bit xxHash digest of s. 8 | func Sum64String(s string) uint64 { 9 | return Sum64([]byte(s)) 10 | } 11 | 12 | // WriteString adds more data to d. It always returns len(s), nil. 13 | func (d *Digest) WriteString(s string) (n int, err error) { 14 | return d.Write([]byte(s)) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/xxhash_amd64.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | // +build gc 3 | // +build !purego 4 | 5 | package xxhash 6 | 7 | // Sum64 computes the 64-bit xxHash digest of b. 8 | // 9 | //go:noescape 10 | func Sum64(b []byte) uint64 11 | 12 | func writeBlocks(x *xxh, b []byte) []byte 13 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/xxhash_safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | // This file contains the safe implementations of otherwise unsafe-using code. 4 | 5 | package xxhash 6 | 7 | // Sum64String computes the 64-bit xxHash digest of s. 8 | func Sum64String(s string) uint64 { 9 | return Sum64([]byte(s)) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/xxhash_unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | // This file encapsulates usage of unsafe. 4 | // xxhash_safe.go contains the safe implementations. 5 | 6 | package xxhash 7 | 8 | import ( 9 | "reflect" 10 | "unsafe" 11 | ) 12 | 13 | // Sum64String computes the 64-bit xxHash digest of s. 14 | // It may be faster than Sum64([]byte(s)) by avoiding a copy. 15 | // 16 | // TODO(caleb): Consider removing this if an optimization is ever added to make 17 | // it unnecessary: https://golang.org/issue/2205. 18 | // 19 | // TODO(caleb): We still have a function call; we could instead write Go/asm 20 | // copies of Sum64 for strings to squeeze out a bit more speed. 21 | func Sum64String(s string) uint64 { 22 | // See https://groups.google.com/d/msg/golang-nuts/dcjzJy-bSpw/tcZYBzQqAQAJ 23 | // for some discussion about this unsafe conversion. 24 | var b []byte 25 | bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) 26 | bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data 27 | bh.Len = len(s) 28 | bh.Cap = len(s) 29 | return Sum64(b) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/client9/misspell/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | bin/ 3 | vendor/ 4 | 5 | # editor turds 6 | *~ 7 | *.gz 8 | *.bz2 9 | *.csv 10 | 11 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 12 | *.o 13 | *.a 14 | *.so 15 | 16 | # Folders 17 | _obj 18 | _test 19 | 20 | # Architecture specific extensions/prefixes 21 | *.[568vq] 22 | [568vq].out 23 | 24 | *.cgo1.go 25 | *.cgo2.c 26 | _cgo_defun.c 27 | _cgo_gotypes.go 28 | _cgo_export.* 29 | 30 | _testmain.go 31 | 32 | *.exe 33 | *.test 34 | *.prof 35 | -------------------------------------------------------------------------------- /vendor/github.com/client9/misspell/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | group: edge 4 | language: go 5 | go: 6 | - "1.10" 7 | git: 8 | depth: 1 9 | 10 | script: 11 | - ./scripts/travis.sh 12 | 13 | # calls goreleaser when a new tag is pushed 14 | deploy: 15 | - provider: script 16 | skip_cleanup: true 17 | script: curl -sL http://git.io/goreleaser | bash 18 | on: 19 | tags: true 20 | condition: $TRAVIS_OS_NAME = linux 21 | -------------------------------------------------------------------------------- /vendor/github.com/client9/misspell/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/gobwas/glob" 6 | packages = [ 7 | ".", 8 | "compiler", 9 | "match", 10 | "syntax", 11 | "syntax/ast", 12 | "syntax/lexer", 13 | "util/runes", 14 | "util/strings" 15 | ] 16 | revision = "5ccd90ef52e1e632236f7326478d4faa74f99438" 17 | version = "v0.2.3" 18 | 19 | [solve-meta] 20 | analyzer-name = "dep" 21 | analyzer-version = 1 22 | inputs-digest = "087ea4c49358ea8258ad9edfe514cd5ce9975c889c258e5ec7b5d2b720aae113" 23 | solver-name = "gps-cdcl" 24 | solver-version = 1 25 | -------------------------------------------------------------------------------- /vendor/github.com/client9/misspell/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html 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 | [[constraint]] 29 | name = "github.com/gobwas/glob" 30 | version = "0.2.3" 31 | 32 | [prune] 33 | go-tests = true 34 | unused-packages = true 35 | -------------------------------------------------------------------------------- /vendor/github.com/client9/misspell/RELEASE-HOWTO.md: -------------------------------------------------------------------------------- 1 | # Release HOWTO 2 | 3 | since I forget. 4 | 5 | 6 | 1. Review existing tags and pick new release number 7 | 8 | ```sh 9 | git tag 10 | ``` 11 | 12 | 2. Tag locally 13 | 14 | ```sh 15 | git tag -a v0.1.0 -m "First release" 16 | ``` 17 | 18 | If things get screwed up, delete the tag with 19 | 20 | ```sh 21 | git tag -d v0.1.0 22 | ``` 23 | 24 | 3. Test goreleaser 25 | 26 | TODO: how to install goreleaser 27 | 28 | ```sh 29 | ./scripts/goreleaser-dryrun.sh 30 | ``` 31 | 32 | 4. Push 33 | 34 | ```bash 35 | git push origin v0.1.0 36 | ``` 37 | 38 | 5. Verify release and edit notes. See https://github.com/client9/misspell/releases 39 | -------------------------------------------------------------------------------- /vendor/github.com/client9/misspell/goreleaser.yml: -------------------------------------------------------------------------------- 1 | # goreleaser.yml 2 | # https://github.com/goreleaser/goreleaser 3 | 4 | project_name: misspell 5 | 6 | builds: 7 | - 8 | main: cmd/misspell/main.go 9 | binary: misspell 10 | ldflags: -s -w -X main.version={{.Version}} 11 | goos: 12 | - darwin 13 | - linux 14 | - windows 15 | goarch: 16 | - amd64 17 | env: 18 | - CGO_ENABLED=0 19 | ignore: 20 | - goos: darwin 21 | goarch: 386 22 | - goos: windows 23 | goarch: 386 24 | 25 | archive: 26 | name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" 27 | replacements: 28 | amd64: 64bit 29 | 386: 32bit 30 | darwin: mac 31 | files: 32 | - none* 33 | 34 | checksum: 35 | name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" 36 | 37 | snapshot: 38 | name_template: "SNAPSHOT-{{.Commit}}" 39 | -------------------------------------------------------------------------------- /vendor/github.com/client9/misspell/url.go: -------------------------------------------------------------------------------- 1 | package misspell 2 | 3 | import ( 4 | "regexp" 5 | ) 6 | 7 | // Regexp for URL https://mathiasbynens.be/demo/url-regex 8 | // 9 | // original @imme_emosol (54 chars) has trouble with dashes in hostname 10 | // @(https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?$@iS 11 | var reURL = regexp.MustCompile(`(?i)(https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s]*)?`) 12 | 13 | // StripURL attemps to replace URLs with blank spaces, e.g. 14 | // "xxx http://foo.com/ yyy -> "xxx yyyy" 15 | func StripURL(s string) string { 16 | return reURL.ReplaceAllStringFunc(s, replaceWithBlanks) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/badger/v2/.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | test_patterns = [ 4 | 'integration/testgc/**', 5 | '**/*_test.go' 6 | ] 7 | 8 | exclude_patterns = [ 9 | 10 | ] 11 | 12 | [[analyzers]] 13 | name = 'go' 14 | enabled = true 15 | 16 | 17 | [analyzers.meta] 18 | import_path = 'github.com/dgraph-io/badger' 19 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/badger/v2/.gitignore: -------------------------------------------------------------------------------- 1 | p/ 2 | badger-test*/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/badger/v2/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | tests: false 3 | 4 | linters-settings: 5 | lll: 6 | line-length: 100 7 | 8 | linters: 9 | disable-all: true 10 | enable: 11 | - errcheck 12 | - ineffassign 13 | - gas 14 | - gofmt 15 | - golint 16 | - gosimple 17 | - govet 18 | - lll 19 | - varcheck 20 | - unused 21 | 22 | issues: 23 | exclude-rules: 24 | - linters: 25 | - gosec 26 | text: "G404: " 27 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/badger/v2/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | Our Code of Conduct can be found here: 4 | 5 | https://dgraph.io/conduct 6 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/badger/v2/pb/gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # You might need to go get -v github.com/gogo/protobuf/... 4 | 5 | protos=${GOPATH-$HOME/go}/src/github.com/dgraph-io/badger/pb 6 | pushd $protos > /dev/null 7 | protoc --gofast_out=plugins=grpc:. -I=. pb.proto 8 | 9 | # Move pb.pb.go file to the correct directory. This is necessary because protoc 10 | # would generate the pb.pb.go file inside a different directory. 11 | mv $protos/github.com/dgraph-io/badger/v2/pb/pb.pb.go ./ 12 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/badger/v2/y/event_log.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Dgraph Labs, Inc. and Contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package y 18 | 19 | import "golang.org/x/net/trace" 20 | 21 | var ( 22 | NoEventLog trace.EventLog = nilEventLog{} 23 | ) 24 | 25 | type nilEventLog struct{} 26 | 27 | func (nel nilEventLog) Printf(format string, a ...interface{}) {} 28 | 29 | func (nel nilEventLog) Errorf(format string, a ...interface{}) {} 30 | 31 | func (nel nilEventLog) Finish() {} 32 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/badger/v2/y/file_dsync.go: -------------------------------------------------------------------------------- 1 | // +build !dragonfly,!freebsd,!windows 2 | 3 | /* 4 | * Copyright 2017 Dgraph Labs, Inc. and Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package y 20 | 21 | import "golang.org/x/sys/unix" 22 | 23 | func init() { 24 | datasyncFileFlag = unix.O_DSYNC 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/badger/v2/y/file_nodsync.go: -------------------------------------------------------------------------------- 1 | // +build dragonfly freebsd windows 2 | 3 | /* 4 | * Copyright 2017 Dgraph Labs, Inc. and Contributors 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package y 20 | 21 | import "syscall" 22 | 23 | func init() { 24 | datasyncFileFlag = syscall.O_SYNC 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/ristretto/.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | test_patterns = [ 4 | '**/*_test.go' 5 | ] 6 | 7 | exclude_patterns = [ 8 | 9 | ] 10 | 11 | [[analyzers]] 12 | name = 'go' 13 | enabled = true 14 | 15 | 16 | [analyzers.meta] 17 | import_path = 'github.com/dgraph-io/ristretto' 18 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/ristretto/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.12 5 | - 1.13 6 | 7 | env: 8 | - GO111MODULE=on # Enable go module for all versions. 9 | 10 | script: 11 | - go test -race ./... 12 | -------------------------------------------------------------------------------- /vendor/github.com/dgraph-io/ristretto/z/rtutil.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/vendor/github.com/dgraph-io/ristretto/z/rtutil.s -------------------------------------------------------------------------------- /vendor/github.com/dgryski/go-farm/.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 | *.exe 21 | *.test 22 | *.prof 23 | 24 | target 25 | -------------------------------------------------------------------------------- /vendor/github.com/dgryski/go-farm/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | branches: 6 | except: 7 | - release 8 | 9 | branches: 10 | only: 11 | - master 12 | - develop 13 | - travis 14 | 15 | go: 16 | - 1.12.x 17 | - 1.13.x 18 | - tip 19 | 20 | matrix: 21 | allow_failures: 22 | - go: tip 23 | 24 | before_install: 25 | - if [ -n "$GH_USER" ]; then git config --global github.user ${GH_USER}; fi; 26 | - if [ -n "$GH_TOKEN" ]; then git config --global github.token ${GH_TOKEN}; fi; 27 | - go get github.com/mattn/goveralls 28 | 29 | before_script: 30 | - make deps 31 | 32 | script: 33 | - make qa 34 | 35 | after_failure: 36 | - cat ./target/test/report.xml 37 | 38 | after_success: 39 | - if [ "$TRAVIS_GO_VERSION" = "1.9" ]; then $HOME/gopath/bin/goveralls -covermode=count -coverprofile=target/report/coverage.out -service=travis-ci; fi; 40 | -------------------------------------------------------------------------------- /vendor/github.com/dgryski/go-farm/VERSION: -------------------------------------------------------------------------------- 1 | 2.0.1 2 | -------------------------------------------------------------------------------- /vendor/github.com/dgryski/go-farm/basics.go: -------------------------------------------------------------------------------- 1 | package farm 2 | 3 | import "math/bits" 4 | 5 | // Some primes between 2^63 and 2^64 for various uses. 6 | const k0 uint64 = 0xc3a5c85c97cb3127 7 | const k1 uint64 = 0xb492b66fbe98f273 8 | const k2 uint64 = 0x9ae16a3b2f90404f 9 | 10 | // Magic numbers for 32-bit hashing. Copied from Murmur3. 11 | const c1 uint32 = 0xcc9e2d51 12 | const c2 uint32 = 0x1b873593 13 | 14 | // A 32-bit to 32-bit integer hash copied from Murmur3. 15 | func fmix(h uint32) uint32 { 16 | h ^= h >> 16 17 | h *= 0x85ebca6b 18 | h ^= h >> 13 19 | h *= 0xc2b2ae35 20 | h ^= h >> 16 21 | return h 22 | } 23 | 24 | func mur(a, h uint32) uint32 { 25 | // Helper from Murmur3 for combining two 32-bit values. 26 | a *= c1 27 | a = bits.RotateLeft32(a, -17) 28 | a *= c2 29 | h ^= a 30 | h = bits.RotateLeft32(h, -19) 31 | return h*5 + 0xe6546b64 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/dgryski/go-farm/fp_generic.go: -------------------------------------------------------------------------------- 1 | // +build !amd64 purego 2 | 3 | package farm 4 | 5 | // Fingerprint64 is a 64-bit fingerprint function for byte-slices 6 | func Fingerprint64(s []byte) uint64 { 7 | return naHash64(s) 8 | } 9 | 10 | // Fingerprint32 is a 32-bit fingerprint function for byte-slices 11 | func Fingerprint32(s []byte) uint32 { 12 | return Hash32(s) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/dgryski/go-farm/fp_stub.go: -------------------------------------------------------------------------------- 1 | // Code generated by command: go run asm.go -out=fp_amd64.s -stubs=fp_stub.go. DO NOT EDIT. 2 | 3 | // +build amd64,!purego 4 | 5 | package farm 6 | 7 | func Fingerprint64(s []byte) uint64 8 | 9 | func Fingerprint32(s []byte) uint32 10 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go_import_path: github.com/dustin/go-humanize 4 | go: 5 | - 1.13.x 6 | - 1.14.x 7 | - 1.15.x 8 | - 1.16.x 9 | - stable 10 | - master 11 | matrix: 12 | allow_failures: 13 | - go: master 14 | fast_finish: true 15 | install: 16 | - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). 17 | script: 18 | - diff -u <(echo -n) <(gofmt -d -s .) 19 | - go vet . 20 | - go install -v -race ./... 21 | - go test -v -race ./... 22 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/big.go: -------------------------------------------------------------------------------- 1 | package humanize 2 | 3 | import ( 4 | "math/big" 5 | ) 6 | 7 | // order of magnitude (to a max order) 8 | func oomm(n, b *big.Int, maxmag int) (float64, int) { 9 | mag := 0 10 | m := &big.Int{} 11 | for n.Cmp(b) >= 0 { 12 | n.DivMod(n, b, m) 13 | mag++ 14 | if mag == maxmag && maxmag >= 0 { 15 | break 16 | } 17 | } 18 | return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag 19 | } 20 | 21 | // total order of magnitude 22 | // (same as above, but with no upper limit) 23 | func oom(n, b *big.Int) (float64, int) { 24 | mag := 0 25 | m := &big.Int{} 26 | for n.Cmp(b) >= 0 { 27 | n.DivMod(n, b, m) 28 | mag++ 29 | } 30 | return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/commaf.go: -------------------------------------------------------------------------------- 1 | //go:build go1.6 2 | // +build go1.6 3 | 4 | package humanize 5 | 6 | import ( 7 | "bytes" 8 | "math/big" 9 | "strings" 10 | ) 11 | 12 | // BigCommaf produces a string form of the given big.Float in base 10 13 | // with commas after every three orders of magnitude. 14 | func BigCommaf(v *big.Float) string { 15 | buf := &bytes.Buffer{} 16 | if v.Sign() < 0 { 17 | buf.Write([]byte{'-'}) 18 | v.Abs(v) 19 | } 20 | 21 | comma := []byte{','} 22 | 23 | parts := strings.Split(v.Text('f', -1), ".") 24 | pos := 0 25 | if len(parts[0])%3 != 0 { 26 | pos += len(parts[0]) % 3 27 | buf.WriteString(parts[0][:pos]) 28 | buf.Write(comma) 29 | } 30 | for ; pos < len(parts[0]); pos += 3 { 31 | buf.WriteString(parts[0][pos : pos+3]) 32 | buf.Write(comma) 33 | } 34 | buf.Truncate(buf.Len() - 1) 35 | 36 | if len(parts) > 1 { 37 | buf.Write([]byte{'.'}) 38 | buf.WriteString(parts[1]) 39 | } 40 | return buf.String() 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/humanize.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package humanize converts boring ugly numbers to human-friendly strings and back. 3 | 4 | Durations can be turned into strings such as "3 days ago", numbers 5 | representing sizes like 82854982 into useful strings like, "83 MB" or 6 | "79 MiB" (whichever you prefer). 7 | */ 8 | package humanize 9 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/ordinals.go: -------------------------------------------------------------------------------- 1 | package humanize 2 | 3 | import "strconv" 4 | 5 | // Ordinal gives you the input number in a rank/ordinal format. 6 | // 7 | // Ordinal(3) -> 3rd 8 | func Ordinal(x int) string { 9 | suffix := "th" 10 | switch x % 10 { 11 | case 1: 12 | if x%100 != 11 { 13 | suffix = "st" 14 | } 15 | case 2: 16 | if x%100 != 12 { 17 | suffix = "nd" 18 | } 19 | case 3: 20 | if x%100 != 13 { 21 | suffix = "rd" 22 | } 23 | } 24 | return strconv.Itoa(x) + suffix 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/fzipp/gocyclo/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # Names should be added to this file like so: 2 | # Name 3 | 4 | # Please keep the list sorted. 5 | 6 | Frederik Zipp 7 | Harshavardhana 8 | -------------------------------------------------------------------------------- /vendor/github.com/fzipp/gocyclo/directives.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Frederik Zipp. 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 gocyclo 6 | 7 | import ( 8 | "go/ast" 9 | "strings" 10 | ) 11 | 12 | type directives []string 13 | 14 | func (ds directives) HasIgnore() bool { 15 | return ds.isPresent("ignore") 16 | } 17 | 18 | func (ds directives) isPresent(name string) bool { 19 | for _, d := range ds { 20 | if d == name { 21 | return true 22 | } 23 | } 24 | return false 25 | } 26 | 27 | func parseDirectives(doc *ast.CommentGroup) directives { 28 | if doc == nil { 29 | return directives{} 30 | } 31 | const prefix = "//gocyclo:" 32 | var ds directives 33 | for _, comment := range doc.List { 34 | if strings.HasPrefix(comment.Text, prefix) { 35 | ds = append(ds, strings.TrimSpace(strings.TrimPrefix(comment.Text, prefix))) 36 | } 37 | } 38 | return ds 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/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/github.com/golang/protobuf/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/github.com/golang/snappy/.gitignore: -------------------------------------------------------------------------------- 1 | cmd/snappytool/snappytool 2 | testdata/bench 3 | 4 | # These explicitly listed benchmark data files are for an obsolete version of 5 | # snappy_test.go. 6 | testdata/alice29.txt 7 | testdata/asyoulik.txt 8 | testdata/fireworks.jpeg 9 | testdata/geo.protodata 10 | testdata/html 11 | testdata/html_x_4 12 | testdata/kppkn.gtb 13 | testdata/lcet10.txt 14 | testdata/paper-100k.pdf 15 | testdata/plrabn12.txt 16 | testdata/urls.10K 17 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Snappy-Go authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Amazon.com, Inc 12 | Damian Gryski 13 | Google Inc. 14 | Jan Mercl <0xjnml@gmail.com> 15 | Klaus Post 16 | Rodolfo Carvalho 17 | Sebastien Binet 18 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/decode_asm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-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 !appengine 6 | // +build gc 7 | // +build !noasm 8 | // +build amd64 arm64 9 | 10 | package snappy 11 | 12 | // decode has the same semantics as in decode_other.go. 13 | // 14 | //go:noescape 15 | func decode(dst, src []byte) int 16 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/encode_asm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-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 !appengine 6 | // +build gc 7 | // +build !noasm 8 | // +build amd64 arm64 9 | 10 | package snappy 11 | 12 | // emitLiteral has the same semantics as in encode_other.go. 13 | // 14 | //go:noescape 15 | func emitLiteral(dst, lit []byte) int 16 | 17 | // emitCopy has the same semantics as in encode_other.go. 18 | // 19 | //go:noescape 20 | func emitCopy(dst []byte, offset, length int) int 21 | 22 | // extendMatch has the same semantics as in encode_other.go. 23 | // 24 | //go:noescape 25 | func extendMatch(src []byte, i, j int) int 26 | 27 | // encodeBlock has the same semantics as in encode_other.go. 28 | // 29 | //go:noescape 30 | func encodeBlock(dst, src []byte) (d int) 31 | -------------------------------------------------------------------------------- /vendor/github.com/google/shlex/README: -------------------------------------------------------------------------------- 1 | go-shlex is a simple lexer for go that supports shell-style quoting, 2 | commenting, and escaping. 3 | -------------------------------------------------------------------------------- /vendor/github.com/gordonklaus/ineffassign/.gitignore: -------------------------------------------------------------------------------- 1 | /ineffassign 2 | 3 | # Created by https://www.gitignore.io/api/go 4 | 5 | ### Go ### 6 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 7 | *.o 8 | *.a 9 | *.so 10 | 11 | # Folders 12 | _obj 13 | _test 14 | 15 | # Architecture specific extensions/prefixes 16 | *.[568vq] 17 | [568vq].out 18 | 19 | *.cgo1.go 20 | *.cgo2.c 21 | _cgo_defun.c 22 | _cgo_gotypes.go 23 | _cgo_export.* 24 | 25 | _testmain.go 26 | 27 | *.exe 28 | *.test 29 | *.prof 30 | 31 | -------------------------------------------------------------------------------- /vendor/github.com/gordonklaus/ineffassign/README.md: -------------------------------------------------------------------------------- 1 | # ineffassign 2 | 3 | Detect ineffectual assignments in Go code. An assignment is ineffectual if the variable assigned is not thereafter used. 4 | 5 | This tool misses some cases because it does not consider any type information in its analysis. For example, assignments to struct fields are never marked as ineffectual. It should, however, never give any false positives. 6 | 7 | ## Install 8 | 9 | go get -u github.com/gordonklaus/ineffassign 10 | 11 | ## Usage 12 | 13 | For basic usage, run the following command from the root of your project: 14 | 15 | ineffassign ./... 16 | 17 | Which will analyze all packages beneath the current directory. 18 | 19 | ## Exit Codes 20 | 21 | ineffassign returns 1 if any problems were found in the checked files. It returns 3 if there were any invalid arguments. 22 | -------------------------------------------------------------------------------- /vendor/github.com/gordonklaus/ineffassign/bugs: -------------------------------------------------------------------------------- 1 | cmd/compile/internal/big/floatconv.go:367:2 m 2 | cmd/cover/cover_test.go:62:2 err 3 | cmd/pprof/internal/profile/profile.go:131:10 err 4 | math/big/ftoa.go:285:2 m 5 | net/file_unix.go:66:7 err 6 | golang.org/x/mobile/app/android.go:175:2 queue 7 | golang.org/x/net/icmp/listen_posix.go:83:6 err 8 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2012 Matt T. Proud (matt.proud@gmail.com) 2 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore: -------------------------------------------------------------------------------- 1 | cover.dat 2 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | 3 | cover: 4 | go test -cover -v -coverprofile=cover.dat ./... 5 | go tool cover -func cover.dat 6 | 7 | .PHONY: cover 8 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Matt T. Proud 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 | 15 | // Package pbutil provides record length-delimited Protocol Buffer streaming. 16 | package pbutil 17 | -------------------------------------------------------------------------------- /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.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/Makefile: -------------------------------------------------------------------------------- 1 | PKGS := github.com/pkg/errors 2 | SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) 3 | GO := go 4 | 5 | check: test vet gofmt misspell unconvert staticcheck ineffassign unparam 6 | 7 | test: 8 | $(GO) test $(PKGS) 9 | 10 | vet: | test 11 | $(GO) vet $(PKGS) 12 | 13 | staticcheck: 14 | $(GO) get honnef.co/go/tools/cmd/staticcheck 15 | staticcheck -checks all $(PKGS) 16 | 17 | misspell: 18 | $(GO) get github.com/client9/misspell/cmd/misspell 19 | misspell \ 20 | -locale GB \ 21 | -error \ 22 | *.md *.go 23 | 24 | unconvert: 25 | $(GO) get github.com/mdempsky/unconvert 26 | unconvert -v $(PKGS) 27 | 28 | ineffassign: 29 | $(GO) get github.com/gordonklaus/ineffassign 30 | find $(SRCDIRS) -name '*.go' | xargs ineffassign 31 | 32 | pedantic: check errcheck 33 | 34 | unparam: 35 | $(GO) get mvdan.cc/unparam 36 | unparam ./... 37 | 38 | errcheck: 39 | $(GO) get github.com/kisielk/errcheck 40 | errcheck $(PKGS) 41 | 42 | gofmt: 43 | @echo Checking code is gofmted 44 | @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" 45 | -------------------------------------------------------------------------------- /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/prometheus/client_golang/NOTICE: -------------------------------------------------------------------------------- 1 | Prometheus instrumentation library for Go applications 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | 7 | 8 | The following components are included in this product: 9 | 10 | perks - a fork of https://github.com/bmizerany/perks 11 | https://github.com/beorn7/perks 12 | Copyright 2013-2015 Blake Mizerany, Björn Rabenstein 13 | See https://github.com/beorn7/perks/blob/master/README.md for license details. 14 | 15 | Go support for Protocol Buffers - Google's data interchange format 16 | http://github.com/golang/protobuf/ 17 | Copyright 2010 The Go Authors 18 | See source code for license details. 19 | 20 | Support for streaming Protocol Buffer messages for the Go language (golang). 21 | https://github.com/matttproud/golang_protobuf_extensions 22 | Copyright 2013 Matt T. Proud 23 | Licensed under the Apache License, Version 2.0 24 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/.gitignore: -------------------------------------------------------------------------------- 1 | command-line-arguments.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/README.md: -------------------------------------------------------------------------------- 1 | See [![Go Reference](https://pkg.go.dev/badge/github.com/prometheus/client_golang/prometheus.svg)](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus). 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/get_pid.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build !js || wasm 15 | // +build !js wasm 16 | 17 | package prometheus 18 | 19 | import "os" 20 | 21 | func getPIDFn() func() (int, error) { 22 | pid := os.Getpid() 23 | return func() (int, error) { 24 | return pid, nil 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/get_pid_gopherjs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build js && !wasm 15 | // +build js,!wasm 16 | 17 | package prometheus 18 | 19 | func getPIDFn() func() (int, error) { 20 | return func() (int, error) { 21 | return 1, nil 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/num_threads.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build !js || wasm 15 | // +build !js wasm 16 | 17 | package prometheus 18 | 19 | import "runtime" 20 | 21 | // getRuntimeNumThreads returns the number of open OS threads. 22 | func getRuntimeNumThreads() float64 { 23 | n, _ := runtime.ThreadCreateProfile(nil) 24 | return float64(n) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/num_threads_gopherjs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build js && !wasm 15 | // +build js,!wasm 16 | 17 | package prometheus 18 | 19 | // getRuntimeNumThreads returns the number of open OS threads. 20 | func getRuntimeNumThreads() float64 { 21 | return 1 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/process_collector_js.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build js 15 | // +build js 16 | 17 | package prometheus 18 | 19 | func canCollectProcess() bool { 20 | return false 21 | } 22 | 23 | func (c *processCollector) processCollect(ch chan<- Metric) { 24 | // noop on this platform 25 | return 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/NOTICE: -------------------------------------------------------------------------------- 1 | Data model artifacts for Prometheus. 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/NOTICE: -------------------------------------------------------------------------------- 1 | Common libraries shared by Prometheus Go components. 2 | Copyright 2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/model/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 model contains common data structures that are shared across 15 | // Prometheus components and libraries. 16 | package model 17 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/.gitignore: -------------------------------------------------------------------------------- 1 | /testdata/fixtures/ 2 | /fixtures 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/.golangci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | linters: 3 | enable: 4 | - godot 5 | - revive 6 | 7 | linter-settings: 8 | godot: 9 | capital: true 10 | exclude: 11 | # Ignore "See: URL" 12 | - 'See:' 13 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Prometheus Community Code of Conduct 2 | 3 | Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | * Johannes 'fish' Ziemke @discordianfish 2 | * Paul Gier @pgier 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Prometheus Authors 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 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 | include Makefile.common 15 | 16 | %/.unpacked: %.ttar 17 | @echo ">> extracting fixtures $*" 18 | ./ttar -C $(dir $*) -x -f $*.ttar 19 | touch $@ 20 | 21 | fixtures: testdata/fixtures/.unpacked 22 | 23 | update_fixtures: 24 | rm -vf testdata/fixtures/.unpacked 25 | ./ttar -c -f testdata/fixtures.ttar -C testdata/ fixtures/ 26 | 27 | .PHONY: build 28 | build: 29 | 30 | .PHONY: test 31 | test: testdata/fixtures/.unpacked common-test 32 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/NOTICE: -------------------------------------------------------------------------------- 1 | procfs provides functions to retrieve system, kernel and process 2 | metrics from the pseudo-filesystem proc. 3 | 4 | Copyright 2014-2015 The Prometheus Authors 5 | 6 | This product includes software developed at 7 | SoundCloud Ltd. (http://soundcloud.com/). 8 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting a security issue 2 | 3 | The Prometheus security policy, including how to report vulnerabilities, can be 4 | found here: 5 | 6 | 7 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cmdline.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 procfs 15 | 16 | import ( 17 | "strings" 18 | 19 | "github.com/prometheus/procfs/internal/util" 20 | ) 21 | 22 | // CmdLine returns the command line of the kernel. 23 | func (fs FS) CmdLine() ([]string, error) { 24 | data, err := util.ReadFileNoStat(fs.proc.Path("cmdline")) 25 | if err != nil { 26 | return nil, err 27 | } 28 | 29 | return strings.Fields(string(data)), nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_armx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build linux && (arm || arm64) 15 | // +build linux 16 | // +build arm arm64 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoARM 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build linux && (mips || mipsle || mips64 || mips64le) 15 | // +build linux 16 | // +build mips mipsle mips64 mips64le 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoMips 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_others.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build linux && !386 && !amd64 && !arm && !arm64 && !mips && !mips64 && !mips64le && !mipsle && !ppc64 && !ppc64le && !riscv64 && !s390x 15 | // +build linux,!386,!amd64,!arm,!arm64,!mips,!mips64,!mips64le,!mipsle,!ppc64,!ppc64le,!riscv64,!s390x 16 | 17 | package procfs 18 | 19 | var parseCPUInfo = parseCPUInfoDummy 20 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build linux && (ppc64 || ppc64le) 15 | // +build linux 16 | // +build ppc64 ppc64le 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoPPC 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build linux && (riscv || riscv64) 15 | // +build linux 16 | // +build riscv riscv64 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoRISCV 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build linux 15 | // +build linux 16 | 17 | package procfs 18 | 19 | var parseCPUInfo = parseCPUInfoS390X 20 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build linux && (386 || amd64) 15 | // +build linux 16 | // +build 386 amd64 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoX86 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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 | //go:build (linux && appengine) || (!linux && !darwin) 15 | // +build linux,appengine !linux,!darwin 16 | 17 | package util 18 | 19 | import ( 20 | "fmt" 21 | ) 22 | 23 | // SysReadFile is here implemented as a noop for builds that do not support 24 | // the read syscall. For example Windows, or Linux on Google App Engine. 25 | func SysReadFile(file string) (string, error) { 26 | return "", fmt.Errorf("not supported on this platform") 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/lint/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - 1.10.x 5 | - 1.11.x 6 | - master 7 | 8 | go_import_path: golang.org/x/lint 9 | 10 | install: 11 | - go get -t -v ./... 12 | 13 | script: 14 | - go test -v -race ./... 15 | 16 | matrix: 17 | allow_failures: 18 | - go: master 19 | fast_finish: true 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/lint/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Golint 2 | 3 | ## Before filing an issue: 4 | 5 | ### Are you having trouble building golint? 6 | 7 | Check you have the latest version of its dependencies. Run 8 | ``` 9 | go get -u golang.org/x/lint/golint 10 | ``` 11 | If you still have problems, consider searching for existing issues before filing a new issue. 12 | 13 | ## Before sending a pull request: 14 | 15 | Have you understood the purpose of golint? Make sure to carefully read `README`. 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/lint/golint/importcomment.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 The Go Authors. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file or at 5 | // https://developers.google.com/open-source/licenses/bsd. 6 | 7 | // +build go1.12 8 | 9 | // Require use of the correct import path only for Go 1.12+ users, so 10 | // any breakages coincide with people updating their CI configs or 11 | // whatnot. 12 | 13 | package main // import "golang.org/x/lint/golint" 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/execabs/execabs_go118.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build !go1.19 6 | 7 | package execabs 8 | 9 | import "os/exec" 10 | 11 | func isGo119ErrDot(err error) bool { 12 | return false 13 | } 14 | 15 | func isGo119ErrFieldSet(cmd *exec.Cmd) bool { 16 | return false 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/execabs/execabs_go119.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build go1.19 6 | 7 | package execabs 8 | 9 | import ( 10 | "errors" 11 | "os/exec" 12 | ) 13 | 14 | func isGo119ErrDot(err error) bool { 15 | return errors.Is(err, exec.ErrDot) 16 | } 17 | 18 | func isGo119ErrFieldSet(cmd *exec.Cmd) bool { 19 | return cmd.Err != nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 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 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 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-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 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 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 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-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 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 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 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_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 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 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /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 | //go:build linux && (ppc64 || ppc64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, 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 ·SyscallNoError(SB),NOSPLIT,$0-48 17 | BL runtime·entersyscall(SB) 18 | MOVD a1+8(FP), R3 19 | MOVD a2+16(FP), R4 20 | MOVD a3+24(FP), R5 21 | MOVD R0, R6 22 | MOVD R0, R7 23 | MOVD R0, R8 24 | MOVD trap+0(FP), R9 // syscall entry 25 | SYSCALL R9 26 | MOVD R3, r1+32(FP) 27 | MOVD R4, r2+40(FP) 28 | BL runtime·exitsyscall(SB) 29 | RET 30 | 31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 32 | MOVD a1+8(FP), R3 33 | MOVD a2+16(FP), R4 34 | MOVD a3+24(FP), R5 35 | MOVD R0, R6 36 | MOVD R0, R7 37 | MOVD R0, R8 38 | MOVD trap+0(FP), R9 // syscall entry 39 | SYSCALL R9 40 | MOVD R3, r1+32(FP) 41 | MOVD R4, r2+40(FP) 42 | RET 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, 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_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 | //go:build gc 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/auxv_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 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 | //go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Auxv() ([][2]uintptr, error) { 12 | return nil, syscall.ENOTSUP 13 | } 14 | -------------------------------------------------------------------------------- /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 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 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_aix_ppc.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 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.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 | //go:build aix && ppc64 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev & 0x3fffffff00000000) >> 32) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32((dev & 0x00000000ffffffff) >> 0) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | var DEVNO64 uint64 26 | DEVNO64 = 0x8000000000000000 27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 28 | } 29 | -------------------------------------------------------------------------------- /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_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/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /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 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 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 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 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_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.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 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 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/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /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 | //go: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/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 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 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.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 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.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 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | import "unsafe" 15 | 16 | func ioctl(fd int, req uint, arg uintptr) (err error) { 17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 18 | if r0 == -1 && er != nil { 19 | err = er 20 | } 21 | return 22 | } 23 | 24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 26 | if r0 == -1 && er != nil { 27 | err = er 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /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 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /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 | //go:build linux && gc 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 | //go:build linux && gc && 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_gc_arm.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 | //go:build arm && gc && linux 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 | -------------------------------------------------------------------------------- /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 | //go: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 | //go: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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | //go:build arm64 && 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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /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 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.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 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 | //go:build linux && go1.24 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | //go:linkname vgetrandom runtime.vgetrandom 12 | //go:noescape 13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 | //go:build !linux || !go1.24 6 | 7 | package unix 8 | 9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { 10 | return -1, false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.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 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.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 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.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 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.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 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.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 | //go:build windows && !race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.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 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.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 windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.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 windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_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 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.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 windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/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/tools/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/tools/go/ast/astutil/util.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 | package astutil 6 | 7 | import "go/ast" 8 | 9 | // Unparen returns e with any enclosing parentheses stripped. 10 | func Unparen(e ast.Expr) ast.Expr { 11 | for { 12 | p, ok := e.(*ast.ParenExpr) 13 | if !ok { 14 | return e 15 | } 16 | e = p.X 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.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 | //go:build !go1.11 6 | // +build !go1.11 7 | 8 | package gcimporter 9 | 10 | import "go/types" 11 | 12 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { 13 | named := make([]*types.Named, len(embeddeds)) 14 | for i, e := range embeddeds { 15 | var ok bool 16 | named[i], ok = e.(*types.Named) 17 | if !ok { 18 | panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") 19 | } 20 | } 21 | return types.NewInterface(methods, named) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.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 | //go:build go1.11 6 | // +build go1.11 7 | 8 | package gcimporter 9 | 10 | import "go/types" 11 | 12 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { 13 | return types.NewInterfaceType(methods, embeddeds) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/internal/gcimporter/support_go117.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build !go1.18 6 | // +build !go1.18 7 | 8 | package gcimporter 9 | 10 | import "go/types" 11 | 12 | const iexportVersion = iexportVersionGo1_11 13 | 14 | func additionalPredeclared() []types.Type { 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/internal/gcimporter/support_go118.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build go1.18 6 | // +build go1.18 7 | 8 | package gcimporter 9 | 10 | import "go/types" 11 | 12 | const iexportVersion = iexportVersionGenerics 13 | 14 | // additionalPredeclared returns additional predeclared types in go.1.18. 15 | func additionalPredeclared() []types.Type { 16 | return []types.Type{ 17 | // comparable 18 | types.Universe.Lookup("comparable").Type(), 19 | 20 | // any 21 | types.Universe.Lookup("any").Type(), 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/types/typeutil/imports.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 | package typeutil 6 | 7 | import "go/types" 8 | 9 | // Dependencies returns all dependencies of the specified packages. 10 | // 11 | // Dependent packages appear in topological order: if package P imports 12 | // package Q, Q appears earlier than P in the result. 13 | // The algorithm follows import statements in the order they 14 | // appear in the source code, so the result is a total order. 15 | // 16 | func Dependencies(pkgs ...*types.Package) []*types.Package { 17 | var result []*types.Package 18 | seen := make(map[*types.Package]bool) 19 | var visit func(pkgs []*types.Package) 20 | visit = func(pkgs []*types.Package) { 21 | for _, p := range pkgs { 22 | if !seen[p] { 23 | seen[p] = true 24 | visit(p.Imports()) 25 | result = append(result, p) 26 | } 27 | } 28 | } 29 | visit(pkgs) 30 | return result 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/event/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 event provides a set of packages that cover the main 6 | // concepts of telemetry in an implementation agnostic way. 7 | package event 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/event/keys/standard.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 keys 6 | 7 | var ( 8 | // Msg is a key used to add message strings to label lists. 9 | Msg = NewString("message", "a readable message") 10 | // Label is a key used to indicate an event adds labels to the context. 11 | Label = NewTag("label", "a label context marker") 12 | // Start is used for things like traces that have a name. 13 | Start = NewString("start", "span start") 14 | // Metric is a key used to indicate an event records metrics. 15 | End = NewTag("end", "a span end marker") 16 | // Metric is a key used to indicate an event records metrics. 17 | Detach = NewTag("detach", "a span detach marker") 18 | // Err is a key used to add error values to label lists. 19 | Err = NewError("error", "an error that occurred") 20 | // Metric is a key used to indicate an event records metrics. 21 | Metric = NewTag("metric", "a metric event marker") 22 | ) 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/packagesinternal/packages.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 packagesinternal exposes internal-only fields from go/packages. 6 | package packagesinternal 7 | 8 | import ( 9 | "golang.org/x/tools/internal/gocommand" 10 | ) 11 | 12 | var GetForTest = func(p interface{}) string { return "" } 13 | var GetDepsErrors = func(p interface{}) []*PackageError { return nil } 14 | 15 | type PackageError struct { 16 | ImportStack []string // shortest path from package named on command line to this one 17 | Pos string // position of error (if present, file:line:col) 18 | Err string // the error itself 19 | } 20 | 21 | var GetGoCmdRunner = func(config interface{}) *gocommand.Runner { return nil } 22 | 23 | var SetGoCmdRunner = func(config interface{}, runner *gocommand.Runner) {} 24 | 25 | var TypecheckCgo int 26 | 27 | var SetModFlag = func(config interface{}, value string) {} 28 | var SetModFile = func(config interface{}, value string) {} 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build !go1.18 6 | // +build !go1.18 7 | 8 | package typeparams 9 | 10 | // Enabled reports whether type parameters are enabled in the current build 11 | // environment. 12 | const Enabled = false 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build go1.18 6 | // +build go1.18 7 | 8 | package typeparams 9 | 10 | // Note: this constant is in a separate file as this is the only acceptable 11 | // diff between the <1.18 API of this package and the 1.18 API. 12 | 13 | // Enabled reports whether type parameters are enabled in the current build 14 | // environment. 15 | const Enabled = true 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/typesinternal/types_118.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build go1.18 6 | // +build go1.18 7 | 8 | package typesinternal 9 | 10 | import ( 11 | "go/types" 12 | ) 13 | 14 | func init() { 15 | SetGoVersion = func(conf *types.Config, version string) bool { 16 | conf.GoVersion = version 17 | return true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/README: -------------------------------------------------------------------------------- 1 | This repository holds the transition packages for the new Go 1.13 error values. 2 | See golang.org/design/29934-error-values. 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 xerrors implements functions to manipulate errors. 6 | // 7 | // This package is based on the Go 2 proposal for error values: 8 | // https://golang.org/design/29934-error-values 9 | // 10 | // These functions were incorporated into the standard library's errors package 11 | // in Go 1.13: 12 | // - Is 13 | // - As 14 | // - Unwrap 15 | // 16 | // Also, Errorf's %w verb was incorporated into fmt.Errorf. 17 | // 18 | // Use this package to get equivalent behavior in all supported Go versions. 19 | // 20 | // No other features of this package were included in Go 1.13, and at present 21 | // there are no plans to include any of them. 22 | package xerrors // import "golang.org/x/xerrors" 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/errors.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 xerrors 6 | 7 | import "fmt" 8 | 9 | // errorString is a trivial implementation of error. 10 | type errorString struct { 11 | s string 12 | frame Frame 13 | } 14 | 15 | // New returns an error that formats as the given text. 16 | // 17 | // The returned error contains a Frame set to the caller's location and 18 | // implements Formatter to show this information when printed with details. 19 | func New(text string) error { 20 | return &errorString{text, Caller(1)} 21 | } 22 | 23 | func (e *errorString) Error() string { 24 | return e.s 25 | } 26 | 27 | func (e *errorString) Format(s fmt.State, v rune) { FormatError(e, s, v) } 28 | 29 | func (e *errorString) FormatError(p Printer) (next error) { 30 | p.Print(e.s) 31 | e.frame.Format(p) 32 | return nil 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/internal/internal.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 | package internal 6 | 7 | // EnableTrace indicates whether stack information should be recorded in errors. 8 | var EnableTrace = true 9 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/encoding/prototext/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 prototext marshals and unmarshals protocol buffer messages as the 6 | // textproto format. 7 | package prototext 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 editiondefaults contains the binary representation of the editions 6 | // defaults. 7 | package editiondefaults 8 | 9 | import _ "embed" 10 | 11 | //go:embed editions_defaults.binpb 12 | var Defaults []byte 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gojp/goreportcard/1060522058ebc739b0be81eb6c1f773ffaa7eb1c/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/errors/is_go112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 | //go:build !go1.13 6 | // +build !go1.13 7 | 8 | package errors 9 | 10 | import "reflect" 11 | 12 | // Is is a copy of Go 1.13's errors.Is for use with older Go versions. 13 | func Is(err, target error) bool { 14 | if target == nil { 15 | return err == target 16 | } 17 | 18 | isComparable := reflect.TypeOf(target).Comparable() 19 | for { 20 | if isComparable && err == target { 21 | return true 22 | } 23 | if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { 24 | return true 25 | } 26 | if err = unwrap(err); err == nil { 27 | return false 28 | } 29 | } 30 | } 31 | 32 | func unwrap(err error) error { 33 | u, ok := err.(interface { 34 | Unwrap() error 35 | }) 36 | if !ok { 37 | return nil 38 | } 39 | return u.Unwrap() 40 | } 41 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/errors/is_go113.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 | //go:build go1.13 6 | // +build go1.13 7 | 8 | package errors 9 | 10 | import "errors" 11 | 12 | // Is is errors.Is. 13 | func Is(err, target error) bool { return errors.Is(err, target) } 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.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 | //go:build !protolegacy 6 | // +build !protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = false 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.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 | //go:build protolegacy 6 | // +build protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = true 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 genid contains constants for declarations in descriptor.proto 6 | // and the well-known types. 7 | package genid 8 | 9 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/empty_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" 14 | 15 | // Names for google.protobuf.Empty. 16 | const ( 17 | Empty_message_name protoreflect.Name = "Empty" 18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto" 14 | 15 | // Names for google.protobuf.FieldMask. 16 | const ( 17 | FieldMask_message_name protoreflect.Name = "FieldMask" 18 | FieldMask_message_fullname protoreflect.FullName = "google.protobuf.FieldMask" 19 | ) 20 | 21 | // Field names for google.protobuf.FieldMask. 22 | const ( 23 | FieldMask_Paths_field_name protoreflect.Name = "paths" 24 | 25 | FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf.FieldMask.paths" 26 | ) 27 | 28 | // Field numbers for google.protobuf.FieldMask. 29 | const ( 30 | FieldMask_Paths_field_number protoreflect.FieldNumber = 1 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/goname.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 genid 6 | 7 | // Go names of implementation-specific struct fields in generated messages. 8 | const ( 9 | State_goname = "state" 10 | 11 | SizeCache_goname = "sizeCache" 12 | SizeCacheA_goname = "XXX_sizecache" 13 | 14 | WeakFields_goname = "weakFields" 15 | WeakFieldsA_goname = "XXX_weak" 16 | 17 | UnknownFields_goname = "unknownFields" 18 | UnknownFieldsA_goname = "XXX_unrecognized" 19 | 20 | ExtensionFields_goname = "extensionFields" 21 | ExtensionFieldsA_goname = "XXX_InternalExtensions" 22 | ExtensionFieldsB_goname = "XXX_extensions" 23 | 24 | WeakFieldPrefix_goname = "XXX_weak_" 25 | ) 26 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/map_entry.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 genid 6 | 7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field names and numbers for synthetic map entry messages. 10 | const ( 11 | MapEntry_Key_field_name protoreflect.Name = "key" 12 | MapEntry_Value_field_name protoreflect.Name = "value" 13 | 14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1 15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/wrappers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 genid 6 | 7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field name and number for messages in wrappers.proto. 10 | const ( 11 | WrapperValue_Value_field_name protoreflect.Name = "value" 12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | //go:build !go1.12 6 | // +build !go1.12 7 | 8 | package impl 9 | 10 | import "reflect" 11 | 12 | type mapIter struct { 13 | v reflect.Value 14 | keys []reflect.Value 15 | } 16 | 17 | // mapRange provides a less-efficient equivalent to 18 | // the Go 1.12 reflect.Value.MapRange method. 19 | func mapRange(v reflect.Value) *mapIter { 20 | return &mapIter{v: v} 21 | } 22 | 23 | func (i *mapIter) Next() bool { 24 | if i.keys == nil { 25 | i.keys = i.v.MapKeys() 26 | } else { 27 | i.keys = i.keys[1:] 28 | } 29 | return len(i.keys) > 0 30 | } 31 | 32 | func (i *mapIter) Key() reflect.Value { 33 | return i.keys[0] 34 | } 35 | 36 | func (i *mapIter) Value() reflect.Value { 37 | return i.v.MapIndex(i.keys[0]) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | //go:build go1.12 6 | // +build go1.12 7 | 8 | package impl 9 | 10 | import "reflect" 11 | 12 | func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | //go:build !purego && !appengine 6 | // +build !purego,!appengine 7 | 8 | package impl 9 | 10 | // When using unsafe pointers, we can just treat enum values as int32s. 11 | 12 | var ( 13 | coderEnumNoZero = coderInt32NoZero 14 | coderEnum = coderInt32 15 | coderEnumPtr = coderInt32Ptr 16 | coderEnumSlice = coderInt32Slice 17 | coderEnumPackedSlice = coderInt32PackedSlice 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/enum.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 impl 6 | 7 | import ( 8 | "reflect" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | type EnumInfo struct { 14 | GoReflectType reflect.Type // int32 kind 15 | Desc protoreflect.EnumDescriptor 16 | } 17 | 18 | func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum { 19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum) 20 | } 21 | func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc } 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/strs/strings_pure.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 | //go:build purego || appengine 6 | // +build purego appengine 7 | 8 | package strs 9 | 10 | import pref "google.golang.org/protobuf/reflect/protoreflect" 11 | 12 | func UnsafeString(b []byte) string { 13 | return string(b) 14 | } 15 | 16 | func UnsafeBytes(s string) []byte { 17 | return []byte(s) 18 | } 19 | 20 | type Builder struct{} 21 | 22 | func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { 23 | return prefix.Append(name) 24 | } 25 | 26 | func (*Builder) MakeString(b []byte) string { 27 | return string(b) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_methods.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build !protoreflect 7 | // +build !protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = true 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return m.ProtoMethods() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_reflect.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build protoreflect 7 | // +build protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = false 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoiface/legacy.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 | package protoiface 6 | 7 | type MessageV1 interface { 8 | Reset() 9 | String() string 10 | ProtoMessage() 11 | } 12 | 13 | type ExtensionRangeV1 struct { 14 | Start, End int32 // both inclusive 15 | } 16 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google Inc. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | syntax = "proto2"; 9 | 10 | package google.protobuf; 11 | 12 | import "google/protobuf/descriptor.proto"; 13 | 14 | option go_package = "google.golang.org/protobuf/types/gofeaturespb"; 15 | 16 | extend google.protobuf.FeatureSet { 17 | optional GoFeatures go = 1002; 18 | } 19 | 20 | message GoFeatures { 21 | // Whether or not to generate the deprecated UnmarshalJSON method for enums. 22 | optional bool legacy_unmarshal_json_enum = 1 [ 23 | retention = RETENTION_RUNTIME, 24 | targets = TARGET_TYPE_ENUM, 25 | edition_defaults = { edition: EDITION_PROTO2, value: "true" }, 26 | edition_defaults = { edition: EDITION_PROTO3, value: "false" } 27 | ]; 28 | } 29 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | install: go get -t -v ./... 4 | go: 1.2 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/completions.go: -------------------------------------------------------------------------------- 1 | package kingpin 2 | 3 | // HintAction is a function type who is expected to return a slice of possible 4 | // command line arguments. 5 | type HintAction func() []string 6 | type completionsMixin struct { 7 | hintActions []HintAction 8 | builtinHintActions []HintAction 9 | } 10 | 11 | func (a *completionsMixin) addHintAction(action HintAction) { 12 | a.hintActions = append(a.hintActions, action) 13 | } 14 | 15 | // Allow adding of HintActions which are added internally, ie, EnumVar 16 | func (a *completionsMixin) addHintActionBuiltin(action HintAction) { 17 | a.builtinHintActions = append(a.builtinHintActions, action) 18 | } 19 | 20 | func (a *completionsMixin) resolveCompletions() []string { 21 | var hints []string 22 | 23 | options := a.builtinHintActions 24 | if len(a.hintActions) > 0 { 25 | // User specified their own hintActions. Use those instead. 26 | options = a.hintActions 27 | } 28 | 29 | for _, hintAction := range options { 30 | hints = append(hints, hintAction()...) 31 | } 32 | return hints 33 | } 34 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/envar.go: -------------------------------------------------------------------------------- 1 | package kingpin 2 | 3 | import ( 4 | "os" 5 | "regexp" 6 | ) 7 | 8 | var ( 9 | envVarValuesSeparator = "\r?\n" 10 | envVarValuesTrimmer = regexp.MustCompile(envVarValuesSeparator + "$") 11 | envVarValuesSplitter = regexp.MustCompile(envVarValuesSeparator) 12 | ) 13 | 14 | type envarMixin struct { 15 | envar string 16 | noEnvar bool 17 | } 18 | 19 | func (e *envarMixin) HasEnvarValue() bool { 20 | return e.GetEnvarValue() != "" 21 | } 22 | 23 | func (e *envarMixin) GetEnvarValue() string { 24 | if e.noEnvar || e.envar == "" { 25 | return "" 26 | } 27 | return os.Getenv(e.envar) 28 | } 29 | 30 | func (e *envarMixin) GetSplitEnvarValue() []string { 31 | values := make([]string, 0) 32 | 33 | envarValue := e.GetEnvarValue() 34 | if envarValue == "" { 35 | return values 36 | } 37 | 38 | // Split by new line to extract multiple values, if any. 39 | trimmed := envVarValuesTrimmer.ReplaceAllString(envarValue, "") 40 | for _, value := range envVarValuesSplitter.Split(trimmed, -1) { 41 | values = append(values, value) 42 | } 43 | 44 | return values 45 | } 46 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/guesswidth.go: -------------------------------------------------------------------------------- 1 | // +build appengine !linux,!freebsd,!darwin,!dragonfly,!netbsd,!openbsd 2 | 3 | package kingpin 4 | 5 | import "io" 6 | 7 | func guessWidth(w io.Writer) int { 8 | return 80 9 | } 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/guesswidth_unix.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,linux freebsd darwin dragonfly netbsd openbsd 2 | 3 | package kingpin 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "strconv" 9 | "syscall" 10 | "unsafe" 11 | ) 12 | 13 | func guessWidth(w io.Writer) int { 14 | // check if COLUMNS env is set to comply with 15 | // http://pubs.opengroup.org/onlinepubs/009604499/basedefs/xbd_chap08.html 16 | colsStr := os.Getenv("COLUMNS") 17 | if colsStr != "" { 18 | if cols, err := strconv.Atoi(colsStr); err == nil { 19 | return cols 20 | } 21 | } 22 | 23 | if t, ok := w.(*os.File); ok { 24 | fd := t.Fd() 25 | var dimensions [4]uint16 26 | 27 | if _, _, err := syscall.Syscall6( 28 | syscall.SYS_IOCTL, 29 | uintptr(fd), 30 | uintptr(syscall.TIOCGWINSZ), 31 | uintptr(unsafe.Pointer(&dimensions)), 32 | 0, 0, 0, 33 | ); err == 0 { 34 | return int(dimensions[1]) 35 | } 36 | } 37 | return 80 38 | } 39 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/analysis/facts/directives.go: -------------------------------------------------------------------------------- 1 | package facts 2 | 3 | import ( 4 | "reflect" 5 | 6 | "golang.org/x/tools/go/analysis" 7 | "honnef.co/go/tools/analysis/lint" 8 | ) 9 | 10 | func directives(pass *analysis.Pass) (interface{}, error) { 11 | return lint.ParseDirectives(pass.Files, pass.Fset), nil 12 | } 13 | 14 | var Directives = &analysis.Analyzer{ 15 | Name: "directives", 16 | Doc: "extracts linter directives", 17 | Run: directives, 18 | RunDespiteErrors: true, 19 | ResultType: reflect.TypeOf([]lint.Directive{}), 20 | } 21 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/analysis/facts/token.go: -------------------------------------------------------------------------------- 1 | package facts 2 | 3 | import ( 4 | "go/ast" 5 | "go/token" 6 | "reflect" 7 | 8 | "golang.org/x/tools/go/analysis" 9 | ) 10 | 11 | var TokenFile = &analysis.Analyzer{ 12 | Name: "tokenfileanalyzer", 13 | Doc: "creates a mapping of *token.File to *ast.File", 14 | Run: func(pass *analysis.Pass) (interface{}, error) { 15 | m := map[*token.File]*ast.File{} 16 | for _, af := range pass.Files { 17 | tf := pass.Fset.File(af.Pos()) 18 | m[tf] = af 19 | } 20 | return m, nil 21 | }, 22 | RunDespiteErrors: true, 23 | ResultType: reflect.TypeOf(map[*token.File]*ast.File{}), 24 | } 25 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/cmd/staticcheck/README.md: -------------------------------------------------------------------------------- 1 | # staticcheck 2 | 3 | _staticcheck_ offers extensive analysis of Go code, covering a myriad 4 | of categories. It will detect bugs, suggest code simplifications, 5 | point out dead code, and more. 6 | 7 | ## Installation 8 | 9 | See [the main README](https://github.com/dominikh/go-tools#installation) for installation instructions. 10 | 11 | ## Documentation 12 | 13 | Detailed documentation can be found on 14 | [staticcheck.io](https://staticcheck.io/docs/). 15 | 16 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/cmd/staticcheck/staticcheck.go: -------------------------------------------------------------------------------- 1 | // staticcheck analyses Go code and makes it better. 2 | package main 3 | 4 | import ( 5 | "log" 6 | "os" 7 | 8 | "golang.org/x/tools/go/analysis" 9 | "honnef.co/go/tools/lintcmd" 10 | "honnef.co/go/tools/simple" 11 | "honnef.co/go/tools/staticcheck" 12 | "honnef.co/go/tools/stylecheck" 13 | "honnef.co/go/tools/unused" 14 | ) 15 | 16 | func main() { 17 | fs := lintcmd.FlagSet("staticcheck") 18 | debug := fs.String("debug.unused-graph", "", "Write unused's object graph to `file`") 19 | fs.Parse(os.Args[1:]) 20 | 21 | var cs []*analysis.Analyzer 22 | for _, v := range simple.Analyzers { 23 | cs = append(cs, v) 24 | } 25 | for _, v := range staticcheck.Analyzers { 26 | cs = append(cs, v) 27 | } 28 | for _, v := range stylecheck.Analyzers { 29 | cs = append(cs, v) 30 | } 31 | 32 | cs = append(cs, unused.Analyzer) 33 | if *debug != "" { 34 | f, err := os.OpenFile(*debug, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666) 35 | if err != nil { 36 | log.Fatal(err) 37 | } 38 | unused.Debug = f 39 | } 40 | 41 | lintcmd.ProcessFlagSet(cs, fs) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/config/example.conf: -------------------------------------------------------------------------------- 1 | checks = ["all", "-ST1003", "-ST1014"] 2 | initialisms = ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", 3 | "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", 4 | "IP", "JSON", "QPS", "RAM", "RPC", "SLA", 5 | "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", 6 | "UDP", "UI", "GID", "UID", "UUID", "URI", 7 | "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", 8 | "XSS", "SIP", "RTP"] 9 | dot_import_whitelist = [] 10 | http_status_code_whitelist = ["200", "400", "404", "500"] 11 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/go/ir/identical.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package ir 4 | 5 | import "go/types" 6 | 7 | var structTypesIdentical = types.IdenticalIgnoreTags 8 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/go/ir/identical_17.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package ir 4 | 5 | import "go/types" 6 | 7 | var structTypesIdentical = types.Identical 8 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/go/ir/irutil/stub.go: -------------------------------------------------------------------------------- 1 | package irutil 2 | 3 | import ( 4 | "honnef.co/go/tools/go/ir" 5 | ) 6 | 7 | // IsStub reports whether a function is a stub. A function is 8 | // considered a stub if it has no instructions or if all it does is 9 | // return a constant value. 10 | func IsStub(fn *ir.Function) bool { 11 | for _, b := range fn.Blocks { 12 | for _, instr := range b.Instrs { 13 | switch instr.(type) { 14 | case *ir.Const: 15 | // const naturally has no side-effects 16 | case *ir.Panic: 17 | // panic is a stub if it only uses constants 18 | case *ir.Return: 19 | // return is a stub if it only uses constants 20 | case *ir.DebugRef: 21 | case *ir.Jump: 22 | // if there are no disallowed instructions, then we're 23 | // only jumping to the exit block (or possibly 24 | // somewhere else that's stubby?) 25 | default: 26 | // all other instructions are assumed to do actual work 27 | return false 28 | } 29 | } 30 | } 31 | return true 32 | } 33 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/go/ir/staticcheck.conf: -------------------------------------------------------------------------------- 1 | # ssa/... is mostly imported from upstream and we don't want to 2 | # deviate from it too much, hence disabling SA1019 3 | checks = ["inherit", "-SA1019"] 4 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/go/ir/write.go: -------------------------------------------------------------------------------- 1 | package ir 2 | 3 | func NewJump(parent *BasicBlock) *Jump { 4 | return &Jump{anInstruction{block: parent}, ""} 5 | } 6 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/go/types/typeutil/imports.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 | package typeutil 6 | 7 | import "go/types" 8 | 9 | // Dependencies returns all dependencies of the specified packages. 10 | // 11 | // Dependent packages appear in topological order: if package P imports 12 | // package Q, Q appears earlier than P in the result. 13 | // The algorithm follows import statements in the order they 14 | // appear in the source code, so the result is a total order. 15 | // 16 | func Dependencies(pkgs ...*types.Package) []*types.Package { 17 | var result []*types.Package 18 | seen := make(map[*types.Package]bool) 19 | var visit func(pkgs []*types.Package) 20 | visit = func(pkgs []*types.Package) { 21 | for _, p := range pkgs { 22 | if !seen[p] { 23 | seen[p] = true 24 | visit(p.Imports()) 25 | result = append(result, p) 26 | } 27 | } 28 | } 29 | visit(pkgs) 30 | return result 31 | } 32 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/internal/go/gcimporter/newInterface10.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 !go1.11 6 | 7 | package gcimporter 8 | 9 | import "go/types" 10 | 11 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { 12 | named := make([]*types.Named, len(embeddeds)) 13 | for i, e := range embeddeds { 14 | var ok bool 15 | named[i], ok = e.(*types.Named) 16 | if !ok { 17 | panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") 18 | } 19 | } 20 | return types.NewInterface(methods, named) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/internal/go/gcimporter/newInterface11.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 go1.11 6 | 7 | package gcimporter 8 | 9 | import "go/types" 10 | 11 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { 12 | return types.NewInterfaceType(methods, embeddeds) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/internal/robustio/robustio_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 robustio 6 | 7 | import ( 8 | "errors" 9 | "syscall" 10 | ) 11 | 12 | const errFileNotFound = syscall.ENOENT 13 | 14 | // isEphemeralError returns true if err may be resolved by waiting. 15 | func isEphemeralError(err error) bool { 16 | var errno syscall.Errno 17 | if errors.As(err, &errno) { 18 | return errno == errFileNotFound 19 | } 20 | return false 21 | } 22 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/internal/robustio/robustio_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 !windows,!darwin 6 | 7 | package robustio 8 | 9 | import ( 10 | "io/ioutil" 11 | "os" 12 | ) 13 | 14 | func rename(oldpath, newpath string) error { 15 | return os.Rename(oldpath, newpath) 16 | } 17 | 18 | func readFile(filename string) ([]byte, error) { 19 | return ioutil.ReadFile(filename) 20 | } 21 | 22 | func removeAll(path string) error { 23 | return os.RemoveAll(path) 24 | } 25 | 26 | func isEphemeralError(err error) bool { 27 | return false 28 | } 29 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/internal/robustio/robustio_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 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 robustio 6 | 7 | import ( 8 | "errors" 9 | "syscall" 10 | ) 11 | 12 | const ERROR_SHARING_VIOLATION = 32 13 | const errFileNotFound = syscall.ERROR_FILE_NOT_FOUND 14 | 15 | // isEphemeralError returns true if err may be resolved by waiting. 16 | func isEphemeralError(err error) bool { 17 | var errno syscall.Errno 18 | if errors.As(err, &errno) { 19 | switch errno { 20 | case syscall.ERROR_ACCESS_DENIED, 21 | syscall.ERROR_FILE_NOT_FOUND, 22 | ERROR_SHARING_VIOLATION: 23 | return true 24 | } 25 | } 26 | return false 27 | } 28 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/internal/sync/sync.go: -------------------------------------------------------------------------------- 1 | package sync 2 | 3 | type Semaphore struct { 4 | ch chan struct{} 5 | } 6 | 7 | func NewSemaphore(size int) Semaphore { 8 | return Semaphore{ 9 | ch: make(chan struct{}, size), 10 | } 11 | } 12 | 13 | func (sem Semaphore) Acquire() { 14 | sem.ch <- struct{}{} 15 | } 16 | 17 | func (sem Semaphore) AcquireMaybe() bool { 18 | select { 19 | case sem.ch <- struct{}{}: 20 | return true 21 | default: 22 | return false 23 | } 24 | } 25 | 26 | func (sem Semaphore) Release() { 27 | <-sem.ch 28 | } 29 | 30 | func (sem Semaphore) Len() int { 31 | return len(sem.ch) 32 | } 33 | 34 | func (sem Semaphore) Cap() int { 35 | return cap(sem.ch) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/lintcmd/stats.go: -------------------------------------------------------------------------------- 1 | // +build !aix,!android,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 2 | 3 | package lintcmd 4 | 5 | import "os" 6 | 7 | var infoSignals = []os.Signal{} 8 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/lintcmd/stats_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | 3 | package lintcmd 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | var infoSignals = []os.Signal{syscall.SIGINFO} 11 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/lintcmd/stats_posix.go: -------------------------------------------------------------------------------- 1 | // +build aix android linux solaris 2 | 3 | package lintcmd 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | var infoSignals = []os.Signal{syscall.SIGUSR1} 11 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/lintcmd/version/buildinfo.go: -------------------------------------------------------------------------------- 1 | // +build go1.12 2 | 3 | package version 4 | 5 | import ( 6 | "fmt" 7 | "runtime/debug" 8 | ) 9 | 10 | func printBuildInfo() { 11 | if info, ok := debug.ReadBuildInfo(); ok { 12 | fmt.Println("Main module:") 13 | printModule(&info.Main) 14 | fmt.Println("Dependencies:") 15 | for _, dep := range info.Deps { 16 | printModule(dep) 17 | } 18 | } else { 19 | fmt.Println("Built without Go modules") 20 | } 21 | } 22 | 23 | func buildInfoVersion() (string, bool) { 24 | info, ok := debug.ReadBuildInfo() 25 | if !ok { 26 | return "", false 27 | } 28 | if info.Main.Version == "(devel)" { 29 | return "", false 30 | } 31 | return info.Main.Version, true 32 | } 33 | 34 | func printModule(m *debug.Module) { 35 | fmt.Printf("\t%s", m.Path) 36 | if m.Version != "(devel)" { 37 | fmt.Printf("@%s", m.Version) 38 | } 39 | if m.Sum != "" { 40 | fmt.Printf(" (sum: %s)", m.Sum) 41 | } 42 | if m.Replace != nil { 43 | fmt.Printf(" (replace: %s)", m.Replace.Path) 44 | } 45 | fmt.Println() 46 | } 47 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/lintcmd/version/buildinfo111.go: -------------------------------------------------------------------------------- 1 | // +build !go1.12 2 | 3 | package version 4 | 5 | func printBuildInfo() {} 6 | func buildInfoVersion() (string, bool) { return "", false } 7 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/lintcmd/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | "runtime" 8 | ) 9 | 10 | const Version = "2020.2.3" 11 | const MachineVersion = "v0.1.3" 12 | 13 | // version returns a version descriptor and reports whether the 14 | // version is a known release. 15 | func version() (human, machine string, known bool) { 16 | if Version != "devel" { 17 | return Version, MachineVersion, true 18 | } 19 | v, ok := buildInfoVersion() 20 | if ok { 21 | return v, "", false 22 | } 23 | return "devel", "", false 24 | } 25 | 26 | func Print() { 27 | human, machine, release := version() 28 | 29 | if release { 30 | fmt.Printf("%s %s (%s)\n", filepath.Base(os.Args[0]), human, machine) 31 | } else if human == "devel" { 32 | fmt.Printf("%s (no version)\n", filepath.Base(os.Args[0])) 33 | } else { 34 | fmt.Printf("%s (devel, %s)\n", filepath.Base(os.Args[0]), human) 35 | } 36 | } 37 | 38 | func Verbose() { 39 | Print() 40 | fmt.Println() 41 | fmt.Println("Compiled with Go version:", runtime.Version()) 42 | printBuildInfo() 43 | } 44 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/pattern/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package pattern 4 | 5 | import ( 6 | "go/ast" 7 | goparser "go/parser" 8 | "go/token" 9 | "os" 10 | "path/filepath" 11 | "strings" 12 | ) 13 | 14 | var files []*ast.File 15 | 16 | func init() { 17 | fset := token.NewFileSet() 18 | filepath.Walk("/usr/lib/go/src", func(path string, info os.FileInfo, err error) error { 19 | if err != nil { 20 | // XXX error handling 21 | panic(err) 22 | } 23 | if !strings.HasSuffix(path, ".go") { 24 | return nil 25 | } 26 | f, err := goparser.ParseFile(fset, path, nil, 0) 27 | if err != nil { 28 | return nil 29 | } 30 | files = append(files, f) 31 | return nil 32 | }) 33 | } 34 | 35 | func Fuzz(data []byte) int { 36 | p := &Parser{} 37 | pat, err := p.Parse(string(data)) 38 | if err != nil { 39 | if strings.Contains(err.Error(), "internal error") { 40 | panic(err) 41 | } 42 | return 0 43 | } 44 | _ = pat.Root.String() 45 | 46 | for _, f := range files { 47 | Match(pat.Root, f) 48 | } 49 | return 1 50 | } 51 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/printf/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package printf 4 | 5 | func Fuzz(data []byte) int { 6 | _, err := Parse(string(data)) 7 | if err == nil { 8 | return 1 9 | } 10 | return 0 11 | } 12 | -------------------------------------------------------------------------------- /vendor/honnef.co/go/tools/staticcheck/buildtag.go: -------------------------------------------------------------------------------- 1 | package staticcheck 2 | 3 | import ( 4 | "go/ast" 5 | "strings" 6 | 7 | "honnef.co/go/tools/go/ast/astutil" 8 | ) 9 | 10 | func buildTags(f *ast.File) [][]string { 11 | var out [][]string 12 | for _, line := range strings.Split(astutil.Preamble(f), "\n") { 13 | if !strings.HasPrefix(line, "+build ") { 14 | continue 15 | } 16 | line = strings.TrimSpace(strings.TrimPrefix(line, "+build ")) 17 | fields := strings.Fields(line) 18 | out = append(out, fields) 19 | } 20 | return out 21 | } 22 | --------------------------------------------------------------------------------