messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage exp14\n\nimport (\n\t. \"github.com/shurcooL/go/gists/gist7480523\"\n\t. \"github.com/shurcooL/go/gists/gist7802150\"\n\n\t\"github.com/shurcooL/go/gists/gist8018045\"\n)\n\ntype GoPackages struct {\n\tSkipGoroot bool // Currently, work... | go | edit | 15 | 4 | mit | 379a1445adcacc5c586695e7e17b477e1c4a5d36 | shurcooL/go | exp/14/main.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2018 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses... | go | edit | 0 | 1 | apache-2.0 | 325714ab560d5fbfd76b90813381cec444758552 | GoogleCloudPlatform/netd,GoogleCloudPlatform/netd,GoogleCloudPlatform/netd | pkg/options/options.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package zapadapter provides a logger that writes to a go.uber.org/zap.Logger.\npackage zapadapter\n\nimport (\n\t\"github.com/jackc/pgx\"\n\t\"go.uber.org/zap\"\n\t\"go.uber.org/zap/zapcore\"\n)\n\ntype Logger struct {\n\tlogger *zap.Logger\... | go | edit | 0 | 7 | mit | 8ba5485db6ebfa824458df98db6df29cbe128332 | jackc/pgx,jackc/pgx,jackc/pgx,jackc/pgx | log/zapadapter/adapter.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\nfunc assertEqual(a interface{}, b interface{}) {\n\tif a != b {\n\t\tpanic(fmt.Sprint(\"Expected \", a, \", but got \", b))\n\t}\n}\n\nfunc fib(n int) int {\n\tif n < 2 {\n\t\treturn 1\n\t}\... | go | edit | 0 | 2 | mit | e8e795c97378e6bd4cf6d693c23e6d8e90429a4e | alangpierce/apgo | sample/sample.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Logging helpers\npackage autosite\n\nimport (\n\t\"net/http\"\n)\n\n// LoggerFunc returns a logger from a http request.\ntype LoggerFunc func(*http.Request) Logger\n\n// Logger specifies logging functions.\ntype Logger interface {\n\t// Debu... | go | edit | 0 | 1 | mit | 754c347b2aa5923a03c1a9806804c049ea83858d | hkjn/autosite | logging.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage handlers\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/cloudfoundry-incubator/bbs\"\n\t\"github.com/cloudfoundry-incubator/bbs/models\"\n\t\"github.com/pivotal-golang/lager\"\n)\n\ntype StopAppHandler struct {\n\tbbsClient bbs.Client\n\... | go | edit | 3 | 4 | apache-2.0 | 6e8b5de82a26d9d0000ae7ce5669eef8052123e9 | cloudfoundry-incubator/nsync | handlers/stop_app_handler.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/rlayte/toystore\"\n\t\"github.com/rlayte/toystore/adapters/redis\"\n)\n\nfunc main() {\n\tvar seed string\n\tif len(os.Args) != 2 {\n\t\tfmt.Printf(\"usage: %s [port... | go | edit | 0 | 4 | mit | 7f85af507aaea6d504f0aeddb7e1a6ffd9b8e1d7 | rlayte/toystore | example/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\t// Declare a variable called myName.\n\tvar myName string\n\t// Now add a variable for your friends name here.\n\n\t// Set the value of myName to your name.\n\t// I'll use Owen :) You h... | go | edit | 0 | 1 | bsd-3-clause | d7e68e44d4a48271942f377b5b6c43195b995d40 | gophercoders/codeclub | hellofriends/hellofriends.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage nigronimgosession\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/gorilla/context\"\n\tmgo \"gopkg.in/mgo.v2\"\n)\n\ntype DatabaseAccessor struct {\n\t*mgo.Session\n\turl string\n\tname string\n\tcoll string\n}\n\nfunc NewDatabaseAccesso... | go | edit | 0 | 2 | mit | 597e4bc46519afb8757ab000b9b260fa72d0247f | joeljames/nigroni-mgo-session | database_accessor.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage protocol\n\n// Kafka Encoding\n\ntype encoder interface {\n\tencode(pe packetEncoder)\n}\n\nfunc encode(in encoder) ([]byte, error) {\n\tif in == nil {\n\t\treturn nil, nil\n\t}\n\n\tvar prepEnc prepEncoder\n\tvar realEnc realEncoder\n\... | go | edit | 18 | 4 | mit | 8dca559f101f1291f06416539403e92085c82edc | aybabtme/sarama,cep21/sarama,sclasen/sarama,jimmykuo/sarama,scalingdata/sarama,jepst/sarama,VividCortex/sarama,cep21/sarama,raisemarketplace/sarama,rafrombrc/sarama,Neuw84/sarama,yangfan876/sarama,raisemarketplace/sarama,vrischmann/sarama,winlinvip/sarama,kraveio/sarama,rafrombrc/sarama,kraveio/sarama,DataDog/sarama,be... | protocol/encoder_decoder.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage store\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/Sirupsen/logrus\"\n\t\"github.com/solderapp/solder/config\"\n)\n\n// Load initializes the database connection.\nfunc Load(cfg *config.Config) *Store {\n\tdriver := cfg.Database.Driver\n\tco... | go | edit | 6 | 4 | apache-2.0 | 72c282466e2c9f9564fe4331dafbb50964a3f4c1 | kleister/kleister-api,kleister/kleister-api,solderapp/solder-api,solderapp/solder-api | store/load.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage chapter15\n\nimport \"testing\"\n\nvar scoreCombinationTests = []struct {\n\tW []int\n\ts int\n\texpected int\n}{\n\t{[]int{2, 3, 7}, 12, 4},\n}\n\nfunc TestScoreCombination(t *testing.T) {\n\tfor _, tt := range scoreCombi... | go | edit | 3 | 3 | mit | 29bf109de0b6abfb3532d05bc612e0636b7adfa6 | akshaykumar90/sparkling-water | chapter15/scorecombination_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage glx\n\n// #cgo linux LDFLAGS: -lGL\n// #include <stdlib.h>\n// #include <GL/glx.h>\nimport \"C\"\nimport \"unsafe\"\n\nfunc GetProcAddress(name string) unsafe.Pointer {\n\tvar cname *C.GLubyte = (*C.GLubyte)(C.CString(name))\n\tdefer C.... | go | edit | 0 | 1 | mit | 0c2e34e3d8c64bb1c81e41feca9e1f61374752a6 | go-gl/gl,thinkofdeath/gl,mantyr/gl,MaVo159/gl,stephenwithav/gl | procaddr/glx/glx.go | rejected_duplicate | Near-duplicate of sample 116902 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage util\n\nimport \"fmt\"\nimport \"os\"\n\nfunc MaybePanic(err error) {\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nfunc Debugging() bool {\n\treturn os.Getenv(\"GOLOG_DEBUG\") != \"\"\n}\n\nfunc Debugf(format string, args ...interface{... | go | edit | 0 | 2 | mit | f913d71d8808825ea2358731fc464e5aae542b57 | vzaramel/golog,vzaramel/golog,samuell/golog,bransorem/golog,mndrix/golog,bransorem/golog,mndrix/golog,samuell/golog | util/util.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage types\n\n// DataFreshness codes for a specific data freshness requirement: realtime or base_schedule\ntype DataFreshness string\n\nconst (\n\t// DataFreshnessRealTime means you'll get undisrupted journeys\n\tDataFreshnessRealTime DataFr... | go | edit | 0 | 0 | unlicense | d9a4c9242f7759e5b9dc7ac853c1a6799b584d44 | aabizri/navitia,aabizri/navitia | common.go | rejected_duplicate | Near-duplicate of sample 117738 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"github.com/Symantec/Dominator/lib/mdb\"\n\t\"io\"\n\t\"log\"\n)\n\nfunc loadDsHostFqdn(reader io.Reader, datacentre string, logger *log.Logger) (\n\t*mdb.Mdb, error) {\n\ttype mac... | go | edit | 0 | 7 | apache-2.0 | 028f8b142966611391d41c41671d61138d1c4b4f | rgooch/Dominator,keep94/Dominator,keep94/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator,Symantec/Dominator,Symantec/Dominator | cmd/mdbd/loadDsHostFqdn.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage frontend\n\nimport (\n\t\"crypto/hmac\"\n\t\"crypto/sha1\"\n)\n\n// ComputeHMAC of a message using a specific key\nfunc ComputeHMAC(message []byte, key string) []byte {\n\tmac := hmac.New(sha1.New, []byte(key))\n\tmac.Write(message)\n\t... | go | edit | 0 | 1 | bsd-3-clause | 3434e00fe6939d20d76fa7d05a9288c7b1d7a1f3 | cvmfs/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs | gateway/internal/gateway/frontend/hmac.go | rejected_duplicate | Near-duplicate of sample 117752 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/gorilla/mux\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\trouter := mux.NewRouter()\n\n\trouter.HandleFunc(\"/\", func(rw http.ResponseWriter, req *http.Request) {\n\t\tfmt.Fprintf(rw, \"... | go | edit | 0 | 1 | mit | f4b1de70d1ef4a74de7a3e1ab93db00602f9a159 | jagger27/glocal | server/directory.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage utils\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"fmt\"\n)\n\nfunc GetLogger(prefix string) *Logger {\n\treturn New(prefix)\n}\n\nfunc New(prefix string) *Logger {\n\tl := new(Logger)\n\tl.logger = log.New(os.Stdout, fmt.Sprintf(\"[%s] \", pr... | go | edit | 0 | 2 | mit | 162e6f09b73fc835780e19886fb71a3899436cce | vanng822/aguin,vanng822/aguin,vanng822/aguin,vanng822/aguin,vanng822/aguin | src/aguin/utils/logging.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\tlog \"github.com/sirupsen/logrus\"\n\n\t\"runtime\"\n\n\t\"github.com/spf13/pflag\"\n)\n\nfunc main() {\n\truntime.GOMAXPROCS(runtime.NumCPU())\n\tvar dataFolder string\n\tvar indexPath string\n\tvar addr string\n\tv... | go | edit | 6 | 4 | mit | 80b8403e231b86355ee00794c562ec9eee9e964b | zerok/pyvideosearch | main.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (c) 2013 Conformal Systems LLC.\n// Use of this source code is governed by an ISC\n// license that can be found in the LICENSE file.\n\npackage ldb_test\n\nimport (\n\t\"github.com/conformal/btcdb\"\n\t\"os\"\n\t\"testing\"\n)\n\n/... | go | edit | 0 | 5 | isc | d9404fe88017921072bcfc15305e0700c35adb47 | decred/dcrd,soapboxsys/ombfullnode,danoctavian/btcd,jimmysong/btcd,davecgh/btcd,danoctavian/btcd,cjepson/btcd,qchain/btcd,Cleawing/btcd,qchain/btcd,cjepson/btcd,btcsuitereleases/btcd,Cleawing/btcd,toddfries/btcd,Dirbaio/btcd,Dirbaio/btcd,decred/dcrd,adiabat/btcd,ltcsuite/ltcd,stevenroose/btcd,ppcsuite/ppcd-old,hectorj/... | ldb/boundary_test.go | rejected_duplicate | Near-duplicate of sample 116919 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage arn\n\nimport \"time\"\n\n// AnimeAiringDate ...\ntype AnimeAiringDate struct {\n\tStart string `json:\"start\"`\n\tEnd string `json:\"end\"`\n}\n\n// StartDateHuman ...\nfunc (airing *AnimeAiringDate) StartDateHuman() string {\n\tt, ... | go | edit | 0 | 2 | mit | 30f677249eef79da5e75cbfd35ed4df78c014e22 | animenotifier/arn | AnimeAiringDate.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// This is a simple web application that makes possible to use Open Build\n// Service as a simple Vagrant image catalog.\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/codegangsta/negroni\"\n\t\"gi... | go | edit | 12 | 2 | mit | bb490c1e2c7deddeeaf230587b0373eb37510e8c | flavio/obs2vagrant | src/obs2vagrant/main.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\tlog \"github.com/Sirupsen/logrus\"\n\t\"github.com/fubarhouse/golang-drush/makeupdater\"\n\t\"strings\"\n)\n\nfunc main() {\n\tvar strMake = flag.String(\"makes\", \"\", \"Comma-separated list of absolute... | go | edit | 0 | 3 | mit | b26be598a4d43dce762c4ec2ce9f3b6f2e2b9484 | fubarhouse/golang-drush | cmd/update-make/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage util\n\nimport (\n\t\"net/http\"\n\t\"sync\"\n)\n\ntype StatusGroup struct {\n\tsync.WaitGroup\n\tsync.Mutex\n\tStatus int\n\tErr error\n}\n\nfunc NewStatusGroup() *StatusGroup {\n\treturn &StatusGroup{Status: http.StatusOK}\n}\n\nfu... | go | edit | 0 | 4 | mit | 41f272498df15bce6bf8c0e5857d5b4ecc8673db | tsinghua-io/api-server | util/sync.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage window\n\n/*\n#cgo darwin CFLAGS: -D_GOSMF_OSX_\n#cgo darwin LDFLAGS: -F/Library/Frameworks -framework SDL2\n\n#cgo linux CFLAGS: -D_GOSMF_LINUX_\n#cgo linux LDFLAGS: -lSDL2main -lSDL2\n\n#cgo windows CFLAGS: -D_GOSMF_WINDOWS_\... | go | edit | 0 | 0 | mit | f81db2b578362cd241544cc1a0ec5cf942adf222 | anthonyrego/gosmf,anthonyrego/dodge | window/build.go | accepted | null | true |
[
{
"role": "user",
"content": "Write go code for the following: Add basic test for Project()."
},
{
"role": "assistant",
"content": "package mathgl\n\nimport (\n\t\"testing\"\n)\n\nfunc TestProject(t *testing.T) {\n\tobj := Vec3d{1002, 960, 0}\n\tmodelview := Mat4d{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1... | go | new_file | 15 | 2 | bsd-3-clause | 626fe0348385cdb1499af28f90a91c70dc6954e3 | mantyr/mathgl,alexvasi/mathgl,go-gl/mathgl | project_test.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage fstestutil\n\nimport (\n\t\"flag\"\n\t\"time\"\n)\n\n// SetDefaultTimeout sets the default value for the `go test\n// -test.timeout` flag. Original default is no timeout.\nfunc SetDefaultTimeout(d time.Duration) {\n\tf := flag.Lookup(\"... | go | edit | 0 | 4 | mit | f57ecc7843924ef84d65f79ee4fbaf6828a47097 | bazil/bazil | fs/fstestutil/timeout.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cryptobox\n\n// #cgo pkg-config: libsodium\n// #include <stdlib.h>\n// #include <sodium.h>\nimport \"C\"\nimport \"github.com/GoKillers/libsodium-go/support\"\n\nfunc CryptoBoxSeal(m []byte, pk []byte) ([]byte, int) {\n\tsupport.CheckSi... | go | edit | 12 | 1 | isc | 4aad531aaa72867ae486204f8b3e8f47d4bd1c93 | GoKillers/libsodium-go,GoKillers/libsodium-go | cryptobox/crypto_box_seal.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage day5\n\nfunc Solution() string {\n\treturn decode(\"abbhdwsy\")\n}\n\nfunc decode(input string) string {\n\treturn \"Not yet solved\"\n}\n\n```\n\nApply this change: Add brute force solution for day 5 part 1"
},
{
"role": "assis... | go | edit | 0 | 4 | mit | 864ce94d09e4cb63dc98fc15dca8f9440597d746 | domdavis/adventofcode | 2016/day5/day5.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n)\n\nfunc worker(ch <-chan int, wg *sync.WaitGroup) {\n\tdefer wg.Done()\n\tfor {\n\t\ttask, ok := <-ch\n\t\tif !ok {\n\t\t\treturn\n\t\t}\n\t\ttime.Sleep(1 * time.Millisecond)\n\t\tf... | go | edit | 3 | 3 | mit | 4040efc4e8c244ac97e6638738423da391cbeaa3 | divan/gotrace,divan/gotrace,divan/gotrace | examples/workers1.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2017 Authors of Cilium\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://ww... | go | edit | 0 | 0 | apache-2.0 | bb11ad1a15907feb9304f55a26a95bed77291f1d | tklauser/cilium,tgraf/cilium,eloycoto/cilium,scanf/cilium,tgraf/cilium,cilium/cilium,cilium-team/cilium,eloycoto/cilium,scanf/cilium,scanf/cilium,michi-covalent/cilium,scanf/cilium,michi-covalent/cilium,eloycoto/cilium,tklauser/cilium,tgraf/cilium,eloycoto/cilium,eloycoto/cilium,tgraf/cilium,michi-covalent/cilium,michi... | pkg/proxy/defaults.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//\n// Copyright 2016 Gregory Trubetskoy. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the Licen... | go | edit | 0 | 1 | apache-2.0 | 70b573255d307ac730393fdf5550e32566773ff6 | tgres/tgres | daemon/http.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage sentry\n\nimport \"fmt\"\n\n// APIError represents a Sentry API Error response\ntype APIError map[string]interface{}\n\n// TODO: use this instead\n// type apiError struct {\n// \tDetail string `json:\"detail\"`\n// }\n\nfunc (e APIError... | go | edit | 0 | 3 | mit | 00e788ad4469dbc25f09d8a5ac63295dd4bdde83 | jianyuan/go-sentry | sentry/errors.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cloud\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nconst azure_metadata_url = \"http://169.254.169.254/metadata/latest/instance/\"\n\nfunc getAzureData(url string) (data []string) {\n\treq, err := htt... | go | edit | 3 | 3 | mit | 3c3ac4df138618ce3d434acbe0756cf2503bfcf8 | erichs/elements | lib/elements/cloud/azure.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage uuid\n\nimport (\n\t. \"github.com/smartystreets/goconvey/convey\"\n\t\"testing\"\n\n\t\"fmt\"\n\t\"regexp\"\n)\n\nfunc TestNew(t *testing.T) {\n\tConvey(\"uuid\", t, func() {\n\t\tuuid := New()\n\n\t\tConvey(\"is in format xxxxxxxx-xxx... | go | edit | 15 | 1 | apache-2.0 | df804918f401bc011af8ef2af0f1732ccdc0166e | SkygearIO/skygear-server,rickmak/skygear-server,SkygearIO/skygear-server,rickmak/skygear-server,rickmak/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server | uuid/uuid_test.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage perceptron\n\nimport (\n\t\"github.com/mitsuse/perceptron-go/vector\"\n)\n\ntype Classifier struct {\n\tmodel *Model\n}\n\nfunc NewClassifier(indexer Indexer) *Classifier {\n\tc := &Classifier{\n\t\tmodel: &Model{\n\t\t\tweight: vector... | go | edit | 12 | 3 | mit | dc6a6023d3911c0b36b29fd148ab6ea327a9bd79 | mitsuse/perceptron-go,mitsuse/perceptron-go | classifier.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"errors\"\n\t\"sync\"\n)\n\ntype LanguagePool struct {\n\tmutex sync.RWMutex\n\tlanguages map[string]*Language\n}\n\nfunc NewLanguagePool() *LanguagePool {\n\tp := new(LanguagePool)\n\tp.languages = make(map[s... | go | edit | 18 | 2 | mit | 3465cbb27a0af0b042651b2c6c49bcc296bc131a | MStoykov/mazungumzo | server/language_pool.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage wmenu\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n)\n\nvar clear map[string]func()\n\nfunc init() {\n\tclear = make(map[string]func())\n\tclear[\"linux\"] = func() {\n\t\tcmd := exec.Command(\"clear\")\n\t\tcmd.Stdout = os.Stdo... | go | edit | 0 | 2 | mit | a910ba609fb67654120cd539e65caa686c8e894e | dixonwille/wmenu | clearScreen.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestTableSizesCommand(t *testing.T) {\n\tsaved := dburi\n\tdburi = \"postgres://localhost/postgres?sslmode=disable\"\n\tvar buf bytes.Buffer\n\t// TODO se... | go | edit | 12 | 4 | apache-2.0 | ec6ac3d3dd30f3e6e9d95390745c4a6a6b35d61f | kindlyops/despite,kindlyops/despite,kindlyops/despite | src/despite/despite_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage interop\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go interop.go\n\n//sys coTaskMemFree(buffer unsafe.Pointer) = ole32.CoTaskMemFree\n\nfunc Conv... | go | edit | 6 | 2 | mit | 3a2ea8f473928ec022b208186fa35fac76f78256 | madhanrm/hcsshim,Microsoft/hcsshim | internal/interop/interop.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage api\n\nimport (\n\t\"fmt\"\n)\n\ntype OIDCToken struct {\n\tToken string `json:\"token\"`\n}\n\ntype OIDCTokenRequest struct {\n\tJobId string\n\tAudience string\n}\n\nfunc (c *Client) OIDCToken(methodReq *OIDCTokenRequest) (*OIDCTok... | go | edit | 3 | 3 | mit | 5ddef488663eb7557a0a4e1a2c5374cbd7a2ef0c | buildkite/agent,buildkite/agent,buildkite/agent | api/oidc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage state\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nfunc TestServiceConsistent(t *testing.T) {\n\tstate := stateSetup(simpleServiceMeta, simpleService, t)\n\tresult := state.Consistent()\n\tif result.Consistent != false {\n\t\tfmt.Println... | go | edit | 0 | 0 | mit | 09467c2f03527b934d22f4aa49c8033f54b8a1f9 | vektorlab/otter,vektorlab/otter,vektorlab/otter | state/service_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage filter\n// Copyright ©2011 Dan Kortschak <<EMAIL>>\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundat... | go | edit | 0 | 1 | bsd-3-clause | 5cb367b394300af15f1e850c7cfcb240b4552e13 | biogo/biogo,brentp/biogo,biogo/biogo,mnsmar/biogo,mnsmar/biogo,brentp/biogo | src/bio/align/pals/filter/dphits.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage auth\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/pufferpanel/apufferi/v4/response\"\n\t\"github.com/pufferpanel/pufferpanel/v2/models\"\n\t\"github.com/pufferpanel/pufferpanel/v2/services\"\n\t\"github.com/pufferpanel/pu... | go | edit | 3 | 3 | apache-2.0 | 884a64f2cca73bbcf4657168833ccf9d0e610e88 | PufferPanel/PufferPanel,PufferPanel/PufferPanel,PufferPanel/PufferPanel,PufferPanel/PufferPanel | web/auth/reauth.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gen\n\ntype Config struct {\n\tSource string `json:\"source\"`\n\tDestination string `json:'destination\"`\n\tSafe bool `json:\"safe\"`\n\tExcluede []string `json:\"exclude\"`\n\tInclude string `json\"\"incl... | go | edit | 3 | 0 | mit | 9d3b8834aa3e1d26fdfa5b0cc8bec4da431b053b | gernest/wuxia,gernest/wuxia,gernest/wuxia,gernest/wuxia | gen/config.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage utils\n\nimport (\n\t\"crypto/rand\"\n\t\"math/big\"\n\n\t\"github.com/freeusd/solebtc/models\"\n)\n\n// RandomReward generates a random reward with rates given\nfunc RandomReward(rates []models.RewardRate) int64 {\n\tsum := sumOfWeight... | go | edit | 0 | 5 | mit | a48e7020f845bc5681c9c8588d120f0d99b310e9 | freeusd/solebtc,solefaucet/sole-server,freeusd/solebtc,solefaucet/sole-server,solefaucet/sole-server,freeusd/solebtc | utils/random_reward.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage boil\n\nimport (\n\t\"database/sql\"\n\t\"os\"\n)\n\ntype Executor interface {\n\tExec(query string, args ...interface{}) (sql.Result, error)\n\tQuery(query string, args ...interface{}) (*sql.Rows, error)\n\tQueryRow(query string, args ... | go | edit | 0 | 2 | bsd-3-clause | d97e8262650c3cfdb3f9fd577a5861f4ef6e1d62 | nullbio/sqlboiler,pobri19/sqlboiler,volatiletech/sqlboiler,vattle/sqlboiler,volatiletech/sqlboiler | boil/db.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/yeo/betterdev.link/baja\"\n\t\"log\"\n\t\"os\"\n)\n\nvar (\n\tVersion string\n\tGitCommit string\n)\n\nfunc main() {\n\tfmt.Printf(\"BetterDev %s Build %s\\n\", Version, GitCommit)\n\n\tcwd,... | go | edit | 9 | 7 | mit | c7071dcb6fe8e95bf56f235a6945f19f53f763d8 | yeospace/better-dev.link,yeospace/better-dev.link,yeo/betterdev.link,yeo/betterdev.link,yeo/betterdev.link,yeo/betterdev.link,yeospace/better-dev.link | cmd/main.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/Sirupsen/logrus\"\n\t\"github.com/cerana/cerana/pkg/logrusx\"\n\t\"github.com/spf13/pflag\"\n)\n\nfunc main() {\n\tlogrus.SetFormatter(&logrusx.MistifyFormatter{})\n\n\tconfig := newConfig(nil, nil)\n\tp... | go | edit | 6 | 2 | mit | d3e7f760c83ad699117d9ff5a8408cd0236697dd | cerana/cerana,cerana/cerana,cerana/cerana,cerana/cerana | cmd/statspusher/main.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n . \"github.com/onsi/ginkgo\"\n . \"github.com/onsi/gomega\"\n\n \"path\"\n)\n\nvar _ = Describe(\"Run\", func() {\n It(\"has a version number\", func() {\n Expect(version).ToNot(BeNil())\n })\n\n Describe(\"c... | go | edit | 54 | 1 | mit | a5bfe78f387335834f043777837f4581604fc4fe | nicolasmccurdy/run | run_test.go | rejected_lint | Too many lint violations: 54 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ethutil\n\nimport (\n\tchecker \"gopkg.in/check.v1\"\n)\n\ntype SizeSuite struct{}\n\nvar _ = checker.Suite(&SizeSuite{})\n\nfunc (s *SizeSuite) TestStorageSizeString(c *checker.C) {\n\tdata1 := 2381273\n\tdata2 := 2192\n\tdata3 := 12\n... | go | edit | 9 | 1 | mit | bfd1fe977e1a4f921fce6b4ca522b024df0b2733 | maran/go-ethereum,maran/go-ethereum,maran/go-ethereum,maran/go-ethereum,maran/go-ethereum,maran/go-ethereum,maran/go-ethereum,maran/go-ethereum,maran/go-ethereum | ethutil/size_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage v4l2\n\nimport \"fmt\"\n\n// #include \"webcam_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\nvar w *C.webcam_t\n\nfunc OpenWebcam(path string, width, height int) {\n\tdev := C.CString(path)\n\tdefer C.free(unsafe.Pointer(dev))\n\tw = ... | go | edit | 3 | 2 | mit | beb2d3d8748ec728684b54334ca455c6dc74ac2c | kfei/sshcam,kfei/sshcam | webcam/v4l2/webcam.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/intelsdi-x/pulse/control/plugin\"\n\t\"github.com/intelsdi-x/pulse/plugin/publisher/pulse-publisher-riemann/riemann\"\n)\n\nfunc main() {\n\t// Three things are provided:\n\t// - The definiti... | go | edit | 0 | 1 | apache-2.0 | 80a575201b29ef1436ac1f4f6e1721e0753404cd | intelsdi-x/snap-plugin-publisher-riemann,intelsdi-x/snap-plugin-publisher-riemann,intelsdi-x/snap-plugin-publisher-riemann | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage classes\n\nconst (\n\tObjectClass = \"Object\"\n\tClassClass = \"Class\"\n\tModuleClass = \"Module\"\n\tIntegerClass = \"Integer\"\n\tFloatClass = \"Float\"\n\tStringClass = \"String\"\n\tArrayClass = \"Array\"\n\... | go | edit | 0 | 0 | mit | 6c1da37036523eafa1df7c9faafd29639c31ef71 | goby-lang/goby,st0012/Rooby,goby-lang/goby,st0012/Rooby,goby-lang/goby | vm/classes/classes.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/NYTimes/gziphandler\"\n\t\"github.com/discoviking/website/server/storage\"\n\t\"github.com/gorilla/mux\"\n\t\"net/http\"\n)\n\nfunc createRouter(storageService storage.Service) *mux.Router {\n\t// Main R... | go | edit | 0 | 1 | mit | f3e535d42face26f6ed0391a947bc376976ccb24 | DiscoViking/website,DiscoViking/website,DiscoViking/website,DiscoViking/website,DiscoViking/website | server/router.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage simpledb_test\n\nimport (\n\t\"github.com/garyburd/redigo/redis\"\n\t\"github.com/northbright/simpledb\"\n)\n\nfunc Example_GetRedisHashMaxZiplistEntries() {\n\tvar err error\n\tvar redisHashMaxZiplistEntries uint64 = 0\n\n\tsimpledb.De... | go | edit | 0 | 4 | mit | e697d2248a6305d0ca9f044499b9538c8cb7f8de | northbright/simpledb | util_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage request\n\nimport (\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\n/*\n *type Response interface {\n * StatusCode() int\n *\n * Headers() http.Header\n * Content() chan []byte\n *\n * Request() *Request\n *}\n *... | go | edit | 0 | 2 | apache-2.0 | 8f5a85b2a3e8ba168633ca3e7c0c4f6c26e4475a | maxamillion/flamingo,tmrts/flamingo,tmrts/flamingo,maxamillion/flamingo | pkg/request/response.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/aws/aws-sdk-go/service/cloudwatchevents\"\n)\n\ntype Rules struct {\n\tRules []Rule\n}\n\ntype Rule struct {\n\tDescription string `yaml:\"description\"`\n\tEventPattern string ... | go | edit | 0 | 0 | mit | c0ab8fc353a472d23b7cb98366ef9d16e593725f | unasuke/maekawa | structs.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage golog\n\nimport \"testing\"\n\nfunc TestBasic(t *testing.T) {\n single := make(map[string]string)\n single[`hello.`] = `hello`\n single[`a + b.`] = `+(a, b)`\n single[`first, second.`] = `','(first, second)`\n single[`\\+... | go | edit | 12 | 5 | mit | 45f38011785c767dfa958e4b26db3e53bb1f9b60 | bransorem/golog,vzaramel/golog,samuell/golog,bransorem/golog,mndrix/golog,mndrix/golog,vzaramel/golog,samuell/golog | parser_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net\"\n\t\"time\"\n)\n\nfunc listener(listen string, quit chan struct{}, dispatcher func(net.IP, []byte)) {\n\tbuf := make([]byte, 32765)\n\n\tladdr, err := net.ResolveUDPAddr(\"udp\", listen)\n\tcheckEr... | go | edit | 6 | 6 | mit | 2717858d72b09bf82c6e596f58c96a3d6061e0cc | arachnist/udproxy | listener.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage repeating_otp\n\nimport (\n\t\"testing\"\n\t\"io/ioutil\"\n\t\"github.com/stretchr/testify/require\"\n\t\"encoding/base64\"\n)\n\nfunc Test_Solve_1(t *testing.T) {\n\tinput, err := ioutil.ReadFile(\"challenge-6.txt\")\n\trequire.Nil(t, ... | go | edit | 3 | 3 | mit | 68ef438869b00ec2a3bd41a1c2e078e973a18143 | cngkaygusuz/matasano-challenges,ckaygusu/matasano-challenges | repeating_otp/solver_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage auth\n\nimport (\n\t\"time\"\n\n\t\"golang.org/x/net/context\"\n)\n\n// AuthenticationProvider provides helper methods to convert tokens to sessions\n// using our own internal authorization services\ntype AuthenticationProvider interfac... | go | edit | 0 | 0 | mit | 91423b229344b67d0e30b03e148c2807baf4ef6a | mondough/typhon,monzo/typhon | auth/auth.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n)\n\ntype test struct {\n\tattr string\n}\n\nfunc main() {\n\tfmt.Println(&test{\n\t\tattr: \"test\",\n\t})\n}\n\n```\n\nApply this change: Fix go get on travis"
},
{
"role": "assistant",
"conten... | go | edit | 0 | 1 | mit | d6672b6f71ee214a72c3c1a11748aa4d4f90a97b | wndhydrnt/go-signature-statusbar | spec/fixtures/issue-1.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage mysql\n\nimport (\n\t\"database/sql\"\n\t\"strconv\"\n\n\t\"github.com/gansoi/gansoi/plugins\"\n\n\t// We need the MySQL driver for this.\n\t_ \"github.com/go-sql-driver/mysql\"\n)\n\n// MySQL retrieves metrics from a MySQL server.\ntyp... | go | edit | 0 | 6 | mit | d0e8147e228a7436b335ef96357582bd7080b3cc | gansoi/gansoi,gansoi/gansoi,gansoi/gansoi,gansoi/gansoi | plugins/agents/mysql/Mysql.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage etcd\n\nimport (\n\t\"errors\"\n\t\"github.com/coreos/go-etcd/etcd\"\n\t\"github.com/kelseyhightower/confd/config\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\nvar machines = []string{\n\t\"http://127.0.0.1:4001\",\n}\nvar prefix string =... | go | edit | 0 | 5 | mit | 99c77b4fe093261e4b9493c3e4e1b3c66b61b6c1 | openedbox/confd,crunchywelch/confd,Flipkart/confd,shencan/confd,agilemobiledev/confd,bacongobbler/confd,jnummelin/confd,israelchen/confd,zytek/confd,aledbf/confd,zytek/confd,linearregression/confd,monder/confd,kelseyhightower/confd,openedbox/confd,blippar/confd,crandles/confd,elsonrodriguez/confd,layerhq/confd,cloudnau... | etcd/etcd.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/codegangsta/cli\"\n\t\"github.com/headmade/backuper/config\"\n)\n\nfunc providerAction(c *cli.Context) {\n\tvar providerConfig config.Provider\n\tswitch c.Command.Name {\n\tcase \"AWS\":\n\t... | go | edit | 0 | 5 | mit | a2c051de357cbc7890c931051877d753aecc055a | headmade/backuper | providers.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2010 The \"go-linoise\" Authors\n//\n// Use of this source code is governed by the Simplified BSD License\n// that can be found in the LICENSE file.\n//\n// This software is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES\n/... | go | edit | 9 | 3 | bsd-2-clause | a9a434a11cca06808f5ada8f8c0290e6aa13013f | fiber/go-linoise | linoise/linoise_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build js,wasm\n\npackage websocket\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"syscall/js\"\n\n\t\"github.com/libp2p/go-libp2p-core/transport\"\n\tma \"github.com/multiformats/go-multiaddr\"\n\tmanet \"github.com/multiformats/go-multiaddr... | go | edit | 15 | 4 | mit | e08426cc8d11465fbfdd4f71b97baf50e2a02ee4 | libp2p/go-libp2p,libp2p/go-libp2p,ipfs/go-libp2p | p2p/transport/websocket/websocket_browser.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gorocksdb\n\nimport (\n\t\"sync\"\n\t\"testing\"\n\n\t\"github.com/facebookgo/ensure\"\n)\n\nfunc TestCOWList(t *testing.T) {\n\tcl := NewCOWList()\n\tcl.Append(\"hello\")\n\tcl.Append(\"world\")\n\tcl.Append(\"!\")\n\tensure.DeepEqual(... | go | edit | 9 | 3 | mit | b95bf535a9f650e083836e98671ef548dc29f05c | tecbot/gorocksdb,tecbot/gorocksdb | cow_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage falcon_portal\n\n// +---------+------------------+------+-----+---------+-------+\n// | Field | Type | Null | Key | Default | Extra |\n// +---------+------------------+------+-----+---------+-------+\n// | grp_id | int(10... | go | edit | 0 | 2 | apache-2.0 | f3ecff8aefa41247f363ec006f944454bbfd7b8c | jojohappy/falcon-plus,taomaree/falcon-plus,jojohappy/falcon-plus,jojohappy/falcon-plus,open-falcon/falcon-plus,jojohappy/falcon-plus,jojohappy/falcon-plus,taomaree/falcon-plus,taomaree/falcon-plus,open-falcon/falcon-plus,open-falcon/falcon-plus,taomaree/falcon-plus,open-falcon/falcon-plus,jojohappy/falcon-plus,taomaree... | modules/api/app/model/falcon_portal/grp_host.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage dai\n\nimport (\n\tr \"github.com/dancannon/gorethink\"\n\t\"github.com/materials-commons/mcstore/pkg/db/model\"\n\t\"github.com/materials-commons/mcstore/pkg/db/schema\"\n)\n\ntype rProjects struct {\n\tsession *r.Session\n}\n\nfunc Ne... | go | edit | 0 | 4 | mit | f9f47a8418140a0477c82c4ea9ffb0366b6815a6 | materials-commons/mcstore,materials-commons/mcstore,materials-commons/mcstore | pkg/db/dai/rprojects.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// $G $D/$F.go && $L $F.$A && ./$A.out\n\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage main\n\nexport Vector;\n\ntype... | go | edit | 3 | 1 | bsd-3-clause | 7505cfa0538d05a52c70ebb7a8f844d9887ac9dc | bdwalton/debian-golang,wesolows/golang,bdwalton/debian-golang,wesolows/golang,pombredanne/go-deleteme,wesolows/golang-old,gnanderson/go,apparentlymart/golang,wesolows/golang-old,dsriram/golang,wesolows/golang,dsriram/golang,pombredanne/go-deleteme,apparentlymart/golang,firebitsbr/golang-old,bdwalton/debian-golang,pombr... | test/fixedbugs/bug026.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage validator\n\nvar (\n\tConvertToConcreteValue = convertToConcreteValue\n\tGetFieldByName = getFieldByName\n\tIsValid = isValid\n)\n\n```\n\nApply this change: Add export variable for test"
},
{
"role": "ass... | go | edit | 18 | 0 | mit | d60a660683c1a9068b16790950504a18a7a71773 | go-jstmpl/go-jsvalidator | required_export_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage handlers\n\nimport (\n\t\"github.com/go-openapi/runtime/middleware\"\n\t\"github.com/sapcc/kubernikus/pkg/api\"\n\t\"github.com/sapcc/kubernikus/pkg/api/models\"\n\t\"github.com/sapcc/kubernikus/pkg/api/rest/operations\"\n\t\"github.com... | go | edit | 12 | 3 | apache-2.0 | be4820f6eb79c89eb0ee62cf93619eb2c7f004fd | sapcc/kubernikus,sapcc/kubernikus,sapcc/kubernikus | pkg/api/handlers/update_cluster.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2016 Keybase, Inc. All rights reserved. Use of\n// this source code is governed by the included BSD license.\n\npackage logger\n\nimport (\n\t\"errors\"\n\t\"time\"\n)\n\n// RotateLogFile is the old style of logging to a file. It u... | go | edit | 6 | 2 | bsd-3-clause | eeeefc3d70c4a0c56530b1a18b4efdfb98cc86ee | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client | go/logger/rotatelog.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/docopt/docopt-go\"\n)\n\nfunc main() {\n\tusage := `Usage: nvd-search [-c CVE | -k KEY] [-v VENDOR] [-p PRODUCT] [-n NVD]\n\nOptions:\n -h --help show this\n -c CVE --cv... | go | edit | 3 | 1 | mit | 2a7d0634fd7ae0eaa708e4d6fa51da4768c33717 | okuuva/nvd-search-cli | nvd-cli.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage routes\n\nimport (\n\t\"net/http\"\n\n\th \"github.com/anonx/sunplate/internal/skeleton/assets/handlers\"\n\n\tr \"github.com/anonx/sunplate/routing\"\n)\n\n// List is a slice of routes of the following form:\n//\tRoute:\n//\t\tPattern\... | go | edit | 0 | 0 | bsd-2-clause | 564adc09e4351668cf3a3914a560d94bdeb0b1a7 | anonx/sunplate,goaltools/goal,anonx/sunplate,anonx/sunplate,goaltools/goal,goaltools/goal | internal/skeleton/routes/routes.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//Command to run test version:\n//goapp serve app.yaml\n//Command to deploy/update application:\n//goapp deploy -application golangnode0 -version 0\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n)\n\nfunc helloWorld(w http.ResponseWrit... | go | edit | 0 | 1 | mit | 282662ffb010760a64847917071e1c0bbcd8c014 | GreyLabsDev/GoTests,GreyLabsDev/GoTests | hw.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gash\n\n// a collection of various hash function implementations.\n\n// a simple djb2 implementation\nfunc Djb2(s string) int {\n hash := 5381\n for c := range s {\n hash += (hash * 33) + c\n }\n\n return hash\n}\n\n`... | go | edit | 0 | 2 | mit | e9c1f8c005129e9a882689da4c16c23406e5b2e5 | elvinyung/gash | hashfns.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cmd\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/gsamokovarov/jump/cli\"\n\t\"github.com/gsamokovarov/jump/config\"\n\t\"github.com/gsamokovarov/jump/scoring\"\n)\n\nfunc updateCmd(args cli.Args, conf *config.Config) {\n... | go | edit | 0 | 7 | mit | aa1f6a1c3c53e721f4ee29ab286cd669240183ff | gsamokovarov/jump | cmd/chdir.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// GENERATED and MANAGED by giddyup (https://github.com/alexandre-normand/giddyup)\npackage slackscot\n\nconst (\n\tVERSION = \"3.2.1\"\n)\n\n```\n\nApply this change: Revert to Version 1.0.0 prior to Go Module Upgrade\n\nNot great to ignore al... | go | edit | 0 | 0 | mit | 1785a143eaf435002f020c07e39f11dc81edd385 | alexandre-normand/slackscot | version.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage screens\n\nimport (\n\t\"groggy/world\"\n\t\"github.com/nsf/termbox-go\"\n\t\"groggy/widgets\"\n)\n\nfunc MainMapLoop(worldState *world.WorldState) {\n\tlevel := worldState.CurrentLevel\n\tplayer := worldState.PlayerCharacter\n\n\tfor {... | go | edit | 9 | 9 | apache-2.0 | 12b9a7d8217524cca54e5c333ba6624cbdb50a3f | noseblowhorn/groggy | screens/mainmapscreen.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2019 The Tekton Authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/l... | go | edit | 0 | 0 | apache-2.0 | c0fae23a9c73645dc82bc52c9783bd01e8c26c65 | tektoncd/pipeline,tektoncd/pipeline | pkg/apis/pipeline/controller.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage httpd\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/Symantec/Dominator/lib/html\"\n\t\"github.com/Symantec/Dominator/lib/srpc\"\n)\n\nfunc statusHandler(w http.ResponseWriter, req *http.Request) {\n\tif req.URL.P... | go | edit | 0 | 4 | apache-2.0 | 6d958ea13a6480d5a090d07a93f6fecb742c643a | Symantec/Dominator,rgooch/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator,rgooch/Dominator | sub/httpd/status.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build linux\n\npackage main\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\n\t\"github.com/opencontainers/runc/libcontainer\"\n\t_ \"github.com/opencontainers/runc/libcontainer/nsenter\"\n\t\"github.com/urfave/cli\"\n)\n\nfunc init() {\n\tif len(os... | go | edit | 0 | 3 | apache-2.0 | 1494c72b84a86c4778f238d7181a93107c0137e0 | dqminh/runc,mYmNeo/runc,docker/runc,justincormack/runc,sunyuan3/runc,shishir-a412ed/runc,xiaochenshen/runc,nkwilson/runc,opencontainers/runc,justincormack/runc,mheon/runc,justincormack/runc,wking/runc,cyphar/runc,WeiZhang555/runc,coolljt0725/runc,mYmNeo/runc,cyphar/runc,estesp/runc,maxamillion/runc,avagin/runc,mYmNeo/r... | main_unix.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package s3manageriface provides an interface for the s3manager package\npackage s3manageriface\n\nimport (\n\t\"io\"\n\n\t\"github.com/aws/aws-sdk-go/service/s3\"\n\t\"github.com/aws/aws-sdk-go/service/s3/s3manager\"\n)\n\n// DownloaderAPI i... | go | edit | 0 | 0 | apache-2.0 | fdddd4a2bf3ee13eebd6699a54a0a86814fae116 | aws/aws-sdk-go,xibz/aws-sdk-go,xibz/aws-sdk-go,radeksimko/aws-sdk-go,radeksimko/aws-sdk-go,yxd-hde/aws-sdk-go,yxd-hde/aws-sdk-go,zmarois/aws-sdk-go,myshen/aws-sdk-go,agworld/aws-sdk-go,yxd-hde/aws-sdk-go,xibz/aws-sdk-go,agworld/aws-sdk-go,radeksimko/aws-sdk-go,agworld/aws-sdk-go,myshen/aws-sdk-go,calgaryscientific/aws-... | service/s3/s3manager/s3manageriface/interface.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build go1.9\n\npackage server\n\nimport (\n\t\"github.com/xgfone/go-tools/net2\"\n)\n\ntype (\n\t// THandle is the type alias of net2.THandle.\n\t//\n\t// DEPRECATED!!! Please the package net2.\n\tTHandle = net2.THandle\n\n\t// THandleFunc ... | go | edit | 0 | 0 | apache-2.0 | 78ab6d7349839851d0d5cb087fab57ea0d31378a | xgfone/go-tools | net2/server/tcp.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage restic\n\nimport \"context\"\n\n// FindUsedBlobs traverses the tree ID and adds all seen blobs (trees and data\n// blobs) to the set blobs. Already seen tree blobs will not be visited again.\nfunc FindUsedBlobs(ctx context.Context, repo... | go | edit | 9 | 8 | bsd-2-clause | 9ea1a78bd4c57f0db465342f05496828a7784509 | restic/restic,restic/restic | internal/restic/find.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cmd\n\nimport (\n\t\"os\"\n\t\"path\"\n\t\"runtime\"\n)\n\n// ensureGBDXDir will create the gbdx directory if it doesn't already exist.\nfunc ensureGBDXDir() (string, error) {\n\tgbdxPath := path.Join(userHomeDir(), \".gbdx\")\n\terr :=... | go | edit | 0 | 3 | mit | 6ea3342a6ba446a5d73ab80bde427b9791596ddf | youngpm/gbdx | gbdxcli/cmd/util.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\t\"os\"\n\t\"text/template\"\n)\n\nconst (\n\tdataTmpl = `// This file was auto-generated.\n\npackage {{.Pkg}}\n\nvar {{.Name}}Data = [{{.Size}}]byte{\n{{range .Data}}\t{{printf \"0x%02X\" .}},\... | go | edit | 0 | 4 | mit | 56096908ad6d4c41fc5956f6fd55e773ef6048b3 | DeedleFake/incoming | cmd/bintogo/tmpl.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\n * Copyright 2019, EnMasse authors.\n * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).\n */\n\npackage util\n\nimport (\n\t\"crypto/rand\"\n\t\"math/big\"\n)\n\nvar (\n\tPossibleCharacters... | go | edit | 0 | 3 | apache-2.0 | c39f8f49d89ec69f51ede724d28337a00e25ee74 | EnMasseProject/enmasse,EnMasseProject/enmasse,jenmalloy/enmasse,jenmalloy/enmasse,EnMasseProject/enmasse,jenmalloy/enmasse,jenmalloy/enmasse,EnMasseProject/enmasse,jenmalloy/enmasse,jenmalloy/enmasse,EnMasseProject/enmasse,EnMasseProject/enmasse,EnMasseProject/enmasse,jenmalloy/enmasse | pkg/util/password.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n\n\t\"github.com/kellydunn/golang-geo\"\n)\n\nfunc TestGeocode(t *testing.T) {\n\tquery := \"1600 amphitheatre parkway\"\n\texpectedAddress := \"1600 Amphitheatre Parkway, Mountain View, CA 94043, USA\"\... | go | edit | 6 | 5 | mit | f6045b9c65448252deb924ff3422fe61b8651d7f | zachlatta/geodude | main_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage molecule\n\n// InMessage is a message sent to a molecule by an external agent.\n//\n// An in-message comprises a request, an optional cookie value and a\n// dynamic payload. The meaning of the cookie depends on the request.\n// Similar... | go | edit | 0 | 0 | mit | 8a650e75480c870c32ed627b80b593a4bb2ae040 | js-ojus/RxnWeaver,RxnWeaver/RxnWeaver | data/molecule/messages.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ui\n\nimport (\n\t\"image\"\n\t\"image/draw\"\n\n\t\"github.com/ninjasphere/go-gestic\"\n\t\"github.com/ninjasphere/sphere-go-led-controller/util\"\n)\n\ntype UpdateProgressPane struct {\n\tprogressImage util.Image\n\tloopingImage util... | go | edit | 3 | 1 | mit | 82799507bd1117dfa8b56aaf22a85b139a9e798c | ninjasphere/sphere-go-led-controller,ninjasphere/sphere-go-led-controller,ninjasphere/sphere-go-led-controller,ninjasphere/sphere-go-led-controller,lindsaymarkward/sphere-go-led-controller,lindsaymarkward/sphere-go-led-controller,lindsaymarkward/sphere-go-led-controller,lindsaymarkward/sphere-go-led-controller | ui/UpdateProgressPane.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\n Copyright 2017 Simon J Mudd\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apa... | go | edit | 0 | 1 | apache-2.0 | ea566c371cd6ba85b02a6fe7ae9c4e23d5698bde | github/orchestrator,enisoc/orchestrator,github/orchestrator,orkestrov/orchestrator,orkestrov/orchestrator,github/orchestrator,enisoc/orchestrator,orkestrov/orchestrator,enisoc/orchestrator,orkestrov/orchestrator,github/orchestrator,enisoc/orchestrator | go/discovery/metric.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/labstack/echo\"\n\t\"github.com/labstack/echo/middleware\"\n)\n\nfunc main() {\n\te := echo.New()\n\te.Use(middleware.Logger())\n\te.Use(middleware.Recover())\n\n\th := Handler{}\n\terr := h.initDB()\n\t... | go | edit | 3 | 2 | mit | 569e68da7699969fce989e051a70ffb36c72902e | hasit/healthyrepo,hasit/healthyrepo,hasit/healthyrepo | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage log\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype Severity int32\n\n// Supported severities.\nconst (\n\tSeverityDebug Severity = iota\n\tSeverityInfo\n\tSeverityWarning\n\tSeverityError\n)\n\nvar severityNames = []string{\"DEBUG\", ... | go | edit | 0 | 3 | apache-2.0 | 44874009257d4d47ba9806f1b7f72a32a015e4d8 | mailgun/log | severity.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage bosh\n\nconst GCPBoshDirectorEphemeralIPOps = `\n- type: replace\n path: /networks/name=default/subnets/0/cloud_properties/ephemeral_external_ip?\n value: true\n`\n\nconst AWSBoshDirectorEphemeralIPOps = `\n- type: replace\n path: /r... | go | edit | 0 | 0 | apache-2.0 | 430a6a56aaa63b8236a9b71fb4e4c07d31b68cf9 | pivotal-cf-experimental/bosh-bootloader,pivotal-cf-experimental/bosh-bootloader | bosh/ops.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage commands\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\tflags \"github.com/jessevdk/go-flags\"\n)\n\n// Commands requires at least one arg\nfunc TestCmd_Expand(t *testing.T) {\n\tv := &ExpandSpec{}\n\ttestRequireParam(t,... | go | edit | 27 | 1 | apache-2.0 | 564499a0d0a7239d90d65a1f0b4937fc4b103e34 | go-swagger/go-swagger,go-swagger/go-swagger | cmd/swagger/commands/expand_test.go | rejected_lint | Too many lint violations: 27 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.