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 main\n\nimport \"fmt\"\n\ntype custom struct {\n\tfirstname\n\tlastname\n}\n\ntype custom1 struct {\n\tfirstname\n\tlastname\n}\n\nfunc main() {\n\n\tfmt.Println(\"This is a simple text\")\n\t// This is a modification from git hub\n\n\t...
go
edit
9
1
bsd-2-clause
49f76c13e5285373eaaf3aba4e63c3d6b1dc51ce
davidescus/simple-web-app,davidescus/simple-web-app,davidescus/simple-web-app
main.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gocipher\n\nfunc LetterNumberEncrypt(text string) []int {\n\trunes := []rune(text)\n\tnumbers := make([]int, len(runes))\n\tfor i, rune := range runes {\n\t\tif rune >= 'A' && rune <= 'Z' {\n\t\t\tnumbers[i] = int(rune - 'A' + 1)\n\t\t}...
go
edit
0
6
mit
7c1fb5edf960d35317b5dfa926624ff7f62e1909
andrewarchi/gocipher
gocipher/letter_number.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/gorilla/mux\"\n)\n\nconst (\n\tPORT = \":8080\"\n)\n\nfunc main() {\n\trouter := mux.NewRouter()\n\trouter.HandleFunc(\"/\", roothandler)\n\terr := http.ListenAndServe(PORT, ...
go
edit
9
2
mit
a102f95bc8bf2b00c7dd63481a9d629354a82526
ewhal/Todolist,ewhal/Todolist
todo.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\"log\"\n\t\"net/http\"\n\t\"net/http/httputil\"\n)\n\nfunc hello(rw http.ResponseWriter, req *http.Request) {\n\tfmt.Fprintf(rw, \"This is stalemate.\")\n}\n\nfunc processPayload(rw http.ResponseWriter, r...
go
edit
0
4
mit
1c29d3b23555d2a06c6cb09a53b63a426080826a
kytrinyx/stalemate
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (C) 2018 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www...
go
edit
3
2
apache-2.0
a294062f368e5e664ce963c8b47fd438bd77918c
google/agi,google/gapid,google/gapid,pmuetschard/gapid,Qining/gapid,google/agi,google/gapid,pmuetschard/gapid,pmuetschard/gapid,google/agi,google/agi,Qining/gapid,Qining/gapid,google/agi,pmuetschard/gapid,google/agi,Qining/gapid,google/gapid,pmuetschard/gapid,Qining/gapid,google/gapid,google/agi,google/gapid,pmuetschar...
core/app/linker/linker_windows.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tvar g GMHook\n\terr := http.ListenAndServe(\"localhost:4000\", g)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\nApply this change: Make sure to bind to the corr...
go
edit
3
2
mit
50c1804b294cfdebf84285c312124583867d3e34
NelsonLeDuc/CalmanBot,NelsonLeDuc/CalmanBot
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage tools\n\nimport (\n\t\"crypto/hmac\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\nfunc ComputeHmac256(message string, secret string) string {\n\tkey := []byte(secret)\n\th := hmac.N...
go
edit
0
2
mit
e8da1c83e67a92854a4c6024567d7a4c4578a3da
scritch007/go-tools
tools.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage graph\n\ntype Vertex struct{}\n\ntype Edge struct {\n\tstart Vertex\n\tend Vertex\n}\n\ntype Graph struct{}\n\nfunc New() *Graph {\n\treturn &Graph{}\n}\n\nfunc (g *Graph) Edges(v *Vertex) []*Edge {\n\treturn nil\n}\n\n```\n\nApply th...
go
edit
6
2
mit
f54319b8b0e0445c21300ada1b3e6f32c60adb94
oinume/algo,oinume/algo
datastructure/graph/graph.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage decorator\n\nimport (\n\t\"time\"\n\n\tsparta \"github.com/mweagle/Sparta\"\n\tgocf \"github.com/mweagle/go-cloudformation\"\n\t\"github.com/sirupsen/logrus\"\n)\n\n// LambdaVersioningDecorator returns a TemplateDecorator\n// that is re...
go
edit
0
1
mit
bee300e66d31c2c5f87b391c915cea7bd9261679
mweagle/Sparta,mweagle/Sparta,mweagle/Sparta,mweagle/Sparta
decorator/versioning.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage controllers\n\nimport (\n\t\"github.com/jgraham909/revmgo\"\n\t\"github.com/robfig/revel\"\n\t\"html/template\"\n)\n\nfunc init() {\n\trevel.TemplateFuncs[\"add\"] = func(a, b int) int { return a + b }\n\trevel.TemplateFuncs[\"get\"] = ...
go
edit
0
3
mit
d2983fa99b50c54473920034ab2789b9d2517c8b
shawnps/nihongo,gojp/nihongo,shawnps/nihongo,gojp/nihongo,gojp/nihongo,shawnps/nihongo,gojp/nihongo,shawnps/nihongo
app/controllers/init.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage exporter\n\nimport (\n\t\"net\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"github.com/prometheus/common/log\"\n)\n\n// UnixStatsReader reads uwsgi stats from specified unix socket.\ntype UnixStatsReader struct {\n\tfilename string\n}\n\nfunc ini...
go
edit
12
3
apache-2.0
c5ee55e74ceefec7148ed8f0587328a94f4bde7b
timonwong/uwsgi_exporter
exporter/reader_unix.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage uuid_test\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/northbright/uuid\"\n)\n\nfunc ExampleNew() {\n\tfor i := 0; i < 5; i++ {\n\t\tuuid, _ := uuid.New()\n\t\tfmt.Printf(\"%v\\n\", uuid)\n\t}\n\t// Output:\n}\n\n```\n\nApply this change: R...
go
edit
0
2
mit
58c332e6cc2c4970735b85a7bab925a45f69c932
northbright/uuid
uuid_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage coreutils\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n)\n\n// ExecCommand executes a command with args and returning the stringified output\nfunc ExecCommand(command string, args []string, redirect bool) string {\n\tif ExecutableExists(comman...
go
edit
3
3
apache-2.0
189a27608be511bc0680e4a055e8379b52934461
StroblIndustries/codeutilsShared,StroblIndustries/coreutils
exec.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\t\"os/exec\"\n)\n\nfunc executeCmd(command string, args ...string) {\n\tcmd := exec.Command(command, args...)\n\tcmdReader, err := cmd.StdoutPipe()\n\tif err != nil {\n\t\t...
go
edit
9
6
mit
1b21288e1f9975f7c2be2e9fe248f64235764ec4
go-playground/generate
misc.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage api\n\nimport \"regexp\"\n\nvar idRegexp = regexp.MustCompile(\"^[[:alnum:]](?:[_-]?[[:alnum:]]){1,35}$\")\n\n// ValidID returns true if the given ID is a valid application or device ID\nfunc ValidID(id string) bool {\n\treturn idRegexp...
go
edit
0
1
mit
9955a22f37dcc1fa93ec898c1d892281b1df5c3c
mgranberry/ttn,jvanmalder/ttn,mgranberry/ttn,TheThingsNetwork/ttn,jvanmalder/ttn,mgranberry/ttn,TheThingsNetwork/ttn,jvanmalder/ttn,TheThingsNetwork/ttn
api/validation.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build OMIT\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n)\n\n// SafeCounter is safe to use concurrently.\ntype SafeCounter struct {\n\tv map[string]int\n\tmux sync.Mutex\n}\n\n// Inc increments the counter for the given...
go
edit
0
2
bsd-3-clause
2e616b842c1127f0f4f1e49fcf2765d347bcaea1
golang/tour,zorion/go-tour-ca,zorion/go-tour-ca,dupoxy/go-tour-fr,dupoxy/go-tour-fr,dupoxy/go-tour-fr
content/concurrency/mutex-counter.go
rejected_duplicate
Near-duplicate of sample 118565
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"net/http\"\nimport \"os\"\nimport \"strings\"\nimport \"fmt\"\n\nfunc main() {\n port := os.Getenv(\"PORT\")\n if port == \"\" {\n port = \"8080\"\n }\n http.HandleFunc(\"/\", IpResponse)\n http.Li...
go
edit
6
4
apache-2.0
1f49df9e2d9ccfee83a69c75cc6d8f9953a98866
mhotchen/IP-echo,mhotchen/IP-echo
main.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage datacenter\n\ntype GetDCReq struct {\n\tDataCenter string `valid:\"required\" URIParam:\"yes\"`\n}\n\ntype GetDCRes struct {\n\tSupportsPremiumStorage bool\n\tSupportsSharedLoadBalancer bool\n\tDeployableNetworks []Deployabl...
go
edit
0
0
apache-2.0
c061fab7f4ea14496fbc0b25f269dc3f6815d8cd
CenturyLinkCloud/clc-go-cli,CenturyLinkCloud/clc-go-cli
models/datacenter/get_deployment_capabilities.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/facebookgo/grace/gracehttp\"\n\t\"github.com/labstack/echo\"\n\t\"github.com/labstack/echo/middleware\"\n)\n\nfunc main() {\n\te := echo.New()\n\n\te.Use(middleware.LoggerWithConfig(middlewar...
go
edit
3
2
mit
233bcd0bc57c9a12f893f6901bbf60aa30ddcd43
hasit/healthyrepo,hasit/healthyrepo,hasit/healthyrepo
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nfunc main() {\n\tci, err := apiConn.allCommits()\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tsortedMsg, _ := sortedChangeLogMessages(ci)\n\n\t//fmt.Printf(\"Sorted messages:\\n%+v\\n\", sortedMsg)\n\n\terr = generateChangeLog...
go
edit
12
3
apache-2.0
f74d0221876b5e405c0b5b2fd30eb765812d80ce
hheld/ChangeLogFromGitLab
main.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage stripe\n\nimport (\n\t\"testing\"\n\n\tassert \"github.com/stretchr/testify/require\"\n\t\"github.com/stripe/stripe-go/form\"\n)\n\nfunc TestSourceObjectParams_AppendTo(t *testing.T) {\n\t// Test to make sure that TypeData makes it to t...
go
edit
3
1
mit
a1aa950fb558475b53fe37e6c3fbc141bb51a2d9
ChannelMeter/stripe-go,stripe/stripe-go,stripe/stripe-go,ChannelMeter/stripe-go
source_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build appengine\n\npackage main\n\nimport (\n\t\"net/http\"\n\t\"sync\"\n\t\"time\"\n\n\t_ \"gnd.la/admin\" // required for make-assets command\n\t_ \"gnd.la/blobstore/driver/gcs\" // enable Google Could Storage blobstore d...
go
edit
9
3
apache-2.0
3e7cb3760f58c939eb9a6348f4407cf85c4f2d9b
rainycape/gondolaweb,rainycape/gondolaweb,rainycape/gondolaweb,rainycape/gondolaweb
templates/_appengine/main_appengine.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"fmt\"\n\t\"os\"\n\t\"net/http\"\n\t\"github.com/julienschmidt/httprouter\"\n)\n\nfunc Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {\n\tfmt.Fprintln(w, \"HTTP working over a socket!...
go
edit
3
2
mit
b3a94b09e765ea41dac080e8a567038215d8793d
nikelmwann/dokku-api-server
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cloudwatch\n\nimport (\n\t\"os\"\n\t\"testing\"\n)\n\nfunc TestDefaultSessionConfig(t *testing.T) {\n\tcases := []struct {\n\t\texpected string\n\t\texport bool\n\t\texportVar string\n\t\texportVal string\n\t}{\n\t\t{\n\t\t\texpecte...
go
edit
3
5
mit
fe764f09ca3f776eee1f5b5dfa680502f9ae4ede
full360/cuckoo,full360/cuckoo
cloudwatch/client_test.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 E_DIRECTED, EM_DIRECTED = 1 << iota, 1 << iota - 1\n E_UNDIRECTED, EM_UNDIRECTED\n E_W...
go
edit
0
0
mit
a384051af7393a915ecab903e118f9722ea04069
sdboyer/gogl,sdboyer/gogl
graph.go
rejected_duplicate
Near-duplicate of sample 118747
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// errchk $G $D/$F.go\n\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage main\n\nimport (\n\tOS \"os\" // should requir...
go
edit
0
1
bsd-3-clause
622a6679403dd07c987d8b148e41d54d557ed185
abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go
test/bugs/bug125.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"os/exec\"\n)\n\nfunc main() {\n\tworkingDirectory, error := os.Getwd()\n\n\tif error != nil {\n\t\tfmt.Println(error)\n\t\tos.Exit(1)\n\t}\n\n\tworkingDirectory, error = fi...
go
edit
0
4
mit
b568dcfc06924b832f132f5c028fd61daa3b1755
nate/logo
logo.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2016 Skippbox, Ltd.\nCopyright 2017 André Cruz\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n ...
go
edit
0
1
apache-2.0
87a94c9fe9618135282cd43695523a620a9bcc49
edevil/kubewatch
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\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\tu...
go
edit
0
1
apache-2.0
feebe72c1302d3abb3d1bd88585a18f40e3e505b
rtwire/mock,rtwire/mock
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/zmb3/spotify\"\n\t\"golang.org/x/oauth2/clientcredentials\"\n)\n\nfunc main() {\n\tconfig := &clientcredentials.Config{\n\t\tClientID: os.Getenv(\"SPOTIFY_ID\"),...
go
edit
0
6
apache-2.0
319f5690205142032dd948fb5da8cb38cae16236
zmb3/spotify
examples/paging/page.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage helpers\n\nimport (\n\t\"html/template\"\n\n\t\"github.com/acsellers/multitemplate\"\n)\n\n// Available helper modules \"forms\", \"general\", \"link\", \"asset\"\nfunc LoadHelpers(modules ...string) {\n\tloadFuncs(coreFuncs)\n\tfor _, ...
go
edit
51
7
bsd-2-clause
1bce3acd3c0fcfdf7334c9e4e47ca23d772d4280
acsellers/multitemplate,acsellers/multitemplate
helpers/load.go
rejected_lint
Too many lint violations: 51
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gocaa\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n)\n\ntype HTTPError struct {\n\tStatusCode int\n\tUrl *url.URL\n}\n\nfunc (e HTTPError) Error() string {\n\treturn fmt.Sprintf(\"%i on %s\", e.StatusCode, e.Url.String())\n}\n\ntype In...
go
edit
3
1
mit
c349796fef8530d4eb58b417887c314e2fd4465c
mineo/gocaa
errors.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2012 - 2015 The ASCIIToSVG Contributors\n// All rights reserved.\n\npackage asciitosvg\n\nimport \"testing\"\n\nfunc TestNewCanvas(t *testing.T) {\n\tdata := `\n +------+\n |Editor|-------------+--------+\n +------+ ...
go
edit
3
1
mit
40d4b8e4b1d8d56fc76fec4b0881d99a7970d01f
asciitosvg/asciitosvg
asciitosvg_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !darwin\n\npackage main\n\nimport (\n\t\"log\"\n)\n\nfunc run(cpus, mem, diskSz int, userData string, args []string) {\n\tlog.Fatalf(\"'run' is not support yet on your OS\")\n}\n\n```\n\nApply this change: Fix typo in `moby run`\n\nSi...
go
edit
0
1
apache-2.0
e4a092c0e1f6b1456399c3e9a847b07d0e017d9d
kencochrane/linuxkit,yankcrime/linuxkit,ndauten/linuxkit,furious-luke/linuxkit,justincormack/linuxkit,thebsdbox/linuxkit,eyz/linuxkit,deitch/linuxkit,zx2c4/linuxkit,davefreitag/linuxkit,JohnnyLeone/linuxkit,t-koulouris/linuxkit,YuPengZTE/linuxkit,konstruktoid/linuxkit,linuxkit/linuxkit,radu-matei/linuxkit,JohnnyLeone/l...
src/cmd/moby/run_fallback.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package db2 is the replacement for db. It provides low level db connection\n// and query capabilities.\npackage db2\n\n// PageQuery represents a portion of a Query struct concerned with paging\n// through a large dataset.\ntype PageQuery st...
go
edit
0
0
apache-2.0
9592c3148aba5ebfe0e6ef1d30b91c86d65ca639
nullstyle/go-horizon,nullstyle/go-horizon,nullstyle/go-horizon,stellar/horizon,stellar/horizon,stellar/horizon
src/github.com/stellar/horizon/db2/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/gentlemanautomaton/serviceresolver\"\n\t\"github.com/scjalliance/resourceful/guardian\"\n)\n\nfunc collectEndpoints(ctx context.Context) (endpoints []guardian.En...
go
edit
0
5
mit
aea5dfb3007912341a0966107f90db8fe58aa2dd
scjalliance/resourceful,scjalliance/resourceful,scjalliance/resourceful
cmd/resourceful/endpoints.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nvar ARGV []string\n\nfunc main() {\n\tARGV = os.Args[1:]\n\n\tif len(ARGV) == 0 {\n\t\t// Read stdin only\n\t\tio.Copy(os.Stdout, os.Stdin)\n\n\t} else {\n\t\t// Read ARGV only\n\t\t...
go
edit
6
5
mit
9ba3d510c2ddf83e8e2dacbfc383cf6e692d9565
caius/gocat
gocat.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage bitbucket\n\nimport (\n\t\"code.cloudfoundry.org/lager\"\n\t\"github.com/concourse/atc/auth/verifier\"\n\t\"net/http\"\n)\n\ntype RepositoryVerifier struct {\n\trepositories []RepositoryConfig\n\tbitbucketClient Client\n}\n\nfunc New...
go
edit
9
4
apache-2.0
259b3710676492aa98d03afcd14b96c81d098a31
concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse
auth/bitbucket/repository_verifier.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build f030x6\n\npackage tim\n\nimport (\n\t\"unsafe\"\n\n\t\"stm32/hal/raw/mmap\"\n)\n\n//emgo:const\nvar (\n\t// Advanced-control timers.\n\tTIM1 = (*Periph)(unsafe.Pointer(mmap.TIM1_BASE))\n\n\t// General-purpose timers.\n\tTIM3 = (*Perip...
go
edit
0
0
bsd-3-clause
ec422fd4080b7b5e21415c32c0615c5afc109695
ziutek/emgo,ziutek/emgo,ziutek/emgo,ziutek/emgo
egpath/src/stm32/hal/tim/instances-f3.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build darwin\n\npackage libfuse\n\nimport (\n\t\"os\"\n\n\t\"bazil.org/fuse\"\n)\n\nfunc getPlatformSpecificMountOptions(m Mounter) ([]fuse.MountOption, error) {\n\toptions := []fuse.MountOption{}\n\n\t// Add kbfuse support.\n\t// Workaroun...
go
edit
6
2
bsd-3-clause
bb504e8f4e3ad1ec90ed9ca4af9e3d66fcebaf3a
keybase/kbfs,keybase/client,keybase/client,keybase/client,keybase/client,keybase/kbfs,keybase/client,keybase/kbfs,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/kbfs,keybase/client,keybase/client
libfuse/mounter_osx.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"github.com/ricallinson/forgery\"\n \"github.com/spacedock-io/index/common\"\n)\n\nfunc Routes(server *f.Server) {\n /*\n Library repository routes\n */\n server.Put(\"/v1/repositories/:repo/auth\", LibraryA...
go
edit
45
1
mit
12c14bfd34be16ffe6796b24ef7693cfe63ee109
spacedock-io/index
routes.go
rejected_lint
Too many lint violations: 45
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"log\"\n\nconst (\n\t// outputRoot is the output directory\n\t// for the build artifacts.\n\toutputRoot = \"dist\"\n)\n\nvar (\n\t// appName is the name of the\n\t// application to be built.\n\tappName string\n\n\t// app...
go
edit
15
7
mit
8f1770a777d8e7b971b18850675b70562a72a5ce
samherrmann/gowrap
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\"log\"\n\n\tevdev \"github.com/gvalkov/golang-evdev\"\n)\n\ntype Event interface {\n\tString() string\n}\n\nfunc main() {\n\tkbdEvent, err := NewK().Lookup()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\...
go
edit
3
17
mit
757dc366abfa25bad4368835fb52b340b534acff
jspc/go-kbd
main.go
rejected_complexity
Cyclomatic complexity too high: 17
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage i18n\n\nimport (\n\t\"net/http\"\n\n\t\"golang.org/x/text/language\"\n)\n\n// A Parser is a funcion that returns a list of accepted languages, most preferred first.\ntype Parser func(*http.Request) []language.Tag\n\n// ParseAcceptLangua...
go
edit
0
3
mit
d2cdac161786fb999e0f563960a81c376c2246fc
gowww/i18n
parse.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/jvrplmlmn/nginx-requests-stats/handlers\"\n\t\"github.com/satyrius/gonx\"\n)\n\nconst version = \"0.1.0\"\n\nvar format string\nvar logFile string\n\nfunc init() ...
go
edit
0
1
mit
f556f375693b9892f5c69132c213ab7e96943f4f
jvrplmlmn/nginx-requests-stats
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage common\n\nimport (\n\t\"encoding/json\"\n)\n\ntype TaskData struct {\n\tFullyQualifiedNodeName string\n\tRexFullyQualifiedNodeName string\n\tZookeepers []string\n\tClusterName string\n\tNodeID ...
go
edit
0
1
apache-2.0
886024fe5047d86ec71b20d96c2e51a385dd96de
calebTomlinson/riak-mesos,sargun/riak-mesos,sargun/riak-mesos,calebTomlinson/riak-mesos,sargun/riak-mesos,sargun/riak-mesos,calebTomlinson/riak-mesos,calebTomlinson/riak-mesos,sargun/riak-mesos
common/shared_structs.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n)\n\nfunc main() {\n\textArgs, err := LookupExtCmd(os.Args[1:])\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\textCmd := exec.Command(extArgs[0], extArgs[1:]...)...
go
edit
3
5
mit
a71884087fbfebe148542030ff6e6ab4bff40d5d
naoty/ext
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage exporter\n\nimport (\n\tlog \"github.com/sirupsen/logrus\"\n\t\"github.com/foomo/petze/watch\"\n)\n\nfunc LogResultHandler(result watch.Result) {\n\tlogger := log.WithFields(log.Fields{\n\t\t\"service_id\": result.ID,\n\t\t\"runtime\": ...
go
edit
0
4
mit
57173c6bdc431b867c331f7ab112234e282a44cc
foomo/petze
exporter/logexporter.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage commands\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/concourse/concourse/fly/rc\"\n)\n\ntype PruneWorkerCommand struct {\n\tWorker string `short:\"w\" long:\"worker\" required:\"true\" description:\"Worker to prune\"`\n}\n\nfunc (command ...
go
edit
3
13
apache-2.0
cbc3b6b036a01c951e2d0549823c16d6be42e071
concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse
fly/commands/prune_worker.go
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage channels\n\ntype ThermoStatActuator interface {\n\tSetTemperatureSetPoint(float64) error\n}\n\ntype ThermoStatState struct {\n\tTarget *float64 `json:\"target,omitempty\"`\n}\n\ntype ThermoStatChannel struct {\n\tbaseChannel\n\tactuator...
go
edit
0
1
mit
18a691f8dabe1d59554ced1e7f55e91c9409cda5
ninjasphere/go-ninja,ninjasphere/go-ninja
channels/Thermostat.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage mint\n\nimport \"testing\"\nimport \"fmt\"\nimport \"os\"\n\ntype ProxyTestee struct {\n\tt *testing.T\n\tactual interface{}\n\texpected interface{}\n}\n\nvar (\n\tFailBase = 0\n\tFailType = 1\n)\nvar Scolds = map[int]string{\n...
go
edit
0
2
mit
b059059a68b83f26aeda05e0cabc63423f6424dc
otiai10/mint
mint.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015-2017, Cyrill @ Schumacher.fm and the CoreStore contributors\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 co...
go
edit
0
0
apache-2.0
7da39310819a84ec9b983beffcaa4bda8cd739aa
corestoreio/csfw,corestoreio/csfw
storage/mview/doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage rpcd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/Symantec/Dominator/lib/hash\"\n\t\"github.com/Symantec/Dominator/proto/imageserver\"\n)\n\nfunc (t *rpcType) AddImage(request imageserver.AddImageRequest,\n\treply *imageserver.A...
go
edit
12
9
apache-2.0
b8c10e7ab332c7f3e32f3a4004fbb122e0ebee4d
Symantec/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator,rgooch/Dominator,Symantec/Dominator,keep94/Dominator,keep94/Dominator,keep94/Dominator
imageserver/rpcd/addImage.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\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\n\t\"code.google.com/p/goauth2/oauth\"\n\t\"github.com/google/go-github/github\"\n)\n\nfunc ListRepos(config *Config) {\n\tt := &oauth.Transport{\n\t\tToken: ...
go
edit
6
3
apache-2.0
5561a910c4c29d660bb26e6970b5125fa7e72f96
thecarlhall/privy
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\"fmt\"\n\t\"testing\"\n)\n\nfunc TestTax2011QuickDeduction(t *testing.T) {\n\tfmt.Println(\"Year 2011:\")\n\n\tafterTax, qdWithTax := tax2011QuickDeduction(0)\n\tfmt.Printf(\"Atfer Tax:%v\\n\", afterTax)\n\tfor k, v...
go
edit
0
5
mit
c137bea82b2bb5c762e0b3bfe86df4164dcf3570
MarsBighead/garden,MarsBighead/garden,MarsBighead/garden,MarsBighead/garden
tools/iit/main_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage meep_test\n\nimport (\n\t\"fmt\"\n\n\t\".\"\n)\n\nfunc ExampleTraceableErr() {\n\ttype Woop struct {\n\t\tmeep.TraceableError\n\t\terror\n\t}\n\terr := meep.New(&Woop{})\n\tfmt.Println(err.(*Woop).StackString())\n\n\t/// Output:\n\t// F...
go
edit
9
1
apache-2.0
809a3a8671cc5a4e4741f70f48cc433dd2d8b9be
polydawn/meep,polydawn/meep
traceable_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\"fmt\"\n\t\"net\"\n\n\t\"github.com/cmatsuoka/ouidb\"\n\t\"github.com/mostlygeek/arp\"\n)\n\nvar db *ouidb.OuiDB\n\nfunc init() {\n\tdb = ouidb.New(\"/etc/manuf\")\n\tif db == nil {\n\t\tdb = ouidb.New(\"manuf\")\n\...
go
edit
3
4
mit
d6268844a2e9302243e1410f3c8b496cef53fa2b
cmatsuoka/dhcpcheck
util.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"log\"\n \"fmt\"\n \"os\"\n \"path\"\n\n \"golang.org/x/net/context\"\n\n \"github.com/docker/libcompose/docker\"\n \"github.com/docker/libcompose/docker/ctx\"\n \"github.com/docker/libcompose...
go
edit
0
4
apache-2.0
49a7fce941cc46f56e95651925ab2518dfe94940
adrahon/deploy-compose
2deploy.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !darwin\n\npackage tftp\n\nimport \"net\"\n\nconst udp = \"udp\"\n\nfunc localSystem(c *net.UDPConn) string {\n\treturn c.LocalAddr().String()\n}\n\n```\n\nApply this change: Determine correct localhost address for tests." }, { ...
go
edit
0
3
mit
29d2b723487b09f8042a955eb8afedb2f7f78a11
pin/tftp
conn.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage messages\n\nimport (\n\t\"github.com/Symantec/tricorder/go/tricorder/types\"\n)\n\ntype Range struct {\n\tLower *float64 `json:\"lower,omitempty\"`\n\tUpper *float64 `json:\"upper,omitempty\"`\n\tCount uint64 `json:\"count\"`\n}\n\nty...
go
edit
0
0
apache-2.0
aa95fa34247f685678db7bd47bf1c895eb099d55
Symantec/tricorder
go/tricorder/messages/api.go
accepted
null
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\nvar (\n\t// Flags\n\thelpShort = flag.Bool(\"h\", false, \"Show usage text (same as --help).\")\n\thelpLong = flag.Bool(\"help\", false, \"Show usage text (same as -h).\")\n)\n\nfu...
go
edit
0
4
bsd-3-clause
9654cdd0492895da43da1572fad7f48fcdea6314
dsymonds/gotoc,dsymonds/gotoc
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"encoding/json\"\n\n// StrSlice representes a string or an array of strings.\n// We need to override the json decoder to accept both options.\ntype StrSlice struct {\n\tparts []string\n}\n\n// UnmarshalJSON decodes the b...
go
edit
0
0
mit
35b2a960fc38124a0dbde849e0fcf67bcbec23c0
drone-plugins/drone-ssh,appleboy/drone-ssh,appleboy/drone-ssh
types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage bytebufferpool\n\nimport \"sync\"\n\nconst (\n\tminBitSize = 8\n\tsteps = 20\n\n\tminSize = 1 << minBitSize\n\tmaxSize = 1 << (minBitSize + steps - 1)\n)\n\ntype byteBufferPool struct {\n\t// Pools are segemented into power-of-two ...
go
edit
9
3
mit
7e712dfeb68c142b4f4cb1c6e864afa757342780
valyala/bytebufferpool
pool.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\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"regexp\"\n)\n\nfunc main() {\n\tresp, _ := http.Get(\"http://hichannel.hinet.net/radio/mobile/index.do?id=232\")\n\tdefer resp.Body.Close()\n\thtml := new(bytes.Buffer)\n\tht...
go
edit
6
1
mit
0562aba1db9c44e24a87943a2774a060f8193cc5
lecheel/gohinetradio,toomore/gohinetradio
main.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage xmmsclient\n\nimport (\n\t\"bytes\"\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestSerializeInt(t *testing.T) {\n\tvar expected = []byte{\n\t\t0x00, 0x00, 0x00, 0x02,\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a,\n\t}\n\tvar buffer...
go
edit
3
2
isc
7af43f9d658020c9d5b79f77599670fbe009810e
dsvensson/go-xmmsclient
xmmsclient/serialize_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build integration\npackage codedeploy_test\n\nimport (\n\t\"strconv\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/awslabs/aws-sdk-go/aws\"\n\t\"github.com/awslabs/aws-sdk-go/service/codedeploy\"\n)\n\nfunc TestCreateDeleteApplication(t *te...
go
edit
0
4
apache-2.0
594dccc0ddd3eca634e6d3a982f5d729ac0273a5
jkakar/aws-sdk-go,Onefootball/aws-sdk-go,xibz/aws-sdk-go,euank/aws-sdk-go,rail/aws-sdk-go,matematik7/aws-sdk-go,keithpitt/aws-sdk-go,tml/aws-sdk-go,Onefootball/aws-sdk-go,skyportsystems/aws-sdk-go,euank/aws-sdk-go,dragonfax/aws-sdk-go,rosenhouse/aws-sdk-go,jacobxk/aws-sdk-go,marcosnils/aws-sdk-go,xibz/aws-sdk-go,matema...
service/codedeploy/codedeploy_integ_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage medtronic\n\nconst (\n\tstatus Command = 0xCE\n)\n\n// StatusInfo represents the pump's status.\ntype StatusInfo struct {\n\tNormal bool\n\tBolusing bool\n\tSuspended bool\n}\n\n// Status returns the pump's status.\nfunc (pump *Pump...
go
edit
6
4
mit
f8fec086c6e009cc7b864ec20a62e6a6f748e762
ecc1/medtronic,ecc1/medtronic
status.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage alice\n\nimport \"net/http\"\n\n// A constructor for a piece of middleware.\n// Most middleware use this constructor out of the box,\n// so in most cases you can just pass somepackage.New\ntype Constructor func(http.Handler) http.Handle...
go
edit
0
3
mit
1cd89f72170a07c349cbc5b59d53424a57e78c21
justinas/alice,azr/alice,Compufreak345/alice
chain.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\ttwodee \"../libs/twodee\"\n)\n\nconst (\n\tUpLayer twodee.GameEventType = iota\n\tDownLayer\n\tUpWaterLevel\n\tDownWaterLevel\n\tPlayerMove\n\tGameIsClosing\n\tPlayExploreMusic\n\tPauseMusic\n\tResumeMusic\n\tPlayerP...
go
edit
6
1
apache-2.0
7a63dce37a0afd42bd9efc9687c55feeaef04130
kurrik/ld29,kurrik/ld29,pikkpoiss/ld29,pikkpoiss/ld29
src/events.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2013-2017 Pierre Neidhardt <<EMAIL>>\n// Use of this file is governed by the license that can be found in LICENSE.\n\npackage main\n\nimport (\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/jhprks/damerau\"\n)\n\nvar (\n\treNorm ...
go
edit
0
3
mit
6d964a6eb6368ed531ad4b5eb475d80f458e1538
Ambrevar/Demlo,Ambrevar/Demlo
fuzzy.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"fmt\"\n \"html\"\n \"log\"\n \"net/http\"\n)\n\ntype item struct {\n node string\n value int\n}\n\ntype Node struct {\n head item\n left item\n right item\n}\n\nfunc split(x int) (a, b, c ...
go
edit
0
1
apache-2.0
e08409ee9d120ea512ad676a65c5f13207ebea18
emforce/GoPlayground,emforce/GoPlayground
main.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/dcbishop/gim/cli\"\n)\n\nfunc main() {\n\toptions, err := cli.ParseArgs(os.Args)\n\n\tif err != nil {\n\t\tfmt.Println(cli.Usage())\n\t\tos.Exit(1)\n\t}\n\n\tif options.Help {\n\t\...
go
edit
0
3
cc0-1.0
a3af2438d842ad90c103ed152d6e054d226cdc75
dcbishop/jkl
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage metrics\n\ntype Histogram interface {\n\tClear()\n\tUpdate(value int64)\n\tCount() uint64\n\tSum() int64\n\tMin() int64\n\tMax() int64\n\tMean() float64\n\tPercentiles([]float64) []int64\n}\n\n```\n\nApply this change: Add HistogramExpo...
go
edit
0
2
bsd-3-clause
13b95f3b9aa2378cd4dbcf540ab755fd66edae50
samuel/go-metrics
metrics/histogram.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"text/template\"\n\n\t\"github.com/ovn-org/libovsdb/ovsdb\"\n)\n\nconst MODEL_TEMPLATE = `\n// Code generated by \"libovsdb.modelgen\"\n// DO NOT EDIT.\n\npackage {{ .PackageName }}\n\nimport (\n\t\"github.com/ovn-o...
go
edit
9
2
apache-2.0
0f1ed576a81ff0d57fe8068b4076f1e15c63e1d3
socketplane/libovsdb
cmd/modelgen/dbmodel.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage qbot\n\nimport (\n\t\"strings\"\n\n\t\"github.com/doozr/guac\"\n\t\"github.com/doozr/jot\"\n\t\"github.com/doozr/qbot/command\"\n\t\"github.com/doozr/qbot/queue\"\n\t\"github.com/doozr/qbot/util\"\n)\n\n// MessageHandler handles an inco...
go
edit
3
3
mit
844fa0fb81ef01a35d54c2229e359f9afa0bf35c
doozr/qbot,doozr/qbot
message_handler.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage xyebot\n\n// Response to Telegram\ntype Response struct {\n\tChatid int64 `json:\"chat_id\"`\n\tText string `json:\"text\"`\n\tMethod string `json:\"method\"`\n}\n\n// Chat Telegram structure\ntype Chat struct {\n\tID int64 `json: \"...
go
edit
3
0
apache-2.0
9ea4830e4f896f3d1094a364416cac95c3f5b022
m-messiah/xye-bot
types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dbg\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"runtime\"\n\t\"runtime/pprof\"\n\t\"time\"\n\n\t\"github.com/Sirupsen/logrus\"\n)\n\nconst (\n\tpath = \"/var/cores/\"\n)\n\n// DumpGoMemoryTrace output memory profile to logs.\...
go
edit
0
3
apache-2.0
24821ba1ec0d88207eef3bd012c321673cca0d47
pault84/openstorage,libopenstorage/openstorage,pault84/openstorage,pault84/openstorage,libopenstorage/openstorage,libopenstorage/openstorage
pkg/dbg/profile_dump.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/aseure/jagger/query\"\n)\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n\tquery := query.NewQuery(r.Body)\n\n\tif query == nil {\n\t\tw.WriteHeader(400)\n\t} else...
go
edit
0
2
mit
997aa4adb9f4ab91833efad688e0a62077eb66f6
aseure/jagger,aseure/jagger
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dht\r\n\r\nimport (\r\n\t\"testing\"\r\n\r\n\tassert \"github.com/stretchr/testify/assert\"\r\n)\r\n\r\nfunc TestFindKeysNearestToNotEqual(t *testing.T) {\r\n\ts, err := newStore()\r\n\tassert.Nil(t, err)\r\n\r\n\ts.Put(KeyPrefixPeer+\"...
go
edit
18
1
mit
7a2dac8a98c7762410a01456691a61631b7907c3
nimona/go-nimona,nimona/go-nimona,nimona/go-nimona,nimona/go-nimona
dht/kv_store_test.go
rejected_lint
Too many lint violations: 18
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
0
5
apache-2.0
2ba2dcc5b14ced82e789c36b269ecf8047acd149
jkomoros/sudoku,jkomoros/sudoku,jkomoros/sudoku
cmd/i-sudoku/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !windows,!plan9,!js\n\npackage sys\n\nimport (\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n)\n\nfunc NotifySignals() chan os.Signal {\n\t// This catches every signal regardless of whether it is ignored.\n\tsigCh := make(chan os.Signal,...
go
edit
3
1
bsd-2-clause
7ddcc5b1b58555ee19f730c4b72318cd38e16db1
elves/elvish,elves/elvish,elves/elvish,elves/elvish,elves/elvish
pkg/sys/signals_unix.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2015 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
ff409da5b0d2a49b7cc7861efbec377235d9ab2d
kubernetes/cloud-provider-openstack,kubernetes/cloud-provider-openstack,kubernetes/cloud-provider-openstack
pkg/volume/cinder/doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"net/http\"\n)\n\nvar (\n\tport int\n\tdir string\n)\n\nfunc init() {\n\tflag.IntVar(&port, \"port\", 8080, \"Port to run server on.\")\n\tflag.StringVar(&dir, \"dir\", \".\", \"Directory to ...
go
edit
3
1
mit
6945ca5ecf49e994ca80d74981fe2f2a043c2401
gregjones/serve
serve.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage phases\n\nimport (\n\t\"github.com/Everlane/evan/common\"\n\n\t\"github.com/nlopes/slack\"\n)\n\ntype SlackNotifierPhase struct {\n\tClient *slack.Client\n\tChannel string\n\tFormat func(common.Deployment) (string, error)\n}\n\nfunc (...
go
edit
0
5
mit
2bb058685d727c0ae1102169971e5016e35f433d
Everlane/evan
phases/slack_notifier.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage limiter\n\n// -----------------------------------------------------------------\n// Store\n// -----------------------------------------------------------------\n\n// Store is the common interface for limiter stores.\ntype Store interfac...
go
edit
9
1
mit
d7e272fe7b2ae6868b74fe2c109bf4c08da34fa7
ulule/limiter,manavo/limiter,ulule/limiter
limiter.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage problem_2_test\n\nimport (\n . \"github.com/onsi/ginkgo\"\n . \"github.com/onsi/gomega\"\n \"testing\"\n)\n\nfunc TestProblem_2(t *testing.T) {\n RegisterFailHandler(Fail)\n RunSpecs(t, \"Problem 2\")\n}\n\nvar _ = Describe(\"fibGe...
go
edit
33
1
unlicense
eb2949560e4a06dfeb89e80f724e9755baf2c664
jmtuley/euler-golang
problem_2/solution_test.go
rejected_lint
Too many lint violations: 33
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"reflect\"\n\t\"regexp\"\n\t\"testing\"\n)\n\nvar genMatcherTests = []struct {\n\tsrc string\n\tdst *regexp.Regexp\n}{\n\t{\"abc\", regexp.MustCompile(`abc`)},\n}\n\nfunc TestGenMatcher(t *testing.T) {\n\tfor _, tes...
go
edit
3
4
mit
04b4d8b9ce557e8b1d868c53f29e663c54cc502d
kusabashira/msub
subvert_test.go
rejected_duplicate
Near-duplicate of sample 117537
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/drone/drone-go/drone\"\n)\n\ntype Params struct {\n\tAccessKey string `json:\"access_key\"`\n\tSecretKey string `json:\"secret_key\"`\n\tRegion string `json:\...
go
edit
0
0
apache-2.0
2f669f21bb304485d6aef37cfe52528781689eea
andyet/drone-ecs,drone-plugins/drone-ecs
types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage model_test\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crezam/actions-on-google-golang/internal/test\"\n\t\"github.com/crezam/actions-on-google-golang/model\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestRequestParsing(t *te...
go
edit
0
1
mit
0ad0f5c41bf6770e2b3229ca07c27d877d1a5de4
crezam/actions-on-google-golang
model/request_test.go
rejected_duplicate
Near-duplicate of sample 118411
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage integration_test\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t. \"github.com/sclevine/agouti/dsl\"\n\t. \"github.com/sclevine/agouti/internal/integration\"\n\t\"testing\"\n)\n\nfunc TestIntegration(t *t...
go
edit
24
1
mit
bdac81fced51a326481f473704d677f6a73af953
sclevine/agouti,abourget/agouti,sclevine/agouti,Etienne42/agouti,abourget/agouti,Etienne42/agouti
internal/integration/integration_suite_test.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage termite\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"syscall\"\n\t\"testing\"\n)\n\nfunc TestFileAttrReadFrom(t *testing.T) {\n\tdir, _ := ioutil.TempDir(\"\", \"termite\")\n\tioutil.WriteFile(dir+\"/file.txt\", []byte{42}, 0644)\n\n\tat...
go
edit
6
3
bsd-3-clause
117a182a0ffc1960e0bfe3dc0e53d3eede41bb28
hanwen/termite,hanwen/termite,hanwen/termite
termite/fileattr_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\"bytes\"\n\t\"log\"\n\t\"os/exec\"\n\n\t\"github.com/shizeeg/xmpp\"\n)\n\n// RunPlugin is a generic interface for external commands.\nfunc (s *Session) RunPlugin(stanza xmpp.Stanza, filename string, tonick bool, par...
go
edit
3
4
bsd-3-clause
833a93918a9e19ccdd50e4a12bc7ebfc80d8c27b
shizeeg/jagod,shizeeg/jagod
plugin.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015, Mike Houston, see LICENSE for details.\npackage bloompw\n\nimport (\n\t\"github.com/AndreasBriese/bbloom\"\n)\n\ntype BloomPW struct {\n\tFilter *bbloom.Bloom\n}\n\n// New will return a new Database interface that stores entr...
go
edit
0
3
mit
508d33112a48174bc383ce2b2157c1895aa6a3de
klauspost/password
drivers/bloompw/bloom.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage goutils\n\nimport (\n\t\"bytes\"\n\t\"text/template\"\n\n\t\"github.com/hoveychen/go-utils/gomap\"\n)\n\nvar (\n\ttextTmplCache = gomap.New()\n)\n\nfunc Sprintt(textTmpl string, data interface{}) string {\n\tret := textTmplCache.GetOrCr...
go
edit
0
3
apache-2.0
86c1ced2f5b76aa25a023d342b2379411af94754
hoveychen/go-utils
tmpl.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 Google Inc. All Rights Reserved.\n// This file is available under the Apache license.\n\npackage errors\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/google/mtail/internal/vm/position\"\n\t\"github.com/pkg/errors\"\n...
go
edit
0
4
apache-2.0
575e4a5c5203754b49e9e97a0c6abd4f050b72ac
google/mtail,SuperQ/mtail,SuperQ/mtail,google/mtail
internal/vm/errors/errors.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport(\n\t\"net\"\n\t\"os\"\n)\n\nconst(\n\tRECV_BUF_LEN = 1024\n)\n\nfunc main() {\n\tprintln(\"Starting the server\")\n\tlistener, err := net.Listen(\"tcp\", \"127.0.0.1:8377\")\n\tif err != nil {\n\t\tprintln(\"error Listen:...
go
edit
0
4
bsd-2-clause
ab49082107b84599b5475e311d8c72dcdadcbe80
wincent/clipper
clipper.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage version\n\nimport \"testing\"\n\nfunc TestFullversion(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\twant string\n\t}{\n\t\t{\n\t\t\tname: \"Get correct name\",\n\t\t\twant: Version + \"-\" + Revision,\n\t\t},\n\t}\n\tfor ...
go
edit
6
2
mit
9946e63eda172381b163f613991a0283da046223
budougumi0617/tasks,budougumi0617/tasks
version/version_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage core\n\nimport (\n\t\"fmt\"\n)\n\ntype sharedStateSink struct {\n\twriter Writer\n}\n\n// NewSharedStateSink creates a sink that writes to SharedState.\nfunc NewSharedStateSink(ctx *Context, name string) (Sink, error) {\n\tregistry := c...
go
edit
12
3
mit
b8147ce354db143320944b85294f3237c66f788c
sensorbee/sensorbee,sensorbee/sensorbee
core/shared_state_sink.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ipjogli\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n)\n\nfunc init() {\n\thttp.HandleFunc(\"/\", handler)\n}\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprintf(w, r.RemoteAddr+\"\\n\")\n}\n\n```\n\nApply this change: S...
go
edit
0
2
bsd-2-clause
952c13db50da3858e6de7af755a873f30edf74c3
jamesog/ip.jog.li
ipjogli.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dmesg // import \"github.com/docker/docker/pkg/dmesg\"\n\nimport (\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Dmesg returns last messages from the kernel log, up to size bytes\nfunc Dmesg(size int) []byte {\n\tt := uintptr(3)...
go
edit
0
2
apache-2.0
2841b05b71095d662ecb47831d88371e9cb033ff
dims/docker,kojiromike/docker,AkihiroSuda/docker,bearstech/moby,nawawi/docker,yongtang/docker,jimjag/docker,jameszhan/docker,gnailuy/docker,nawawi/docker,nalind/docker,ibuildthecloud/docker,bearstech/moby,moby/moby,djs55/docker,yosifkit/docker,justincormack/docker,docker/docker,Ramzec/docker,vdemeester/docker,cpuguy83/...
pkg/dmesg/dmesg_linux.go
accepted
null
true