messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2019 The Wuffs 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// https://w... | go | edit | 3 | 3 | apache-2.0 | eac65a0084f6e99cbebbbcd24ca71851b74643e9 | google/wuffs,google/wuffs,google/wuffs,google/wuffs,google/wuffs | lib/raczlib/make_cgo.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage materials\n\nimport (\n\t\"os\"\n)\n\ntype MaterialsCommons struct {\n\tuser *User\n\tbaseUri string\n}\n\nfunc NewMaterialsCommons(user *User) *MaterialsCommons {\n\tmcurl := os.Getenv(\"MCURL\")\n\tif mcurl == \"\" {\n\t\tmcurl = \... | go | edit | 6 | 2 | mit | f1a872cbe5c89238a1fd27f583a4a625af42f055 | materials-commons/materials,materials-commons/materials | mcurl.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 Keybase, Inc. All rights reserved. Use of\n// this source code is governed by the included BSD license.\n\npackage libkb\n\nimport (\n\t\"fmt\"\n)\n\n// NOTE: This file is the source of truth for our version number, but we hav... | go | edit | 0 | 1 | bsd-3-clause | f8d9daefdc3201c718381e0106f1a748fc4fe73d | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client | go/libkb/version.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// gddoexp is a command line tool crated to list eligible packages for\n// archiving in GoDoc.org\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n\t\"path\"\n\n\t\"github.com/golang/gddo/database\"\n\t\"github.com/gregjones/http... | go | edit | 0 | 6 | mit | 73cdd9abbac2696f4cb6df9f235dbd91a261fd73 | rafaeljusto/gddoexp | cmd/gddoexp/gddoexp.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2017 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 | 5c817a75b291ed88406ff259ed72c4f774decde5 | kubernetes/apiextensions-apiserver,kubernetes/apiextensions-apiserver | pkg/apis/apiextensions/v1beta1/doc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage read\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\n\t\"github.com/go-task/task/internal/taskfile\"\n\n\t\"gopkg.in/yaml.v2\"\n)\n\n// Taskfile reads a Taskfile for a given directory\nfunc Taskfile(dir string) (... | go | edit | 0 | 7 | mit | 08263c059743d87503b8004a951d2ec90bcc71ed | go-task/task,go-task/task | internal/taskfile/read/taskfile.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage config\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestTrackIgnoreString(t *testing.T) {\n\ttrack := &Track{\n\t\tIgnorePatterns: []string{\n\t\t\t\"con[.]txt\",\n\t\t\t\"pro.f\",\n\t\t},... | go | edit | 3 | 3 | mit | 3f37792b1335cf3e0a31f55f3b33840d6c760688 | exercism/cli,exercism/cli | config/track_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 Eleme Inc. All rights reserved.\n\npackage metric\n\n// Metric with name and value\ntype Metric struct {\n\tName string // metric name\n\tStamp uint64 // metric timestamp\n\tValue float64 // metric value\n\tScore float6... | go | edit | 0 | 1 | mit | a5cc9d72c04020ace62ab9d59ba46a269857f889 | facesea/banshee,eleme/banshee,facesea/banshee,facesea/banshee,eleme/banshee,eleme/banshee,eleme/banshee,eleme/banshee,facesea/banshee | metric/metric.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/**\n * Definition for singly-linked list.\n * type ListNode struct {\n * Val int\n * Next *ListNode\n * }\n */\nfunc addTwoNumbers(l1 *ListNode, l2 *ListNode) *ListNode {\n\tp := new(ListNode)\n\tdump := p\n\tl1_val, l2_val, c, sum := ... | go | edit | 0 | 6 | mit | d71de790d449a80a283ae6c0c88ee277182d33af | Chasego/cod,Chasego/codi,Chasego/codirit,Chasego/codi,Chasego/cod,Chasego/codirit,Chasego/codirit,Chasego/codi,Chasego/codirit,Chasego/cod,Chasego/codi,Chasego/cod,Chasego/codi,Chasego/cod,Chasego/codirit | leetcode/002-Add-Two-Numbers/go/Solution.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage client\n\nimport (\n\t\"code.google.com/p/go-uuid/uuid\"\n\n\t\"github.com/dnaeon/gru/minion\"\n)\n\ntype Client interface {\n\t// Submits a new task to a minion\n\tSubmitTask(minion uuid.UUID, task MinionTask) error\n}\n\n```\n\nApply ... | go | edit | 0 | 0 | mit | 5b5dcf2405100a9f87dab83babff4488aa57073d | ranjithamca/gru | client/client.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"github.com/gorilla/mux\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\trouter := mux.NewRouter().StrictSlash(true)\n\trouter.HandleFunc(\"/\", HelloWeave)\n\trouter.HandleFu... | go | edit | 0 | 4 | apache-2.0 | 4c7d1c1985ab9e2d686ee79007dce14c1139b298 | pierreozoux/guides,spacediver/guides,pierreozoux/guides,fintanr/weave-gs,jjperezaguinaga/guides,jjperezaguinaga/guides,kikkomep/guides,kikkomep/guides,kikkomep/guides,pierreozoux/guides,pessoa/guides,jjperezaguinaga/guides,fintanr/weave-gs,kikkomep/guides,spacediver/guides,kikkomep/guides,spacediver/guides,pierreozoux/... | weave-loadbalance/example/src/myip/myip.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage task\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\t\"text/tabwriter\"\n)\n\n// PrintTasksHelp prints help os tasks that have a description\nfunc (e *Executor) PrintTasksHelp() {\n\ttasks := e.tasksWithDesc()\n\tif len(tasks) == 0 {\n\t\treturn\... | go | edit | 6 | 3 | mit | 7457b3668b9902d4f90fde9e171c3dd4b23792c8 | go-task/task,go-task/task | help.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage rpc\n\nimport (\n\tviper \"github.com/spf13/viper\"\n\n\tlog \"github.com/Cepave/open-falcon-backend/common/logruslog\"\n\tnqmService \"github.com/Cepave/open-falcon-backend/common/service/nqm\"\n)\n\nvar logger = log.NewDefaultLogger(\... | go | edit | 3 | 3 | apache-2.0 | ee0e35de0d1f0a617bcefcd586c502ea90964960 | Cepave/open-falcon-backend,masato25/open-falcon-backend,Cepave/open-falcon-backend,Cepave/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,Cepave/open-falcon-backend,Cepave/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,masato25/open-falcon-backend,Cepave/open... | modules/hbs/rpc/package.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package config allows for reading configuration from a JSON file\npackage config\n\nimport (\n\t\"encoding/json\"\n\t\"io/ioutil\"\n)\n\nvar conf *Config\n\ntype (\n\t// Config struct holds data from a JSON config file\n\tConfig struct {\n\t... | go | edit | 6 | 4 | apache-2.0 | 7c9c0a870be008050f74c156e64273b17bcf1161 | mistifyio/mistify-operator-admin | config/config.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage window\n\nimport \"github.com/oakmound/oak/v2/alg/intgeom\"\n\ntype Window interface {\n\tSetFullScreen(bool) error\n\tSetBorderless(bool) error\n\tSetTopMost(bool) error\n\tSetTitle(string) error\n\tSetTrayIcon(string) error\n\tShowNot... | go | edit | 0 | 0 | apache-2.0 | be73da58aa89a35541c04b042b9ddb17c947a710 | oakmound/oak,oakmound/oak,oakmound/oak | window/window.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (C) 2015 Thomas de Zeeuw.\n//\n// Licensed onder the MIT license that can be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\nconst (\n\tportDesc = \... | go | edit | 0 | 5 | mit | b6652b04b20f1387f8988fb6c9c2da1838fd383b | Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools,Thomasdezeeuw/tools | serve/serve.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage core_test\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/pivotal-cf-experimental/destiny/core\"\n\t. \"github.com/pivotal-cf-experimental/gomegamatchers\"\n\t\"gopkg.in/yaml.v2\"\n)\n\nvar _ ... | go | edit | 18 | 1 | apache-2.0 | 2f411b9a125577812a1696af899c7ba7fedbf372 | pivotal-cf-experimental/destiny,pivotal-cf-experimental/destiny | core/manifest_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage client\n\nimport (\n\t\"context\"\n\n\t\"github.com/sethvargo/go-envconfig\"\n)\n\ntype Env struct {\n\tLoginAuthURL string `env:\"TELEPRESENCE_LOGIN_AUTH_URL,default=https://auth.datawire.io/auth\"`\n\tLoginTokenURL string `... | go | edit | 3 | 2 | apache-2.0 | 863dfc20ff4f2388ece05092115f0b9e2f0740ae | datawire/telepresence,datawire/telepresence,datawire/telepresence | pkg/client/envconfig.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage rdbtools\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\ntype KeyObject struct {\n\tExpiryTime time.Time\n\tKey interface{}\n}\n\nfunc NewKeyObject(key interface{}, expiryTime int64) KeyObject {\n\tk := KeyObject{\n\t\tKey: key,\n\t}\n\... | go | edit | 6 | 2 | mit | b1f08bcbc8e7880ea81a030e679a6bc779daba08 | vrischmann/rdbtools | key.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage atom_test\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/mmcdole/gofeed/atom\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\n// Tests\n\nf... | go | edit | 0 | 3 | mit | b7a5fbfb72860baabe2a27ff38a6e637258ea2a4 | mmcdole/gofeed | atom/parser_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage release\n\nimport (\n\t\"time\"\n\n\t\"github.com/go-kit/kit/log\"\n\n\t\"github.com/weaveworks/flux/update\"\n)\n\ntype Changes interface {\n\tCalculateRelease(update.ReleaseContext, log.Logger) ([]*update.ServiceUpdate, update.Result,... | go | edit | 6 | 2 | apache-2.0 | c07105554ec716ccf43c1f7985286b677bd5da4e | weaveworks/flux,squaremo/flux,squaremo/flux,weaveworks/flux | release/releaser.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/influxdata/chronograf\"\n)\n\n// Logger is middleware that logs the request\nfunc Logger(logger chronograf.Logger, next http.Handler) http.Handler {\n\tfn := func(w http.ResponseWrite... | go | edit | 0 | 1 | mit | 43ee0e4baf2bac1ee72a55d4f9568e2d725e302a | li-ang/influxdb,influxdata/influxdb,influxdata/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,li-ang/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influ... | server/logger.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main \n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello!\")\n}\n```\n\nApply this change: Solve first problem with Go"
},
{
"role": "assistant",
"content": "package main \n\nimport \"fmt\"\n\nfunc main() {\n\tmultipl... | go | edit | 0 | 6 | mit | e65a1bc071a31f83e563e4a6853d19a33c110faa | krasun/ProjectEulerSolutions | go/1/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage plex\n\nimport (\n\t\"testing\"\n)\n\nfunc TestCreateURI(t *testing.T) {\n\ttype args struct {\n\t\tserver Host\n\t\tpath string\n\t\ttoken string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\twant string\n\t}{\n\t... | go | edit | 12 | 2 | mit | 5d20e0bd09da8d1b5349b0e55ea2ffaa366b14b8 | danstis/Plex-Sync,danstis/Plex-Sync,danstis/Plex-Sync | plex/server_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage api\n\n// InstanceConsoleControl represents a message on the instance console \"control\" socket.\n//\n// API extension: instances\ntype InstanceConsoleControl struct {\n\tCommand string `json:\"command\" yaml:\"command\"`\n\... | go | edit | 0 | 0 | apache-2.0 | e2aaaaccc615c0757a48d22b17e88f8baddaaf8f | lxc/lxd,hallyn/lxd,lxc/lxd,lxc/lxd,hallyn/lxd,lxc/lxd,stgraber/lxd,hallyn/lxd,stgraber/lxd,lxc/lxd,atxwebs/lxd,stgraber/lxd,atxwebs/lxd,hallyn/lxd,hallyn/lxd,atxwebs/lxd,lxc/lxd,atxwebs/lxd,stgraber/lxd,hallyn/lxd,stgraber/lxd,lxc/lxd,stgraber/lxd,stgraber/lxd | shared/api/instance_console.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/xml\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestStraingToVoiceMailResponse(t *testing.T) {\n\trecorder := httptest.NewRecorder()\n\tStraightToVoiceMai... | go | edit | 3 | 5 | mit | f3f3c289d594896d62d3f62c23c6cbc87ab9b90d | antontsv/twilio | main_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage microsoft\n\n// func TestTranslate(t *testing.T) {\n// \tapi := NewTranslator(\"\", \"\")\n\n// \toriginal := \"dog\"\n// \ttranslation, err := api.Translate(original, \"en\", \"de\")\n\n// \tif err != nil {\n// \t\tt.Errorf(\"Unexpecte... | go | edit | 6 | 6 | apache-2.0 | ed45ca9d1da5064115add1172d59d7ea04e5237d | holygeek/translator,st3v/translator | microsoft/api_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package flight_test\npackage flight_test\n\nimport (\n\t\"log\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/blue-jay/blueprint/lib/env\"\n\t\"github.com/blue-jay/blueprint/lib/flight\"\n)\n\n// TestRace tests for race condition... | go | edit | 0 | 2 | mit | f1d0cf0d906a3ed9543b64fdf7f4cfc0d4c35869 | arapov/pile,blue-jay/blueprint,blue-jay/blueprint,arapov/pile | lib/flight/flight_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\tfastping \"github.com/tatsushid/go-fastping\"\n)\n\ntype PingCheck struct {\n\tHost string\n}\n\nfunc ParsePingCheck(data map[string]interface{}) PingCheck {\n\tcheck :=... | go | edit | 0 | 2 | mit | cb16353e358ef615b77cdc1b1f33b81444526383 | sosedoff/howdy | pingcheck.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage version\n\nimport (\n\t\"testing\"\n)\n\nfunc TestVersioning(t *testing.T) {\n\tif !NewVersionAvailable(\"v0.1.0\") {\n\t\tt.Error(\"should be a version newer than v0.1.0\")\n\t}\n}\n\n```\n\nApply this change: Fix version check test to... | go | edit | 0 | 2 | mit | 6ad242e0633e22f1fd16c28200b33e37cd8dedde | tardisx/discord-auto-upload,tardisx/discord-auto-upload,tardisx/discord-auto-upload | version/version_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage scipipe\n\nimport (\n\t\"github.com/stretchr/testify/assert\"\n\tt \"testing\"\n)\n\nfunc testAddProcesses(t *t.T) {\n\tproc1 := NewBogusProcess()\n\tproc2 := NewBogusProcess()\n\tpipeline := NewPipeline()\n\tpipeline.AddProcesses(proc1... | go | edit | 6 | 1 | mit | 1c3a0a7136cb9d5cb46779462651e38fa86880c7 | scipipe/scipipe,scipipe/scipipe,samuell/scipipe | pipeline_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage trello\n\nimport (\n\t\"github.com/joonasmyhrberg/go-trello\"\n)\n\ntype TrelloConfig struct {\n\tKey string\n\tToken string\n\tUser string\n}\n\nvar trelloClient *trello.Client\nvar trelloConfig TrelloConfig\n\nfunc Authenticate(con... | go | edit | 9 | 1 | mit | a5f492da66dc7960cf1fc58f30cca6b280335dbf | HeiaHeia/trello-bot | trello/client.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2017 The go-interpreter 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 disasm\n\nimport (\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n)... | go | edit | 0 | 2 | bsd-3-clause | d34c07302a1e9e6cfe521401ec428c6d2852600a | go-interpreter/wagon,go-interpreter/wagon | disasm/log.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build !windows\n\npackage commands\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n)\n\nfunc tarStreamFrom(workDir string, paths []string) (io.ReadCloser, error) {\n\tvar archive io.ReadCloser\n\n\tif tarPath, err := exec.LookPat... | go | edit | 3 | 5 | apache-2.0 | fcd99fde7caba395745ccaeb4ee21c8e82005707 | cjcjameson/fly,simonjjones/fly,zachgersh/fly,zachgersh/fly,cjcjameson/fly | commands/tar_stream.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage models\n\nimport (\n \"github.com/revel/revel\"\n \"time\"\n)\n\ntype Thread struct {\n ThreadId int\n UserId int\n Topic string\n\n // Transient\n Thread *Thread\n User *User\n}\n\n```\n... | go | edit | 6 | 0 | mit | c6186a66808a098b0b754d090cb4b3c593e87437 | bahlo/godisc,bahlo/godisc,bahlo/godisc | app/models/thread.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage autoload\n\n/*\n To use autoload, import the package like so:\n import _ \"github.com/jpfuentes2/env.go/autoload\"\n\n Importing this package will automatically source the `pwd`/.env file and set\n each environment variable.\n\n... | go | edit | 3 | 1 | mit | 2232083ff80d6a97ab14443cef1c520642f6e25e | jpfuentes2/go-env | autoload/autoload.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage singularity\n\nimport (\n\t\"github.com/opentable/sous/ext/docker\"\n\t\"github.com/opentable/sous/lib\"\n)\n\n// DummyNameCache implements the Builder interface by returning a\n// computed image name for a given source version\ntype Du... | go | edit | 9 | 1 | mit | 63ea11911b7d72b41e02144514f5c5bc66413ccd | opentable/sous,opentable/sous,nyarly/sous,samsalisbury/sous,opentable/sous,opentable/sous,samsalisbury/sous,samsalisbury/sous,nyarly/sous,samsalisbury/sous,samsalisbury/sous,opentable/sous,nyarly/sous | ext/singularity/dummy_registry.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage geocoder\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nconst (\n\tcity = \"Seattle\"\n\tstate = \"WA\"\n\tpostalCode = \"98104\"\n\tseattleLat = 47.603561\n\tseattleLng = -122.329437\n)\n\nfunc TestGeocode(t *testing.T) {\n\tqu... | go | edit | 6 | 4 | mit | 33687eb78acee1009f7a026a59f46781b5360e79 | rafaeljribeiro/geocoder,jasonwinn/geocoder,stanim/geocoder | geocoder_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2016 The Gosl Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build !windows,!darwin\n\npackage h5\n\n/*\n#cgo CFLAGS: -I/usr/include/hd... | go | edit | 0 | 0 | bsd-3-clause | 6cd6cfc43b2355272a0e5c22f24d78aba1d6c438 | cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl | io/h5/flags.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage flow\n\nimport (\n\t\"fmt\"\n\n\t\"go/types\"\n\n\t\"github.com/dustin/go-humanize\"\n)\n\nfunc cardinalityMismatchError(source, dest ComponentID, sourceSig, destSig *types.Tuple) error {\n\treturn fmt.Errorf(`\nAs I infer the types of ... | go | edit | 0 | 1 | mit | 1b6d552c0eb9a01e24ec4ac607ee4ae9cd547f2c | Logiraptor/oak | flow/type_errors.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// (c) 2019-2020, Ava Labs, Inc. All rights reserved.\n// See the file LICENSE for licensing terms.\n\n// For ease of implementation, our database's interface matches Ethereum's\n// database implementation. This was to allow use to use Geth cod... | go | edit | 6 | 0 | bsd-3-clause | 650103b77015147b18ff640e566937b68ef35db3 | ava-labs/avalanchego,ava-labs/avalanchego | database/batch.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage rtypes\n\nimport (\n\t\"github.com/robloxapi/types\"\n)\n\ntype NilType struct{}\n\nvar Nil NilType\n\nfunc (NilType) Type() string {\n\treturn \"nil\"\n}\n\nfunc (NilType) String() string {\n\treturn \"nil\"\n}\n\nfunc (n NilType) Copy... | go | edit | 0 | 1 | mit | edf8e17e34de5e0c8266dd65abe4d1803a2dbf98 | Anaminus/rbxmk,Anaminus/rbxmk | rtypes/nil.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 The tgbot 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 commands\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"regexp\"\n\t\"strings\... | go | edit | 3 | 1 | bsd-3-clause | e9b6a46ddb79f0d45ff42128985e531a21871cfa | jroimartin/tgbot | commands/echo.go | accepted | null | 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 | 6 | 1 | bsd-3-clause | 622a6679403dd07c987d8b148e41d54d557ed185 | abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go | test/bugs/bug125.go | rejected_lint | Too many lint violations: 6 | 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\nconst none = 0 // same const identifie... | go | edit | 6 | 0 | bsd-3-clause | ed1eb770f0ec882af805b452c904f29db6050110 | npe9/noahevans-go9,webfd/go-zh,npe9/noahevans-go9,npe9/noahevans-go9,scirelli/scirelli-go,webfd/go-zh,rdp/rogerpack2005-golang,Triskite/willstone-goclone,bryanxu/go-zh,bryanxu/go-zh,d0f/go-zh,rflanagan/reginaldflanagan-project1,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,webfd/go-zh,d0f/go-zh,scirelli/s... | test/bugs/bug126.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gorobdd\n\nimport (\n\t\"fmt\"\n\t//\"testing\"\n)\n\nfunc ExampleReduceTrivial() {\n\tfmt.Println(Reduce(True([]string{})))\n\tfmt.Println(Reduce(False([]string{})))\n\tfmt.Println(Reduce(True([]string{\"a\"})))\n\tfmt.Println(Reduce(F... | go | edit | 12 | 1 | mit | 26737e00309e305db76a04c734a947ebb8be58d8 | callpraths/gorobdd | reduce_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage apps\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t. \"github.com/vito/cmdtest/matchers\"\n\n\t. \"github.com/pivotal-cf-experimental/cf-acceptance-tests/helpers\"\n)\n\nvar _ = Describe(\"An application... | go | edit | 0 | 1 | apache-2.0 | 1e4d853beea3c39f845b403ed620703cc5ba9260 | matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests,matt-royal/cf-acceptance-tests | apps/staging_log_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage chessboard\n\nimport \"fmt\"\n\nfunc PrintChessboard() {\n\tfmt.Print(\" \")\n\tfor i := 0; i < 8; i++ {\n\t\tfmt.Printf(\" %c\", 'a'+i)\n\t}\n\tfmt.Println()\n\n\tfor i := 0; i < 8; i++ {\n\t\tfmt.Print(\" +\")\n\t\tfor j := 0; j < 8; ... | go | edit | 3 | 7 | mit | a144fcfdb707ccb883a33a1e44473f51ca5f9843 | Roadagain/Chess | chessboard/print.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage vizzini_test\n\nimport (\n\t\"code.cloudfoundry.org/bbs/models\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Cells\", func() {\n\tIt(\"should return all cells\", func() {\n\t\tcells, err := b... | go | edit | 18 | 3 | apache-2.0 | 3e4b09a348a1c08c7f37209b5693f345b26ee25f | pivotal-cf-experimental/vizzini,cloudfoundry-incubator/vizzini,pivotal-cf-experimental/vizzini,cloudfoundry-incubator/vizzini | cells_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"math\"\n\t\"testing\"\n)\n\nconst MaxInt = int(^uint(0) >> 1)\n\nfunc smallestMultiple() int {\n\tdivisible := false\n\tanswer := 0\n\tfor i := 20; i < MaxInt; i++ {\n\t\tfor j := 1; j <= 20; j++ {\n\t\t\tdivisible... | go | edit | 0 | 5 | bsd-2-clause | 3c5553e92e3448be5809e2d3ea88af5b3c935e60 | jmalonzo/project-euler-solutions,jmalonzo/project-euler-solutions | go/005_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage slackapi\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n)\n\nfunc CheckResponse(t *testing.T, x interface{}, y string) {\n\tout, err := json.Marshal(x)\n\tif err != nil {\n\t\tt.Fatal(\"json fromat;\", err)\n\t}\n\tif string(out) != y... | go | edit | 6 | 3 | mit | df8528b6c78a8f8f2c9220a13bbf517290eac193 | cixtor/slackapi | slackapi_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage departure\n\nimport (\n\t\"time\"\n\t\"fmt\"\n)\n\nfunc Watch(duration, throttle, bufferTime int, apiKey, origin, destination, transitMode, lineName string) {\n\tticker := time.NewTicker(time.Second * time.Duration(throttle))\n\tgo func... | go | edit | 3 | 4 | mit | 7071627cb12f127cae3d221ba433785157c09755 | DanShu93/trainspotter,DanShu93/trainspotter | departure/watcher.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/peteretelej/saf\"\n)\n\nfunc main() {\n\tb, err := saf.GetBundles()\n\tif err != nil {\n\t\tfmt.Printf(\"Failed to get bundles: %v\\n\", err)\n\t\treturn\n\t}\n\tb.PrettyPrint()\n\n}\n\n```\... | go | edit | 0 | 2 | mit | 10e3f75b7cae2782ee079b88de26223968fec5b6 | peteretelej/saf | cmd/bundles/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"echo client\")\n}\n\n```\n\nApply this change: Add echo-client implementation in golang"
},
{
"role": "assistant",
"content": "package main\n\nimport (\n\t\"bufio\"\n\... | go | edit | 0 | 8 | mit | 17b281b6ed8d785b49fda3aad5ac40231aaad011 | kingsamchen/Eureka,kingsamchen/Eureka,kingsamchen/Eureka,kingsamchen/Eureka,kingsamchen/Eureka,kingsamchen/Eureka,kingsamchen/Eureka,kingsamchen/Eureka | NetEcho/golang/client/cmd/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage greenskeeper\n\nimport (\n\t\"os/exec\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/onsi/gomega/gexec\"\n\n\t\"testing\"\n)\n\nfunc TestGreenskeeper(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tR... | go | edit | 30 | 3 | apache-2.0 | 6edc7cec47f6a972cfc71f8ce4f00624b93e0662 | cloudfoundry-incubator/guardian-release,cloudfoundry-incubator/guardian-release,cloudfoundry-incubator/guardian-release | src/greenskeeper/greenskeeper_suite_test.go | rejected_lint | Too many lint violations: 30 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage u9\n\nimport (\n\t\"github.com/gopherjs/gopherjs/js\"\n\t\"honnef.co/go/js/dom\"\n)\n\n// AddTabSupport is a helper that modifies a <textarea>, so that pressing tab key will insert tabs.\nfunc AddTabSupport(textArea *dom.HTMLTextAreaEle... | go | edit | 0 | 6 | mit | 0d4c8d2e4fdbf23bdff41c8a2a79d2edf5205ea4 | shurcooL/go | u/u9/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage resource\n\nimport (\n\t\"context\"\n\n\t\"github.com/concourse/concourse/atc\"\n\t\"github.com/concourse/concourse/atc/runtime\"\n)\n\nfunc (resource *resource) Check(\n\tctx context.Context,\n\tspec runtime.ProcessSpec,\n\trunnable ru... | go | edit | 3 | 2 | apache-2.0 | 7d1d9d98e4e9e04572a61016fd96e8acfb91c62f | concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse | atc/resource/resource_check.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//+build gtk_3_6 gtk_3_8 gtk_3_10 gtk_3_12 gtk_3_14\n\npackage gtk\n\n// #cgo pkg-config: gtk+-3.0\n// #include <gtk/gtk.h>\n// #include <stdlib.h>\nimport \"C\"\n\nimport (\n\t\"github.com/gotk3/gotk3/gdk\"\n\t\"unsafe\"\n)\n\n// OverrideColor... | go | edit | 9 | 2 | isc | 24abbe91ce556edb7dc4a11a89a7b8e97f7e31fc | pekim/gotk3,andre-hub/gotk3,pekim/gotk3,pekim/gotk3,gotk3/gotk3,yamnikov-oleg/gotk3,andre-hub/gotk3,yamnikov-oleg/gotk3,andre-hub/gotk3,gotk3/gotk3,yamnikov-oleg/gotk3 | gtk/gtk_deprecated_since_3_16.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\"os\"\n\t\"fmt\"\n)\n\nfunc main() {\n\tfor _, s := range os.Args[1:] {\n\t\tfi, _ := os.Stat(s)\n\t\tmt := fi.ModTime()\n\t\tfmt.Printf(\"%d %s\", mt, s)\n\t}\n}\n\n```\n\nApply this change: mtime: Check for error ... | go | edit | 3 | 3 | bsd-3-clause | 7445399be5ae7588274bbe6843c6ca6a342d6326 | mortdeus/goblin | cmd/mtime/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\nfunc pr(f string, v ...interface{}) {\n\tfmt.Printf(f+\"\\n\", v...)\n}\n\nfunc exists(path string) bool {\n\t_, err := os.Stat(path)\n\treturn err == nil\n}\n\n// createdir is used when the e... | go | edit | 0 | 3 | mit | 4ca42abd488ebf1156d1d28a30b059a2d2f652c2 | Urethramancer/lbapi,Urethramancer/lbapi | cmd/lbmgr/utility.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage image\n\nimport (\n\t\"github.com/Symantec/Dominator/lib/filesystem\"\n\t\"github.com/Symantec/Dominator/lib/hash\"\n)\n\nfunc (image *Image) listObjects() []hash.Hash {\n\thashes := make([]hash.Hash, 0, image.FileSystem.NumRegularInode... | go | edit | 3 | 1 | apache-2.0 | b0e487333784645b8549c58668bff0b4909dbfa7 | keep94/Dominator,Symantec/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator,keep94/Dominator,keep94/Dominator,rgooch/Dominator,Symantec/Dominator | lib/image/list.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage mbtest\n\nimport (\n\t\"bytes\"\n\t\"io/ioutil\"\n\t\"path/filepath\"\n\t\"testing\"\n)\n\nconst testdataDir = \"testdata\"\n\n// Testdata returns a file's bytes based on the path relative to the testdata\n// directory. It fails the tes... | go | edit | 0 | 3 | bsd-2-clause | bd6ebbd157aac78132090e9373daf1c9bc315503 | messagebird/go-rest-api | internal/mbtest/helper.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/julienschmidt/httprouter\"\n\t\"github.com/rs/cors\"\n\t\"gopkg.in/mgo.v2\"\n\n\t\"github.com/kshvmdn/what-class-is-this/server/controllers\"\n)\n\nfunc ... | go | edit | 6 | 3 | mit | 6ecb43035c8ff0aa1f77087100bdcde56aedebea | qasim/what-class-is-this,qasim/what-class-is-this,qasim/what-class-is-this,qasim/what-class-is-this | server/server.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage handlers\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/cloudfoundry-incubator/bbs\"\n\t\"github.com/cloudfoundry-incubator/nsync\"\n\t\"github.com/cloudfoundry-incubator/nsync/recipebuilder\"\n\t\"github.com/pivotal-golang/lager\"\n\t\"... | go | edit | 15 | 2 | apache-2.0 | 2244d77c94c14a94622fa048d937f828cf6519b4 | cloudfoundry-incubator/nsync | handlers/handlers.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage wl_integration_test\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"basic root functionality\", func() {\n\tIt(\"gets root correctly\", func() {\n\t\troot, err := client.Root()\n\t\tE... | go | edit | 18 | 1 | mit | 5d1671bb9bf53a61f5c8db8a00f8c62adcf33e81 | robdimsdale/wl,robdimsdale/wundergo,robdimsdale/wl,robdimsdale/wundergo | integration_tests/root_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ginkgomon\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/tedsuo/ifrit\"\n)\n\nfunc Invoke(runner ifrit.Runner) ifrit.Process {\n\tprocess := ifrit.Background(runner)\n\n\... | go | edit | 6 | 3 | mit | 1c9ab08ace7ac3bbc42ed04cc5a4a0660b213a9a | tedsuo/ifrit | ginkgomon/helpers.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write go code for the following: Add tests for project setter\n\nAdded tests for logic in project setter store."
},
{
"role": "assistant",
"content": "package projectsetter\n\nimport (\n\t\"github.com/rancher/norman/types\"\n\t\"github.com/rancher/rancher/pkg/projec... | go | new_file | 9 | 4 | apache-2.0 | fae96b72e31deb1dbccf7d5fa352e1f23a3c2109 | rancher/rancher,rancher/rancher,cjellick/rancher,rancher/rancher,rancherio/rancher,cjellick/rancher,rancherio/rancher,cjellick/rancher,rancher/rancher | pkg/api/store/projectsetter/project_setter_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage models\n\nimport (\n\t\"time\"\n\n\t\"github.com/jinzhu/now\"\n\t\"github.com/qor/qor-example/db\"\n)\n\ntype Chart struct {\n\tTotal string\n\tDate time.Time\n}\n\n/*\ndate format 2015-01-23\n*/\nfunc GetChartData(table, start, end st... | go | edit | 0 | 4 | mit | 845c6dc392ed034057857abc5a4d814c458d0bbf | firestudios/qor-example,grengojbo/qor-example,qor/qor-example,grengojbo/qor-example,firestudios/qor-example,qor/qor-example,qor/qor-example,grengojbo/qor-example,firestudios/qor-example | app/models/chart.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2013 Carlos Brando. All rights reserved.\n// Use of this source code is governed by a MIT license\n// that can be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os/exec\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"... | go | edit | 3 | 7 | mit | 7b531b82b394a0c000412dd9cb9129420861f158 | carlosbrando/lunchy | status.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage glx\n\n// #cgo linux LDFLAGS: -lGL\n// #include <stdlib.h>\n// #include <GL/glx.h>\nimport \"C\"\nimport \"unsafe\"\n\nfunc GetProcAddress(name string) unsafe.Pointer {\n\tvar cname *C.GLubyte = (*C.GLubyte)(C.CString(name))\n\tdefer C.... | go | edit | 3 | 1 | mit | 0c2e34e3d8c64bb1c81e41feca9e1f61374752a6 | go-gl/gl,thinkofdeath/gl,mantyr/gl,MaVo159/gl,stephenwithav/gl | procaddr/glx/glx.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"github.com/golang/protobuf/proto\"\n\t\"golang.org/x/net/context\"\n)\n\ntype Request interface {\n\tcontext.Context\n\n\t// Id of this message, used to correlate the response\n\tId() string\n\t// ContentType of ... | go | edit | 0 | 0 | mit | 65dd2714e0347738499bed12fec0df02fcba5748 | monzo/typhon,mondough/typhon | server/request.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype APRSPacket struct {\n\tCallsign string\n\tPacketType string\n\tLatitude string\n\tLongitude string\n\tAltitude string\n\tGPSTime string\n\tRawData s... | go | edit | 0 | 3 | apache-2.0 | 875942854c369d011888cf2a484f0dc86649ac3e | benjojo/aprs.go | aprs.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage utils_test\n\nimport (\n\t\"github.com/herald-it/goncord/utils\"\n\t\"net/url\"\n\t\"testing\"\n)\n\ntype TestStruct struct {\n\tField string\n\tField2 int\n}\n\nfunc TestFormFiller(t *testing.T) {\n\tts := new(TestStruct)\n\tform := u... | go | edit | 18 | 1 | mit | 0c72bcc4edc09902ecded9a92ce08d145ee94e14 | herald-it/goncord | utils/form_filler_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage pufferpanel\n\nimport (\n\t\"os/user\"\n)\n\nfunc UserInGroup() bool {\n\tu, err := user.Current()\n\tif err != nil {\n\t\treturn false\n\t}\n\n\texpectedGroup, err := user.LookupGroup(\"pufferpanel\")\n\tif err != nil {\n\t\treturn fal... | go | edit | 0 | 8 | apache-2.0 | bdd74d44f4b429a67cec822017def26b94145195 | PufferPanel/PufferPanel,PufferPanel/PufferPanel,PufferPanel/PufferPanel,PufferPanel/PufferPanel | groups_linux.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package dns resolves names to dns records\npackage dns\n\nimport (\n\t\"net\"\n\n\t\"github.com/micro/go-micro/network/resolver\"\n)\n\n// Resolver is a DNS network resolve\ntype Resolver struct{}\n\n// Resolve assumes ID is a domain name e.... | go | edit | 0 | 7 | apache-2.0 | cffa5b6b50d25a48b20754af5fc9a5154d516c5e | myodc/go-micro,micro/go-micro | network/resolver/dns/dns.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage syssetup\n\nimport (\n\t\"io/ioutil\"\n\t\"os/exec\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\nvar (\n\tcallIPTablesFile = \"/proc/sys/net/bridge/bridge-nf-call-iptables\"\n)\n\nfunc Configure() error {\n\texec.Command(\"modprobe\", \"b... | go | edit | 0 | 3 | apache-2.0 | cb5e4254572805c3e70a342ce3ad84124ea438fe | rancher/k3s,rancher/k3s | pkg/agent/syssetup/setup.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage commands\n\nimport (\n\tcmds \"github.com/ipfs/go-ipfs/commands\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc checkHelptextRecursive(t *testing.T, name []string, c *cmds.Command) {\n\tif c.Helptext.Tagline == \"\" {\n\t\tt.Errorf(\"%s has ... | go | edit | 6 | 6 | mit | a11b806d935e7e7b8e7d27d3e1a49398eaaef0c2 | ianopolous/go-ipfs,WilliButz/go-ipfs,Quantomicus/go-ipfs,MichaelMure/go-ipfs,Luzifer/go-ipfs,MichaelMure/go-ipfs,WilliButz/go-ipfs,kyledrake/go-ipfs,Luzifer/go-ipfs,ianopolous/go-ipfs,Quantomicus/go-ipfs,ianopolous/go-ipfs,JustinDrake/go-ipfs,OpenBazaar/go-ipfs,OpenBazaar/go-ipfs,JustinDrake/go-ipfs,JustinDrake/go-ipfs... | core/commands/helptext_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Sample application to demonstrate the log package.\n\npackage log_test\n\nimp... | go | edit | 0 | 1 | bsd-3-clause | 47a5da9bace9b3a5127b24daa2b382e12cf85a3c | zombiezen/go-log | example_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n)\n\nfunc TestNewBlock(t *testing.T) {\n\tstartApplication()\n\n\t// Register on volume\n\tb := datastore.NewBlock()\n\n\t// Persist\n\tb.Persist()\n\n\t// Encode\n\tb.ErasureEncoding()\n\n\t// Persist w... | go | edit | 6 | 4 | apache-2.0 | 2132a0a27b3d10ffd53494054d6ab3b225859938 | RobinUS2/xyzfs,RobinUS2/xyzfs | block_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage models\n\nimport (\n \"github.com/spacedock-io/registry/db\"\n)\n\ntype Image struct {\n Id int64\n Uuid string\n Json []byte\n Checksum string\n Size int64\n Ancestry []string\n Tags []Tag\n}\n\nfun... | go | edit | 3 | 1 | mit | b8af8747a84459eb917f980e5ccd89ad25e57a16 | spacedock-io/registry | models/image.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage chessboard\n\nvar starting = [][]byte{\n\t[]byte{'R', 'N', 'B', 'K', 'Q', 'B', 'N', 'R'},\n\t[]byte{'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P'},\n\t[]byte{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '},\n\t[]byte{' ', ' ', ' ', ' ', ' ', ' ', ' ',... | go | edit | 3 | 1 | mit | 6de229cac19424ca407d08ec9ab827dc13a65e7b | Roadagain/Chess | src/chessboard/piece.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage templates\n\nfunc ScopeTemplateContent() string {\n\treturn `{{ .Name}}:\n {{ range .Services }}{{ .GetName }}:\n {{ range $key, $value := .GetParameters }}{{ $key }}: {{ $value }}\n {{ end }}{{ end }}\n`\n}\n\n```\n\nApply this ... | go | edit | 0 | 1 | apache-2.0 | d69e9dc473b019bfc33039ac78ae6bea0c2a5242 | bernardolins/clustereasy,bernardolins/clustereasy | templates/content.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage migrator\n\nimport (\n\t\"github.com/mattes/migrate/migrate\"\n\t\"github.com/resourced/resourced-master/config\"\n)\n\nfunc New(generalConfig config.GeneralConfig) *Migrator {\n\tm := &Migrator{}\n\tm.AppGeneralConfig = generalConfig\n... | go | edit | 0 | 4 | mit | 5a38d379d1c258102ba51bb83842326924755242 | resourced/resourced-master,resourced/resourced-master,resourced/resourced-master,resourced/resourced-master,resourced/resourced-master,resourced/resourced-master | migrator/migrator.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage secretcrypt\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n)\n\nfunc passthrough(plaintext string) {\n\tcrypted, err := Encrypt(\"testphrase\", []byte(plaintext))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tplain, err := Decrypt(\"testphrase... | go | edit | 6 | 4 | mit | e46f89c1a6001f765ad1a04758111b0297d912db | scode/saltybox,scode/saltybox | secretcrypt/secretcrypt_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage codeutilsShared\n\nimport (\n\t\"crypto/sha512\"\n\t\"encoding/hex\"\n\t\"os\"\n)\n\n// GlobalFileMode as a file mode we'll use for \"global\" operations such as when doing IO as root\nvar GlobalFileMode os.FileMode\n\n// UniversalFileM... | go | edit | 0 | 4 | apache-2.0 | b74a999a2bb18336ef88b6552d8d93a25fb4353d | StroblIndustries/codeutilsShared,StroblIndustries/coreutils | codeutilsShared.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage adeptus\n\nvar (\n\tregex_xp = regexp.MustCompile(`\\(?\\d+xp\\)?`) // Match `150xp` and `(150xp)`\n)\n\ntype Upgrade interface {\n\tMark string\n\tName string\n\tCost string\n}\n\n// ParseUpgrade generate an upgrade from a raw line\nfu... | go | edit | null | null | unlicense | 3ed4399f5fcbf59b8c152461398131d9f8518650 | elwinar/adeptus | upgrade.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\"flag\"\n\t\"fmt\"\n\t\"github.com/BurntSushi/toml\"\n\tlog \"github.com/Sirupsen/logrus\"\n)\n\nfunc StartServer(config *SiteConfig) {\n\tgb := NewGoblin(config)\n\terr := gb.Init()\n\tif err != nil {\n\t\tlog.Erro... | go | edit | 0 | 4 | apache-2.0 | db989029b4110bf06ffa82766787ebeef817e048 | ggoblin/goblin,eternnoir/goblin,eternnoir/goblin,eternnoir/goblin,ggoblin/goblin,ggoblin/goblin | platform/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2014 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 file.\n\npackage util\n\nimport \"testing\"\n\nfunc TestAssertEquals(t *testing.T) {\n\tv :... | go | edit | 3 | 2 | mit | c414130e60f72e610cafe8ea3d688e63305ab9ce | mrekucci/euler | util/util_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage workflowhelpers\n\nimport (\n\t\"time\"\n)\n\ntype userContext interface {\n\tSetCfHomeDir() (string, string)\n\tUnsetCfHomeDir(string, string)\n\tLogin()\n\tLogout()\n\tTargetSpace()\n}\n\nvar AsUser = func(uc userContext, timeout time... | go | edit | 0 | 1 | apache-2.0 | 24bb1f52ec6e1a3be30987ecafb0d159b501eeb0 | cloudfoundry-incubator/cf-test-helpers,cloudfoundry-incubator/cf-test-helpers | workflowhelpers/as_user.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\t\"github.com/didip/tollbooth\"\n\t\"github.com/magicwrighter/tollbooth/thirdparty/tollbooth_fasthttp\"\n\t\"github.com/valyala/fasthttp\"\n)\n\nfunc main() {\n\trequestHandler := func(ctx *fasthttp.Requ... | go | edit | 0 | 2 | mit | 8252b320bf8b59becc2bb6de27ebc6b24f963e76 | didip/tollbooth | thirdparty/tollbooth_fasthttp/test/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage wrapplog\n\nimport (\n\t\"strings\"\n\n\t\"github.com/Sirupsen/logrus\"\n)\n\nvar jsonFormatter = logrus.JSONFormatter{}\n\ntype WrappFormatter struct {\n\t// TimestampFormat sets the format used for marshaling timestamps.\n\tTimestampF... | go | edit | 0 | 1 | mit | e7af00087b9bf1cd832bc279b8ae1d57a3e3b0ea | wrapp/wrapplog | log.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage util\n\nimport (\n\t\"regexp\"\n)\n\nfunc Contains(stringSlice []string, searchString string) bool {\n\tfor _, value := range stringSlice {\n\t\tif value == searchString {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc Contai... | go | edit | 6 | 4 | mit | 32bc365655c7f33d88b716230823b072c30684a4 | v4lproik/no-name,v4lproik/no-name,v4lproik/no-name | util/slice.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage models\n\nimport (\n\t\"github.com/coopernurse/gorp\"\n)\n\nfunc CreateTables(g *gorp.DbMap) {\n\t// Add User Table\n\tt := g.AddTableWithName(User{}, \"dispatch_user\").SetKeys(true, \"UserId\")\n\tt.ColMap(\"Password\").Transient = tr... | go | edit | 21 | 1 | mit | 5ebe5070d9fc59595d56319977a87d36389f89c3 | melange-app/melange,melange-app/melange,melange-app/melange,melange-app/melange,melange-app/melange,melange-app/melange | app/models/init.go | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"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 | 6 | 5 | mit | a5529542189b3c9296f94f28fb9731af819f0afe | go-playground/generate | misc.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (c) 2013 Conformal Systems LLC.\n// Use of this source code is governed by an ISC\n// license that can be found in the LICENSE file.\n\npackage ldb_test\n\nimport (\n\t\"github.com/conformal/btcdb\"\n\t\"github.com/conformal/btcwir... | go | edit | 0 | 5 | isc | 9049bcaceccfcbe02e5c4b79e1d661c60866c0d7 | Dirbaio/btcd,CryptocurrencyCabal/htcd,pkothbauer/btcd,btcsuitereleases/btcd,ppcsuite/ppcd-old,jimmysong/btcd,BitGo/prova,jrick/btcd,ppcsuite/ppcd,qchain/btcd,davecgh/btcd,jcmincke/dcrd,stevenroose/btcd,ppcsuite/ppcd-old,tb00/btcd,CryptocurrencyCabal/htcd,soapboxsys/ombfullnode,mathiasrw/btcd,glv2/ppcd,jrick/btcd,jcminc... | ldb/boundary_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gockle\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/maraino/go-mock\"\n)\n\nvar mySession = &SessionMock{}\n\nfunc Example_dump() {\n\tvar rows, _ = mySession.QuerySliceMap(\"select * from users\")\n\n\tfor _, row := range rows {\n\t\tfmt.P... | go | edit | 18 | 2 | apache-2.0 | 2e998b3ba8936ed33b06ee4f0e166315a4b720f3 | willfaught/gockle | examples_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage saml2aws\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// AWSRole aws role attributes\ntype AWSRole struct {\n\tRoleARN string\n\tPrincipalARN string\n\tName string\n}\n\n// ParseAWSRoles parses and splits the roles while als... | go | edit | 0 | 7 | mit | 6554beec1060da5ab1f55072a1489d7f40c9d5e2 | Versent/saml2aws,Versent/saml2aws | aws_role.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build linux,386\n\npackage system\n\nimport (\n\t\"syscall\"\n)\n\n// Setuid sets the uid of the calling thread to the specified uid.\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID, uintptr(uid), 0,... | go | edit | 6 | 2 | apache-2.0 | 0a45903563082932864f1e746a17a8e3f9a19a89 | opencontainers/runc,sunyuan3/runc,jhowardmsft/runc,wking/runc,avagin/runc,maxamillion/runc,kolyshkin/runc,mheon/runc,vbatts/runc,WeiZhang555/runc,adrianreber/runc,opencontainers/runc,jhowardmsft/runc,stefanberger/runc,justincormack/runc,rhatdan/runc,hqhq/runc,justincormack/runc,shishir-a412ed/runc,nkwilson/runc,rajasec... | libcontainer/system/syscall_linux_386.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\"log\"\n\t\"net/http\"\n\t\"os\"\n)\n\nvar version string\n\nfunc main() {\n\thttp.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\t\tlog.Printf(\"%s %s\", r.Method, r.URL)\n\t\tfmt.Fpr... | go | edit | 3 | 1 | mit | b9b86d05ff9a87f7b6e6c3de7decaefd45f5589b | mongrelion/gapp | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"io/ioutil\"\n\t\"strings\"\n)\n\nvar airlineCodes AirlineCodes\n\nfunc check(e error) {\n\tif e != nil {\n\t\tpanic(e)\n\t}\n}\n\nfunc init() {\n\ttableName := \"airline\"\n\ttableFields := []string{\"Id\", \"Name\... | go | edit | 12 | 4 | mit | 2b593f12ae93c650afa7a91e93ab431e7aa5fb9d | ftcjeff/AirlineCode-go | Repo.go | rejected_lint | Too many lint violations: 12 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.