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 (\n\t\"log\"\n\t\"os\"\n\n\tdocker \"github.com/fsouza/go-dockerclient\"\n)\n\nfunc getEnvVar(name, defval string) string {\n\tval := os.Getenv(name)\n\tif val == \"\" {\n\t\tval = defval\n\t}\n\treturn val\n}\n\nfunc mai...
go
edit
6
5
mit
0b7585e2f60b0b710e6dc1e86daff21b9ee20c9a
sosedoff/docker-gateway
main.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage anidb\n\nimport (\n\t\"github.com/Kovensky/go-fscache\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\ntype MyListStats struct {\n\tAnime int\n\tEpisodes int\n\tFiles int\n\tFilesize int64\n\tAddedAnime int...
go
edit
0
0
mit
6f2375c97130fc61eb62d9691ecd31878a68361f
Kovensky/go-anidb
misc.go
accepted
null
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/apple\"\n\t\"github.com/ivan1993spb/snake-server/world\"\n)\n\nconst chanAppleObserverEventsBuffer = 32\n\nconst defaultAppleCoun...
go
edit
0
8
bsd-2-clause
e91fa495631ff75320600c47c8a2f19614038247
ivan1993spb/clever-snake
observers/apple_observer.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cartel\n\nimport (\n\t\"sync\"\n)\n\ntype Pool struct {\n\tInput chan Task\n\tOutput chan OutputValue\n\twg *sync.WaitGroup\n}\n\nfunc (p Pool) End() {\n\tclose(p.Input)\n\tp.wg.Wait()\n}\n\nfunc (p Pool) Do(t Task) {\n\tp.Input <-...
go
edit
18
4
mit
580ad7505adadb621210f3461feb343499fea35e
icambridge/cartel
pool.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sms\n\nimport \"encoding/json\"\n\ntype NexmoSms struct {\n\tApiKey string `json:\"api_key\"`\n\tApiSecret string `json:\"api_secret\"`\n\tTo string `json:\"to\"`\n\tFrom string `json:\"from\"`\n\tSmsBody string `json:\...
go
edit
3
2
mit
f2826b8ce9191b18e4abbd1d07df74852256d821
cosminrentea/gobbler,smancke/guble,cosminrentea/gobbler,smancke/guble
server/sms/sms.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage testdb\n\nimport (\n\t\"database/sql/driver\"\n\t\"io\"\n)\n\ntype rows struct {\n\tclosed bool\n\tcolumns []string\n\trows [][]driver.Value\n\tpos int\n}\n\nfunc (rs *rows) clone() *rows {\n\tif rs == nil {\n\t\treturn nil\n\t}...
go
edit
0
3
bsd-2-clause
9cf7790aa0f2af9638042bd5e72b293556100cef
rafaeljusto/go-testdb
rows.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sys\n\ntype MockExecutor struct {\n\tExec chan string\n\tArgs chan []string\n\n\tOutStr chan string\n\tOutErr chan error\n}\n\nfunc NewMockExecutor() *MockExecutor {\n\treturn &MockExecutor{\n\t\tExec: make(chan string, 1),\n\t\tArgs: m...
go
edit
0
1
apache-2.0
403c02c9b295348c94073ed8c5ee2374b7bebfd0
maxamillion/flamingo,maxamillion/flamingo,tmrts/flamingo,tmrts/flamingo
pkg/sys/executor_mock.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage internal_test\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/instana/go-sensor/autoprofile/internal\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestTimer_Restart(t *testing.T) {\n\tvar fired int\n\ttimer := internal...
go
edit
0
1
mit
6cd28e734c926178868dd572a79524d174daa070
instana/golang-sensor,instana/golang-sensor
autoprofile/internal/timer_test.go
accepted
null
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. \"github.com/smartystreets/goconvey/convey\"\n\t\"testing\"\n)\n\nfunc TestNewDumpTokenModel(t *testing.T) {\n\tdump_token := &models.DumpToken...
go
edit
18
1
mit
bad5c39c97cc716bc142675490a897390c9670a3
herald-it/goncord
models/dump_token_test.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage db\n\nimport (\n\t\"database/sql\"\n\t_ \"github.com/go-sql-driver/mysql\"\n\t\"github.com/open-falcon/hbs/g\"\n\t\"log\"\n)\n\nvar DB *sql.DB\n\nfunc Init() {\n\terr := dbInit(g.Config().Database)\n\n\tif err != nil {\n\t\tlog.Fatalf(\...
go
edit
null
null
apache-2.0
9f1516b716a2fdd847eff7cdb85821f85af8a250
Cepave/open-falcon-backend,Cepave/open-falcon-backend,Cepave/hbs,Cepave/open-falcon-backend,Cepave/open-falcon-backend,Cepave/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,Cepave/hbs,masato25/open-falcon-backend,masato25/open-falc...
db/db.go
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```go\npackage mc\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\n\t\"testing\"\n)\n\nfunc TestMC(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"MC Suite\")\n}\n\n```\n\nApply this change: Add Before and A...
go
edit
12
1
mit
0dbc3f39281c135cd100474b7d2ca2368767036f
materials-commons/mcstore,materials-commons/mcstore,materials-commons/mcstore
cmd/pkg/mc/project_suite_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage provision\n\nimport (\n\t\"github.com/docker/machine/libmachine/drivers\"\n\t\"github.com/docker/machine/libmachine/ssh\"\n)\n\ntype RedHatSSHCommander struct {\n\tDriver drivers.Driver\n}\n\nfunc (sshCmder RedHatSSHCommander) SSHComman...
go
edit
0
4
apache-2.0
ec4697ea3379b79cef47f50cac44efee283b5ace
gdevillele/docker.github.io,anweiss/docker.github.io,bgokden/machine,docker-zh/docker.github.io,gdevillele/docker.github.io,shin-/docker.github.io,BSWANG/denverdino.github.io,londoncalling/docker.github.io,bdwill/docker.github.io,aduermael/docker.github.io,troy0820/docker.github.io,wzymaster/machine,aduermael/docker.gi...
libmachine/provision/redhat_ssh_commander.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage paths\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/VonC/godbg\"\n\t. \"github.com/smartystreets/goconvey/convey\"\n)\n\nfunc TestArchive(t *testing.T) {\n\n\tConvey(\"Tests for Uncompress\", t, func() {\n\n\t\tConvey(\"Uncompress fail...
go
edit
0
1
mit
44c42ff0f82ea73e4003c137f43cdc31854cc5fe
VonC/senvgo,VonC/senvgo
paths/paths_archives_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage db\n\nimport (\n\t\"database/sql\"\n\t_ \"github.com/go-sql-driver/mysql\"\n\t\"github.com/open-falcon/hbs/g\"\n\t\"log\"\n)\n\nvar DB *sql.DB\n\nfunc Init() {\n\terr := dbInit(g.Config().Database)\n\n\tif err != nil {\n\t\tlog.Fatalf(\...
go
edit
null
null
apache-2.0
9f1516b716a2fdd847eff7cdb85821f85af8a250
Cepave/open-falcon-backend,Cepave/open-falcon-backend,Cepave/hbs,Cepave/open-falcon-backend,Cepave/open-falcon-backend,Cepave/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,Cepave/hbs,masato25/open-falcon-backend,masato25/open-falc...
db/db.go
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"io\"\n)\n\ntype P1 struct {\n\trd *bufio.Reader\n}\n\n// NewReader returns a Reader whose read telegrams from a Reader object.\nfunc NewP1(rd io.Reader) P1 {\n\treturn P1{rd: bufio.NewReader(rd)}\n}\n\...
go
edit
3
1
mit
37bb7e70b0002d30171272ff4c454829c762a79e
OrangeTux/carrot
p1.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"os\"\n\n\t\"github.com/foomo/petze/service\"\n\t\"github.com/foomo/petze/config\"\n\tlog \"github.com/sirupsen/logrus\"\n)\n\nfunc main() {\n\tflag.Usage = usage\n\tflag.Parse()\n\tif flag.NArg() != 1 {...
go
edit
0
3
mit
e5dc220fb707651888fec980944f7b739b59fc02
foomo/petze
petze.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n)\n\nfunc main() {\n\n\tclients := strings.Split(os.Getenv(\"XLANG_CLIENTS\"), \",\")\n\tservers := strings.Split(os.Getenv(\"XLANG_SERVERS\"), \",\")\n\tbehaviors := strings.Split(...
go
edit
0
1
mit
42f7376d6e68381e88650dfc85d5df9b60ac056b
yarpc/crossdock,yarpc/crossdock,crossdock/crossdock,yarpc/crossdock,crossdock/crossdock,crossdock/crossdock
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sysinfo\n\nimport (\n\t\"errors\"\n\t\"io/ioutil\"\n\t\"strings\"\n)\n\nvar (\n\tErrUserNotFound = errors.New(\"user not found\")\n\tErrGroupNotFound = errors.New(\"group not found\")\n\tErrInvalidFileFormat = errors.New(\"inva...
go
edit
0
2
mit
3476e8384df372f4da52951aef0bc363cc6669b1
adrg/sysinfo
utils.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage marvel\n\nimport (\n\t\"flag\"\n\t\"testing\"\n)\n\nvar (\n\tapiKey = flag.String(\"pub\", \"\", \"Public API key\")\n\tsecret = flag.String(\"priv\", \"\", \"Private API secret\")\n)\n\nfunc TestRequest(t *testing.T) {\n\tflag.Parse()\...
go
edit
9
4
apache-2.0
a11f1147c6936eaef4102a4b964aefd19058f44b
ImJasonH/go-marvel
marvel_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/* Copyright (c) 2015, Daniel Martí <<EMAIL>> */\n/* See LICENSE for licensing information */\n\npackage main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"regexp\"\n)\n\nvar regexLink = regexp.MustCompile(\n\t`([^\\s'\"<>\\(\\)]+:(//)?|(h...
go
edit
0
4
bsd-3-clause
237d4b28366a596fc0f325289cae37a9f6f48aca
mvdan/xurls,digideskio/xurls
xurls.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 The LUCI 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
304401ac63884cee76ea44634aa813bc7d117c03
luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go
common/proto/milo/util.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/nightexcessive/websocket\"\n)\n\nfunc testMessage(socket *websocket.WebSocket, message string) {\n\tif err := socket.SendString(\"Hello, World!\"); err != nil {\n\t\tpanic(fmt.Sprintf(\"Erro...
go
edit
0
4
bsd-3-clause
247316c8e57992bf871300fcb2e44dabb2d2f237
gopherjs/websocket,gopherjs/websocket,gopherjs/websocket
example/client/client.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"github.com/waltzofpearls/relay-api/rapi\"\n\nfunc main() {\n\tapi := rapi.New(\"/v1\").\n\t\tsetListenProtocol(\"http\").\n\t\tsetListenAddr(\"localhost:8080\").\n\t\tsetDownstreamProtocol(\"http\").\n\t\tsetDownstreamA...
go
edit
0
1
mit
0c4797c1520bd3d3da36368749b1847b6dac33df
waltzofpearls/relay-api
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage service\n\nimport (\n\t\"strconv\"\n\n\t\"github.com/rancher/norman/types\"\n\t\"github.com/rancher/norman/types/convert\"\n\tv3 \"github.com/rancher/types/client/project/v3\"\n\t\"github.com/sirupsen/logrus\"\n\t\"k8s.io/apimachinery/p...
go
edit
0
2
apache-2.0
a20e4831122d1b8c1b1e944228d0ccc1e23a5b10
rancher/rancher,rancherio/rancher,rancherio/rancher,cjellick/rancher,rancher/rancher,cjellick/rancher,rancher/rancher,cjellick/rancher,rancher/rancher
pkg/api/store/service/service.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\t\"runtime/debug\"\n\t\"time\"\n)\n\nvar PanicDateFormat = \"Jan 2, 2006 at 3:04pm (MST)\"\n\ntype PanicLogger interface {\n\tPrint(v ...interface{})\n}\n\n// Panic returns a handler that...
go
edit
3
4
mit
568c4907fb595dd062f2a06bcdc447a970f7f7ec
urandom/handler
panic.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"go/ast\"\n\t\"go/parser\"\n\t\"go/token\"\n)\n\nfunc validator(name string, s *ast.StructType) {\n\tlog.Print(name)\n\tfor _, fld := range(s.Fields.List) {\n\t\tnam := fld.Names[0].Name\n\t\t...
go
edit
0
7
mit
1f6d2ea7f827e3c56a5df7deae5dfbf73e71f0d8
crunchyroll/govalid
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage imgscale\n\nimport (\n\t\"github.com/stretchr/testify/assert\"\n\t\"testing\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"fmt\"\n)\n\nfunc TestHttpFetchOK(t *testing.T) {\n\tts := httptest.NewServer(http.HandlerFunc(func(w http.Respon...
go
edit
6
1
mit
dbfa1f3a0017dc87d1350bde00c2d18eceb95788
vanng822/imgscale
imgscale/image_provider_http_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package main is used for testing of generated 'views' listing.\n// There is no way to include a new import dynamically, thus\n// we are running this test from generate_test.go\n// as a new command using exec package.\npackage main\n\nimport ...
go
edit
0
4
bsd-2-clause
2cc1fc5e7c6e559c184f918513de3a6e22fdf6f3
goaltools/goal,anonx/sunplate,anonx/sunplate,goaltools/goal,goaltools/goal,anonx/sunplate
generation/testdata/listing/main.go
rejected_duplicate
Near-duplicate of sample 116715
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage pdf\n\nimport \"testing\"\n\n// Unit tests follow\n\nfunc TestIsWhite (t *testing.T) {\n\tfor _,b := range []byte(\"\\000\\t\\n\\f\\r \") {\n\t\tif (!IsWhiteSpace (b)) {\n\t\t\tt.Errorf (\"IsWhiteSpace('\\\\%.3o') failed\", b)\n\t\t}\n\...
go
edit
6
4
apache-2.0
d7a3abab20e990b11d3000e4c57cf28dc649aba2
mawicks/PDFiG
pdf/characters_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\"github.com/albertyw/reaction-pics/server\"\n\t\"github.com/albertyw/reaction-pics/tumblr\"\n\t_ \"github.com/joho/godotenv/autoload\"\n\t\"os\"\n\t\"strings\"\n)\n\nconst readPostsFromTumblrEnv = \"READ_POSTS_FROM_...
go
edit
0
2
mit
422853f483e5b0c5760c8ddc0d6301b5ea3c33a5
albertyw/reaction-pics,albertyw/reaction-pics,albertyw/reaction-pics,albertyw/devops-reactions-index,albertyw/devops-reactions-index,albertyw/devops-reactions-index,albertyw/reaction-pics,albertyw/devops-reactions-index
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage stringset\n\ntype StringSet struct {\n\tstrMap map[string]bool\n}\n\nfunc New(elements ...string) *StringSet {\n\ts := &StringSet{}\n\ts.Clear()\n\tfor _, el := range elements {\n\t\ts.Add(el)\n\t}\n\treturn s\n}\nfunc (s *StringSet) Le...
go
edit
0
2
isc
ce69aa183e6178d35f3a6343c5de252011f578fa
tillberg/stringset
stringset.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage options\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n)\n\nvar (\n\tVerboseClass bool\n\tThreadStackSize uint\n\tAbsJavaHome string // /path/to/jre\n\tAbsJreLib string // /path/to/jre/lib\n)\n\nfunc InitOptions(verboseClass b...
go
edit
0
5
mit
3f0017b58f23e2d8376de07c0bfd62d679f53e1b
zxh0/jvm.go,zxh0/jvm.go,zxh0/jvm.go
jvmgo/options/options.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build amd64,arm64,!darwin,!netbsd,!openbsd\n\npackage goselect\n\n// darwin, netbsd and openbsd uses uint32 on both amd64 and 386\n\nconst (\n\t// NFDBITS is the amount of bits per mask\n\tNFDBITS = 8 * 8\n)\n\n```\n\nApply this change: Fix...
go
edit
0
0
mit
9d6356225769a093a90601efec3edc649dc4b04b
creack/goselect,creack/goselect
fdset_64.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage containers\n\nimport (\n\t\"github.com/fsouza/go-dockerclient\"\n)\n\ntype DockerRuntime struct {\n\tClient *docker.Client\n}\n\nfunc isRelated(volume string, container *docker.Container) bool {\n\tfor _, mount := range container.Mounts...
go
edit
9
6
apache-2.0
0e3de8615db8251e2fd1c197e80d17ff74c8ceb1
ClusterHQ/dvol,ClusterHQ/dvol,ClusterHQ/dvol
pkg/containers/docker.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\"io/ioutil\"\n)\n\ntype Page struct {\n\tTitle string\n\tBody []byte\n}\n\nfunc (p *Page) save() error {\n\tfilename := p.Title + \".txt\"\n\treturn ioutil.WriteFile(filename, p.Body, 0600)\n}\n\nfunc lo...
go
edit
6
2
mit
44b27151d86c9a58b271b7f3bcae6fbd93a8e5a1
tylrtrmbl/gowiki
wiki.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2017 Kumina, https://kumina.nl/\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
42d1c52c12fbabf4cfe5cb795e43642c8c925861
mvtks/nova_exporter,mvtks/nova_exporter,kumina/libvirt_exporter,kumina/libvirt_exporter
libvirt_schema/schema.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage core\n\nimport \"net/http\"\n\ntype handlersStack []func(*Context)\n\nvar handlers handlersStack\n\n// Use adds a handler to the handlers stack.\nfunc Use(h func(*Context)) {\n\thandlers = append(handlers, h)\n}\n\nfunc (h handlersStack...
go
edit
12
1
mit
3d657054638f89a72d55016b16637de71193247a
volatile/core
handlers.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\"github.com/Sirupsen/logrus\"\n\t\"github.com/verath/archipelago/lib\"\n\t\"golang.org/x/net/context\"\n\t\"os\"\n\t\"os/signal\"\n)\n\nfunc main() {\n\tlog := logrus.New()\n\tlog.Level = logrus.DebugLevel\n\tlog.Fo...
go
edit
0
1
mit
03eaf0db4f57a6f17f875a34ac5de26dc5dea0a0
verath/archipelago,verath/archipelago,verath/archipelago
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage config\n\n// The default configuration for windows\nvar DefaultConfig = &Config{\n\tApibase: \"https://mackerel.io\",\n\tRoot: \".\",\n\tPidfile: \"mackerel-agent.pid\",\n\tConffile: \"mackerel-agent.conf\",\n\tRoles: []string{...
go
edit
15
2
apache-2.0
4fe96cf69b5936619f2d82a7a53bdb3d327b29b6
kamatama41/mackerel-agent,yyljlyy/mackerel-agent,kamatama41/mackerel-agent,kamatama41/mackerel-agent,stanaka/mackerel-agent,stanaka/mackerel-agent,mackerelio/mackerel-agent,stanaka/mackerel-agent,yyljlyy/mackerel-agent,mackerelio/mackerel-agent,moznion/mackerel-agent,yyljlyy/mackerel-agent,yyljlyy/mackerel-agent,moznio...
config/config_windows.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package routing contains various functions related to HTTP routing\npackage routing\n\nimport (\n\t\"errors\"\n\t\"strings\"\n)\n\n// getContentType returns the http header safe content-type attribute for the\n// requested path. If the reque...
go
edit
0
8
mit
5055dad156db126036f5456bdb5800fca2782403
Ennovar/gPanel,george-e-shaw-iv/gPanel,george-e-shaw-iv/gPanel,Ennovar/gPanel,george-e-shaw-iv/gPanel,Ennovar/gPanel
general/routing/contentTypes.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage controller\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/rs/xid\"\n)\n\n// RequestID is the unique Request ID for each request\ntype TraceID struct {\n\txid.ID\n}\n\n// StandardResponseFields is meant to be included in all re...
go
edit
3
2
mit
3f7cf73acc9c50675d04443a97012a2131e465ce
gilcrest/go-API-template,gilcrest/go-API-template
controller/controller.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2017 shoarai\n\n// The renfls renames files in a directory.\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\n\t\"github.com/shoarai/renfls\"\n)\n\nconst toDir = \"toSubDirsName\"\n\n// F...
go
edit
0
3
mit
fd730cdde2df3bb3c97bdb1f7cc809a3d8672c6e
shoarai/renfls
cmd/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dotignore\n\nimport (\n\t\"bufio\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/drpotato/dotdot/filesystem\"\n)\n\nvar ignoredFiles map[string]bool\nvar once sync.Once\n\nfunc ShouldIgnore(uri string) bool...
go
edit
0
4
mit
36687dcd97cae1002ff58c457aa054ce00cd7578
drpotato/dotdot
dotignore/dotignore.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"github.com/timakin/ts/loader\"\n\t\"github.com/codegangsta/cli\"\n)\n\nvar Commands = []cli.Command{\n\tcommandAll,\n\tcommandBiz,\n\tcommandHack,\n}\n\nvar commandAll = cli.Command{\n\tName: ...
go
edit
0
2
mit
ded70ace33c11aa33c8c565cbf852b0b31afa055
timakin/ts,timakin/ts
commands.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage parser\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\ntype fragment struct {\n\tpkg string\n\tstatements int\n\tcovered bool\n}\n\nfunc parseLine(raw string) fragment {\n\toutput := fragment{\n\t\tpkg: extractPacka...
go
edit
0
2
apache-2.0
78e5696ce8e138ac98c315a71a4e45f63115558c
corsc/go-tools
package-coverage/parser/line_parser.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/google/go-github/github\"\n)\n\nfunc main() {\n\tclient := github.NewClient(nil)\n\n\tfor i := 0; i < 100; i++ {\n\t\tissue, _, err := client.Issues.Get(\"go-swagger\", \"go-swagger\", i)\n\t\...
go
edit
0
3
mit
25aeea9bf2a9198837ba5f4a8692168f302f86ed
evecon/issuechk,evecon/issuechk
cmd/issuechk/issuechk.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage flak\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/spacemonkeygo/errors\"\n\t\"github.com/spacemonkeygo/errors/try\"\n)\n\n// Runs a function with a tempdir, cleaning up afterward.\nfunc WithDir(f func(string), dirs ...st...
go
edit
0
4
apache-2.0
53083a0be1fd640642c5af472edd04aa4b11c5bd
polydawn/repeatr,subuser-security/repeatr,subuser-security/repeatr,polydawn/repeatr
lib/flak/assist.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build go1.16\n\npackage compiler\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n)\n\n// Version is the GopherJS compiler version string.\nconst Version = \"1.16.0+go1.16.3\"\n\n// GoVersi...
go
edit
0
5
bsd-2-clause
a4630ec28c790dd1be785f097d0268c4aa4a423f
gopherjs/gopherjs,gopherjs/gopherjs,gopherjs/gopherjs,gopherjs/gopherjs,gopherjs/gopherjs
compiler/version_check.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"golang.org/x/crypto/ssh/terminal\"\n\t\"os\"\n)\n\nfunc main() {\n\tif terminal.IsTerminal(int(os.Stdin.Fd())) {\n\t\tprintln(\"Cellophane v0.1 (C) 2015 Sten Linnarsson <http://linnarssonlab.org/>\")\n\...
go
edit
6
5
bsd-2-clause
9045ed8c512d1039716bb8678a514f0ff326db4c
linnarsson-lab/ceftools
cef.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\"errors\"\n\t\"fmt\"\n\t\"log\"\n\t\"os/exec\"\n)\n\n// Iterates over Godep file dependencies and sets\n// the specified version on each of them.\nfunc install() error {\n\tdeps, err := readDepFile()\n\tif err != ni...
go
edit
12
8
bsd-3-clause
49f230e4f80c5c59e4019805cf7c3e58cc9b2b0e
mtibben/gogpm
install.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage bootstrap\n\nimport (\n\t\"fmt\"\n)\n\ntype LogAction struct {\n\tOutput string `json:\"output\"`\n}\n\nfunc init() {\n\tRegister(\"log\", &LogAction{})\n}\n\nfunc (a *LogAction) Run(s *State) error {\n\tfmt.Println(interpolate(s, a.Out...
go
edit
9
1
bsd-3-clause
e3ff85aebc64241dce782336c000242d641803b3
mubassirhayat/flynn,clifff/flynn,GrimDerp/flynn,Brandywine2161/flynn,TribeMedia/flynn,rikur/flynn,lmars/flynn,felixrieseberg/flynn,rikur/flynn,technosophos/flynn,rikur/flynn,felixrieseberg/flynn,TribeMedia/flynn,justintung/flynn,benbjohnson/flynn,Brandywine2161/flynn,whouses/flynn,TribeMedia/flynn,benbjohnson/flynn,ben...
log_action.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage v1alpha1\n\nimport (\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\n// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n\ntype NatsStreamingClusterList struct {\n\tmetav1.TypeMeta `json:\",inline\"`\n\tmeta...
go
edit
0
0
apache-2.0
f1643bddfb247e1b03fd8bf29f67a16b14f8409b
nats-io/nats-streaming-operator,nats-io/nats-streaming-operator
pkg/apis/streaming/v1alpha1/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cli\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cobra\"\n)\n\n// MinRequiredArgs checks if the minimum number of args exists, and returns an\n// error if they do not.\nfunc MinRequiredArgs(args []string, min int, cmd *cobra.Command) ...
go
edit
0
3
apache-2.0
25892d27be5dd10dac694fd4d5ae317882c32fc1
thaJeztah/cli,thaJeztah/cli,gdevillele/cli,dnephin/cli,docker/cli,cpuguy83/cli,ashfall/cli,Zebrilee/cli,Zebrilee/cli,riyazdf/cli,ashfall/cli,dnephin/cli,e11137/cli,redpanda/cli,allencloud/cli,e11137/cli,riyazdf/cli,cpuguy83/cli,allencloud/cli,redpanda/cli,docker/cli
required.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage helper\n\nvar guessExecutableName = \"openvpn\"\nvar guessExecutablePaths = []string{\n\t\"/usr/local/sbin/openvpn\",\n\t\"/Applications/Tunnelblick.app/Contents/Resources/openvpn/openvpn-2.4.*-openssl-1.*/openvpn\",\n\t\"/Applications/...
go
edit
0
0
mit
abffd878585a8cbdea01b3bed40c9eaa5733a35f
dpb587/ssoca,dpb587/ssoca,dpb587/ssoca
service/openvpn/client/helper/executable_finder_darwin.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"os\"\n\t\"regexp\"\n)\n\ntype procfileEntry struct {\n\tName string\n\tCommand string\n\tPort int\n}\n\nfunc parseProcfile(path string, portBase, portStep int) (entries []procfileEntry) {\n\tre, ...
go
edit
12
6
mit
f069298efdd00bce64897b2102d3a19c6477c4c9
DarthSim/hivemind,DarthSim/hivemind
procfile.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage actions\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/deis/helm/log\"\n\t\"github.com/gobuffalo/buffalo\"\n\t\"github.com/gobuffalo/pop\"\n\t\"github.com/kindlyops/mappamundi/havenapi/models\"\n)\n\n// RegistrationHandler accepts json\nfunc ...
go
edit
3
2
apache-2.0
add5260561eef92dbba183921ed616120f178914
kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi
havenapi/actions/registration_funnel.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage rtcp\n\n// RawPacket represents an unparsed RTCP packet. It's returned by Unmarshal when\n// a packet with an unknown type is encountered.\ntype RawPacket []byte\n\n// Marshal encodes the packet in binary.\nfunc (r RawPacket) Marshal() ...
go
edit
15
2
mit
2f2e452896d9e0def81166d170cc73ab7171fba0
pion/rtcp
raw_packet.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage request\n\nimport \"net/http\"\n\nvar DefaultClient = ClientImplementation{http.DefaultClient}\n\ntype Client interface {\n\tGet(string, ...Parameter) (*Response, error)\n}\n\ntype ClientImplementation struct {\n\tHTTPClient *http.Clien...
go
edit
15
3
apache-2.0
e56781078b52807576dfc598eb03765689e3849a
tmrts/flamingo,tmrts/flamingo,maxamillion/flamingo,maxamillion/flamingo
pkg/request/client.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\"net/http\"\n\n\t\"github.com/bigroom/communicator\"\n)\n\nfunc defaultServerHandler(w http.ResponseWriter, r *http.Request) {\n\tcoms := communicator.New(w)\n\n\tresp := struct {\n\t\tServer string `json:\"server\"...
go
edit
3
1
mit
27d580afeaa56d1f4f615dff7a327e6dc80c8220
BigRoom/vision
server_handlers.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage matrix\n\nimport (\n\t\"testing\"\n)\n\nfunc TestIdentity(t *testing.T) {\n\tm := Identity(11)\n\trows, cols := m.Dim()\n\tfor i := 0; i < rows; i++ {\n\t\tfor k := 0; k < cols; k++ {\n\t\t\ta := m.Get(i, k)\n\t\t\tif i == k {\n\t\t\t\t...
go
edit
3
6
bsd-3-clause
20ceab72b2e2702d7b4883bf28d79c910d40464d
ziutek/matrix,ziutek/matrix
matrix_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gfx\n\n// ClearMask represents a bitmask to choose which buffers to clear during a\n// framebuffer clearing operation. It must be one of the predefined constants.\ntype ClearMask int\n\n// Clearing masks to select the color, depth, and ...
go
edit
0
0
bsd-3-clause
ae0dc43daca9932a09cf01d3ee67e5e8ea6b6d55
slimsag/gfx,slimsag/gfx
clearable.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage alita\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n)\n\ntype Aligner struct {\n\tw io.Writer\n\tMargin *Margin\n\tDelimiter *Delimiter\n\tPadding *Padding\n\tlines [][]string\n}\n\nfunc NewAligner(w io....
go
edit
0
3
mit
0c10e8b324e0d06b2e583d0744db0febcef0f321
kusabashira/alita
aligner.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n//+build !windows\n\npackage main\n\nfunc SetupProcessGroup() error {\n\t// nothing to do on other platforms\n}\n\n```\n\nApply this change: Fix build for non-windows platforms" }, { "role": "assistant", "content": "//+build !window...
go
edit
0
1
mit
66fcc5495de6effca67dc5ab0d55e2056470c3f4
itchio/itch,itchio/itch,itchio/itch,itchio/itchio-app,itchio/itch,leafo/itchio-app,itchio/itch,itchio/itchio-app,leafo/itchio-app,itchio/itch,leafo/itchio-app,itchio/itchio-app
integration-tests/processgroup_others.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage fsutil\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nfunc copyToFile(destFilename string, perm os.FileMode, reader io.Reader,\n\tlength uint64) error {\n\ttmpFilename := destFilename + \"~\"\n\tdestFile, err := os.OpenFi...
go
edit
0
4
apache-2.0
a6a42d16f3cb1e84df29aba0d1531d5bfb069b13
rgooch/Dominator,keep94/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator,rgooch/Dominator,keep94/Dominator
lib/fsutil/copy.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage helpers\n\nimport \"github.com/sclevine/agouti\"\n\nfunc AgoutiDriver() *agouti.WebDriver {\n\treturn agouti.PhantomJS()\n}\n\n```\n\nApply this change: Revert \"never use selenium ever\"\n\nThis reverts commit 2b17348c5eb516d3d5b340c8f...
go
edit
0
3
apache-2.0
a9a177733220f910f35c306852332f73c810336e
concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse
helpers/agouti_driver.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\n\t\"github.com/ecc1/medtronic\"\n)\n\nconst (\n\tverbose = false\n)\n\nvar (\n\tsignalChan = make(chan os.Signal, 1)\n)\n\nfunc main() {\n\tpump, err := medtronic.Open()\n\tif er...
go
edit
0
7
mit
268d09ff39fa04f26fae04f688eb935b1962db5e
ecc1/medtronic,ecc1/medtronic
apps/sniff.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/stianeikeland/go-rpio\"\n\t\"os\"\n)\n\nvar (\n\t// Use mcu pin 22, corresponds to GPIO3 on the pi\n\tpin = rpio.Pin(22)\n)\n\nfunc main() {\n\t// Open and map memory to access gpio, check for...
go
edit
9
2
mit
be82a08f8a94f04c2c58939587eb1a7a3c0e47cd
stianeikeland/go-rpio
examples/pullup/pullup.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime/debug\"\n\n\t\"testing\"\n\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/sclevine/agouti\"\n)\n\nconst (\n\tPORT = 9009\n)\n\nvar (\n\tbaseUrl = fmt.Sprintf(\"http://localhost:%v/admi...
go
edit
6
2
mit
e0a0a1014764145b68e0191f2588886a22f40aaf
youprofit/qor,amirrpp/qor,qor/qor,shidao-fm/qor,gavinzhs/qor,codedogfish/qor,codedogfish/qor,shidao-fm/qor,trigrass2/qor,codevlabs/qor,codevlabs/qor,insionng/qor,gavinzhs/qor,strogo/qor,strogo/qor,jmptrader/qor,yanzay/qor,youprofit/qor,lance2088/qor,yanzay/qor,jmptrader/qor,amirrpp/qor,shaunstanislaus/qor,insionng/qor,...
test/integration/setup_integration_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dto\n\n// type MessageIn struct {\n// \tId string `json:\"-\"`\n// \tTopic string `json:\"topic\"`\n// \tPayload string `json:\"payload\"`\n// }\n\n// type MessageOut struct {\n// \tId string `json:\"-\"`\n// \tTopic ...
go
edit
0
0
mit
6df018a222ab835f16b3b59af903c0cebe6f9ce8
jbrodriguez/unbalance,jbrodriguez/unbalance,jbrodriguez/unbalance,jbrodriguez/unbalance
server/src/dto/packet.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage issue\n\nimport \"net/http\"\n\ntype HttpBody struct {\n\tContentEncoding string `json:\"contentEncoding\"`\n\tContent []byte `json:\"content\"`\n}\n\ntype HttpEntity struct {\n\tStatus string `json:\"status\"`\n\tHeader ht...
go
edit
0
0
mit
4e245096a70f2731d03cb79fb9942d062df9e81e
cyberintruder/bearded,bearded-web/bearded,jack51706/bearded,cyberintruder/bearded,jack51706/bearded,cyberintruder/bearded,bearded-web/bearded,jack51706/bearded,cyberintruder/bearded,jack51706/bearded,bearded-web/bearded,bearded-web/bearded
models/issue/vector.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/go-martini/martini\"\n\t\"html/template\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"os\"\n)\n\ntype Human struct {\n\tName string\n\tAge string\n}\n\nfunc main() {\n\tf, err := os.Open(\"/home/us...
go
edit
0
4
apache-2.0
c0885bdf4ad7dc8622133cdc3176c7dca64afa9c
cube2222/GoCode,cube2222/GoCode
src/Martini/Templates.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage geocodio\n\nimport (\n\t\"errors\"\n)\n\nconst (\n\t// GeocodioAPIBaseURLv1 is the Geocod.io Base URL\n\tGeocodioAPIBaseURLv1 = \"https://api.geocod.io/v1.5\"\n)\n\n// NewGeocodio is a helper to create new Geocodio pointer\nfunc NewGeoc...
go
edit
18
6
mit
8e4f6b4578486663193ef76d6aa6be42bbbc0709
stevepartridge/geocodio
geocodio.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage stats\n\ntype SingleStat struct {\n\tTotalGB float32\n\tUsedGB float32\n\tAvailableGB float32\n\tUsagePercentage float32\n}\n\ntype MultipleStat struct {\n\tAverageUsagePercentage float32\n\tUsagePercentagePerCore []float32\n}\n\n```\n\...
go
edit
0
0
mit
6b1ce991282be24d4a112cd5a20a0ed476a834c1
julianespinel/mbu
stats/stats.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage api\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/pkg/errors\"\n\t\"github.com/pterodactyl/sftp-server\"\n)\n\nfunc (r *PanelRequest) ValidateSftpCredentials(request sftp_server.AuthenticationRequest) (*sftp_server.AuthenticationResp...
go
edit
0
6
mit
e2c04cc6f52c9e97ae01e2d4540fa0450f24d16c
Pterodactyl/wings,Pterodactyl/wings
api/sftp_endpoints.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage plugin\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/pkg/errors\"\n)\n\ntype metaDataStore struct {\n\tdir string\n\tinstallTarget *installTarget\n}\n\nvar errDisaleMetaDataStore = errors.New(\"...
go
edit
6
3
apache-2.0
d9fc6d9455e6977c61ef04eb5d0ebbeb8ad1f321
mackerelio/mkr,mackerelio/mkr
plugin/meta_data_store.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage matching\n\nimport \"github.com/SpectoLabs/hoverfly/core/state\"\n\nfunc StateMatcher(currentState *state.State, requiredState map[string]string) *FieldMatch {\n\n\tscore := 0\n\tmatched := true\n\n\tif requiredState == nil || len(requi...
go
edit
9
6
apache-2.0
bc0237986cbbbf3a36436e16c103ca18918bc907
SpectoLabs/hoverfly,SpectoLabs/hoverfly
core/matching/state_matcher.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !openbsd\n// +build !windows\n\npackage restic\n\nimport (\n\t\"restic/errors\"\n\t\"syscall\"\n\n\t\"github.com/pkg/xattr\"\n)\n\n// Getxattr retrieves extended attribute data associated with path.\nfunc Getxattr(path, name string) (...
go
edit
0
3
bsd-2-clause
e9d939ff2d11c7da123bc2d20bb9f096b5482124
fawick/restic,kurin/restic,middelink/restic,middelink/restic,fawick/restic,jayme-github/restic,restic/restic,kurin/restic,ar-jan/restic,jayme-github/restic,restic/restic,ar-jan/restic
src/restic/node_xattr.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage config\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\nfunc createOrOpenLockedFile(name string) (file *os.File, err error) {\n\tif _, err := os.Stat(name); os.IsNotExist(err) {\n\t\tfile, err = os.Create(name)\n\t} else {\n\t\tfile, err = os...
go
edit
6
4
mit
bed13b0916edd31ad1e85bd74bea71dd8b4276fb
gsamokovarov/jump
config/file.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) 2015, Peter Mrekaj. All rights reserved.\n// Use of this source code is governed by a MIT-style\n// license that can be found in the LICENSE.txt file.\n\npackage heaps\n\n// reverseInts reverse elements of an[i:j] in an.\nfunc ...
go
edit
3
8
mit
bcd7c4daca17f42756441eb65868e9fabc74cbd7
mrekucci/epi,mrekucci/epi
heaps/sortk.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage core\n\nimport (\n\t\"fmt\"\n)\n\n// writer points a shared state. sharedStateSink will point to the same shared state\n// even after the state is removed from the context.\ntype sharedStateSink struct {\n\twriter Writer\n}\n\n// NewSha...
go
edit
null
null
mit
d88dcee9fe7c3852bb240e1ac70ef62d3bb67767
sensorbee/sensorbee,sensorbee/sensorbee
core/shared_state_sink.go
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "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...
go
edit
0
0
mit
0e1c34ad3af773d7fe8399bbcd0181d471949566
ninjasphere/go-ninja,ninjasphere/go-ninja
model/Site.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage setting\n\nimport (\n\t\"os\"\n\n\t\"github.com/rancher/norman/store/transform\"\n\t\"github.com/rancher/norman/types\"\n\t\"github.com/rancher/rancher/pkg/settings\"\n)\n\nfunc New(store types.Store) types.Store {\n\treturn &transform....
go
edit
0
4
apache-2.0
adfaa0fff200b4dfcab7c6c92b88359e02cdc497
rancherio/rancher,rancher/rancher,rancherio/rancher,rancher/rancher,cjellick/rancher,rancher/rancher,rancher/rancher,cjellick/rancher,cjellick/rancher
pkg/api/store/setting/store.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage xing\n\n// Constants\nconst (\n\t// Type\n\tCommand = \"command\"\n\tEvent = \"event\"\n\tResult = \"result\"\n\n\t// Event\n\tRegister = \"Register\"\n\n\t// Exchanges\n\tRPCExchange = \"xing.rpc\"\n\tEventExchange = \"xing.event\...
go
edit
0
0
apache-2.0
95b411440e30d025fbf5b69954b7ae9acef220f0
wzhliang/xing
constants.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage monk\n\nimport (\n\t\"fmt\"\n)\n\ntype Resolution struct {\n\tResolved []string\n\tSeen []string\n}\n\n// Resolve the asset at assetPath and its dependencies.\n//\n// TODO should return error\nfunc (r *Resolution) Resolve(assetPath ...
go
edit
3
6
mit
cf34b6ba08cd5c5350c1529d60c4488fed3080b2
jim/monk,jim/monk
resolution.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package proto contains protocol buffers that are exchanged between the client\n// and server.\n//\n// Generating Protocol Buffer Code\n//\n// Anytime the Protocol Buffer definitions change, the generated Go code must be\n// regenerated. This...
go
edit
0
0
apache-2.0
a387b0a70af7f9a02db2d28114c2082aa978774d
google/go-tpm-tools,google/go-tpm-tools,google/go-tpm-tools
proto/doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cli\n\nimport \"sort\"\n\n// flagMap is a map of flags with the name as a string key\ntype flagMap map[string]*Flag\n\nfunc (fm flagMap) Merge(fm2 flagMap) flagMap {\n\tfor k, v := range fm2 {\n\t\tfm[k] = v\n\t}\n\treturn fm\n}\n\nfunc...
go
edit
0
5
mit
f4a00633ae215b8bcdb5554b7469db925d47a473
jwaldrip/odin
cli/FlagMap.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// © 2012 Jay Weisskopf\n\npackage pty\n\n// #include <stdlib.h>\n// #include <fcntl.h>\nimport \"C\"\n\nimport \"os\"\n\nfunc Open() (ptm *os.File, ptsName string, err error) {\n\n\tptmFd, err := C.posix_openpt(C.O_RDWR | C.O_NOCTTY)\n\tif err...
go
edit
3
5
mit
c1d22f5343ca271efa490ddbb5dbf43dee43e7e6
jayschwa/go-pty
pty_posix.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build go1.7\n\npackage providertests\n\nimport (\n\t\"testing\"\n\n\tsaml2 \"github.com/russellhaering/gosaml2\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc ExerciseProviderTestScenarios(t *testing.T, scenarios []ProviderTestScena...
go
edit
3
5
apache-2.0
d4877bef50e73ad39bea7207f29aa5572f640ebc
russellhaering/gosaml2,russellhaering/gosaml2
providertests/exercise.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage helpers\n\nimport (\n\t\"runtime\"\n)\n\nfunc IsWindows() bool {\n\treturn runtime.GOOS == \"windows\"\n}\n\n```\n\nApply this change: Add helper Skip test if OS is Windows\n\ncontext: https://www.pivotaltracker.com/story/show/167232547...
go
edit
3
2
apache-2.0
269ac84b5d1905c513554f6d5d5c5725c172e9f6
cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli
integration/helpers/os.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage lib\n\nimport (\n\t. \"github.com/smartystreets/goconvey/convey\"\n\t\"testing\"\n)\n\nfunc TestRandomIds(t *testing.T) {\n\tConvey(\"Given a random identifier\", t, func() {\n\t\ts := RandomIdentifier()\n\t\tConvey(\"Then it is a strin...
go
edit
9
1
apache-2.0
b38092eb8072dea71233f873e9ebdf6304dc1093
involucro/involucro,thriqon/involucro
lib/rand_id_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage arbreader\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\t\"strings\"\n\n\t\"github.com/juju/errgo\"\n)\n\ntype Message struct {\n Key string\n Type string\n Extended map[string]string\n Description string\n}\n\nfunc Read(reader io.Re...
go
edit
3
6
mit
08d8c25446fcd2d3f1098519200921aa7a2db042
altipla-consulting/arb-reader
arbreader/reader.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)\n\nconst CompareAndSwapUsage = `usage: etcdctl [etcd flags] compareAndSwap <key> <value> [testAndSet flags]\neither prevValue or prevIndex needs to be given\nspecial flags: --ttl to set a key w...
go
edit
15
3
apache-2.0
2d199bd634527e24e86fac93a2625b7851df7785
jakubigla/etcdctl,jakubigla/etcdctl
compare_and_swap.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage data\n\nimport (\n\t\"time\"\n\n\t\"gopkg.in/mgo.v2\"\n\t\"gopkg.in/mgo.v2/bson\"\n)\n\ntype Project struct {\n\tID bson.ObjectId `bson:\"_id\"`\n\tName string `bson:\"name\"`\n\tOwnerId bson.ObjectId `bson...
go
edit
9
3
bsd-3-clause
11fa08e8ec1cf16f9533cca9df7b379934af5063
FurqanSoftware/papyrus,FurqanSoftware/papyrus,FurqanSoftware/papyrus
data/project.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2017-2020 The Usacloud 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// ...
go
edit
0
0
apache-2.0
d904cf0beee88aeb9a4094ec119de958621b1856
sacloud/usacloud,yamamoto-febc/usacloud,yamamoto-febc/usacloud,sacloud/usacloud
pkg/cmd/commands/bridge/resource.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
76a53b903b1cd44c867b5580f2a7dd34ca5f52e1
scritch007/go-tools
tools.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage migrate\n\ntype rev20140522205400 struct{}\n\nvar SaveDroneYml = &rev20140522205400{}\n\nfunc (r *rev20140522205400) Revision() int64 {\n\treturn 20140522205400\n}\n\nfunc (r *rev20140522205400) Up(mg *MigrationDriver) error {\n\t_, err...
go
edit
6
1
apache-2.0
632b61adbffc472e3f0742ccc98aaed2a9577437
fracting/drone,nevermosby/drone,donatj/drone,mercadolibre/drone,PermissionData/drone,depay/drone,alphagov/drone,mikaelhg/drone,arobson/drone,kausdev/drone,pombredanne/drone,gregory90/drone,jgoldfar/drone,simonoff/drone,k2wanko/drone,Dataman-Cloud/drone,simonoff/drone,hkjn/drone,vaijab/drone,alphagov/drone,reinbach/dron...
pkg/database/migrate/20140522205400_save_drone_yml.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage iter\n\n// Callback receives a value and returns true if another value should be\n// received or false to stop iteration.\ntype Callback func(value interface{}) (more bool)\n\n// Func iterates by calling Callback for each of its values....
go
edit
0
3
mit
82a06684e1c9389b96ef98ad8caad5f455103e94
anacrolix/missinggo
iter/func.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage intern\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\t\"sync/atomic\"\n\t\"unsafe\"\n)\n\ntype sbwriter interface {\n\tWriteByte(byte) error\n\tWriteString(string) (int, error)\n}\n\nfunc (ctx *Context) WriteTo(rawwr io.Writer) error {\n\tw, ok ...
go
edit
15
6
mit
66cd6ff8f6f3ba914df6bc7fa3359e50077ef3c3
taruti/intern
io.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\tlog \"github.com/sirupsen/logrus\"\n\t\"github.com/urfave/cli\"\n\t\"time\"\n)\n\nfunc RunPeriodically(c *cli.Context) error {\n\n\tlog.SetFormatter(_makeFormatter(c.String(\"format\")))\n\n\tlog.WithFields(log.Field...
go
edit
0
3
apache-2.0
98e8d99412bb14c8b70a45d35a92e77948910c55
qualimente/heartbeat
heartbeat.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage compress\n\nimport \"bytes\"\nimport \"strconv\"\n\nfunc compress(uncompressed string) string {\n\tvar buf bytes.Buffer\n\n\tif len(uncompressed) == 0 {\n\t\treturn buf.String()\n\t}\n\n\tvar prev byte\n\tletter := uncompressed[0]\n\tla...
go
edit
0
4
apache-2.0
9b68793a42b82fe00b6cba6dac10676cc9f52624
armiller/puzzles,armiller/puzzles
compression/compress.go
accepted
null
true