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\n// Copyright ©2014 The gonum 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 mat64\n\n// Inner computes the generalized inner product between x a...
go
edit
9
10
bsd-3-clause
82fd6f9d4125f8daf16fbdbd88678b5c2a67b6e5
gonum/gonum,gonum/gonum,gonum/gonum
mat64/inner.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage domain\n\nimport \"time\"\n\n// Trace represents a full trace of a request\n// comprised of a number of events and annotations\ntype Trace []Event\n\n// EventType represents an Enum of types of Events which Phosphor can record\ntype Eve...
go
edit
0
0
apache-2.0
33f7cda183142e721e18de96b5fbdb5b50984444
mattheath/phosphor,mondough/phosphor,mondough/phosphor,mattheath/phosphor
domain/domain.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage common\n\nconst (\n\tOpGet = iota\n\tOpSet\n\tOpDel\n\tOpLst\n)\n\nvar opNames map[byte]string\n\nfunc init() {\n\topNames = make(map[byte]string, 0)\n\topNames[OpGet] = \"GET\"\n\topNames[OpSet] = \"SET\"\n\topNames[OpDel] = \"DEL\"\n\...
go
edit
0
1
isc
9febd0d4ed12ea2f345cc3835bd9a7de1d43cca8
gokyle/kludge
common/data.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage flect\n\nimport \"reflect\"\n\nfunc IsSlice(i interface{}) bool {\n\treturn IsA(i, reflect.Slice)\n}\n\nfunc IsA(i interface{}, kind reflect.Kind) bool {\n\treturn reflect.TypeOf(i).Kind() == kind\n}\n\nfunc NotA(i interface{}, kind ref...
go
edit
0
2
apache-2.0
2aeed84fcb825e9e0db0219e282b5addfcfaf27c
eyecuelab/kit
flect/kinds.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage test\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/fabiofalci/sconsify/events\"\n\t\"github.com/fabiofalci/sconsify/spotify\"\n\t\"github.com/howeyc/gopass\"\n)\n\nfunc main2() {\n\tusername, pass := cre...
go
edit
0
3
apache-2.0
e46d766aaf90b5eaf79cf40f2e57604a9ade12e9
fabiofalci/sconsify
test/nogui.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2015 The Kubernetes Authors All rights reserved.\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 ...
go
edit
0
0
apache-2.0
2061dbf5ab13e17f256c35e21c60207a74cd6b5c
kubernetes/api
pkg/api/unversioned/well_known_labels.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"log\"\n \"fmt\"\n \"os\"\n \"path\"\n\n \"github.com/docker/libcompose/config\"\n \"github.com/docker/libcompose/project\"\n)\n\nfunc main() {\n pwd, err := os.Getwd()\n if err != nil {\n ...
go
edit
0
9
apache-2.0
289317f7082e35f2103d70449a3dd4db6861a5a1
adrahon/deploy-compose
2deploy.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage lxc\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nvar (\n\tErrCannotParse = errors.New(\"cannot parse raw input\")\n)\n\ntype lxcInfo struct {\n\tRunning bool\n\tPid int\n}\n\nfunc parseLxcInfo(raw strin...
go
edit
0
8
apache-2.0
0225a379518fa292d5808fe1ef31947d0ce30577
tutumcloud/docker,tutumcloud/docker,tutumcloud/docker,tutumcloud/docker
execdriver/lxc/info.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage config\n\nimport \"fmt\"\n\ntype Config struct {\n\tSecret string\n\tHost string\n\tPort int\n\tDB *DBConfig\n\tSlackApp *SlackAppConfig\n}\n\ntype DBConfig struct {\n\tDialect string\n\tUsername string\n\tPassword stri...
go
edit
0
1
mit
1ccdfcc41eeb5060416d67593c6dd727d7331b0a
mingrammer/meetup-api
config/config.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models\n\ntype Direction int\n\nconst (\n\tNorth Direction = 1 << iota\n\tSouth\n\tEast\n\tWest\n)\n\ntype Coordinate struct {\n\tX, Y int\n}\n\ntype Gopher struct {\n\t// Current direction\n\tDirection Direction\n\tX, Y int\n\tPat...
go
edit
0
1
mit
6019eea9f23cd8a2f02cae134cd95f0ea65963b7
gophergala2016/gophertron,gophergala2016/gophertron,gophergala2016/gophertron
models/gopher.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage helper\n\nfunc SafeMap(m map[string]interface{}, key string, def interface{}) interface{} {\n\tvar outp interface{} = def\n\tswitch def.(type) {\n\tcase string:\n\t\tif val, ok := m[key].(string); ok {\n\t\t\toutp = val\n\t\t}\n\tcase i...
go
edit
0
9
apache-2.0
20eb7dded33a842282fd8604c9c31d7875f79c64
Hu13er/Palette
helper/safe.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package go-oui provides functions to work with MAC and OUI's\npackage ouidb\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"testing\"\n)\n\nfunc Test(*testing.T) {\n\td := &OuiDb{}\n\terr := d.Load(\"oui.txt\")\n\n\tif err != nil {\n\t\tlog.Fatal(\"E...
go
edit
9
3
mit
67c05a5d7585e9bed136e9b09a3bffe6a69f48fb
cmatsuoka/ouidb,dutchcoders/go-ouitools
ouitools_test.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\"testing\"\n)\n\nfunc TestRandomCodePoint(t *testing.T) {\n\tfor _, b := range Blocks {\n\t\tvar cp rune\n\t\tcp = b.RandomCodePoint()\n\n\t\tif cp < b.start || cp > b.end {\n\t\t\tt.Fail()\n\t\t}\n\t}\n}\n\nfunc Be...
go
edit
6
4
mit
9a61d62680df62ca01570b62607cd3a80ea47b55
qjcg/horeb
blocks_test.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/atotto/clipboard\"\n)\n\nfunc init() {\n\tregisterSubcommand(&Subcommand{\n\t\tName: \"retrieve\",\n\t\tAliases: []string{\"r\", \"load\", \"l\", \"checkout\", \"co\"},\n\t\tUsage: \"<w...
go
edit
9
3
mit
b94a92cf64244ac9fe52d122cc6351a91a253462
yamnikov-oleg/pss
cmdretrieve.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2016 The Serviced Authors.\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
3
3
apache-2.0
8557ea26fef3ebfe206775b47fc9f86f8776a943
control-center/serviced,control-center/serviced,control-center/serviced,control-center/serviced,control-center/serviced,control-center/serviced,control-center/serviced,control-center/serviced
datastore/mocks/Context.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage monitor\n\nimport \"time\"\n\n// StatusStore is an interface of storage of availability statuses.\n// Standart implementation of this interface (RedisStore) uses Redis as backend,\n// but some user may reimplement interface to store dat...
go
edit
18
5
mit
c179e9583f01fcd3d204ea588c0da3ce59eeff93
yamnikov-oleg/avamon-bot,yamnikov-oleg/avamon-bot
monitor/statusstore.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage column\n\ntype Column interface {\n\tLen() uint\n\tAppend(row interface{}) error\n\tAt(index uint) (value interface{}, exists bool)\n}\n\n```\n\nApply this change: Add missing String() method in interface" }, { "role": "assistan...
go
edit
0
0
mit
c72cdae5d6ad3b70b627fcd1d54c9590763a698a
hgfischer/textable
column/column.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models\n\nimport \"github.com/brocaar/lorawan\"\n\n// NodeSession contains the informatio of a node-session (an activated node).\ntype NodeSession struct {\n\tDevAddr lorawan.DevAddr `json:\"devAddr\"`\n\tAppEUI lorawan.EUI64 `...
go
edit
3
0
mit
2f0b92274bac779147883f9052ffba27462194da
brocaar/loraserver,brocaar/loraserver,ymkins/brocaar-loraserver,ymkins/brocaar-loraserver
models/node_session.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"database/sql\"\n\n\t_ \"github.com/mattn/go-sqlite3\"\n)\n\nconst TRACKSQL = `\n\tselect time, latitude, longitude, elevation, heartrate, cadence\n\tfrom points\n\twhere track = ?\n\torder by time\n`\n\n// TODO: Po...
go
edit
9
4
bsd-2-clause
a43cd10bdaf04c43df44f8e77753775ff8749661
arsatiki/gpsport260tool
stravade/db.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) Alex Ellis 2017. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\npackage queue\n\nimport \"net/url\"\nimport \"net/http\"\n\n// Request for asynchro...
go
edit
0
0
mit
a7c6c39200782ea2e1a1b005d56e3edd51e761a7
alexellis/faas,alexellis/faas,alexellis/faas,openfaas/faas,openfaas/faas,alexellis/faas,openfaas/faas,alexellis/faas,alexellis/faas,alexellis/faas,alexellis/faas,alexellis/faas
gateway/queue/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"flag\"\n\t\"io/ioutil\"\n\t\"log\"\n)\n\n// define CLI flags\n//TODO: add default path for default file\nvar filepath = flag.String(\"filepath\", \"./names.json\", \"The path to the file with t...
go
edit
0
4
mit
b4629c8108bed714bd79781863d4d163a9480b09
rotespferd/name-generator
name-generator.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage transition\n\nimport (\n\t\"io/ioutil\"\n\n\t\"launchpad.net/goyaml\"\n\t// \"log\"\n)\n\ntype FeatureGroup struct {\n\tGroup string\n\tTransition string\n\tFeatures []string\n\tIdle bool\n\tAssociated bool\n}\n\ntype Morph...
go
edit
3
4
apache-2.0
4e746575bb94c6347febb0c176e6f0dfdbde2dd4
habeanf/yap,habeanf/yap
alg/transition/featurereader.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build windows\npackage buf\n\nimport (\n\t\"syscall\"\n)\n\nfunc checkReadVConstraint(conn syscall.RawConn) (bool, error) {\n\tvar isSocketReady = false\n\tvar reason error\n\t/*\n\t\t\tIn Windows, WSARecv system call only support socket co...
go
edit
3
2
mit
a32d6416e5b58f22d245d630c47fe6fdd420b297
v2ray/v2ray-core,panzer13/v2ray-core,v2ray/v2ray-core,panzer13/v2ray-core
common/buf/readv_constraint_windows.go
rejected_duplicate
Near-duplicate of sample 117340
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage router\n\nimport (\n\t\"github.com/labstack/echo\"\n\t\"github.com/labstack/echo/middleware\"\n\t\"github.com/photoshelf/photoshelf-storage/infrastructure/container\"\n\t\"github.com/photoshelf/photoshelf-storage/presentation/controller...
go
edit
0
1
mit
57c069b14e0a8e4a88c872395a0fce26127402de
photoshelf/photoshelf-storage
presentation/router/router.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage request\n\ntype MockClient struct {\n\tClient\n\n\tMethod chan string\n\tURL chan []string\n\tParameters chan []Parameter\n\n\tOutResponse *Response\n\tOutError error\n}\n\nfunc NewMockExecutor(r *Response, err error) *Moc...
go
edit
18
1
apache-2.0
a639e78ce515ad5ca74909eea628ad772b7e3cd1
tmrts/flamingo,maxamillion/flamingo,tmrts/flamingo,maxamillion/flamingo
pkg/request/client_mock.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\thttpListen := flag.String(\"http\", \"127.0.0.1:8080\", \"host:port to listen on\")\n\t// basePath := flag.String(\"base\", \".\", \"base path...
go
edit
0
3
bsd-3-clause
9a43c31ea5caa1b405e9caa91ce6aeea534041ac
mulander/norway
norway/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage tmdb\n\nimport (\n\t. \"gopkg.in/check.v1\"\n)\n\nfunc (s *TmdbSuite) TestGetCertificationsMovieList(c *C) {\n\tmovieResult, err := s.tmdb.GetCertificationsMovieList()\n\ts.baseTest(&movieResult, err, c)\n\tusMovieCerts := movieResult.C...
go
edit
12
1
mit
04012f64520bf23a9325c09ba5dc66dc4fdea426
ryanbradynd05/go-tmdb,ryanbradynd05/go-tmdb,ryanbradynd05/go-tmdb
certifications_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage anaconda\n\ntype Tweet struct {\n\tSource string\n\tId int64\n\tRetweeted bool\n\tFavorited bool\n\t//User TwitterUser\n\tTruncated bool\n\tText string\n\tRetweet_count int64\n\tId_str string\n\tCr...
go
edit
6
0
mit
1abbb149be0e99525ee766c86d76120c4b40caaa
rfsbraz/anaconda,amit-lulla/twitterapi,Fe4nn0r/anaconda,aatishnn/anaconda,ifross89/anaconda,140proof/anaconda,jeffk/anaconda,intfrr/anaconda,cgag/anaconda,josephyzhou/anaconda,rendon/anaconda,jmptrader/anaconda,azr/anaconda,logashoff/anaconda
tweet.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage metadata\n\nfunc listInternalFieldTypes() []*FieldType {\n\treturn []*FieldType{\n\t\t&FieldType{\n\t\t\tName: \"_bool\",\n\t\t\tDatamanType: Bool,\n\t\t},\n\t\t&FieldType{\n\t\t\tName: \"_datetime\",\n\t\t\tDatamanType: D...
go
edit
39
1
mit
01847f69b11049fc500684016ee5074caa4c4da0
jacksontj/dataman
src/storage_node/metadata/field_type_internal.go
rejected_lint
Too many lint violations: 39
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage user\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/asaskevich/govalidator\"\n\t\"github.com/vardius/go-api-boilerplate/internal/errors\"\n)\n\n// EmailAddress is an email address value object\ntype EmailAddress string\n\n// Unmarsh...
go
edit
0
2
mit
e77590f914a430618ce2f61dc5f1627ce3a2612f
vardius/go-api-boilerplate,vardius/go-api-boilerplate,vardius/go-api-boilerplate
cmd/user/internal/domain/user/models.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage backends\n\nimport (\n\t\"io\"\n\t\"os\"\n)\n\ntype FileStore interface {\n\t// write content at given path\n\tWriteFile(path string, reader io.Reader) (err error)\n\n\t// create dir at given path\n\tCreateDir(path string) (err error)\n...
go
edit
3
0
mit
f196de5ecad49bc9c75072a618ef48aab0f2d798
Marktown/frontend,Marktown/frontend,Marktown/frontend
backends/file_store.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage api\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc (api *API) TokenAuth() gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\tif api.token != c.Request.Header.Get(\"token\") {\n\t\t\tc.AbortWithStatus(http....
go
edit
3
2
mit
f9784b202625b37312b0f10a869b73bf049e71f6
nimona/go-nimona,nimona/go-nimona,nimona/go-nimona,nimona/go-nimona
api/middleware_auth.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage router\n\nimport (\n\t\"html/template\"\n\t\"net/http\"\n\n\t\"github.com/gorilla/mux\"\n)\n\nvar notFoundTemplate = template.Must(template.New(\"NotFound\").Funcs(FuncMap).ParseFiles(\"templates/index.html\", \"templates/404.html\"))\n...
go
edit
9
2
mit
87fec6c5abba85df8be26a846af77eb31506ccb5
NyaaPantsu/nyaa,ipatrol/nyaa,ipatrol/nyaa,ElegantMonkey/nyaa,majestrate/nyaa,steindornatorinn/nyaa,yueou/nyaa,NyaaPantsu/nyaa,ipatrol/nyaa,ElegantMonkey/nyaa,kipukun/nyaa,steindornatorinn/nyaa,majestrate/nyaa,steindornatorinn/nyaa,Nutjob/nyaa,moose65468/nyaa,yueou/nyaa,ElegantMonkey/nyaa,yueou/nyaa,ipatrol/nyaa,kipukun...
router/notFoundHandler.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage opts\n\nimport (\n\t\"fmt\"\n\t\"net\"\n)\n\ntype IpOpt struct {\n\t*net.IP\n}\n\nfunc NewIpOpt(ref *net.IP, defaultVal string) *IpOpt {\n\to := &IpOpt{\n\t\tIP: ref,\n\t}\n\to.Set(defaultVal)\n\treturn o\n}\n\nfunc (o *IpOpt) Set(val s...
go
edit
3
2
apache-2.0
561b98067f90326cc3c1d73cab6836a2e50728cd
riyazdf/cli,cpuguy83/cli,thaJeztah/cli,ashfall/cli,cpuguy83/cli,Zebrilee/cli,docker/cli,e11137/cli,dnephin/cli,dnephin/cli,ashfall/cli,riyazdf/cli,e11137/cli,redpanda/cli,thaJeztah/cli,allencloud/cli,Zebrilee/cli,allencloud/cli,docker/cli,redpanda/cli
opts/ip.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage api_test\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n . \"../go-webservice\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n)\n\nvar _ = Describe(\"Web\", func() {\n\tvar (\n\t\tpage *Page\n\t)\n\n\tBe...
go
edit
27
1
mit
493ec859891f2c96d429312ce5cbe39e8faa7846
glenngillen/go-webservice
api_test.go
rejected_lint
Too many lint violations: 27
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build 386 amd64\n\npackage virtualbox\n\nimport \"github.com/intel-go/cpuid\"\n\n// IsVTXDisabled checks if VT-x is disabled in the CPU.\nfunc (d *Driver) IsVTXDisabled() bool {\n\tif cpuid.HasFeature(cpuid.VMX) || cpuid.HasFeature(cpuid.SV...
go
edit
3
3
apache-2.0
173a41dd536bf2d7cac4126950c698c590f1f3fd
dweomer/docker-machine,docker/machine,dweomer/docker-machine,docker/machine
drivers/virtualbox/vtx_intel.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage defaults_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestDefaults(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Defaults Suite\")\n}\n\n```\n\nApply this c...
go
edit
6
1
apache-2.0
583f7f7dd73d76217c5bb72ac22ef30430d58911
grpc/test-infra,grpc/test-infra
pkg/defaults/defaults_suite_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage grpc\n\nimport ( \n\t\"testing\"\n\t\"math/rand\"\n\t\"time\"\n)\n\nfunc TestBackoffConfigDefaults(t *testing.T) {\n\tb := BackoffConfig{}\n\tsetDefaults(&b)\n\tif b != DefaultBackoffConfig {\n\t\tt.Fatalf(\"expected BackoffConfig to pi...
go
edit
12
2
bsd-3-clause
34d99ff2c2406eb420be2727f0045f0b673a7df6
mpl/grpc-go,thinkerou/grpc-go,rakyll/grpc-go,menghanl/grpc-go,fuchsia-mirror/third_party-grpc-grpc-go,rakyll/grpc-go,stanley-cheung/grpc-go,dsymonds/grpc-go,bradfitz/grpc-go,dfawley/grpc-go,improbable-io/grpc-go,dsymonds/grpc-go,andreimatei/grpc-go,fuchsia-mirror/third_party-grpc-grpc-go,thinkerou/grpc-go,MakMukhi/grpc...
backoff_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\"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
6
2
mit
029ba91b90dd6971e9c9ff5eca53f537218d709f
okuuva/nvd-search-cli
nvd-cli.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2020 the u-root 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\n// +build ignore\n\n// This program was used to generate dir-hard-link.cpio, ...
go
edit
0
5
bsd-3-clause
28748acc82edfc70a5db8d3727496508dafbe82c
u-root/u-root,u-root/u-root,u-root/u-root
cmds/core/cpio/testdata/dir-hard-link.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage winio\n\nimport \"testing\"\n\nfunc TestLookupInvalidSid(t *testing.T) {\n\t_, err := LookupSidByName(\".\\\\weoifjdsklfj\")\n\taerr, ok := err.(*AccountLookupError)\n\tif !ok || aerr.Err != cERROR_NONE_MAPPED {\n\t\tt.Fatalf(\"expected...
go
edit
15
3
mit
1891e2bbff1edeec391fee46918b58b374d48c7e
microsoft/go-winio,Microsoft/go-winio
sd_test.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cmd\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n)\n\n// RootCmd define root command\nvar RootCmd = &cobra.Command{\n\tUse: \"s3-edit\",\n\tShort: \"Edit directly a file on Amazon S3\",\n\tLong: \"Edit directly a...
go
edit
3
2
mit
3130bfe9d25027c43d2a90dee7a3f0180cd3258f
tsub/s3-edit
cmd/root.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models\n\nimport \"time\"\n\ntype Sensor struct {\n\tName string `json:\"name\"`\n\tType string `json:\"type\"`\n\tGenTime time.Time `json:\"gen_time\"`\n}\n\n// Struct for Gyro Sensor\ntype GyroSensor struct {\n\tSensor\n\t...
go
edit
0
0
mit
3a5cbb599dde6cba4bd05e4e217bab702d74b27d
mingrammer/go-codelab
models/sensors.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage conv\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestFleat64ToString(t *testing.T) {\n\tfs := []float64{1.2, -12, 4.14, 9.72, 6.666666}\n\ttransformable := Float64Slice(fs)\n\tstrs := transformable....
go
edit
3
1
mit
7b7522dc3423763b0127c7fac0689c8439d77405
bpicode/fritzctl,bpicode/fritzctl
conv/conversion_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n//go:generate go-bindata -pkg ctstatic -ignore .../.DS_Store -o files.go files/...\n\npackage ctstatic\n\nimport (\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/elazarl/go-bindata-assetfs\"\n)\n\n// all static/ files embedded as a Go library\nfun...
go
edit
3
3
mit
7e94266ebe91c55d88acdf9b8d33c0d9f235e6ee
suryadewa/ForNesiaToRrent,adiev13/cloud-torrent,adiev13/cloud-torrent,Mysecretid/mysecretid,FreeIDMZone/torrent-test,FreeIDMZone/torrent-test,jpillora/cloud-torrent,anmolmonga2009/toru,jpillora/cloud-torrent,Thenast/Harryhs,gamerstt/Actsg,Mysecretid/mysecretid,Mysecretid/mysecretid,adiev13/cloud-torrent,Mysecretid/Myse...
static/static.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\"os/exec\"\n\t\"github.com/codegangsta/cli\"\n)\n\nfunc runDgc(c *cli.Context) {\n\tfmt.println(\"Hello Test\")\n}\n\nfunc main() {\n\tapp := cli.NewApp()\n\tdgc.Name = \"dgc\"\n\tdgc.Usage = \"...
go
edit
3
1
mit
008ccaf4f5ea94e1ee3a17419ad209b883d55fdd
hatchery/dgc
dgc/dgc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage useful\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n)\n\n// GetPwd1 return .go file path, where func really is\n//\n// Useful only with .go file\n// With binary file always return path of source .go file\nfunc GetPwd1() string {\n\t...
go
edit
0
2
mit
4e480c1e9e657018ba3c8d6d7c85b9cdea7c7aca
dematron/go-useful
useful/pathwd.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/tcnksm/go-input\"\n)\n\nfunc main() {\n\tui := &input.UI{\n\t\tWriter: os.Stdout,\n\t\tReader: os.Stdin,\n\t}\n\n\tquery := \"What is your name?\"\n\tans, err := ui.Ask(query, &inp...
go
edit
0
2
mit
82116cc68f18a7d4cb2850fb9ac7143a2a77e637
tcnksm/go-input,OneCloudInc/go-input
example/ask.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage types\n\nimport (\n\t\"encoding/json\"\n)\n\ntype SearchResult struct {\n\tCollection json.RawMessage\n\tDocuments json.RawMessage\n\tTotal int\n\tFetched int\n\tAggregations json.RawMessage\n\tOptions QueryOptions...
go
edit
12
2
apache-2.0
6968c88743d5c7ff863c5a944ddf773da0a9dc43
kuzzleio/sdk-go,kuzzleio/sdk-go
types/search_result.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\t\"github.com/anchor/picolog\"\n\t\"github.com/fractalcat/emogo\"\n\tzmq \"github.com/pebbe/zmq4\"\n\t\"os\"\n)\n\nvar Logger *picolog.Logger\n\nfunc main() {\n\tlisten := flag.String(\"listen\", \"tcp://*...
go
edit
0
6
bsd-3-clause
ed0a57ba99d9cdab0167e4df1851f8755fd5217d
olorin/insensate,fractalcat/insensate
insenced/insenced.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage static_test\n\nimport (\n\t\".\"\n\t\"fmt\"\n\t\"net/http\"\n)\n\nfunc ExampleBuild() {\n\thandler := http.NewServeMux()\n\tpaths := []string{}\n\n\thandler.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\t\tfmt.Fprin...
go
edit
9
1
mit
c60959a8ef9850b8425e31014f24c13d68cda50a
leighmcculloch/static
build_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage xstrings\n\nimport (\n\t\"github.com/wallclockbuilder/testify/assert\"\n\t\"testing\"\n)\n\nfunc TestChomp(t *testing.T) {\n\tassert := assert.New(t)\n\tassert.Equal(\"hello\", Chomp(\"hello\", \"\"))\n\tassert.Equal(\"hello\", Chomp(\"...
go
edit
9
1
bsd-2-clause
0d3805555e09575831e89eee453af8dfce703b12
wallclockbuilder/gstrings,wallclockbuilder/stringutil
xstrings/chomp_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage chunker\n\nimport (\n\t\"testing\"\n\n\t\"bytes\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"time\"\n)\n\nfunc TestReadAll(t *testing.T) {\n\tn := 60\n\tl := 1\n\tbuf := make([]byte, l*n)\n\tfor i := 0; i < n; i++ {\n\t\tfor j := 0; j < l; j++ {\n...
go
edit
9
6
bsd-3-clause
8075e54722f7603d4e7cf43b4925690516493ce2
thijzert/speeldoos
lib/wavreader/chunker/chunker_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage commands\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/concourse/fly/commands/internal/displayhelpers\"\n\t\"github.com/concourse/fly/commands/internal/flaghelpers\"\n\t\"github.com/concourse/fly/rc\"\n)\n\ntype HidePipelineCommand struct {\...
go
edit
3
6
apache-2.0
9678edd6e6dd2409b00bcd3c94fe710f0c28b1a0
concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse
commands/hide_pipeline.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage command\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\nconst (\n\tBeer = \"\\U0001f37a\"\n)\n\nfunc BeerOclock(query string) []string {\n\thour := time.Now().Hour()\n\n\tvar result string\n\tif hour >= 18 {\n\t\tresult = fmt.Sprintf(\"YES! %s...
go
edit
0
3
mit
4fa436fd05c49693a7679b0af0e394d71d5ed3f7
caiofilipini/got
command/beeroclock.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sarama\n\nimport \"runtime/debug\"\n\nvar v string\n\nfunc version() string {\n\tif v == \"\" {\n\t\tbi, ok := debug.ReadBuildInfo()\n\t\tif ok {\n\t\t\tv = bi.Main.Version\n\t\t} else {\n\t\t\t// if we can't read a go module version th...
go
edit
0
2
mit
3c7163ef66daa946f960961aeff2f555d753d6e9
Shopify/sarama,DataDog/sarama,Shopify/sarama,DataDog/sarama
version.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 Jean Niklas L'orange. 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 edn\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n)\n\nfunc TestPPrint...
go
edit
3
4
bsd-3-clause
ad7edb7b3136ca4b8abacf56ce7682bd6a46bc9c
go-edn/edn
pprint_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n//+build !js\n\npackage vecty\n\nfunc init() {\n\tpanic(\"vecty: only GopherJS compiler is supported\")\n}\n\n```\n\nApply this change: Use canonical format for build constraint.\n\nThis improves consistency.\r\n\r\nSee https://godoc.org/go/bui...
go
edit
0
1
bsd-3-clause
8de85d2f144a4e56b05233b97efaf246224b9179
gopherjs/vecty
gopherjs_only.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage protocol\n\nimport (\n\t. \"github.com/Philipp15b/go-steam/protocol/steamlang\"\n\t\"io\"\n)\n\ntype JobId uint64\n\ntype Serializer interface {\n\tSerialize(w io.Writer) error\n}\n\ntype Deserializer interface {\n\tDeserialize(r io.Rea...
go
edit
12
2
bsd-3-clause
c6388c5255fa615fbdab081374d50000cc6ce027
juRiii/go-steam,juRiii/go-steam
protocol/internal.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage passvault\n\nimport (\n\t\"testing\"\n)\n\nvar emptyKey = make([]byte, 16)\nvar dummy = make([]byte, 16)\n\nfunc TestUsesFlush(t *testing.T) {\n\tsingleUse := ActiveUser{\n\t\tAdmin: true,\n\t\tExpiry: nextYear,\n\t\tUses: 1,\n\t\tkey: ...
go
edit
3
6
bsd-2-clause
afda151f08b4df562dd3c2b69e90bfa72cfa3d86
dullgiulio/redoctober,Bren2010/redoctober,ejcx/redoctober,dullgiulio/redoctober,Bren2010/redoctober,ejcx/redoctober
src/redoctober/passvault/passvault_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\ntype Contact struct {\n\tId int\n\tEmail string\n\tFirstName string\n\tLastName string\n\tMiddleName string\n\tDateOfBirth string\n\tSex int\n}\n\n```\n\nApply this change: Implement right jron marsh...
go
edit
0
8
mit
0dcaad90af049c068bb199fa9e900598b63ebabb
konjoot/benches,konjoot/benches,konjoot/benches
kami/contact.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage mysqlproto\n\nimport (\n\t\"errors\"\n)\n\ntype ResultSet struct {\n\tstream *Stream\n}\n\nfunc (r ResultSet) Row() ([]byte, error) {\n\tpacket, err := r.stream.NextPacket()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif packet.Pa...
go
edit
18
6
mit
b9bef7c2d626f037dc3042758f4f8be61430735c
pubnative/mysqlproto-go
com_query_response.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"time\"\n)\n\nfunc Start(stop chan int) {\n\tfor _, in := range Plugins.Inputs {\n\t\tgo CopyMulty(in, Plugins.Outputs...)\n\t}\n\n\tfor {\n\t\tselect {\n\t\tcase <-stop:\n\t\t\treturn\n\t\tcase <-time.Aft...
go
edit
0
9
apache-2.0
983bc728fa719b4827bfdbbcec41ff76a85b499f
bunnyblue/gor,MenZil/gor,on99/gor,wxdublin/gor,jmptrader/gor,no2key/gor,jakubholynet/gor,davidwalter0/gor,treejames/gor-1,dt/gor,wfxiang08/gor,cregev/gor,torfuzx/gor,daodaoliang/gor,insionng/gor,Sk464036801/gor,jasonchaffee/gor,ironsmile/gor,dshamaeli/gor,chinanjjohn2012/gor,chengky/gor,cemkoc/gor,chenwenbin928/gor-1,r...
emitter.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage librariesio\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n)\n\n// Project that holds a name field\ntype Project struct {\n\tName string `json:\"name,omitempty\"`\n}\n\n// GetProject returns information about a project and it's versions.\n// G...
go
edit
3
3
mit
970f2a52738f73cc8c63f4323b07a4b33fe3fddd
hackebrot/go-librariesio
librariesio/projects.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage core\n\nimport (\n \"errors\"\n \"fmt\"\n \"image\"\n \"image/png\"\n \"io\"\n \"os\"\n \"os/exec\"\n)\n\ntype PNGHandler struct {\n}\n\nfunc (p *PNGHandler) ImageType() string {\n return \"image/png\"\n}\n\nfunc...
go
edit
0
3
mit
a9435a9180a073655cbe4caa43ce2ba1b6d1d063
lotrekagency/piuma,lotrekagency/piuma
core/image_png.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cli\n\nimport \"flag\"\n\nconst DoubleMinus = \"--\"\n\n//ParameterFlagMode determines how arguments are parsed for SubCommands.\ntype ParameterFlagMode int\n\nconst (\n\t//ModeInterspersed allows command parameters and flags to be mixe...
go
edit
0
0
mit
470f338da0105f37c0e7b66a2ca63fea5da5138e
gogolfing/cli,gogolfing/cli
cli.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"strconv\"\n\t\"time\"\n)\n\nfunc init() {\n\trand.Seed(time.Now().Unix())\n}\n\n// StringsToInterfaceSlice converts strings to a slice of interfaces containing the strings.\nfunc Strings...
go
edit
0
2
mit
aefb3b76f97b704b18b8f0590745c55eee09241c
MasterOfBinary/redistypes
internal/test/test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !linux\n\npackage elf\n\nimport \"fmt\"\n\ntype PerfMap struct{}\n\nfunc InitPerfMap(b *Module, mapName string, receiverChan chan []byte) (*PerfMap, error) {\n\treturn nil, fmt.Errorf(\"not supported\")\n}\n\nfunc (pm *PerfMap) PollSt...
go
edit
3
1
apache-2.0
4026e82322e45b8de5afa6f4d491ed1200d0846f
louism517/gobpf,louism517/gobpf,louism517/gobpf
elf/perf_unsupported.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage siren\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc NTP(w, f int) Status {\n\tout, err := exec.Command(\"ntpq\", \"-c\", \"rv 0 offset\").Output()\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stdout,...
go
edit
21
5
mit
a27a91a9d151c339b9c81bebbc5af74cc5b05aa0
cotap/siren
siren/ntp.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"io/ioutil\"\n\t\"strconv\"\n\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/mdeheij/gitlegram/gitlab\"\n\tlog \"github.com/mdeheij/logwrap\"\n)\n\nfunc main() {\n\tc := NewConfig()\n\t//gin.SetMode(gin.ReleaseMode...
go
edit
6
3
mit
1508b7ca7250ed81320ad0272b5b98c3d8f25172
mdeheij/gitlegram
api.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gosseract_test\n\nimport \"github.com/otiai10/gosseract\"\nimport . \"github.com/otiai10/mint\"\nimport \"testing\"\n\nfunc Test_Greet(t *testing.T) {\n\tExpect(t, gosseract.Greet()).ToBe(\"Hello,Gosseract.\")\n}\n\nfunc Test_Must(t *te...
go
edit
9
1
mit
c5dbd750f6e1d3e3018d960c8904bc3f239aac99
otiai10/gosseract,esiqveland/gosseract,tonycoming/gosseract,trigrass2/gosseract,tonycoming/gosseract,otiai10/gosseract,trigrass2/gosseract,esiqveland/gosseract,trigrass2/gosseract,tonycoming/gosseract,otiai10/gosseract,esiqveland/gosseract,otiai10/gosseract
all_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage read\n\n// Fre scores the Flesch reading-ease.\n// See https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFlesch%E2%80%93Kincaid_readability_tests%23Flesch_reading_ease.\nfunc Fre(text string) float64 {\n\tsylCnt := float64(CntSyls(text))\n\twordC...
go
edit
9
1
mit
fa5a4e96b5db2c0ff9a400450b01671c6b20d2a6
BluntSporks/readability
fre.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage crane\n\nimport \"testing\"\n\nfunc TestDependencies(t *testing.T) {\n\tcontainer := &Container{Run: RunParameters{RawLink: []string{\"a:b\", \"b:d\"}}}\n\tif deps := container.Dependencies(); deps[0] != \"a\" || deps[1] != \"b\" {\n\t\...
go
edit
9
4
mit
9682b7065c48648a63ec1822d376f8482a38671c
rmoorman/crane,inthroxify/crane,michaelsauter/crane,t-suwa/crane,jesper/crane,michaelsauter/crane,stajkowski/crane,tmc/crane,jesper/crane,tmc/crane,inthroxify/crane,dreamcat4/crane,dreamcat4/crane,rmoorman/crane,t-suwa/crane,bjaglin/crane,bjaglin/crane,stajkowski/crane
crane/container_test.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\"log\"\n\n\tflag \"github.com/ogier/pflag\"\n\n\t\"github.com/aaronang/cong-the-ripper/lib/slave\"\n)\n\nfunc main() {\n\tlog.Println(\"slave starting...\")\n\tportPtr := flag.String(\"port\", \"8080\", \"Web server...
go
edit
0
1
mit
c447a86b2209052fb8b71cfc4555097d6f595f40
aaronang/cong-the-ripper,aaronang/cong-the-ripper
cmd/slave/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage agent\n\nimport (\n\t\"testing\"\n)\n\nfunc TestConstructResource(t *testing.T) {\n\tr := ConstructResources(1, 1, 1, 1, 1, 1)\n\n\tif r.CpuTotal != 1 || r.CpuUsage != 1 || r.MemoryTotal != 1 || r.MemoryUsage != 1 || r.DiskTotal != 1 ||...
go
edit
3
7
mit
d055743a71b2fff55a8506ab5ea00c861e61a813
longan/litchi
agent/resources_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/ant0ine/go-json-rest/rest\"\n\t\"github.com/julienbayle/jeparticipe/app\"\n)\n\nfunc main() {\n\n\tvar (\n\t\t// Path to the database\n\t\tdbFile = flag.String(\"...
go
edit
0
1
mit
5f86efb800160c786be0e593f6b758eefc47a830
julienbayle/jeparticipe,julienbayle/jeparticipe
cmd/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"regexp\"\n\t\"sync\"\n)\n\ntype EndpointRegistry struct {\n\tsync.RWMutex\n\tendpoints map[string]*Endpoint\n}\n\nfunc NewEndpointRegistry() *EndpointRegistry {\n\treturn &EndpointRegistry{\n\t\tendpoints: make(m...
go
edit
9
3
mit
045c936958d45ce76820d0f7aad5f9d9c782d5f5
mondough/typhon,monzo/typhon
server/endpoint_registry.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/timakin/ts/loader\"\n\t\"github.com/codegangsta/cli\"\n)\n\nvar Commands = []cli.Command{\n\tcommandAll,\n\tcommandBiz,\n\tcommandHack,\n}\n\nvar commandAll = cli.Command{\n\tName: \"pop\",\n\tUsage: \"...
go
edit
0
1
mit
7ec3b887456f286351eba6b66e49538fd729a3cf
timakin/ts,timakin/ts
commands.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/briandowns/spinner\"\n)\n\nfunc main() {\n\ts := spinner.New(spinner.CharSets[0], 100*time.Millisecond)\n\ts.Prefix = \"Colors: \"\n\tif err := s.Color(\"yellow\"); err != nil {\...
go
edit
0
6
apache-2.0
3c22fb745f49a6d9d2189b83a76becc2fbb18c36
diddledan/spinner,briandowns/spinner,mjmac/spinner
examples/color/app.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage utils\n\nimport (\n\t\"bytes\"\n\t\"os\"\n)\n\n// ClosingBuffer implement Closer interface for Buffer\ntype ClosingBuffer struct {\n\t*bytes.Buffer\n}\n\n// Close implement Closer interface for Buffer\nfunc (cb *ClosingBuffer) Close() (...
go
edit
0
1
mit
6cb256b8b479cf27788e0e30a3c9d0f66c45735e
qor/qor,qor/qor,qor/qor
utils/buffer.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n)\n\nfunc TestMainNoArgsShouldPrintUsage(t *testing.T) {\n\tout := bytes.NewBufferString(\"\")\n\n\tlf := NewLocalFiles(\"\")\n\tMain([]string{\"\"}, out, out, &lf)\n\n\tif out.String() != U...
go
edit
15
2
cc0-1.0
e377cb3f2d1bd21bccab3d14ac2fcca32c68fe90
dcbishop/dtt
dwi_test.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage matrix\n\nimport (\n\t\"os\"\n\t)\n\n\n\nfunc Invert(frame [][]float32) [][]float32 {\n}\n\nfunc ExtractChannel(frame [][]float32, channel int) []float32 {\n\tout := make([]float32, len(frame))\n\n\tfor i, v := range frame {\n\t\n\t}\n\...
go
edit
0
4
mit
3ab496965a1ef36f4f6f0f682bf5f62916fd9e1f
jesusaurus/afp,jesusaurus/afp,jesusaurus/afp,jesusaurus/afp
lib/matrix/matrix.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage service\n\ntype Release interface {\n\tGetID() int\n\tGetTagName() string\n\tGetName() string\n\tGetBody() string\n\tGetHTMLURL() string\n}\n\ntype NewRelease struct {\n\tID int\n\tTagName string\n\tName string\n\tBody string...
go
edit
0
1
mit
6b33b2fe8fdc64978703fd74c501ff3c81ef8c9a
mpppk/hlb
service/release.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"dao\"\n\t\"os\"\n\t\"www\"\n\n\t\"github.com/inconshreveable/log15\"\n)\n\n//sudo docker pull spotify/cassandra\n//sudo docker run --name cassandra -d -p 9042:9042 spotify/cassandra\n//sudo docker exec -it cassandr...
go
edit
0
2
apache-2.0
27b91ba369542ce1f847db8b8e4af5b8de595ddf
jerome-laforge/mytweeter,jerome-laforge/mytweeter,jerome-laforge/mytweeter
src/cmd/mytweeter/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestNewURL(t *testing.T) {\n\turl, err := NewURL(\"https://github.com/motemen/pusheen-explorer\")\n\tExpect(url.String()).To(Equal(\"https://github.com/motemen/p...
go
edit
15
1
mit
95cfaeb5aa27c690ecf06c595fdfb056c1d86ad6
maoe/ghq,uetchy/ghq,jmatsu/ghq_ss,skatsuta/ghq,motemen/ghq,ngtk/ghq,motemen/ghq,motemen/ghq
url_test.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\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 signal\n\nimport (\n\t\"syscall\"\n\t\"testing\"\n)\n\nfunc TestSignal(t...
go
edit
6
2
bsd-3-clause
08e8f3bd51f8e816de5902069f80704ece1957f4
abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go
src/pkg/os/signal/signal_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage vm\n\nvar (\n\tnullClass *RNull\n\t// NULL represents Goby's null objects.\n\tNULL *NullObject\n)\n\n// RNull is the built in class of Goby's null objects.\ntype RNull struct {\n\t*BaseClass\n}\n\n// NullObject represnts the null value ...
go
edit
0
1
mit
c8a46f504f90eb1f049025f531d046fa2631594d
Maxwell-Alexius/goby,hachi8833/goby,Maxwell-Alexius/goby,Maxwell-Alexius/goby,goby-lang/goby,goby-lang/goby,goby-lang/goby,st0012/Rooby,hachi8833/goby,st0012/Rooby,hachi8833/goby
vm/null.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage spritz\n\n// InsecurePasswordHash calculates a CPU- and memory-hard hash of the given\n// password and salt. It takes a linear parameter, m, which determines both CPU\n// and memory cost. It also takes the length of the hash in bytes.\n...
go
edit
3
2
mit
662b53fd8eac2f2b0d5e8187e72a1ac17dd8e86d
codahale/spritz
passhash.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage security\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/goincremental/web\"\n\t\"github.com/goincremental/web/security/models\"\n)\n\ntype securityContextKey int\n\nconst userKey securityContextKey = 0\n\nfunc SetUser(r *http.Request, va...
go
edit
0
2
apache-2.0
6c3492c268e58e74ee92284c547aac8ee60653ec
GoIncremental/web
security/context.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage irc\n\nimport (\n\t//\tirc \"github.com/thoj/Go-IRC-Client-Library\"\n\t\"fmt\"\n\t\"testing\"\n)\n\n\nfunc TestConnection(t *testing.T) {\n\tirccon := IRC(\"invisible\", \"invisible\")\n\n\tfmt.Printf(\"Testing connection\\n\")\n\n\ter...
go
edit
15
2
bsd-3-clause
7e83b51915e81cf442f3818014abf61ac9d85254
pratikmallya/go-ircevent,iwanbk/ogric,oniichaNj/go-ircevent,DanielOaks/girc-go,Elemental-IRCd/irc,alaska/go-ircevent,HenrySlawniak/go-ircevent,SeanThomasWilliams/go-ircevent,phone/go-ircevent,dainis/go-ircevent
irc_test.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"os\"\nimport \"github.com/codegangsta/cli\"\n\nfunc main() {\n\tapp := cli.NewApp()\n\tapp.Name = \"exercism\"\n\tapp.Usage = \"fight the loneliness!\"\n\tapp.Action = func(c *cli.Context) {\n\t\tprintln(\"Hello friend!...
go
edit
0
1
mit
3165608fb29d17d33ebeb88095e8d4c801b7ed68
lcowell/cli,arvidsaur/cli,exercism/cli,Tonkpils/cli,Tonkpils/cli,yeah-right/cli,arvidsaur/cli,yeah-right/cli,Tonkpils/cli,neslom/cli,lcowell/cli,neslom/cli,zabawaba99/cli,exercism/cli,lcowell/cli,yeah-right/cli,arvidsaur/cli,zabawaba99/cli,zabawaba99/cli,neslom/cli
src/main.go
rejected_duplicate
Near-duplicate of sample 116931
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t_ \"github.com/jinzhu/gorm/dialects/sqlite\"\n\t\"github.com/spf13/viper\"\n\t\"github.com/swordbeta/trello-burndown/pkg/server\"\n\t\"github.com/swordbeta/trello-burndown/...
go
edit
0
3
mit
c69552733a6789e53c87b734742024d839adf1dc
swordbeta/trello-burndown
cmd/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage core\n\nimport (\n\t\"github.com/projectjane/jane/connectors\"\n\t\"github.com/projectjane/jane/models\"\n\t\"log\"\n\t\"strings\"\n)\n\nfunc Publishers(publishMsgs <-chan models.Message, config *models.Config) {\n\tlog.Print(\"Initiali...
go
edit
0
9
mit
db0a4854563e1f7f0416e98f523dafefd0cf249d
mmcquillan/jane,projectjane/jane,hexbotio/hex
core/publishers.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/flynn/flynn-controller/client\"\n)\n\nfunc main() {\n\tkey := os.Args[3]\n\n\tclient, err := controller.NewClient(\"\", os.Getenv(\"CONTROLLER_AUTH_KEY\"))\n\tif err != nil {\n\t\t...
go
edit
3
5
bsd-3-clause
fe56731123d96a1d466785458bd3587c8d06f211
flynn-archive/flynn-receive,flynn-archive/flynn-receive
key-check/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"./du\"\n\t\"fmt\"\n)\n\nvar KB = uint64(1024)\n\nfunc main() {\n\tusage := du.NewDiskUsage(\"C:\\\\\")\n\tfmt.Println(\"Free:\", usage.Free()/(KB*KB))\n\tfmt.Println(\"Available:\", usage.Available()/(KB*KB))\n\tfm...
go
edit
0
1
unlicense
a7a1b211640b563731d66d5296929843ce18e127
calmh/du,ricochet2200/go-disk-usage,d4l3k/go-disk-usage
duexample.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/discoproject/goworker/jobutil\"\n\t\"github.com/discoproject/goworker/worker\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"strings\"\n)\n\nfunc Map(reader io.Reader, writer io.Writer) {\n\tbody, err := io...
go
edit
0
4
isc
577a1de6d9c5cd8ec4cf4f8244a117de9eb33321
discoproject/goworker
examples/count_words.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage handler\n\nimport (\n\telasticseach \"github.com/Rakanixu/elasticsearch/srv/proto/elasticsearch\"\n\t\"github.com/micro/go-micro/errors\"\n)\n\n// RequiredRecordFieldsExists returns an error if DocRef struct has zero value\nfunc DocRefF...
go
edit
0
3
apache-2.0
62ef15c40b2391cc28188da04ed7fb4f3c4c8f4e
Rakanixu/elasticsearch,Rakanixu/elastic
srv/handler/helper.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build norwfs\n\npackage dotgit\n\nimport \"gopkg.in/src-d/go-git.v4/plumbing\"\n\nfunc (d *DotGit) setRef(fileName, content string, old *plumbing.Reference) error {\n\tf, err := d.fs.Create(fileName)\n\tif err != nil {\n\t\treturn err\n\t}\...
go
edit
3
2
apache-2.0
dae8c68b753943058aa397947e5c318d8db8cab8
src-d/go-git,mcuadros/go-git,go-git/go-git,go-git/go-git,src-d/go-git,mcuadros/go-git
storage/filesystem/internal/dotgit/dotgit_setref_norwfs.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Program gcm-logger logs and echoes as a GCM \"server\".\npackage main\n\nimport (\n\t\"github.com/alecthomas/kingpin\"\n\t\"github.com/aliafshar/toylog\"\n\t\"github.com/google/go-gcm\"\n)\n\nvar (\n\tserverKey = kingpin.Flag(\"server_key\",...
go
edit
0
2
apache-2.0
8beca790d3797d63dccc71d645645c9aee9045b9
kikinteractive/go-gcm,googlearchive/go-gcm,kikinteractive/go-gcm,rounds/go-gcm
cmd/gcm-logger.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nconst (\n\tsetNames = \"SET NAMES utf8\"\n\tsetLocPrefix = \"SET @localPrefix='+48'\"\n\toutboxTable = \"SMSd_Outbox\"\n\trecipientsTable = \"SMSd_Recipients\"\n\tinboxTable = \"SMSd_Inbox\"\n)\n\nconst create...
go
edit
0
0
bsd-3-clause
b39962bcf776cd2761e585e1becf089c0fa0d0cf
ziutek/gogammu
smsd/dbdef.go
accepted
null
true