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// Based on ssh/terminal:\n// Copyright 2011 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\n// +build linux,!appengine darwin freebsd openbsd\n\n...
go
edit
3
1
apache-2.0
4a25da23b978d2eacb145d710a9682cc12b74f88
stgraber/lxd,stgraber/lxd,hallyn/lxd,hallyn/lxd,hallyn/lxd,stgraber/lxd,hallyn/lxd,lxc/lxd,lxc/lxd,hallyn/lxd,atxwebs/lxd,atxwebs/lxd,atxwebs/lxd,stgraber/lxd,hallyn/lxd,lxc/lxd,lxc/lxd,stgraber/lxd,lxc/lxd,stgraber/lxd,lxc/lxd,stgraber/lxd,atxwebs/lxd,lxc/lxd
shared/log15/term/terminal_notwindows.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage entities\n\nimport \"time\"\n\nvar (\n\ttimeStamp int64 = time.Date(2012, time.November, 10, 23, 0, 0, 0, time.UTC).UnixNano() / 1e6\n\tmission Mission = Mission{\n\t\tColor: Color{22, 22, 22},\n\t\tSource: []int{100, 200...
go
edit
18
0
mit
2f58cbdf8834fe79c36f4cb5428151d0c559bbab
WarCluster/warcluster-server,WarCluster/warcluster-server
entities/init_test.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\"testing\"\n)\n\nfunc TestParseMaintainer(t *testing.T) {\n\tcases := []struct {\n\t\tin []byte\n\t\twant *Maintainer\n\t}{\n\t\t{[]byte(\"JohnDoe\"), &Maintainer{Name: \"JohnDoe\"}},\n\t\t{[]byte(\"John Doe\"), &...
go
edit
0
3
mit
9b343d990ef728f08e23c6fee299bcf30e59b039
y-taka-23/voicepipe,y-taka-23/voicepipe
unmarshal_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dice\n\nimport \"testing\"\n\nfunc TestRollable(t *testing.T) {\n var attackDie AttackDie\n var defenseDie DefenseDie\n attackDie.Roll()\n defenseDie.Roll()\n}\n\n```\n\nApply this change: Add test for die rolling." }, {...
go
edit
27
6
mit
b43683f05ba1453e302ffed77c04ed124bf330d4
geordanr/go_xwing,geordanr/go_xwing,geordanr/go_xwing
dice/die_test.go
rejected_lint
Too many lint violations: 27
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package events defines the structures used for events dispatched from the\n// wrangler package.\npackage events\n\nimport (\n\t\"github.com/youtube/vitess/go/event\"\n\t\"github.com/youtube/vitess/go/vt/topo\"\n)\n\n// Reparent is an event t...
go
edit
0
2
apache-2.0
bd1ae3761b68c5629c7d693a775ae4f359a79dde
guokeno0/vitess,fengshao0907/vitess,SDHM/vitess,applift/vitess,anusornc/vitess,SDHM/vitess,anusornc/vitess,erzel/vitess,skyportsystems/vitess,tinyspeck/vitess,mattharden/vitess,dcadevil/vitess,cgvarela/vitess,SDHM/vitess,michael-berlin/vitess,kuipertan/vitess,cloudbearings/vitess,tjyang/vitess,nurblieh/vitess,alainjoba...
go/vt/wrangler/events/reparent.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage fs\n\nimport (\n\t\"mime\"\n\t\"path\"\n\t\"strings\"\n)\n\n// MimeTypeFromName returns a guess at the mime type from the name\nfunc MimeTypeFromName(remote string) (mimeType string) {\n\tmimeType = mime.TypeByExtension(path.Ext(remote)...
go
edit
6
3
mit
aadbcce486df149a8b09cdbe753e624a8fddd8ba
B4dM4n/rclone,olihey/rclone,olihey/rclone,B4dM4n/rclone,B4dM4n/rclone,ncw/rclone,olihey/rclone,B4dM4n/rclone,ncw/rclone,yonjah/rclone,yonjah/rclone,ncw/rclone,yonjah/rclone,yonjah/rclone,olihey/rclone,ncw/rclone
fs/mimetype.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) 2015, Peter Mrekaj. All rights reserved.\n// Use of this source code is governed by a MIT-style\n// license that can be found in the LICENSE.txt file.\n\npackage ptypes\n\n// IntWeight returns number of bits set to 1 in x.\nfun...
go
edit
0
3
mit
d734313a15076bf107024fabb6d8f65f492a1622
mrekucci/epi,mrekucci/epi
ptypes/closestint.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\n\t\"github.com/Symantec/Dominator/lib/errors\"\n)\n\nfunc findHypervisor(vmIpAddr net.IP) (string, error) {\n\tif *hypervisorHostname != \"\" {\n\t\treturn fmt.Sprintf(\"%s:%d\", *hypervisorHost...
go
edit
18
6
apache-2.0
404e15219b69ae60f3e3e735636f39c0e3773b5f
rgooch/Dominator,Symantec/Dominator,rgooch/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator
cmd/vm-control/findHypervisor.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\"fmt\"\n\t\"os\"\n\n\t\"github.com/labstack/gommon/log\"\n\t\"github.com/scritch007/go-moviename\"\n)\n\nvar debug bool\n\nfunc init() {\n\tflag.BoolVar(&debug, \"v\", false, \"Enable debug logs\")\n}\n\...
go
edit
3
4
mit
9293d227b5e89dfa2714974ef01f0505b9443652
scritch007/go-medianame
cmd/parseMovieName/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage statemachine\n\nimport (\n\t\"log\"\n\t\"os\"\n)\n\ntype Handler func() string\n\ntype Machine struct {\n\tHandlers map[string]Handler\n\tLogger *log.Logger\n}\n\ntype StateMachineError struct {\n\tState string\n}\n\nfunc (sme StateMa...
go
edit
0
4
mit
0af0796ae57311e1828f135161cc19dcb55d8105
christianberg/boxrunner
statemachine/statemachine.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Utility scans spectrum and shows channels on which Crazyflies found\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/krasin/crazyradio\"\n)\n\nfunc main() {\n\tst, err := crazyradio.Start(nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t...
go
edit
0
3
mit
d276e040aaf0971105dbde4be159417e7e01162d
samofly/cflie
cmd/crazyradio-scan/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage netascii\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"io\"\n)\n\nfunc WriteTo(b []byte, bw *bufio.Writer) (n int, err error) {\n\tb = bytes.Replace(b, []byte{'\\r', 0}, []byte{'\\r'}, -1)\n\tb = bytes.Replace(b, []byte{'\\r', '\\n'}, []by...
go
edit
0
3
apache-2.0
6051c6372ddad9326d591477ee14dde484772ff6
marcelki/tftp
netascii/netascii.go
accepted
null
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\n// Copyright 2015 Reed O'Brien <<EMAIL>>.\n// All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tfmt.Print(\"c...
go
edit
0
1
bsd-3-clause
35246bbbee0d65e0b83977d785b0f6be886e572e
yubo/oath
main.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/nitishparkar/muffliato/crawler\"\n\t\"io/ioutil\"\n\t\"strings\"\n)\n\nconst sitesFile string = \"sites.txt\"\n\nfunc main() {\n\tdata, err := ioutil.ReadFile(sitesFile)\n\n\tif err != nil {\n...
go
edit
0
5
mit
a5c5f5dad4cfca91c53d043bfc26b0b248a7b28f
nitishparkar/muffliato
main.go
rejected_duplicate
Near-duplicate of sample 118908
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\"strconv\"\n\n\t\"github.com/rtwire/mock/service\"\n)\n\nvar (\n\tport = flag.Int(\"port\", 8085, \"service port number\")\n)\n\nfunc main() {\n\tflag.Parse()\n\n\taddr := \":\...
go
edit
0
1
apache-2.0
0431f75e27d08749ab94e7487201d36491ae7aff
rtwire/mock,rtwire/mock
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 Alex Browne. All rights reserved.\n// Use of this source code is governed by the MIT\n// license, which can be found in the LICENSE file.\n\n// Package zoom A blazing-fast datastore and querying engine for\n// Go built on Red...
go
edit
0
0
mit
a79cee721980a5c4ae084fd1684c51330dc27ef7
albrow/zoom
zoom.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/* Copyright 2019 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
3
2
apache-2.0
12eed13535bbf4679d29b845f6bcb4eef4a49bba
google/gonids
fuzz.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build freebsd,!cgo\n\n/*\n Copyright The containerd Authors.\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 Lic...
go
edit
0
1
apache-2.0
63603f42b2802fa71d8a0a6ab56f39be2615c7e5
containerd/console
pty_freebsd_nocgo.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage nptl\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/krasin/g3\"\n\t\"github.com/krasin/voxel/raster\"\n\t\"github.com/krasin/voxel/volume\"\n)\n\nfunc Write(w io.Writer, vol volume.Space16, grid raster.Grid) (err error) {\n\tstepX :...
go
edit
0
2
mit
f8cbbbb498421a7b43db739243681adf296e6d85
krasin/voxel
nptl/writer.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2015 The Things Network\n// Use of this source code is governed by the MIT license that can be found in the LICENSE file.\n\npackage components\n\nimport (\n\t\"github.com/thethingsnetwork/core\"\n\t//\"github.com/thethingsnetwor...
go
edit
0
1
mit
1301e1f57c0fc3935cdf707112eb75a77025f8d3
TheThingsNetwork/ttn,mgranberry/ttn,LoRaWanSoFa/ttn,mgranberry/ttn,TheThingsNetwork/ttn,jvanmalder/ttn,LoRaWanSoFa/ttn,jvanmalder/ttn,mgranberry/ttn,TheThingsNetwork/ttn,jvanmalder/ttn
refactored_components/packet.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/albertyw/reaction-pics/server\"\n\t\"github.com/albertyw/reaction-pics/tumblr\"\n\t_ \"github.com/joho/godotenv/autoload\"\n\t\"os\"\n\t\"strings\"\n)\n\nconst readPostsFromTumblrEnv = \"READ_POSTS_FROM_...
go
edit
0
2
mit
9fcc3c99dacf63aef455ac8be895b45eab110a47
albertyw/reaction-pics,albertyw/reaction-pics,albertyw/devops-reactions-index,albertyw/devops-reactions-index,albertyw/reaction-pics,albertyw/reaction-pics,albertyw/devops-reactions-index,albertyw/devops-reactions-index
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\n// gitVersion returns the tag of the HEAD, if one exists,\n// or else the commit hash.\nfunc gitVersion() string {\n\ttag := cmd(\"git\", \"tag\", \"--contains\", \"HEAD\").OutputLine()\n\n\tif tag != \"\" {\n\t\treturn tag\n\t}...
go
edit
6
3
mit
0e84598e29d091bc4274409c1df02260e2dcefb0
samherrmann/gowrap
git.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\nimport \"io/ioutil\"\nimport \"os\"\n\nfunc main() {\n\tfmt.Println(\"Advent of code: Golang\\nTask 8\")\n\n\tPrintCurrentDir()\n\n\tfile, err := ioutil.ReadFile(\"../input.txt\")\n\tif err != nil {\n\t\tfmt.Prin...
go
edit
0
2
apache-2.0
2e943e24b794d899aae3397a6a8a34ea2ee4271d
EvilKhaosKat/advent_of_code,EvilKhaosKat/advent_of_code,EvilKhaosKat/advent_of_code,EvilKhaosKat/advent_of_code
task_8/Golang/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n)\n\n// goGenerate executes the command \"go generate\"\nfunc goGenerate() {\n\tcmd(\"go\", \"generate\").Run()\n}\n\n// goBuild executes the command \"go build\" for the desired\n// targ...
go
edit
12
2
mit
424bc782bc1d5b5125a0e17aa319bd75132b6309
samherrmann/gowrap
gotools.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\t\"math/rand\"\n\t\"strings\"\n\t\"time\"\n)\n\nfunc mesosTestProvider(taskId string) (RunningTask, error) {\n\tparts := strings.Split(taskId, \".\")\n\tif len(parts) == 2 && parts[0] != \"\" {\n\t\treturn ...
go
edit
9
3
mit
2d05579085563a744b5be9a5823e4190f748f8fa
ChannelMeter/vault-gatekeeper-mesos,ChannelMeter/vault-gatekeeper-mesos
mesos_test_provider.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage app\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"text/template\"\n\n\t\"github.com/Sirupsen/logrus\"\n\t\"github.com/docker/libcompose/version\"\n\t\"github.com/urfave/cli\"\n)\n\nvar versionTemplate = `Version: {{.Version}...
go
edit
0
4
apache-2.0
8b3b3d98b7388c65581dab06b90ced2f82e8a73f
vdemeester/libcompose,weitenghuang/libcompose,vito-c/libcompose,docker/libcompose,vito-c/libcompose,jainvipin/libcompose,dweomer/docker-libcompose,Azure22/libcompose,jainvipin/libcompose,weitenghuang/libcompose,Azure22/libcompose,dweomer/docker-libcompose,docker/libcompose,vdemeester/libcompose
cli/app/version.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Println(\"Hello, World!\")\n}\n\n```\n\nApply this change: Update go hello world with tab instead of spaces indentation." }, { "role": "assistant", "content": "package main\n\...
go
edit
0
1
mit
d6bd609df37b4b60dcdad123ee607417fa2b38b9
jbranchaud/hello-world,jbranchaud/hello-world,jbranchaud/hello-world,jbranchaud/hello-world,jbranchaud/hello-world,jbranchaud/hello-world
hello_world/go/hello_world.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage client\n\nimport (\n \"net/http\"\n \"golang.org/x/oauth2\"\n)\n\ntype authCodeFn func(string) func() string\n\nfunc NewOauthClient(clientId, clientSecret, tokenFile string, authFn authCodeFn) (*http.Client, error) {\n conf := ...
go
edit
6
0
mit
f2ab00ce73744c95a986100784ec4af92cd83c33
prasmussen/gdrive,prasmussen/gdrive
client/auth.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage urlutil\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n)\n\nfunc open(rawurl string) (io.ReadCloser, error) {\n\tu, err := url.Parse(rawurl)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif u.Scheme == \...
go
edit
0
7
apache-2.0
3cf19149ca2655b235f941f012f74a422eafed4c
rgooch/Dominator,Symantec/Dominator,rgooch/Dominator,Symantec/Dominator,rgooch/Dominator,Symantec/Dominator
lib/url/urlutil/open.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sanntid\n\ntype Line struct {\n\tName string\n\tDestination string\n}\n\ntype Arrival struct {\n\tLine Line\n\tExpectedArrivalTime string\n\tPlatform string\n}\n\nfunc GetArrivals(locationId int) ([]Arri...
go
edit
3
3
mit
43812e383db83df5c56a400c4cedd48c62d49a9c
michaelenger/sanntid
sanntid.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage auth\n\nimport (\n\t\"net/http\"\n)\n\nconst CookieName = \"ATC-Authorization\"\n\ntype CookieSetHandler struct {\n\tHandler http.Handler\n}\n\nfunc (handler CookieSetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tcooki...
go
edit
0
3
apache-2.0
fe8ec541980121ba74b630825728b8d62dfa46d4
concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse
cookie_set_handler.go
rejected_duplicate
Near-duplicate of sample 117649
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gstrings\n\nimport (\n\t\"github.com/wallclockbuilder/testify/assert\"\n\t\"testing\"\n)\n\nfunc TestLength(t *testing.T) {\n\tassert := assert.New(t)\n\n\tassert.Equal(5, Length(\"hello\"))\n}\n\n```\n\nApply this change: Add example t...
go
edit
6
1
bsd-2-clause
d5047421dd8cd333814f97643bccfdda4f270c9a
wallclockbuilder/gstrings,wallclockbuilder/stringutil
length_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\t\"io\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n)\n\nfunc main() {\n\tstart := time.Now()\n\tch := make(chan string)\n\tfor _, url := range os.Args[1:] {\n\t\tif !strings.HasP...
go
edit
0
4
mit
f0932b8c5186d9a53905036a5df0a2dfdddd5b56
jimlawton/gopl
ch1/fetchall/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n//\n// Copyright (c) 2017 Mainflux\n//\n// SPDX-License-Identifier: Apache-2.0\n//\n\npackage export\n\n// Message - Encapsulating / wrapper message object that contains Event\n// to be exported and the client export registration details\ntype ...
go
edit
3
0
apache-2.0
038b5645f8d1eef2bd0d43fe1fbd87858102edae
feclare/edgex-export
message.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage appui\n\nimport (\n\t\"context\"\n\n\t\"github.com/docker/docker/api/types/events\"\n\t\"github.com/moncho/dry/docker\"\n\t\"github.com/moncho/dry/ui/termui\"\n)\n\n//RegisterWidget registers the given widget for updates from the given ...
go
edit
0
2
mit
6fe65e139763923bc15772e4a9edf111fe5ca0ad
moncho/dry,moncho/dry
appui/listen.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tgaugeTotal = prometheus.NewGauge(prometheus.GaugeOpts{\n\t\tName: \"total\",\n\t\tNamespace: \"scan\",\n\t\tSubsystem: \"ips\",\n\t...
go
edit
3
3
mit
09980b8e6b94a854cded0147f3a904fa93b03484
jamesog/scan,jamesog/scan,jamesog/scan
metrics.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dynatest\n\nimport (\n\t\"github.com/underarmour/dynago\"\n\t\"github.com/underarmour/dynago/schema\"\n)\n\n// A Mock executor\ntype Executor struct {\n}\n\nfunc (e *Executor) GetItem(*dynago.GetItem) (*dynago.GetItemResult, error) {\n\...
go
edit
0
1
mit
e22c1dac159f40149c5f36c75aa1068097cbf342
ralph-tice/dynago,underarmour/dynago,crast/dynago
dynatest/executor.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build pkcs11,linux\n\npackage yubikey\n\nvar possiblePkcs11Libs = []string{\n\t\"/usr/lib/libykcs11.so\",\n\t\"/usr/lib64/libykcs11.so\",\n\t\"/usr/lib/x86_64-linux-gnu/libykcs11.so\",\n\t\"/usr/local/lib/libykcs11.so\",\n}\n\n```\n\nApply ...
go
edit
0
0
apache-2.0
251ea57f0508249a3117f20adcf971d102acc308
HuKeping/notary,jfrazelle/notary,endophage/notary,HuKeping/notary,HuKeping/notary,endophage/notary,johnsandiford/notary,johnsandiford/notary,docker/notary,jfrazelle/notary,jfrazelle/notary,docker/notary,johnsandiford/notary,docker/notary,endophage/notary
trustmanager/yubikey/pkcs11_linux.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage v2\n\nimport (\n\t\"os\"\n\n\t\"code.cloudfoundry.org/cli/cf/cmd\"\n\t\"code.cloudfoundry.org/cli/commands\"\n\t\"code.cloudfoundry.org/cli/commands/flags\"\n)\n\ntype DeleteSpaceCommand struct {\n\tRequiredArgs flags.Space `positional-...
go
edit
0
1
apache-2.0
a3590026f85d194f6547d537dffc3afe870dadb9
cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli
commands/v2/delete_space_command.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\n/*\nThis could probably be smarter, but it'll do for now.\n*/\n\nconst HTML_STOPPED = `\n\t<html>\n\t\t<body>\n\t\t\t<p>The instances for this service are currently powered down.</p>\n\t\t\t<p><a href=\"%s\">Click here</a> to st...
go
edit
0
0
apache-2.0
9afb59d6299eae6a19c9375e0b378c603e34bcf1
fairfaxmedia/flywheel,fairfaxmedia/flywheel
html.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage values\n\n// Keys returns all the keys.\nfunc (m SMap) Keys() []string {\n\tr := make([]string, 0)\n\tfor k := range m {\n\t\tr = append(r, k)\n\t}\n\treturn r\n}\n\n// Values returns all the values.\nfunc (m SMap) Values() []interface{...
go
edit
0
2
apache-2.0
2d00a8c4ba276ecd23cedac76754789bdccdd8d3
xgfone/go-tools
values/smap_utils.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\n\nimport \"os\"\nimport \"bufio\"\nimport \"strings\"\nimport \"time\"\nimport \"strconv\"\nimport \"flag\"\n\nfunc main() {\n\tdur := flag.Duration(\"d\", time.Second, \"duration unit\")\n\tflag.Parse()\n\n\tsca...
go
edit
0
7
apache-2.0
388f827315841cd9014cedb0350be5d34b15a2f1
advincze/benchfmt
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage wl_integration_test\n\nimport (\n\t\"github.com/nu7hatch/gouuid\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/robdimsdale/wl\"\n)\n\nvar _ = Describe(\"basic user functionality\", func() {\n\tIt(\"can...
go
edit
33
1
mit
d5e92175cf887cb71183bdf4fab51debb485f29e
robdimsdale/wundergo,robdimsdale/wl,robdimsdale/wundergo,robdimsdale/wl
integration_tests/user_test.go
rejected_lint
Too many lint violations: 33
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage termios\n\nimport (\n\t\"fmt\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc open_pty_master() (uintptr, error) {\n\treturn open_device(\"/dev/ptmx\")\n}\n\nfunc Ptsname(fd uintptr) (string, error) {\n\tvar n uintptr\n\terr :=...
go
edit
0
2
bsd-2-clause
86dad31139dac86af1c47c72d1a248741ed632c5
pkg/term
termios/pty_linux.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/zero-boilerplate/go-api-helpers/service\"\n\t\"path/filepath\"\n\n\tservice2 \"github.com/ayufan/golang-kardianos-service\"\n)\n\ntype app struct {\n\tlogger service2.Logger\n\twat...
go
edit
15
2
mit
d0e5eded1d1207c9123fb9fd6bcbdb8a95975ecd
golang-devops/script-watcher-service
main.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/lxc/lxd/client\"\n)\n\nfunc cmdShutdown(args *Args) error {\n\tconnArgs := &lxd.ConnectionArgs{\n\t\tSkipGetServer: true,\n\t}\n\tc, err := lxd.ConnectLXDUnix(\"\"...
go
edit
9
7
apache-2.0
0f5237af19a4e27adc2f0c84d236db45ba5e2446
lxc/lxd,hallyn/lxd,stgraber/lxd,hallyn/lxd,Skarlso/lxd,mjeanson/lxd,jsavikko/lxd,hallyn/lxd,jsavikko/lxd,hallyn/lxd,atxwebs/lxd,Skarlso/lxd,lxc/lxd,mjeanson/lxd,Skarlso/lxd,stgraber/lxd,stgraber/lxd,atxwebs/lxd,stgraber/lxd,Skarlso/lxd,atxwebs/lxd,lxc/lxd,erikmack/lxd,stgraber/lxd,erikmack/lxd,lxc/lxd,lxc/lxd,mjeanson/...
lxd/main_shutdown.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 Alex Browne and Soroush Pour.\n// Allrights reserved. Use of this source code is\n// governed by the MIT license, which can be found\n// in the LICENSE file.\n\npackage router_test\n\nimport (\n\t\"fmt\"\n\t\"github.com/go-hum...
go
edit
0
1
mit
74a7c5b732080e8827a22a19e42e0c2cfc778231
go-humble/router,go-humble/router,go-humble/router
example_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage flagx\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n)\n\nfunc Map(m interface{}, parseValue func(string) (interface{}, error)) Value {\n\tv := reflect.ValueOf(m)\n\tif v.IsNil() || v.Kind() != reflect.Map {\n\t\tpanic(\"non-nil ...
go
edit
3
4
apache-2.0
5633dd800380d4f62fde64b5f527a1826628e31f
dolmen-go/flagx
maps.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2014 Google Inc. 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 http://ww...
go
edit
0
2
apache-2.0
3fe9f694567f7d67cb0846b0ad5d758dbe233f79
kubernetes/api
pkg/api/helpers.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage app\n\nimport termbox \"github.com/nsf/termbox-go\"\n\ntype servicesScreenEventHandler struct {\n\tbaseEventHandler\n}\n\nfunc (h *servicesScreenEventHandler) handle(event termbox.Event) {\n\thandled := false\n\n\tswitch event.Key {\n\t...
go
edit
21
3
mit
e2a18a2283a462746b649c25bdcc349b8ac51aab
moncho/dry,moncho/dry
app/service_events.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage app_helpers\n\nimport (\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/cloudfoundry-incubator/cf-test-helpers/cf\"\n\t\"github.com/cloudfoundry-incubator/cf-test-helpers/helpers\"\n\t. \"github.com/onsi/gomega\"\n\t. \"github.com/onsi/gom...
go
edit
15
3
apache-2.0
57097f0da80f64b893640411f87d77d1c381bc2d
matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests
helpers/app_helpers/app_helpers.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage types\n\n//type Config map[string][]map[string]string\ntype ConfigRecord map[string]string\ntype Config map[string]ConfigRecord\n\ntype BaseRecord struct {\n\tTitle string\n\tLink string\t\n}\n\ntype RecordList []BaseRecord\n```\n\nAppl...
go
edit
0
3
mit
e5bc99a99d55d43985c9d51e114bae665b176de7
danielkocher/link-select
types/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"net/http\"\n\n// Middleware to add HSTS header\nfunc hstsHandler(h http.Handler) http.Handler {\n return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n w.Header().Set(\"Strict-Transport-Secu...
go
edit
0
1
mit
c5c0507ffa2894e4c56756ca0750cfe648b3a80c
mooxmirror/blog,mooxmirror/go-blog,mooxmirror/go-blog,mooxmirror/blog
hsts.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2017 Auburn University and others. 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// The godoctor command refactors Go code.\npackage main\n\nimport...
go
edit
0
1
bsd-3-clause
acb8df5c0053dceb9f37b235ad38c231e2736576
godoctor/godoctor
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Webserver\npackage main\n\nimport (\n\t\"fmt\"\n\t\"gopkg.in/gcfg.v1\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprintf(w, \"Welcome, %s!\", r.URL.Path[1:])\n}\n\ntype config st...
go
edit
3
2
mit
9795383dfcc060cde178ea887a80f921f99adac8
davedash/bobbi
main.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/rancher/convoy/api\"\n\t\"github.com/rancher/convoy/client\"\n\t\"os\"\n)\n\nconst (\n\t// version of Convoy\n\tVERSION = \"0.4.3\"\n)\n\nfunc cleanup() {\n\tif r := recover(); r != nil {\n\t\...
go
edit
0
2
apache-2.0
55ddd24e0357d733b321872fda8b183025f6a2c4
rancher/rancher-volume,rancher/convoy,medallia/convoy,rancherio/volmgr,rancher/convoy,rancherio/volmgr,medallia/convoy,jinuxstyle/convoy,rancherio/rancher-volume,rancher/rancher-volume,nickvanw/convoy,nickvanw/convoy,jinuxstyle/convoy,rancherio/volmgr,nickvanw/convoy,rancher/rancher-volume,rancherio/rancher-volume,ranc...
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"net/http\"\n\nfunc main() {\n\thttp.HandleFunc(\"/hostname\", hostnameHandler)\n\thttp.HandleFunc(\"/time\", timeHandler)\n\thttp.HandleFunc(\"/issue\", issueHandler)\n\thttp.ListenAndServe(\":3000\", nil)\n}\n\nfunc ho...
go
edit
9
2
mit
3783a0fcb697a882f65e32e6da0af788dc9a9033
adelq/go-dash
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\"fmt\"\n\t\"os\"\n\n\t\"github.com/blixt/go-starbound/starbound\"\n\t\"golang.org/x/exp/mmap\"\n)\n\nfunc main() {\n\tfile, err := mmap.Open(\"../../test.world\")\n\tif err != nil {\n\t\tfmt.Printf(\"failed to open ...
go
edit
0
4
mit
c73e397fc5c6b75ae69dbc78719a944187a15724
blixt/go-starbound
cmd/starbound/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"./mega\"\n \"./task\"\n \"os\"\n \"fmt\"\n \"log\"\n \"io/ioutil\"\n)\n\nconst MaxWorker = 10\n\nfunc main() {\n if len(os.Args) == 0 {\n log.Fatal(\"Please offer json file.\")\n }\n pool, err := task.Cr...
go
edit
0
7
mit
ad1d220703b598324e1fab175188a7c7bea69c45
lyanchih/FatCat
main.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/albertyw/reaction-pics/server\"\n\t\"github.com/joho/godotenv\"\n\tnewrelic \"github.com/newrelic/go-agent\"\n\t\"github.com/rollbar/rollbar-go\"\n)\n\nfunc setupEnv() {\n\terr := godotenv.Lo...
go
edit
6
2
mit
a8e6a862695e21e290452f3edd6eea69035c93e0
albertyw/devops-reactions-index,albertyw/reaction-pics,albertyw/reaction-pics,albertyw/reaction-pics,albertyw/devops-reactions-index,albertyw/reaction-pics,albertyw/devops-reactions-index,albertyw/devops-reactions-index
main.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage template\n\nimport (\n\t\"errors\"\n\t\"io/ioutil\"\n\t\"text/template\"\n)\n\nconst defaultTemplate = `{{ range . }}\n{{ . }}\n{{ end }}\n`\n\n// -------------------------------------------------------\n// Parser.\n// -----------------...
go
edit
0
3
mit
bd770a882a8b911787eaaad8e382f83a9cd8f496
solarsailer/makeinvoice
template/template.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage scipipe\n\nimport (\n\t\"os\"\n\t\"time\"\n)\n\ntype FileTarget struct {\n\tpath string\n}\n\nfunc NewFileTarget(path string) *FileTarget {\n\tft := new(FileTarget)\n\tft.path = path\n\treturn ft\n}\n\nfunc (ft *FileTarget) GetPath() st...
go
edit
3
2
mit
d4374fa7036a78487c7dc79c55b77ffcd4d3ee5b
scipipe/scipipe,scipipe/scipipe,samuell/scipipe
file.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/hashicorp/terraform/plugin\"\n\t\"github.com/jayhding/terraform-provider-pingdom/pingdom\"\n)\n\nfunc main() {\n\tplugin.Serve(&plugin.ServeOpts{\n\t\tProviderFunc: pingdom.Provider,\n\t})\n}\n\n```\n\nA...
go
edit
0
1
mit
7abb09ef80595f68a840166dc336483aebdbdd66
russellcardullo/terraform-provider-pingdom,russellcardullo/terraform-provider-pingdom
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage interfaces\n\nimport (\n\t\"time\"\n)\n\ntype WriteRequest struct {\n\tTimeseries []*Timeseries\n}\n\ntype Operation int\n\nconst (\n\tEqualOperation Operation = iota\n\tNotEqualOperation\n\tGreaterThanOperation\n\tGreaterThanOrEqualOpe...
go
edit
0
0
mit
2a03acf57b089739bfa89e9bf7941c1d8691be5b
n1tr0g/influxdb,runner-mei/influxdb,arussellsaw/influxdb,ASAPPinc/influxdb,brunoqc/influxdb,121watts/influxdb,bluebreezecf/influxdb,rabdureh/influx-attempt,slachiewicz/influxdb,mcanthony/influxdb,cnelissen/influxdb,mnuessler/influxdb,jgeiger/influxdb,hyperworks/influxdb,pkittenis/influxdb,radcheb/influxdb,ninjasphere/i...
src/interfaces/storage_engine.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) 2016, Janoš Guljaš <<EMAIL>>\n// 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 httputils // import \"resenje.org/httputils\"\n\nimport ...
go
edit
0
2
bsd-3-clause
f547e0213673ade08198e5d7217d558e4c6ca502
janos/web,janos/httputils
chain.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
128d16ff4ef45fd94b97b8d3ff6c00abcbdc9c40
GreyLabsDev/GoTests,GreyLabsDev/GoTests
hw.go
rejected_duplicate
Near-duplicate of sample 117971
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage kala\n\nimport (\n\t\"math/big\"\n\t\"net\"\n)\n\nfunc MacAddressToWorkerId(mac string) (int64, error) {\n\thw, err := net.ParseMAC(mac)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tworkerId := new(big.Int).SetBytes([]byte(hw)).Int64...
go
edit
0
2
mit
c2ac2510d61a7e5d6c8faa4d8b8c80da3df3240b
mattheath/kala
util.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"reflect\"\n)\n\nfunc walkStruct(s interface{}, f func(string, reflect.Value) error) error {\n\tvar inner func(v reflect.Value, p string) error\n\tinner = func(v reflect.Value, p string) error {\n\t\tt := v.Type()\n...
go
edit
0
6
mit
dc42c25aa7bf9fc2136277b740848b29891a625c
DeedleFake/ps2avglogin
util.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"time\"\n\n// Standards for the result by launching a Missile\ntype Harm struct {\n code int `json:\"code\"`\n timestamp time.Time `json:\"timestamp\"`\n latency time.Duration `json:\"latency\"...
go
edit
24
0
apache-2.0
e57f074c58412931ede1d6bc7dab7289b28c5189
proliming/boom
harm.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage hdfs\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"sort\"\n)\n\n// Walk walks the file tree rooted at root, calling walkFn for each file or\n// directory in the tree, including root. All errors that arise visiting files\n// and direct...
go
edit
6
10
mit
e2c734b8518275eeb74661de28966a00b9b6c212
colinmarc/hdfs,ashishgandhi/hdfs,ashishgandhi/hdfs,colinmarc/hdfs
walk.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage funk\n\nimport \"reflect\"\n\nfunc equal(expected, actual interface{}) bool {\n\tif expected == nil || actual == nil {\n\t\treturn expected == actual\n\t}\n\n\treturn reflect.DeepEqual(expected, actual)\n\n}\n\nfunc sliceElem(rtype refl...
go
edit
0
6
mit
4d16daa8c0b30c1c85e3eeaf9e181f88d0b0092f
thoas/go-funk,thoas/go-fn
utils.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage feeds\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/rs/cors\"\n\t\"google.golang.org/appengine\"\n)\n\nfunc Run() {\n\tdao := datastoreFeedsDao{}\n\trouter := mux.NewRouter()\n\n\trouter.Handle(\"/feeds\", ...
go
edit
15
1
mit
012cadf304c98bb0658c67f6a71187ab47ad6e3e
mhaligowski/paperboy-feeds
main.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage app\n\nimport termbox \"github.com/nsf/termbox-go\"\n\ntype dfScreenEventHandler struct {\n\tbaseEventHandler\n}\n\nfunc (h *dfScreenEventHandler) handle(event termbox.Event) {\n\th.setFocus(true)\n}\n\n```\n\nApply this change: Add eve...
go
edit
15
8
mit
cd64363ec9a115a3bb216366966e1dd3c167b157
moncho/dry,moncho/dry
app/df_events.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\n\tlog \"github.com/cihub/seelog\"\n)\n\nvar (\n\tflagSet = flag.NewFlagSet(\"kraken\", flag.ExitOnError)\n\n\ttarget = flagSet.String(\"target\", \"\", \"target URL to crawl\")\n)\n\n...
go
edit
6
2
mit
46978136e3c8e3f19603e13f3a939fa666405a39
mattheath/kraken
main.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage daemon\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/docker/docker/container\"\n\t\"github.com/docker/docker/libcontainerd\"\n)\n\nfunc (daemon *Daemon) getLibcontainerdCreateOptions(container *container.Container) (*[]libcontainerd.CreateOp...
go
edit
0
3
apache-2.0
df987c84de144506e92740077423a40049aff0c1
stainboy/docker,joaofnfernandes/docker.github.io,medallia/docker,thaJeztah/docker.github.io,shubheksha/docker.github.io,joeuo/docker.github.io,menglingwei/denverdino.github.io,BSWANG/denverdino.github.io,thaJeztah/docker.github.io,jzwlqx/denverdino.github.io,denverdino/docker.github.io,medallia/docker,LuisBosquez/docke...
daemon/start_linux.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage bitbucket\n\nimport (\n\t\"code.cloudfoundry.org/lager\"\n\tapi \"github.com/SHyx0rmZ/go-bitbucket/bitbucket\"\n\t\"github.com/concourse/atc/auth/verifier\"\n\t\"net/http\"\n)\n\ntype UserVerifier struct {\n\tusers []string\n\tclient a...
go
edit
0
4
apache-2.0
2bdd8f4c939241fa5224295de3eb61b5c366b8d8
concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse
bitbucket/user_verifier.go
rejected_duplicate
Near-duplicate of sample 117235
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage randomword_test\n\nimport (\n\t\"time\"\n\n\t. \"code.cloudfoundry.org/cli/util/randomword\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Generator\", func() {\n\tvar gen Generator\n\n\tBefo...
go
edit
36
1
apache-2.0
d8bc0b730b4d0f260ccd639411f735f0d84827cb
cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli
util/randomword/generator_test.go
rejected_lint
Too many lint violations: 36
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sack\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"path\"\n\t\"strings\"\n)\n\nfunc checkState() {}\n\nfunc splitLine(s string) []string {\n\tarr := strings.SplitN(s, \":\", 3)\n\treturn arr\n}\n\nfunc check(e error) {\n\tif e != nil {\n...
go
edit
3
2
mit
06a6e5bf89d5cfac5330a538395de230489e2d43
zph/go-sack,zph/go-sack
sack/helpers.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage config\n\nimport (\n\t\"github.com/ghthor/gospec\"\n\t. \"github.com/ghthor/gospec\"\n\t\"testing\"\n)\n\nfunc TestUnitSpecs(t *testing.T) {\n\tr := gospec.NewRunner()\n\n\tr.AddSpec(DescribeConfigLoading)\n\n\tgospec.MainGoTest(r, t)\n...
go
edit
12
1
mit
e5f6adcc395b857049c6e59f8fc43fdcac25b54c
ghthor/journal
config/config_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nhttp://www.apache.org/licenses/LICENSE-2.0.txt\n\n\nCopyright 2015 Intel Coporation\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 cop...
go
edit
0
1
apache-2.0
e9676ee86243fe29fb650d211978d1b3ce50ed73
intelsdi-x/snap-plugin-publisher-influxdb,intelsdi-x/snap-plugin-publisher-influxdb,intelsdi-x/snap-plugin-publisher-influxdb
main.go
rejected_duplicate
Near-duplicate of sample 119048
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage commands\n\nimport (\n\t\"fmt\"\n\t\"github.com/spf13/cobra\"\n)\n\nvar outCmd = &cobra.Command{\n\tUse: \"out\",\n\tShort: \"Write a file based on key data.\",\n\tLong: `out is for writing a file based on a Consul key.`,\n\tRun: o...
go
edit
3
3
apache-2.0
e90c725c93b67140d8ae6f2acc0355790d405bae
DataDog/kvexpress,DataDog/kvexpress,DataDog/kvexpress
commands/out.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage xmpp\n\nimport (\n\t\"fmt\"\n\t\"net\"\n)\n\nconst (\n\t// Standard port for XMPP clients to connect to.\n\tXMPP_CLIENT_PORT = 5222\n)\n\n// Perform a DNS SRV lookup and return an ordered list of \"host:port\" TCP\n// addresses for the ...
go
edit
3
3
mit
3125d02cf6b842700239ca67ef5b7f96951d28b7
emgee/go-xmpp
src/xmpp/dns.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)\n\ntype AppConfig struct {\n\tverbose bool\n\tnewRelicKey string\n\tdatabase string\n\tinterval int\n\tuser string\n\thost string\n}\n\nfunc HandleUserOptions() AppConfi...
go
edit
0
4
apache-2.0
994e900c0b4eb6e91236067a6ce97520251fb764
maciejmrowiec/pgmonitor
cmdln.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\t\"github.com/miquella/ask\"\n\n\t\"github.com/miquella/vaulted/lib\"\n)\n\ntype Spawn struct {\n\tSessionOptions\n\n\tCommand []string\n\tDisplayStatus bool\n}\n\nfunc (s *Spawn) Run(st...
go
edit
15
5
mit
11320dc0577bdc8dcb8a90ae2c468ee34b50110c
miquella/vaulted
spawn.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage command\n\n// A CommandCallback takes the name of the player invoking the command, any\n// text supplied after the trigger for the command, and an interface via which\n// game-wide 'actions' can be taken.\ntype CommandCallback func(stri...
go
edit
3
1
mit
1c29c8448f0a6b9f1b94bd2c76c0bfe34ad018e5
huin/chunkymonkey,huin/chunkymonkey
src/chunkymonkey/command/command.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\n\tflags \"github.com/jessevdk/go-flags\"\n)\n\nconst version = \"1.0.0\"\n\nvar opts struct {\n\tVersion bool `short:\"v\" long:\"version\" description:\"Show version\"`\n}\n\nfunc mai...
go
edit
0
5
mit
6449899e67646ca113f8dcb20bdf5060ceef86e3
itochan/ptrhost
ptrhost.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n)\n\nfunc validateAndGetURLHost(urlSample string) (string, error) {\n\n\tparsed, err := url.ParseRequestURI(urlSample)\n\n\tif err != nil {\n\t\tfmt.Printf(\"Unable to parse URL '%s' to get th...
go
edit
3
3
mit
23d22525604adb3d5504cb8894cabcd4add15ea2
leonjza/go-observe,leonjza/go-observe
utils.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/sean-duffy/xlsx\"\n\t\"strconv\"\n)\n\nfunc main() {\n\n\tc := []xlsx.Column{\n\t\txlsx.Column{Name: \"Col1\", Width: 10},\n\t\txlsx.Column{Name: \"Col2\", Width: 10},\n\t}\n\n\tsh := xlsx.NewSheetWithCo...
go
edit
0
3
mit
ba9c164966eb19d32144b81b815958e83720377c
scraperwiki/xlsx,psmithuk/xlsx
example/large/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage formatters\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/mrtazz/checkmake/rules\"\n\t\"github.com/olekukonko/tablewriter\"\n)\n\n// DefaultFormatter is the formatter used by default for CLI output\ntype DefaultFormatt...
go
edit
0
2
mit
788e4aa7eb2047650013367297d44e4a8863a087
mrtazz/checkmake
formatters/default.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\tflags \"github.com/jessevdk/go-flags\"\n\t\"github.com/monochromegane/the_platinum_searcher/search\"\n\t\"github.com/monochromegane/the_platinum_searcher/search/option\"\n\t\"os\"\n\t\"runtime\"\n)\n\nvar opts option...
go
edit
0
4
mit
2fdb6907e6b959e6257e086604f84a905d9c6ac7
cmars/tools,syohex/the_platinum_searcher,tw4452852/the_platinum_searcher,cmars/tools,cmars/tools,cmars/tools,aeruder/the_platinum_searcher,thomasf/the_platinum_searcher,yuya-takeyama/the_platinum_searcher,drmohundro/the_platinum_searcher,DaSea/the_platinum_searcher,monochromegane/the_platinum_searcher
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\r\n\r\nimport (\r\n\t\"github.com/henrylee2cn/pholcus/exec\"\r\n\t_ \"github.com/pholcus/spider_lib\" // 此为公开维护的spider规则库\r\n\t_ \"github.com/pholcus/spider_lib_pte\" // 同样你也可以自由添加自己的规则库\r\n)\r\n\r\nfunc main() {\r\n\t// 设置运行时默...
go
edit
0
1
apache-2.0
7532d897dce8c56705de1b7ad0f5959c8ef71520
glutwins/pholcus,henrylee2cn/pholcus,lln7777/pholcus,lln7777/pholcus,lln7777/pholcus,glutwins/pholcus,henrylee2cn/pholcus,glutwins/pholcus,lln7777/pholcus
example_main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Submitted by Christopher Milan (christopherm99)\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"time\"\n)\n\nfunc shuffle(a []int) []int {\n\trand.Seed(time.Now().UnixNano())\n\tfor i := len(a) - 1; i > 0; i-- {\n\t\tj := rand.I...
go
edit
0
3
mit
bb6b4cda0ff74856f32ecfc7272064880fa0caea
Gathros/algorithm-archive,leios/algorithm-archive,leios/algorithm-archive,leios/algorithm-archive,leios/algorithm-archive,Gathros/algorithm-archive,Gathros/algorithm-archive,Gathros/algorithm-archive,leios/algorithm-archive,Gathros/algorithm-archive,Gathros/algorithm-archive,leios/algorithm-archive,Gathros/algorithm-ar...
contents/bogo_sort/code/go/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/griffithsh/sql-squish/database\"\n)\n\nfunc main() {\n\tscanner := bufio.NewScanner(os.Stdin)\n\n\tvar concatted string\n\tfor scanner.Scan() {\n\t\tconcatt...
go
edit
6
3
mit
c09b3132053225dd3ea720112a0bf8dcfde4a4d6
griffithsh/sqlite-squish
cmd/sqlite-squish/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\t\"os\"\n\t\"fmt\"\n\n\t\"github.com/urfave/cli\"\n)\n\n// Called when thaum is actually run.\nfunc onRun(c *cli.Context) error {\n\ttemplate := c.Args().Get(0)\n\tname := c.Args().Get(1)\n\n\tif len(c.Args()) == 0 {\...
go
edit
9
3
mit
ba59eb1c8064c992a561d85aaae746ab86efa16c
Flaque/thaum
thaum.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage slack\n\nimport (\n\t\"errors\"\n\t\"net/url\"\n)\n\ntype oAuthResponseFull struct {\n\tAccessToken string `json:\"access_token\"`\n\tScope string `json:\"scope\"`\n\tSlackResponse\n}\n\n// GetOAuthToken retrieves an AccessToken\n...
go
edit
12
3
bsd-2-clause
71fba5cf9d831f08fb10ba70cc5056e5b73be852
nlopes/slack,178inaba/slack,james-lawrence/slack
oauth.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage testhelpers\n\nimport(\n\t. \"github.com/onsi/gomega\"\n\t\"bytes\"\n \"io\"\n\t\"os\"\n \"strings\"\n \"wall_street\"\n)\n\nfunc SimulatePipes(reader *wall_street.ReadlineReader, input string, block func()) []string {\n\tin, out, er...
go
edit
6
2
mit
92506424bd2a53d3140129ee7eba1cda2b74220d
tjarratt/wall_street
testhelpers/pipes.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage redis\n\nimport (\n\t\"log\"\n\t\"time\"\n\n\tredis \"github.com/go-redis/redis\"\n\ttry \"github.com/matryer/try\"\n)\n\n// ConnectToClient Connects to a Redis server\nfunc ConnectToClient(ip string, port string, config Config) *redis....
go
edit
0
4
mit
9c58f02a986e0a263cb184459fd8a98e308018aa
cooperaj/sentinel-broker,cooperaj/sentinel-broker
redis/client.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage scipipe\n\nconst (\n\t// BUFSIZE is the standard buffer size used for channels connecting processes\n\tBUFSIZE = 16\n\t// Version is the SciPipe version in string format\n\tVersion = \"0.8\"\n)\n\n```\n\nApply this change: Update versio...
go
edit
0
0
mit
5471b65cb50373a11f95e1c24b9ea705a906bce9
scipipe/scipipe,scipipe/scipipe,samuell/scipipe
const.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// gogl provides a framework for representing and working with graphs.\npackage gogl\n\n// Constants defining graph capabilities and behaviors.\nconst (\n\tE_DIRECTED, EM_DIRECTED = 1 << iota, 1<<iota - 1\n\tE_UNDIRECTED, EM_UNDIRECTED\n\tE_WEI...
go
edit
0
0
mit
baa65642f317ce9a3cd2ade68e24958131d79720
sdboyer/gogl,sdboyer/gogl
graph.go
accepted
null
true