messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```go\npackage comments\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/google/go-github/github\"\n)\n\nvar (\n\tpendingFeedbackLabel = \"pending-feedback\"\n\n\tHandlerPendingFeedbackLabel = func(client *github.Client, event github.IssueCommentEve...
go
edit
0
3
bsd-3-clause
d9a0681b867c057686aab7540a575cb30e044b40
parkr/auto-reply
comments/pending_feedback_label.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2017 Jade Iqbal <<EMAIL>>\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http...
go
edit
0
1
apache-2.0
ddeacdfa2e7a1098419650d7dc9ea9bf62ddd250
LGUG2Z/parsec-ec2
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage raftor\n\nimport (\n\t\"github.com/coreos/etcd/raft/raftpb\"\n\t\"golang.org/x/net/context\"\n)\n\n// Applier applies either a snapshot or entries in a Commit object\ntype Applier interface {\n\n\t// Apply processes commit messages afte...
go
edit
0
0
apache-2.0
7569c6b2ef7fbf64605494e8acafb95b66d07f50
eliquious/raftor,blacklabeldata/raftor
applier.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage kace\n\ntype node struct {\n\tval rune\n\tend bool\n\tlinks []*node\n}\n\nfunc newNode() *node {\n\treturn &node{links: make([]*node, 0)}\n}\n\nfunc (n *node) add(rs []rune) {\n\tcur := n\n\tfor _, v := range rs {\n\t\tlink := cur.l...
go
edit
0
3
mit
904296f68512d2055ae9fe79d2c1f2cddec645b7
codemodus/kace
trie.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage buffalo\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/gorilla/sessions\"\n)\n\n// Session wraps the \"github.com/gorilla/sessions\" API\n// in something a little cleaner and a bit more useable.\ntype Session struct {\n\tSession *session...
go
edit
3
1
mit
ee078c3a146c99bb33aee5b58b352d69538b06fb
gobuffalo/buffalo,gobuffalo/buffalo,markbates/buffalo
session.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\ni-sudoku is an interactive command-line sudoku tool\n*/\n\npackage main\n\nimport (\n\t\"github.com/jkomoros/sudoku\"\n\t\"github.com/nsf/termbox-go\"\n\t\"log\"\n\t\"strings\"\n)\n\ntype mainModel struct {\n\tgrid *sudoku.Grid\n}\n\nfunc m...
go
edit
9
5
apache-2.0
2ba2dcc5b14ced82e789c36b269ecf8047acd149
jkomoros/sudoku,jkomoros/sudoku,jkomoros/sudoku
cmd/i-sudoku/main.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage registration\n\nimport (\n\t\"github.com/opsee/portmapper\"\n)\n\nconst (\n\tipFilePathDefault = \"/gozer/state/ip\"\n\tnsqdTopic = \"connected\"\n)\n\nvar (\n\t// The location of the file produced by OpenVPN containing the inst...
go
edit
0
1
mit
6c0ffe24d72250e77872d6af94306c349ca613da
opsee/zuul,opsee/zuul
src/github.com/opsee/gozer/registration/registration.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage leetcode\n\n// 199. Binary Tree Right Side View\nfunc rightSideView(root *TreeNode) []int {\n\tif root == nil {\n\t\treturn []int{}\n\t}\n\tres := []int{}\n\tlist := []*TreeNode{root}\n\tfor len(list) > 0 {\n\t\tres = append(res, list[l...
go
edit
9
6
mit
3580009dd80cc93c2c1e85f4e1c79353bdc08a8c
motomux/go-algo
leetcode/199_binary_tree_right_side_view.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cf_test\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\n\t\"github.com/pivotal-cf-experimental/cf-test-helpers/cf\"\n)\n\nvar _ = Describe(\"NewUserContext\", func() {\n\n\tvar createUser = func() cf.UserC...
go
edit
21
1
apache-2.0
fdc24bdec520bdf017881e1144d9a933c2792981
cloudfoundry-incubator/cf-test-helpers,nttlabs/cf-test-helpers,cloudfoundry-incubator/cf-test-helpers,nttlabs/cf-test-helpers
cf/user_test.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage knsq\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n)\n\n// FIXME: Use socket API instead of HTTP\n\n// CreateTopic makes sure a topic exists on the given nsqd.\nfunc CreateTopic(nsqd string, topic string) error {\n\tresp, err := htt...
go
edit
0
3
bsd-3-clause
7444dd213029bc8e3a1d9c0debdecc21199d13e3
voxelbrain/k
knsq/convenience.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage html\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"syscall\"\n\t\"time\"\n)\n\nvar startTime time.Time = time.Now()\n\nfunc writeHeader(writer io.Writer) {\n\tfmt.Fprintf(writer, \"Start time: %s<br>\\n\", startTime)\n\tuptime := time.Since(sta...
go
edit
0
1
apache-2.0
3645d26defb048fbbcf0760bae4562a76d8bb107
keep94/Dominator,rgooch/Dominator,keep94/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator,Symantec/Dominator
lib/html/header.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n)\n\nfunc sumOfPrimesBelow(x int) int {\n\tsieve := make([]bool, x)\n\tfor i:=0; i<x; i++ {\n\t\tsieve[i] = true\n\t}\n\tsieve[0] = false\n\tsieve[1] = false\n\n\tfor i:=2; i<x; i++ {\n\t\tif sieve[i] ==...
go
edit
0
7
bsd-2-clause
92e39cdb0505fd8edffd2491a0c913f16a64fb63
jmalonzo/project-euler-solutions,jmalonzo/project-euler-solutions
go/010_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage rpcd\n\nimport (\n\t\"github.com/Symantec/Dominator/dom/herd\"\n\t\"github.com/Symantec/Dominator/lib/srpc\"\n\t\"log\"\n)\n\ntype rpcType struct {\n\therd *herd.Herd\n\tlogger *log.Logger\n}\n\nfunc Setup(herd *herd.Herd, logger *log...
go
edit
0
1
apache-2.0
c93ce07adc6c14cb169a02ca1a0fa03fa2949b72
rgooch/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator,keep94/Dominator,Symantec/Dominator,keep94/Dominator,Symantec/Dominator,keep94/Dominator
dom/rpcd/api.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage bbolt\n\nimport \"unsafe\"\n\nfunc unsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer {\n\treturn unsafe.Pointer(uintptr(base) + offset)\n}\n\nfunc unsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsaf...
go
edit
3
1
mit
f0005d4d30923ce6c583c6af2dd990134fb3d826
etcd-io/bbolt
unsafe.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage zero\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/tj/go-debug\"\n)\n\ntype Key string\n\ntype Args struct {\n\tKey Key\n\tType string\n\tValue interface{}\n}\n\nconst (\n\tString = \"string\"\n\tNumber = \"number\"\n\tArray = \"array\"\...
go
edit
3
2
mit
9f28957fa9cc4b10ba294802b951d9842eab8e2c
umayr/zero
zero.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\n\t\"github.com/spf13/cobra\"\n\n\t\"github.com/squaremo/flux/common/store\"\n\t\"github.com/squaremo/flux/common/store/etcdstore\"\n)\n\nfunc main() {\n\tstore := etcdstore.NewFromEnv()\n\tvar to...
go
edit
21
2
apache-2.0
2acac8e55d79e767c3df488810e18277f57cc485
squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen
fluxctl/main.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\"net/http\"\n)\n\ntype ResponseWriter interface {\n\tHeader() http.Header\n\tWrite([]byte) (int, error)\n\tWriteHeader(int)\n}\n\ntype Route struct {\n\tName string\n\tMethod string\n\tPattern string...
go
edit
18
0
mit
29d8ca3ebf8d44abb635c036444928563ee523da
nicholasrucci/blog,nicholasrucci/blog,nicholasrucci/blog
routes.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage instana\n\n// SpanContext holds the basic Span metadata.\ntype SpanContext struct {\n\t// A probabilistically unique identifier for a [multi-span] trace.\n\tTraceID uint64\n\n\t// A probabilistically unique identifier for a span.\n\tSpa...
go
edit
0
3
mit
8ac5d53b83dce1e21f76c5604247cd76faeeb3a1
instana/golang-sensor,instana/golang-sensor
context.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage delayed_unlock\n\nimport \"sync\"\n\ntype Unlockable interface {\n\tUnlock()\n}\n\n// Delay unlocking some interface for a number of steps.\ntype DelayedUnlockable struct {\n\tsync.Mutex\n\ttoUnlock Unlockable\n\tsteps int\n}\n\nfunc...
go
edit
0
3
bsd-3-clause
afda42f09dd7f2a65c1cfb0d55efd8e207c7030f
weaviate/weaviate,weaviate/weaviate
lib/delayed_unlock/delayed_unlock.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage leetcode\n\n// 409. Longest Palindrome\nfunc longestPalindrome(s string) int {\n\tbytes := make(map[byte]int, 0)\n\tfor i := 0; i < len(s); i++ {\n\t\tb := s[i]\n\t\tcount := bytes[b]\n\t\tbytes[b] = count + 1\n\t}\n\n\tres := 0\n\thasP...
go
edit
0
4
mit
e2b7dc6c6d85c3478d95814a4c712657c32d8f5b
motomux/go-algo
leetcode/409_longest_palindrome.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage monitor\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Stats collector\", func() {\n\tFContext(\"when calculating CPU usage\", func() {\n\t\tIt(\"should correctly format it for usage...
go
edit
33
1
apache-2.0
974e6e0bc9a1e5b6b8209febf3c9965c4f1f9ddd
cloudfoundry/bosh-agent,gu-bin/bosh-agent,mattcui/bosh-agent,mattcui/bosh-agent,mattcui/bosh-agent,gu-bin/bosh-agent,gu-bin/bosh-agent,cloudfoundry/bosh-agent
jobsupervisor/monitor/stats_collector_test.go
rejected_lint
Too many lint violations: 33
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage log\n\ntype Logger interface {\n\tFatal(v ...interface{})\n\tFatalf(format string, v ...interface{})\n\tFatalln(v ...interface{})\n\tPanic(v ...interface{})\n\tPanicf(format string, v ...interface{})\n\tPanicln(v ...interface{})\n\tPrin...
go
edit
0
0
apache-2.0
58759737673c35a11a89730e80a711ee87bf19e6
rgooch/Dominator,rgooch/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator,keep94/Dominator,keep94/Dominator
lib/log/api.go
rejected_duplicate
Near-duplicate of sample 117749
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage tcpreuse\n\nimport (\n\t\"net\"\n\t\"os\"\n)\n\n// reuseErrShouldRetry diagnoses whether to retry after a reuse error.\n// if we failed to bind, we should retry. if bind worked and this is a\n// real dial error (remote end didnt answer)...
go
edit
0
8
mit
2a09bb753794125e929014cf08c431faefeeec32
libp2p/go-libp2p,libp2p/go-libp2p,ipfs/go-libp2p
p2p/net/reuseport/reuseport_plan9.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gnotifier\n\nimport (\n\t\"github.com/deckarep/gosx-notifier\"\n)\n\nfunc (n *notifier) Push() error {\n\terr := n.IsValid()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tnotification := gosxnotifier.NewNotification(n.Config.Message)\n\t...
go
edit
6
2
mit
0d60b633c02961e039aea18b2358960fefeee77b
haklop/gnotifier
gnotifier_darwin.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\"io\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n)\n\n// Errors & warnings are deliberately suppressed as tidy throws warnings very easily\nfunc Tidy(r io.Reader, xmlIn bool) ([]byte, error) {\n\tf, err :...
go
edit
3
5
mit
242f6f7bdba47fa1c6f4bde2436c013ced8f2c8a
sajari/docconv,sajari/docconv,nuveo/docconv,poorny/docconv
tidy.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage campbx\n\n// Ticker\n//\n// Sample response\n//\n// {\"Last Trade\":\"244.99\",\"Best Bid\":\"236.38\",\"Best Ask\":\"244.99\"}\ntype Ticker struct {\n\tLastTrade float32 `json:\"Last Trade,string\"`\n\tBid float32 `json:\"Bes...
go
edit
0
0
mit
5a603ff6d0f49fff48fbcde6cee982e05a80b9ed
scottjbarr/campbx
models.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage str\n\nimport \"unicode\"\n\n// ToSnake converts a string (camel or spinal) to snake case\nfunc ToSnake(str string) string {\n\t// Skip processing for an empty string\n\tif len(str) == 0 {\n\t\treturn \"\"\n\t}\n\n\t// Build the results...
go
edit
0
8
mit
47a8312fc27481fac011087ba7f66c92521a17aa
sagikazarmark/utilz,goph/stdlib
str/case.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage waldo\n\nimport \"math\"\n\n// Sample represents data drawn from some distribution. To compute\n// the Wald statistics we need to have a point estimator function\n// (e.g., the maximum likelihood estimator (MLE))\n// as well as the sam...
go
edit
0
1
mit
a11816a3bebe99ca4cc82e68739ed3640c9242ae
shawnohare/waldo
sample.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models\n\ntype Specifics struct {\n\tPhotoUrl string `json:\"photoUrl\"`\n\tImageId string `json:\"imageId\"`\n\tImageLevel string `json:\"imageLevel\"`\n\tEmail string `json:\"email\"`\n\tEmailLevel string `json:\"emailLevel\...
go
edit
0
3
mit
6ac30ee2cd5a90deb758414fbecd983dca6d827f
boushley/lds-picture-directory-stats
models/Specifics.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sqlstmt\n\nimport (\n\t\"database/sql\"\n)\n\n// DB is the interface that wraps the database access methods\n// used by this package.\n//\n// The *DB and *Tx types in the standard library package \"database/sql\"\n// both implement this...
go
edit
0
0
mit
88624c01ec7a80b1b34a9b6334a5087fc5a18022
jjeffery/sqlr,jjeffery/sqlrow,jjeffery/sqlr
db.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage qpx\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc Cheapest(origin, destination, date string) (to tripOption, err error) {\n\tvar (\n\t\tres *http.Response\n\t\tf io.WriteCloser\n\t\tresp response...
go
edit
15
5
mit
2075e1135d26353bbf09c2f9e2244bf7b4288e42
programminh/wright,programminh/wright,programminh/wright
qpx/qpx.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2019 Authors of Cilium\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://ww...
go
edit
3
0
apache-2.0
f6a645f1d721d90915089897e41320d9befbf0a7
michi-covalent/cilium,tklauser/cilium,tgraf/cilium,tklauser/cilium,cilium/cilium,michi-covalent/cilium,cilium-team/cilium,cilium/cilium,michi-covalent/cilium,cilium-team/cilium,cilium/cilium,tgraf/cilium,tgraf/cilium,tgraf/cilium,cilium/cilium,tgraf/cilium,michi-covalent/cilium,cilium/cilium,michi-covalent/cilium,tklau...
pkg/datapath/endpoint.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage integration_tests\n\nimport (\n\t\"testing\"\n)\n\nfunc TestConnection(t *testing.T) {\n\tlisten := NewNodeBinary(BinaryOptions{Listen: \"[::1]:9999\", Fake_money: true})\n\tlisten.Start()\n\tdefer listen.KillAndPrint(t)\n\tlisten_id, e...
go
edit
18
5
mit
5bc6df835b7965590773feafa66145e319b0ec00
AutoRoute/node,AutoRoute/node
integration_tests/connection_test.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage acgen\n\nimport (\n\t\"io\"\n\t\"strings\"\n\t\"text/template\"\n)\n\nfunc init() {\n\tRegisterGenerator(\"tcsh\", generateTcshCompletion)\n}\n\ntype tcsh struct {\n\tName string\n\tOpt string\n}\n\nfunc newTcsh(c *Command) (t *tcsh, e...
go
edit
0
3
mit
05444a94e25a234b8db2722a6f75da89ff29717e
kusabashira/acgen
generator_tcsh.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2014 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache....
go
edit
0
0
apache-2.0
fed5729677ac8fcee1213c4c0f680f935364de43
mengqiy/utils,kubernetes/utils,kubernetes/utils
doc.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\n\t\"github.com/Zac-Garby/pluto/bytecode\"\n\t\"github.com/Zac-Garby/pluto/compiler\"\n\t\"github.com/Zac-Garby/pluto/parser\"\n\t\"github.com/Zac-Garby/pluto/vm\"\n)\n\nfunc main() {\n\tcompiler ...
go
edit
0
4
mit
21ffbc825cf7944a91de77d0ffc4c3967130c6f3
pluto-language/pluto
pluto.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/labstack/echo\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"path\"\n\t\"testing\"\n)\n\nfunc TestGet(t *testing.T) {\n\t// Setup\n\t...
go
edit
9
2
mit
f0adb6d869f489b229e3e26c3a78ea146cf80dad
photoshelf/photoshelf-storage
server_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\"time\"\n\t\"fmt\"\n)\n\ntype Pokemon struct {\n\tID int\n\tExpiresAt time.Time\n\tPokedexID int\n\tLatitude float64\n\tLongitude float64\n}\n\nfunc (p *Pokemon) UID() string {\n\treturn fmt.Sprintf(\"%v-%v-...
go
edit
3
1
mit
17a8b0428f68b5d38bb6539ab5f4d2f95ed5e77a
jacobmarshall/pokevision-cli,jacobmarshall/pokevision-cli
pokemon.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"os\"\nimport \"fmt\"\n\nfunc main(){\n args := os.Args[1:]\n\n fmt.Println(args[0])\n}\n```\n\nApply this change: Test go args and input" }, { "role": "assistant", "content": "package main\n\nimport \"...
go
edit
0
2
mit
50c9ea44bcb8267a49b68e53cfe2184a1f2b5462
Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum,Bigsby/matrix.sum
src/go/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage config\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/snormore/gologger\"\n\t\"io/ioutil\"\n)\n\ntype Config interface{}\n\nfunc Register(name string, c Config) error {\n\treturn nil\n}\n\ntype Configurable struct {\n\tConfig interfac...
go
edit
0
2
mit
9399611c4095a8c797c60f0ffae532d6baf7df18
snormore/goconfig
config.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage atlas\n\nimport (\n\t\"testing\"\n)\n\nfunc TestCheckType(t *testing.T) {\n\td := Definition{Type: \"foo\"}\n\n\ttest := checkType(d)\n\tif test != false {\n\t\tt.Errorf(\"type is invalid: %s\", d.Type)\n\t}\n\n\td = Definition{Type: \"...
go
edit
45
3
mit
b49c32531fc865f99f7a6dda6b3e497ae31e1244
keltia/ripe-atlas
measurements_test.go
rejected_lint
Too many lint violations: 45
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package tracing consolidates the setup logic for using opencensus tracing and exporting the\n// metrics.\npackage tracing\n\nimport (\n\t\"time\"\n\n\t\"contrib.go.opencensus.io/exporter/stackdriver\"\n\t\"go.opencensus.io/trace\"\n\t\"go.sk...
go
edit
0
2
bsd-3-clause
6de7d84e1bff2c16af9846929ab777e338e5fe54
google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot
go/tracing/tracing.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage wats\n\nimport (\n\t\"time\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t. \"github.com/onsi/gomega/gexec\"\n\n\t\"github.com/cloudfoundry-incubator/cf-test-helpers/cf\"\n\t\"github.com/cloudfoundry-incubator/cf...
go
edit
42
1
apache-2.0
71090408d2fec35bdd4f35a0c3155262c8fd205b
cloudfoundry-incubator/wats,cloudfoundry/wats,cloudfoundry-incubator/wats,cloudfoundry-incubator/wats,cloudfoundry/wats,cloudfoundry-incubator/wats,cloudfoundry-incubator/wats,cloudfoundry/wats,cloudfoundry/wats,cloudfoundry/wats
wats/output_volume_test.go
rejected_lint
Too many lint violations: 42
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gosolar\n\nimport \"fmt\"\n\n// RemoveNCMNodes is now even more awesome.\nfunc (c *Client) RemoveNCMNodes(guids []string) error {\n\treq, endpoint := getRemoveNCMNodesRequest(guids)\n\t_, err := c.post(endpoint, req)\n\n\tif err != nil ...
go
edit
3
2
apache-2.0
95e5097483c747ae9126d7533fa250ade1310a65
mrxinu/gosolar
ncm.go
accepted
null
true
[ { "role": "user", "content": "Write go code for the following: Add licence header to test file" }, { "role": "assistant", "content": "// Copyright 2017 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...
go
new_file
0
0
bsd-3-clause
b3102f16304663d3cac02944159da3e85c68b1b7
golang/dep,ibrasho-forks/dep,golang/dep,ibrasho-forks/dep,golang/dep
internal/gps/_testdata/src/dotgodir/.go/dot.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage system\n\nimport (\n\t\"fmt\"\n\t\"syscall\"\n\n\t\"github.com/buildkite/agent/v3/logger\"\n)\n\nfunc VersionDump(_ logger.Logger) (string, error) {\n\tdll := syscall.MustLoadDLL(\"kernel32.dll\")\n\tp := dll.MustFindProc(\"GetVersion\"...
go
edit
0
1
mit
c3023b6ea764579035f6953ae18c39f0abdd9e6d
buildkite/agent,buildkite/agent,buildkite/agent
system/version_dump_windows.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\ntype Language struct {\n\tImage string\n\tCommand string\n}\n\n// TODO: This should be extracted\nvar Extensions = map[string]Language{\n\t\".rb\": Language{\"r...
go
edit
0
3
mit
f0d677bb130b74876926c889fba8cbf37ca66bc1
lanastasov/bitrun-api,sosedoff/bitrun-api,bitrun/api
lang.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"regexp\"\n)\n\nfunc newMatcher(pat string) (*regexp.Regexp, error) {\n\treturn regexp.Compile(pat)\n}\n\n```\n\nApply this change: Implement branch matcher as fake" }, { "role": "assistant", "content": ...
go
edit
0
1
mit
c6bcbc5be92ee26356dc5f2f0b2747c3899b7fef
kusabashira/msub
subvert.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2015-2017 Hilko Bengen <<EMAIL>>\n// All rights reserved.\n//\n// Use of this source code is governed by the license that can be\n// found in the LICENSE file.\n\npackage yara\n\nimport (\n\t\"github.com/VirusTotal/go-yara/intern...
go
edit
0
11
bsd-2-clause
6657839f8f426d83cb426aca87bc4c7439516242
VirusTotal/go-yara
util.go
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage timeseries\n\nimport \"time\"\n\nfunc TransformScale(factor float64) TransformFunc {\n\treturn func(point TimePoint) TimePoint {\n\t\tif point.Value != nil {\n\t\t\tnewValue := *point.Value * factor\n\t\t\tpoint.Value = &newValue\n\t\t}...
go
edit
18
3
apache-2.0
8e9a26077470c48f4bed938b8e7f8c5e2cfdf36e
alexanderzobnin/grafana-zabbix,alexanderzobnin/grafana-zabbix,alexanderzobnin/grafana-zabbix,alexanderzobnin/grafana-zabbix,alexanderzobnin/grafana-zabbix,alexanderzobnin/grafana-zabbix
pkg/timeseries/transform_functions.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage async\n\nimport (\n \"container/list\"\n \"sync\"\n)\n\n/*\n\n Used to contain the Routine functions to be processed\n\n This list inherits http://golang.org/pkg/container/list/ and contains all\n of the functionality that it conta...
go
edit
0
2
mit
2157666ee3acb470292ac1c5fdaefbb907b5aea5
Southern/async
list.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage commands\n\nimport (\n\t\"github.com/centurylinkcloud/clc-go-cli/base\"\n)\n\ntype CommandBase struct {\n\tInput interface{}\n\tOutput interface{}\n\tExcInfo CommandExcInfo\n}\n\ntype CommandExcInfo struct {\n\tVerb string\n\tUrl...
go
edit
0
1
apache-2.0
402bdefab3da4b3396ed7f97c8b097cbad0da957
CenturyLinkCloud/clc-go-cli,CenturyLinkCloud/clc-go-cli
commands/command_base.go
rejected_duplicate
Near-duplicate of sample 117262
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\ntype targetType uint8\n\nconst (\n\t_ targetType = iota\n\ttargetTypeOneself\n\ttargetTypeFriend\n\ttargetTypeAllFriends\n\ttargetTypeEnemy\n\ttargetTypeAllEnemies\n)\n\ntype ability struct {\n\ttargetType\n\tmanaCost statis...
go
edit
21
9
mit
a61285e4587cef9a01def33ad8926b87612f6e41
etheriqa/crescent
ability.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage venom\n\nimport (\n\t\"reflect\"\n\n\t\"github.com/hashicorp/go-multierror\"\n)\n\nfunc isNil(e error) bool {\n\treturn e == nil || reflect.ValueOf(e).IsNil()\n}\n\nfunc allNil(errs []error) bool {\n\tfor _, e := range errs {\n\t\tif is...
go
edit
3
3
mit
84c3d45c2a81ad181d67fba20a52fed5416d6125
themalkolm/venom
multierror.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage emailserver\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"log\"\n\t\"net\"\n\t\"net/mail\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/TNG/gpg-validation-server/email-client\"\n)\n\nvar received string\n\nfunc init() {\n\tserver := Create(\...
go
edit
6
2
apache-2.0
615e6602371f712f5c0377e2786acbec38efb3bd
TNG/gpg-validation-server,TNG/gpg-validation-server,TNG/openpgp-validation-server,TNG/openpgp-validation-server
email-server/server_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\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 License at\n\n http://w...
go
edit
0
0
apache-2.0
efc6ca4c47791eb239bb813718fa3470d99606fe
containerd/containerd,estesp/containerd,dmcgowan/containerd,mikebrow/containerd,mikebrow/containerd,containerd/containerd,thaJeztah/containerd,thaJeztah/containerd,estesp/containerd,dmcgowan/containerd
version/version.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) 2015, Emir Pasic. 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 utils\n\n// Comparator will make type assertion (see IntComparator for ...
go
edit
0
7
bsd-2-clause
84564da2b4aabad6c322177a2c4fcd7538e93823
cagnosolutions/gods
utils/comparator.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !windows,!plan9\n\npackage core\n\nimport (\n\t\"os\"\n\t\"reflect\"\n\t\"testing\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc TestSignalSource(t *testing.T) {\n\tsigs := NewSignalSource(unix.SIGUSR1)\n\tsigch := sigs.NotifySignals()\n...
go
edit
3
5
bsd-2-clause
56933e241087bbb6b97f1787a5ab94dc36b2e262
elves/elvish,elves/elvish,elves/elvish,elves/elvish,elves/elvish
newedit/core/signal_source_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage monitor\n\nimport \"fmt\"\n\n// Target is a URL, which has to be polled for availability.\ntype Target struct {\n\t// Unique identifier of this target. Targets' IDs cannot intercept. Target's\n\t// ID must be constant between GetTargets...
go
edit
3
1
mit
ce7c60d033f289b76f5a46470aff2fe988461b6e
yamnikov-oleg/avamon-bot,yamnikov-oleg/avamon-bot
monitor/monitor.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package trinary implements a function for converting a trinary number to a decimal number.\npackage trinary\n\nimport \"fmt\"\n\nconst testVersion = 1\n\n// ParseTrinary converts a trinary number to a decimal number.\n// If the input contain...
go
edit
0
5
mit
54d576b46c1872dbf913373397a70529ca1eef22
DanShu93/exercism
solutions/go/trinary/trinary.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage templates\n\nfunc ScopeTemplateContent() string {\n\treturn `#cloud-config\n\n{{ .Name}}:\n {{ range .Services }}{{ .GetName }}:\n {{ range $key, $value := .GetParameters }}{{ $key }}: {{ $value }}\n {{ end }}\n {{ end }}\n`\n}\...
go
edit
0
1
apache-2.0
37b210689082a98536f36f0781e18f732259a13a
bernardolins/clustereasy,bernardolins/clustereasy
templates/content.go
rejected_duplicate
Near-duplicate of sample 116954
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage anaconda\n\ntype TwitterUser struct {\n\tStatuses_count *float64\n\tContributors_enabled *bool\n\tFriends_count *float64\n\tGeo_enabled *bool\n\tDescription ...
go
edit
3
0
mit
b2b32d23a07a1037bc766e704a5135346eb454eb
Fe4nn0r/anaconda,logashoff/anaconda,ifross89/anaconda,cgag/anaconda,jeffk/anaconda,jmptrader/anaconda,azr/anaconda,aatishnn/anaconda,josephyzhou/anaconda,rfsbraz/anaconda,amit-lulla/twitterapi,intfrr/anaconda,140proof/anaconda,rendon/anaconda
twitter_user.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage consumer\n\nimport (\n\t\"testing\"\n\t\"code.google.com/p/goconf/conf\"\n)\n\nconst configFile = `\n[connection]\nvhost = /my-domain\nuser = mark\npassword = sekret\n`\n\n// Test generating URL with defaults.\nfunc TestMakeAmqpUrlWithD...
go
edit
9
2
mit
e5443e64953484cc1c1231ff426a48b624bf61bb
markstory/go-consumer
consumer_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage goDLX\n\n// Matrix is the fundamental unit in the Algorithm X implementation\n// as described in [Knuth, Donald (2000). \"Dancing Links\". _Millenial Perspectives in Computer Science_. P159 *187*.\n// Name and size only apply to columns...
go
edit
0
1
bsd-2-clause
f748077496e28404e921b4f9fb699bc8808fd534
jessecarl/goDLX
dance.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage forms\n\nimport (\n\t\"bones/entities\"\n\t\"bones/repositories\"\n\t\"bones/validation\"\n\t\"code.google.com/p/go.crypto/bcrypt\"\n\t\"errors\"\n\t\"net/http\"\n)\n\nvar LoginFailedError = errors.New(\"Login failed\")\n\ntype LoginFor...
go
edit
0
4
mit
b4d2cd469a8cfa945d9fdfd5e882af4164010209
peterskeide/bones
web/forms/login_form.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nvar parseIndexesListTests = []struct {\n\tlist string\n\tindexes []int\n}{\n\t// Only one index\n\t{\n\t\tlist: \"10\",\n\t\tindexes: []int{10},\n\t},\n\t{\n\t\tlist: \"120\"...
go
edit
3
4
mit
858978d563eba540f0b0b6c6323b3dad0c4bd603
kusabashira/csvp
csvp_test.go
rejected_duplicate
Near-duplicate of sample 117780
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage common\n\nimport (\n\t\"regexp\"\n)\n\n// RepositoryNameComponentRegexp restricts registtry path components names to\n// start with at least two letters or numbers, with following parts able to\n// separated by one period, dash or under...
go
edit
0
0
apache-2.0
15c651b73216daaef24d0b09641511d04cde7970
anweiss/docker.github.io,tianon/docker-distribution,docker/distribution,xiekeyang/distribution,whyrusleeping/distribution,maquanyi/distribution,shubheksha/docker.github.io,ChenLingPeng/distribution,amitshukla/distribution,LuisBosquez/docker.github.io,orivej/distribution,aduermael/docker.github.io,sallyom/distribution,p...
common/names.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"go.skia.org/infra/go/gce\"\n\t\"go.skia.org/infra/go/gce/server\"\n)\n\nfunc SKFEBase(name, ipAddress string) *gce.Instance {\n\tvm := server.Server20170613(name)\n\tvm.DataDisk = nil\n\tvm.ExternalIpA...
go
edit
0
1
bsd-3-clause
a218e85835ec4c5d86366dc153cdcf901c452fc1
google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot
skfe/vm.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ipfs\n\nimport (\n\t\"context\"\n\trouting \"gx/ipfs/QmPpYHPRGVpSJTkQDQDwTYZ1cYUR2NM4HS6M3iAXi8aoUa/go-libp2p-kad-dht\"\n\t\"gx/ipfs/QmTRhk7cgjUf2gfQ3p2M9KPECNZEW9XUrmHcFCgog4cPgB/go-libp2p-peer\"\n)\n\nfunc Query(dht *routing.IpfsDHT, ...
go
edit
0
4
mit
22118dbcb2e775fd70132f8afab293579cde80ed
OpenBazaar/openbazaar-go,OpenBazaar/openbazaar-go,OpenBazaar/openbazaar-go
ipfs/query.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage handler\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/rafaelsq/roar/async\"\n\t\"github.com/rafaelsq/roar/cmd\"\n\t\"github.com/rafaelsq/roar/hub\"\n)\n\nfunc API(w http.ResponseWriter, r *http.Request) {\n\tchannel := \"all\...
go
edit
0
4
mit
015644b008dceeb4fc10aaeba280f368910ae44c
rafaelsq/roar
handler/api.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage serve\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n)\n\nfunc Serve(port, socket string, handler http.Handler) {\n\tif socket == \"\" {\n\t\tPort(port, handler)\n\t} else {\n\t\tSocket(socket, handler)\n\...
go
edit
0
2
mit
42c99dbd26bedab9ce355d5cbd82fa333eb8ac88
hawx/serve
serve.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nPackage goat provides the back-end implementation of a BitTorrent tracker.\n*/\npackage goat\n\n```\n\nApply this change: Fix description for package goat" }, { "role": "assistant", "content": "/*\nPackage goat provides the back...
go
edit
0
0
mit
23f371e65aca0ddd0861bce60b0ee83d3de757f8
mdlayher/goat
goat/doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage view\n\nimport \"github.com/pufferpanel/pufferpanel/models\"\n\ntype UserViewModel struct {\n\tUsername string `json:\"username\"`\n\tEmail string `json:\"email\"`\n}\n\nfunc FromModel(model *models.User) *UserViewModel {\n\treturn &...
go
edit
0
4
apache-2.0
260937103d166300b264f593e0f81e59bcb2a1ae
PufferPanel/PufferPanel,PufferPanel/PufferPanel,PufferPanel/PufferPanel,PufferPanel/PufferPanel
models/view/user.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage util\n\nimport \"bytes\"\n\ntype AppError struct {\n\terrors []error\n}\n\nfunc NewError() *AppError {\n\treturn &AppError{}\n}\n\nfunc (e *AppError) Append(err error) {\n\te.errors = append(e.errors, err)\n}\n\nfunc (e *AppError) Error...
go
edit
0
2
mit
63a7393dd635393cb508c50f2bbe4fe316c2d407
mathsalmi/goarch
util/error.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015-present Oursky Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://...
go
edit
0
3
apache-2.0
caea26d17f1165b59b74a039abe49023bcb227d7
SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server
pkg/core/logging/logging.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/octavore/naga/service\"\n\n\t\"github.com/octavore/ketchup/admin\"\n\t\"github.com/octavore/ketchup/db/bolt\"\n\t\"github.com/octavore/ketchup/plugins/pkg\"\n\t\"github.com/octavore/ketchup/server/api\"\...
go
edit
0
1
apache-2.0
974a47affc24963768cc523e397b71c5d0efb3a7
ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sarama\n\nimport (\n\t\"bytes\"\n\t\"code.google.com/p/snappy-go/snappy\"\n\t\"encoding/binary\"\n)\n\nvar snappyMagic = []byte{130, 83, 78, 65, 80, 80, 89, 0}\n\n// SnappyEncode encodes binary data\nfunc snappyEncode(src []byte) ([]byt...
go
edit
0
4
mit
7e0a2d1baf29cc5ffc996d27937feabceb3dcff1
gyroscope-innovations/legacy_sarama,gyroscope-innovations/legacy_sarama
snappy.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage tictactoe\n\nimport (\n\t\"github.com/jkomoros/boardgame\"\n)\n\nconst (\n\tX = \"X\"\n\tO = \"O\"\n)\n\ntype playerToken struct {\n\tValue string\n}\n\nfunc (p *playerToken) Props() []string {\n\treturn boardgame.PropertyReaderPropsImp...
go
edit
0
3
apache-2.0
c620733bd20e3b523cb8ee48fa13d14ba3e1f6e7
jkomoros/boardgame,jkomoros/boardgame,jkomoros/boardgame
examples/tictactoe/components.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage network\n\nimport (\n\t\"math/rand\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestCompressDecompress(t *testing.T) {\n\tdata := []byte(randomString(1000))\n\n\tcompressor := NewCompressor()\n\tcompressedByte...
go
edit
9
2
bsd-3-clause
a1b0731a176c14ba625e2e8da1374af190703a17
ava-labs/avalanchego,ava-labs/avalanchego
network/compression_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage model\n\ntype Site struct {\n\tID string `json:\"id,omitempty\" redis:\"id\"`\n\tName *string `json:\"name,omitempty\" redis:\"name\"`\n\tType *string `json:\"type,omitempty\" redis:\"type\"`\n\tLatit...
go
edit
0
0
mit
3d928d2370725d7439874ddbbd98f39ca2613d9a
ninjasphere/go-ninja,ninjasphere/go-ninja
model/Site.go
rejected_duplicate
Near-duplicate of sample 117175
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage observers\n\nimport (\n\t\"github.com/sirupsen/logrus\"\n\n\t\"github.com/ivan1993spb/snake-server/objects/corpse\"\n\t\"github.com/ivan1993spb/snake-server/objects/snake\"\n\t\"github.com/ivan1993spb/snake-server/world\"\n)\n\nconst ch...
go
edit
0
5
bsd-2-clause
9797048599da5d705d69e420c9217e2d5346d051
ivan1993spb/clever-snake
observers/snake_observer.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\n\nThis module is experimental and incomplete. Please be careful.\n\nThe archive module provides a few `paul.tag/go/debian` compatable bindings\nto read and write Debian apt archives.\n\n*/\npackage archive\n\n```\n\nApply this change: Fix \...
go
edit
0
0
mit
5592f35b18607a379c98e5dbf2678716131da87f
paultag/go-archive
doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package util contains utility functions\npackage util\n\nimport \"errors\"\n\nfunc StoreImage(image []byte) (sha string, overridden bool, err error) {\n\treturn \"\", false, errors.New(\"Not implemented\")\n}\n\n```\n\nApply this change: Add...
go
edit
0
1
bsd-2-clause
0d6d4b71518c0ad0827307dbdca903ebe87d592f
raumzeitlabor/pingied
util/util.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage atcclient\n\nimport \"github.com/concourse/atc\"\n\n//go:generate counterfeiter . Handler\ntype Handler interface {\n\t// \tAbortBuild()\n\t// \tBuildEvents()\n\t// \tCreateBuild()\n\t// \tCreatePipe()\n\t// \tDeletePipeline()\n\t// \tD...
go
edit
6
1
apache-2.0
c8a502f5c1a9fae75095b776e04265bf8cc470a7
concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse
handler.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage xlsx\n\nimport \"fmt\"\n\nfunc ExampleRow_ReadStruct() {\n\t//example type\n\ttype structTest struct {\n\t\tIntVal int `xlsx:\"0\"`\n\t\tStringVal string `xlsx:\"1\"`\n\t\tFloatVal float64 `xlsx:\"2\"`\n\t\tIgnoredVal int ...
go
edit
3
2
bsd-3-clause
6adc582934d32dc97710ed04cefa61ac25d4823e
ryho/xlsx
example_read_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/arachnist/gorepost/bot\"\n\t\"github.com/arachnist/gorepost/config\"\n\t\"github.com/arachnist/gorepost/irc\"\n)\n\nfunc main() {\n\tvar exit chan struct{}\n\n\tconfig, ...
go
edit
0
5
mit
fb8e2d8392fde635513db46c9848c59a733cdb79
arachnist/gorepost
gorepost.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage rabbithole\n\n// Extra arguments as a map (on queues, bindings, etc)\ntype Properties map[string]interface{}\n\n// Port used by RabbitMQ or clients\ntype Port int\n\n// Rate of change of a numerical value\ntype RateDetails struct {\n\tR...
go
edit
0
4
bsd-2-clause
ae61bf9b3d624291895a480d820079d88e0d6acb
michaelklishin/rabbit-hole,loafoe/rabbit-hole,loafoe/rabbit-hole,signalvine/rabbit-hole,signalvine/rabbit-hole,michaelklishin/rabbit-hole
common.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nThe gomocktestreporter package provides a Ginkgo friendly implementation of [Gomock's](https://code.google.com/p/gomock/) `TestReporter` interface.\n\nMore details and a code example are [here](http://onsi.github.io/ginkgo/#integrating_with...
go
edit
0
1
mit
0f14a621cd0e46c39f7ba7b1caf55b0ad76ecd3f
fschl/ginkgo,justintung/ginkgo,yaoshipu/ginkgo,onsi/ginkgo,ixdy/ginkgo,alvinvarghese/ginkgo,onsi/ginkgo
thirdparty/gomocktestreporter/gomock_test_reporter.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage specs\n\nimport \"fmt\"\n\nconst (\n\t// VersionMajor is for an API incompatible changes\n\tVersionMajor = 0\n\t// VersionMinor is for functionality in a backwards-compatible manner\n\tVersionMinor = 2 \n\t// VersionPatch is for backwar...
go
edit
0
0
apache-2.0
346a898ba89a7450ef30c08910db8756111a9fcc
wking/opencontainer-runtime-spec,hqhq/runtime-spec,hqhq/specs,ujuc/specs,jonboulle/specs,gao-feng/specs,opencontainers/runtime-spec,runcom/specs,laijs/specs,wangkirin/specs,wking/opencontainer-specs,vbatts/specs,marcosnils/specs,opencontainers/specs,cloudfoundry-incubator/specs,ChengTiesheng/specs
version.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\nvar mockupResponse string\n\nfunc init() {\n\tfileContent, _ := ioutil.ReadFile(\"mockup-response.json\")\n\tmockupResponse = string(fileContent)\n}\n\nfunc handler(w ht...
go
edit
6
1
apache-2.0
728aa22336d8d4c8d67bdd2e49b0c150d02c9cdf
Greennav/service-routing
mockup.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sirius\n\nimport \"strings\"\n\nconst prefix = `!`\n\ntype Command struct {\n\tName string\n\tArgs []string\n}\n\nfunc (m *Message) Command(name string) (*Command, bool) {\n\tcmd := prefix + name\n\n\tif strings.HasPrefix(m.Text, cmd) {...
go
edit
0
3
mit
67b7e2a95d4a9e239dd97be13a1c9a06a275478b
kayex/sirius
command.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage runner\nimport (\n\t\"net/http\"\n\t\"fmt\"\n\t\"sync\"\n\t\"bytes\"\n\t\"github.com/dudang/golt/parser\"\n)\n\nvar wg sync.WaitGroup\n\ntype httpRequest func(string) (*http.Response, error)\n\nfunc ExecuteGoltTest(goltTest parser.Golt)...
go
edit
0
3
mit
233817850f542568cdd7ba799d7b17cf61ac7655
dudang/golt
runner/runner.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage drum\n\n// DecodeFile decodes the drum machine file found at the provided path\n// and returns a pointer to a parsed pattern which is the entry point to the\n// rest of the data.\n// TODO: implement\nfunc DecodeFile(path string) (*Patte...
go
edit
0
3
unlicense
0806ec3e8971f6e54f2363a2a3255b9e741ae3cc
kurtis99/chalange1
decoder.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\t\"github.com/mendersoftware/artifacts/config\"\n\t\"github.com/spf13/viper\"\n)\n\nfunc main() {\n\n\tvar configPath string\n\tflag.StringVar(&configPath, \"config\", \"config.yaml\", \"Confi...
go
edit
0
3
apache-2.0
49dcb487e78e8b385aa9509aa5047085bb63f578
pasinskim/deployments,pasinskim/deployments,pasinskim/deployments,pasinskim/deployments
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) 2017 Tigera, Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n...
go
edit
21
1
apache-2.0
f61587872e5fb790befcedcc2a8af2522619bf20
neiljerram/felix,neiljerram/felix,Metaswitch/calico,Metaswitch/calico,neiljerram/felix,neiljerram/felix
dataplane/windows/win_dataplane_test.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage socket\n\nimport (\n \"time\"\n \"net/http\"\n \"github.com/gorilla/websocket\"\n \"app/hub\"\n \"app/message\"\n)\n\nvar upgrader = websocket.Upgrader{}\n\nfunc writeSocket(socket *websocket.Conn, c hub.Connection) {\n ...
go
edit
0
7
mit
7b0246d6001a77456311381e3d9fc8ca3ef8dc6b
exitcodezero/picloud,exitcodezero/pi-cloud-sockets
app/socket/handler.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"regexp\"\n\t\"strings\"\n)\n\nvar (\n\tbranches = regexp.MustCompile(`(?:[^,\\\\]|\\\\.)*`)\n)\n\nfunc newMatcher(pat string) (*regexp.Regexp, error) {\n\tsp := branches.FindAllString(pat, -1)\n\tfor i := 0; i < le...
go
edit
0
3
mit
c71659b79f86235d9630d7805ef55f9f957df4a7
kusabashira/msub
subvert.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gen\n\nfunc entryScript() string {\n\treturn `\nvar system=sys();\n`\n}\n\n```\n\nApply this change: Add Tpl to the entry script" }, { "role": "assistant", "content": "package gen\n\nfunc entryScript() string {\n\treturn `\n...
go
edit
0
1
mit
de01d92eb27daed54246a7c106d55df10764ffbb
gernest/wuxia,gernest/wuxia,gernest/wuxia,gernest/wuxia
scripts.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/wjessop/go-piglow\"\n)\n\nfunc main() {\n\tvar p *piglow.Piglow\n\tvar err error\n\n\t// Create a new Piglow\n\tp, err = piglow.NewPiglow()\n\tif err != nil {\n\t\tlog.Fatal(\"Couldn't create a Piglow: \...
go
edit
6
2
mit
a160f48f6a4d31796836b3741ba3c48903e68fde
wjessop/go-piglow,Anthony3423/go-piglow
examples/example.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models_test\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/herald-it/goncord/models\"\n\t\"testing\"\n)\n\nfunc TestNewDumpTokenModel(t *testing.T) {\n\tdump_token := &models.DumpToken{}\n\n\tif dump_token == nil {\n\t\tt.Fatal(\"Nil ...
go
edit
18
1
mit
179fab7f015a5446d66a4608d09a5a156c0aea8e
herald-it/goncord
models/dump_token_test.go
rejected_lint
Too many lint violations: 18
true