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\n// scanning an HTTP response for phrases\n\nimport (\n\t\"http\"\n\t\"mahonia.googlecode.com/hg\"\n)\n\n// phrasesInResponse scans the content of an http.Response for phrases,\n// and returns a map of phrases and counts.\nfunc p... | go | edit | 15 | 5 | bsd-2-clause | 8f0576a2c63d7ef11bbf2161c00182233deee9ba | andybalholm/redwood,yinheli/redwood-filter,vishnuvaradaraj/redwood,vishnuvaradaraj/redwood,yinheli/redwood-filter,vishnuvaradaraj/redwood,yinheli/redwood-filter,andybalholm/redwood,unixabg/redwood,unixabg/redwood | phrase_scan.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"testing\"\n\n\t. \"github.com/VonC/godbg\"\n\t. \"github.com/smartystreets/goconvey/convey\"\n)\n\nfunc TestGoPanic(t *testing.T) {\n\tConvey(\"Test main\", t, func() {\n\t\tfm... | go | edit | 0 | 5 | mit | 9a433c26e0d515474ebf88d0d4cf49c17a0f3a7e | VonC/gopanic | gopanic_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage response\n\nimport (\n\t\"warcluster/entities\"\n)\n\ntype StateChange struct {\n\tbaseResponse\n\tMissions map[string]*entities.Mission `json:\",omitempty\"`\n\tRawPlanets map[string]*entities.Planet `json:\"-\"`\n\tPlanet... | go | edit | 0 | 1 | mit | 100bc8f314d4bb8ee1d3a30ba91e57a840879183 | WarCluster/warcluster-server,WarCluster/warcluster-server | server/response/state_change.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage indexing\n\nimport (\n \"bytes\"\n \"testing\"\n)\n\nvar testWrites = []struct {\n docs []Document\n out string\n}{\n {[]Document{},\n // Header | End of Docs\n \"searchme\\x00\\x00\"}, // terminator + doc terminator\n {[]Do... | go | edit | 0 | 4 | mit | 5fa06a623981c6f9282fbca80ce767fc8c1e9b67 | kevinclark/indexer | indexing/index_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage index\n\ntype Index struct {\n\tbr *blob_reader\n\tDocs map[uint32][]byte\n\tAttrs map[string][]IbDoc\n}\n\nfunc Open(name string) (*Index, error) {\n\tvar in Index\n\tvar err error\n\n\tin.br, err = open_blob_reader(name)\n\tif err... | go | edit | 0 | 4 | isc | 67f376ff9d2597d618b697d9e45b7ce48cf96dbb | art4711/bsearch | index/bindex.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport(\n \"testing\"\n)\n\nfunc TestFindURLs(t *testing.T) {\n if len(FindURLs(\"Wie sieht es aus wenn man http://starship-factory.ch/blah?foo=bar http://foo?baz=quux sagt?\")) == 0 {\n t.Error(\"no... | go | edit | 0 | 3 | bsd-3-clause | e50ae48c2dc089faf3fb666b99ce8d0e6ea42c4b | julianec/justanotherircbot | findurls_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage godless\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nfunc TerminalConsole(addr string) error {\n\tfmt.Printf(\"The console should send user commands to '%v'.\\n\", addr)\n\tfmt.Println(\"Data found in the APIResponse should be formatted i... | go | edit | 0 | 1 | mit | 6fd5dd323c15928c945ad2de1c37cb6e4303a181 | johnny-morrice/godless | console.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (c) 2013 The Go Authors. All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd.\n\n// goli... | go | edit | 0 | 5 | bsd-3-clause | 7fab5138699731421e7bfa7585344ec34b3828ae | golang/lint,hellosuper/gohint,elgris/hint,darkliquid/lintci,zimmski/lint,JekaMas/hint,gorcz/lint,tmc/lint,NichoZhang/lint,kovetskiy/lint,lutzky/lint | golint/golint.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage v1\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/codegangsta/martini\"\n\t\"github.com/coopernurse/gorp\"\n\t\"github.com/hackedu/backend/v1/model\"\n\t\"github.com/hackedu/backend/v1/route\"\n\t\"github.com/martini-contrib/... | go | edit | 3 | 1 | mit | 537b5ce1016a38570e9c191134de5b59ac295117 | hackedu/website,zachlatta/website,zachlatta/website,hackedu/website,zachlatta/website,hackedu/website | v1/v1.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage campfire\n\nimport (\n \"fmt\"\n)\n\ntype Message struct {\n conn *Connection\n\n Id int `json:\"id,omitempty\"`\n Type string `json:\"type\"`\n UserId int `json:\"user_id,omitempty\"`\n RoomId ... | go | edit | 6 | 1 | mit | f69a42dc0b14b91d12fc6beeb02e2b234d91719b | brettbuddin/campfire | message.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"trace\"\n\nconst (\n\timageW = 640\n\timageH = 480\n)\n\nfunc createRandomImage() [][]trace.Color {\n\timage := make([][]trace.Color, imageH)\n\tfor i := range image {\n\t\timage[i] = make([]trace.Color, imageW)\n\t\tfo... | go | edit | 0 | 1 | apache-2.0 | 72f1ed5dda4f4d2f05f5dd7725b52e8cfa87ab1b | dominichamon/gotrace,dominichamon/gotrace | src/main/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build js\n\npackage ninchat\n\nimport (\n\t\"github.com/gopherjs/gopherjs/js\"\n)\n\ntype duration int64\n\nconst (\n\tsecond duration = 1000\n\tmillisecond = 1\n)\n\ntype timeTime int64\n\nfunc timeNow() timeTime {\n\treturn ... | go | edit | 0 | 2 | bsd-2-clause | 29f4679907773c1119629d89f08d91f4ad0a004b | ninchat/ninchat-go,ninchat/ninchat-go,ninchat/ninchat-go | time_js.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage sys\n\nimport \"runtime\"\n\nfunc DumpStack() string {\n\tbuf := make([]byte, 1024)\n\tfor runtime.Stack(buf, true) == cap(buf) {\n\t\tbuf = make([]byte, cap(buf)*2)\n\t}\n\treturn string(buf)\n}\n\n```\n\nApply this change: sys: Fix Du... | go | edit | 0 | 3 | bsd-2-clause | 00ed6923f7c80857ccd4a21f9044290062a4fc12 | elves/elvish,elves/elvish,elves/elvish,elves/elvish,elves/elvish | sys/dumpstack.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Generates reference files for a given language\n\n// +build !release\n\npackage main\n\nimport \"ldss/lib\"\n\ntype generateReference struct {\n\tappinfo\n}\n\nfunc init() {\n\taddApp(\"generate-reference\", &generateReference{})\n}\n\nfunc ... | go | edit | 24 | 6 | mit | 04fa26e6078fbc41213760ca18b953a70cb8b066 | duckbrain/ldss,duckbrain/ldss | generate-reference.go | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage crawler\n\nimport (\n\t\"net/url\"\n)\n\ntype Fetcher interface {\n\t// Fetch returns the body of URL and\n\t// a slice of URLs found on that page.\n\tFetch(url string) (body string, urls []string, err error)\n}\n\ntype Page struct {\n\... | go | edit | 0 | 0 | mit | 5633aa34830c1e6cae84072d34f0d7a8fcd4e2b8 | mattheath/kraken | crawler/types.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nPackage consts implements constants for the entire project\n*/\npackage consts\n\n// ConfigurationFileName is the configuration file name of Goyave\nconst ConfigurationFileName = \".goyave.toml\"\n\n```\n\nApply this change: Change .goyave.... | go | edit | 0 | 0 | mit | 27c1bd6dd362116f27263f95295f52a564532e85 | k0pernicus/goyave | consts/consts.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n)\n\nvar (\n\tonemin = time.Minute * 1\n\tfivemin = time.Minute * 5\n\ttenmin = time.Minute * 10\n\tonehour = time.Hour * 1\n\n\toneminTimer = time.NewTimer(onemin)\n\tfiveminTimer = time.NewT... | go | edit | 9 | 10 | mit | 84d6c382347f5c26a628719966555d84f63f5ed2 | mojotech/situation-room,mojotech/situation-room | dispatcher.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage markdown\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestWatcher(t *testing.T) {\n\texpected := \"12345678\"\n\tinterval := time.Millisecond * 100\n\ti := 0\n\tout := \"\"\n\tstopChan := Ticke... | go | edit | 6 | 4 | apache-2.0 | 59dbea768c75a7ce07453010fcf6c392738771b8 | captncraig/caddy,tw4452852/caddy,tpng/caddy,yukimochi/caddy,eiszfuchs/caddy,buddhamagnet/caddy,tw4452852/caddy,evermax/caddy,tobya/caddy,Karthic-Hackintosh/caddy,tpng/caddy,hackintoshrao/caddy,joshix/caddy,hackintoshrao/caddy,yukimochi/caddy,ollie314/caddy,DenBeke/caddy,eiszfuchs/caddy,elcore/caddy,DenBeke/caddy,everma... | middleware/markdown/watcher_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage alice\n\n// Module is a marker interface for structs that defines how to initialize instances.\ntype Module interface {\n\t// IsModule indicates if this is a module.\n\tIsModule() bool\n}\n\n// BaseModule is an implementation of Module ... | go | edit | 0 | 1 | mit | fb9bfd1541e59b435738cf4f62f72d90e0f4dcb2 | magic003/alice | module.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage neko\n\nimport (\n\t\"github.com/julienschmidt/httprouter\"\n\t\"mime/multipart\"\n\t\"net/http\"\n)\n\ntype routerParams struct {\n\treq *http.Request\n\tparams httprouter.Params\n}\n\nfunc (c *routerParams) ByGet(name string) strin... | go | edit | 0 | 2 | mit | ebbbfa1ea17c5fb71934713ccd1694df9c6bd5a9 | rocwong/neko | routerparams.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage stringutil\n\nimport \"sync\"\n\ntype StringDeduplicator struct {\n\tlock bool\n\tmutex sync.Mutex\n\tmapping map[string]string\n\tstatistics StringDuplicationStatistics\n}\n\ntype StringDuplicationStatistics struct {\n\tD... | go | edit | 9 | 1 | apache-2.0 | c9904c17dcf2fada0667fc190f61064c95050c65 | Symantec/Dominator,keep94/Dominator,Symantec/Dominator,rgooch/Dominator,keep94/Dominator,keep94/Dominator,Symantec/Dominator,rgooch/Dominator,rgooch/Dominator | lib/stringutil/api.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage utility\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/bitspill/bitsig-go\"\n\t\"github.com/btcsuite/btcutil\"\n)\n\nvar utilIsTestnet bool = false\n\nfunc SetTestnet(testnet bool) {\n\tutilIsTestnet = testnet\n}\n\nfunc Testnet() boo... | go | edit | 0 | 3 | mit | e626d100ea82a5034a2f0da20781deb543ff9319 | oipwg/media-protocol,dloa/media-protocol | utility/util.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage reception\n\nimport (\n\tetcd \"github.com/coreos/etcd/client\"\n\t\"golang.org/x/net/context\"\n)\n\ntype (\n\tkeysAPI interface {\n\t\tGet(path string) (*etcd.Response, error)\n\t\tSet(path, value string, opts *etcd.SetOptions) error\... | go | edit | 0 | 1 | mit | fee27f461a983e57c37fe12e0e4e2aef3034c7c6 | efritz/reception | etcd_shim.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gobrightbox\n\n// Volume represents a Brightbox Volume\n// https://api.gb1.brightbox.com/1.0/#volume\ntype Volume struct {\n\tID string\n\tName string\n\tStatus string\n\tDescription string\n\tEncrypted bool\n\tSi... | go | edit | 12 | 1 | mit | 084999949e1504601ea290927f65ee4bddc94a28 | brightbox/gobrightbox,brightbox/gobrightbox,brightbox/gobrightbox | volumes.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage sluice\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/smartystreets/goconvey/convey\"\n)\n\nfunc Test(t *testing.T) {\n\tConvey(\"Sluice can...\", t, func() {\n\t\tgondola := New()\n\n\t\tConvey(\"pump values\", func() {\n\t\t\tgondola.... | go | edit | 21 | 2 | apache-2.0 | 458be07095fa95464d99ccc4d17c3def8682f49e | polydawn/go-sup,polydawn/go-sup | sluice/sluice_test.go | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage handlers\n\nimport (\n\t\"encoding/json\"\n\t\"log\"\n\t\"net/http\"\n)\n\n//ReturnInternalServerError returns an Internal Server Error\nfunc ReturnInternalServerError(w http.ResponseWriter, message string) {\n\tlog.Println(message)\n\t... | go | edit | 9 | 1 | mit | 135bbfe57b37ab28f1863f9b455db7399b7f7ba4 | jimmified/jimmify-server,jimmified/jimmify-server | handlers/errors.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage helper\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n)\n\n// Asserts that the request did not return an error.\n// Optionally perform some checks only if the request did not fail\nfunc AssertRequestOk(t *testing.T, response interface... | go | edit | 0 | 3 | bsd-3-clause | b1e3361e7fb6c1db1c01167dcd089d913ee15ef2 | weaviate/weaviate,weaviate/weaviate | test/acceptance/helper/assertions.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gomposer\n\nimport (\n \"os\"\n\n \"encoding/json\"\n)\n\ntype Reader interface {\n\tRead(filename string) *Version\n}\n\ntype PackageReader struct {\n}\n\nfunc (pr PackageReader) Read(filename string) (*Version, error) {\n\n b... | go | edit | 9 | 2 | mit | 1bbe0e23a4e418cde7a25ec933a23426f46fe7aa | icambridge/gomposer | packagereader.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\npackage proto defines a set of structures used to negotiate an update between an\nan application (the client) and an equinox update service.\n*/\npackage proto\n\nimport \"time\"\n\ntype PatchKind string\n\nconst (\n\tPatchRaw PatchKind ... | go | edit | 0 | 0 | mit | 112d086ebd58c6e5e340820e97fdc4c4789a6bd1 | equinox-io/equinox | proto/proto.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage tarantool\n\ntype BinaryPacketPool struct {\n\tqueue chan *BinaryPacket\n}\n\nfunc newPackedPacketPool() *BinaryPacketPool {\n\treturn &BinaryPacketPool{\n\t\tqueue: make(chan *BinaryPacket, 512),\n\t}\n}\n\nfunc (p *BinaryPacketPool) G... | go | edit | 9 | 2 | mit | 65e20959a2131b0273088d4717e9ec97fe08bffe | viciious/go-tarantool | binpacket_pool.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nOnly (e.g. OnlyInt32) filters the value stream of an observable and lets\nonly the values of a specific type pass.\n\nSo in case of OnlyInt32 it will only let int32 values pass through.\n*/\npackage Only\n\n```\n\nApply this change: Make On... | go | edit | 0 | 0 | mit | ca9d70d427b4281d71d24b30e6e9ca12082614fc | ReactiveGo/rx | test/Only/doc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage dockerguard\n\ntype Container struct {\n\tId string\n\tHostname string\n}\n\n```\n\nApply this change: Add DockerInfo & DockerVersion struct"
},
{
"role": "assistant",
"content": "package dockerguard\n\ntype DockerInfo... | go | edit | 0 | 0 | mit | 22e40afc32f0467a3bad7d08ccd3594ee4160423 | 90TechSAS/libgo-docker-guard | docker-structs.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage osversion\n\nconst (\n\t// RS1 (version 1607, codename \"Redstone 1\") corresponds to Windows Server\n\t// 2016 (ltsc2016) and Windows 10 (Anniversary Update).\n\tRS1 = 14393\n\n\t// RS2 (version 1703, codename \"Redstone 2\") was a cli... | go | edit | 0 | 0 | mit | ef775b6a90143374b7d5d99ed8e44a512e3cd162 | madhanrm/hcsshim,Microsoft/hcsshim | osversion/windowsbuilds.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage acgen\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"sync\"\n)\n\ntype Command struct {\n\tName string\n\tFlags []*Flag\n}\n\ntype Flag struct {\n\tShort []string\n\tLong []string\n\tArg string\n\tDescription string\n}\n\nt... | go | edit | 0 | 2 | mit | e25741eadca9875c822f2df7bbdaad5c22d934ed | kusabashira/acgen | generator.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage databath\n\nimport ()\n\ntype QueryConditions struct {\n\tcollection string\n\twhere []QueryCondition\n\tpk *uint64\n\tfieldset *string\n\tlimit *int64\n\tfilter *map[string]interface{}\n\toffset *int64\n\tso... | go | edit | 6 | 1 | mit | c103003af6de2fa3edb72567afb5bcf1e8bc29da | daemonl/go_lib | databath/QueryConditions.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage assert\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype Line []string\n\nfunc (line Line) String() string {\n\treturn strings.Join(line, \", \")\n}\n\ntype Lines []Line\n\nfunc SliceContains(actual []string, expected Lines, msgAndArgs .... | go | edit | 6 | 6 | apache-2.0 | 3ad8d2dd6d92a0f909ed6ea102369759dc3518fe | cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli | src/testhelpers/assert/slices.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write go code for the following: Add test for handling config files.\n\nChecks also default config file which is a big plus as it will fail the\ntest if there will be errors."
},
{
"role": "assistant",
"content": "package main\n\nimport \"testing\"\n\nfunc TestHandl... | go | new_file | 6 | 3 | apache-2.0 | 1e626fddc09e34210ba9e4412eb1266a869d0d04 | pasinskim/deployments,pasinskim/deployments,pasinskim/deployments,pasinskim/deployments | main_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage turnpike_test\n\nimport (\n\t\"code.google.com/p/go.net/websocket\"\n\t\"github.com/jcelliott/turnpike\"\n\t\"net/http\"\n)\n\nfunc ExampleClient_NewClient() {\n\tc := turnpike.NewClient()\n\terr := c.Connect(\"ws://127.0.0.1:8080/ws\",... | go | edit | 0 | 2 | mit | 4660d2287cc2124d87c3f71ff1c6c17908e2fb04 | SpirentOrion/turnpike,DaniloMoura1/turnpike,mattbaird/turnpike,mourad/turnpike,dcarbone/turnpike,cornelk/turnpike,DevTable/turnpike,AnimationMentor/turnpike,awakenetworks/turnpike,DaniloMoura1/turnpike,digitallumens/turnpike,jmptrader/turnpike,jcelliott/turnpike,digitallumens/turnpike,digitallumens/turnpike,jmptrader/t... | exampleclient_test.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/pgombola/knowmads/client\"\n)\n\nfunc main() {\n\tnodes := client.Status()\n\tfor _, node := range nodes {\n\t\tfmt.Printf(\"ID=%v;Name=%v;Drain=%v\\n\", node.ID, node.Name, node.Drain)\n\t}... | go | edit | 0 | 2 | apache-2.0 | 9e721e75ceeb61b1c7b0eec952f7e7ffb0be7978 | pgombola/gomad | nodestatus.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage envh\n\nimport (\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestCreateTreeFromDelimiterFilteringByRegexp(t *testing.T) {\n\tsetTestingEnvsForTree()\n\n\tn := createTreeFromDelimiterFilteringByReg... | go | edit | 12 | 2 | mit | cf6eadf3074519d7665f7bbf230789abe71c65cd | antham/envh | env_tree_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage compare_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/xgfone/go-tools/compare\"\n)\n\nfunc TestCompare(t *testing.T) {\n\tv1 := []uint16{1, 2, 4}\n\tv2 := []uint16{1, 2, 3}\n\tif !compare.GT(v1, v2) {\n\t\tt.Fail()\n\t}\n\n\tif !com... | go | edit | 0 | 6 | apache-2.0 | 7d0245aa7bf2b1a1906f4264a046bada31d6b1ab | xgfone/go-tools | compare/compare_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage libtorrent\n\n// #cgo pkg-config: libtorrent-rasterbar openssl\n// #cgo darwin LDFLAGS: -lm -lstdc++\n// #cgo linux LDFLAGS: -lm -lstdc++ -ldl -lrt\n// #cgo windows CXXFLAGS: -DIPV6_TCLASS=39 -O0 -g\n// #cgo windows LDFLAGS: -static-lib... | go | edit | 2 | 0 | bsd-3-clause | ffaeeb1a92ec1fced6ec8181585f0089a2ce1cd4 | dylanvee/libtorrent-go,dylanvee/libtorrent-go,steeve/libtorrent-go,waynus/libtorrent-go,dylanvee/libtorrent-go,sharkone/libtorrent-go,anteo/libtorrent-go,waynus/libtorrent-go,sharkone/libtorrent-go,steeve/libtorrent-go,steeve/libtorrent-go,waynus/libtorrent-go,sharkone/libtorrent-go,anteo/libtorrent-go | libtorrent_cgo.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"flag\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"github.com/robertkrimen/otto\"\n)\n\nfunc main() {\n\tflag.Parse()\n\tvar script []byte\n\tvar err error\n\tfilename := flag.Arg(0)\n\tif filename == \"\" || filena... | go | edit | 0 | 7 | apache-2.0 | c2851c6b6ec2be65e9c09b31d64915049b62311a | lsk-kun/lantern,kelvine/lantern,kangwl/lantern,WaybackMachine/lantern,Denniskevin/lantern,ubuntuvim/lantern,ywzw2013/lantern,tyrchen/lantern,fangshili/lantern,Batterfii/lantern,velocity-toolkit/otto,gregoriusxu/lantern,WaybackMachine/lantern,Jonavin/lantern,newbiecoming/lantern,dmitris/otto,lsk-kun/lantern,dqw18037/lan... | otto/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage watch\n\nimport etcd \"github.com/coreos/etcd/clientv3\"\n\n// OpOption is a simple typedef for etcd.OpOption.\ntype OpOption struct {\n\tGet etcd.OpOption\n\tWatch etcd.OpOption\n}\n\n// WithFilterPut discards PUT events from the wat... | go | edit | 0 | 1 | apache-2.0 | 8add49dbd02db3e1c435f905042669dc65ca22e3 | pachyderm/pfs,pachyderm/pfs,pachyderm/pfs | src/server/pkg/watch/op.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage tuikit\n\nimport \"time\"\n\ntype ProgressSpinner struct {\n\t*TextView\n\n\tspinRunes []rune\n\tcurrent int\n}\n\nfunc NewProgressSpinner() *ProgressSpinner {\n\tps := &ProgressSpinner{\n\t\tTextView: NewTextView(),\n\t\tspinRunes: ... | go | edit | 9 | 2 | apache-2.0 | 17438fe622bf9f62b0c3ec5bdb2f5291472b0f3f | sgeb/go-tuikit,sgeb/go-tuikit | tuikit/progress_spinner.go | rejected_lint | Too many lint violations: 9 | 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 Document struct {\n\tID bson.ObjectId `bson:\"_id\"`\n\tShortId string `bson:\"short_id\"`\n\tTitle string `bs... | go | edit | 9 | 3 | bsd-3-clause | 0ac59b4f5824fcb86f7cf69d336b714ac5d85309 | FurqanSoftware/papyrus,FurqanSoftware/papyrus,FurqanSoftware/papyrus | data/document.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage executordispatch\n\nimport (\n\t\"path/filepath\"\n\n\t\"polydawn.net/repeatr/def\"\n\t\"polydawn.net/repeatr/executor\"\n\t\"polydawn.net/repeatr/executor/chroot\"\n\t\"polydawn.net/repeatr/executor/nsinit\"\n\t\"polydawn.net/repeatr/e... | go | edit | 0 | 5 | apache-2.0 | b9fdd25a588f963759a971f1e2c4aaff80316760 | polydawn/repeatr,subuser-security/repeatr,subuser-security/repeatr,polydawn/repeatr | executor/dispatch/dispatch.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage types\n\nimport (\n\t\"fmt\"\n)\n\ntype Result struct {\n\tCode CodeType\n\tData []byte\n\tLog string // Can be non-deterministic\n}\n\nfunc NewResult(code CodeType, data []byte, log string) Result {\n\treturn Result{\n\t\tCode: code,\... | go | edit | 0 | 1 | apache-2.0 | 06a0ac8188c10700e9c8448bed9f4a41efb7ff63 | tendermint/tmsp,tendermint/tendermint,kidinamoto01/abci,kidinamoto01/abci,tendermint/tmsp,kidinamoto01/abci,tendermint/tendermint,tendermint/tendermint,tendermint/tmsp,tendermint/tendermint | types/result.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cmd\n\nimport (\n\t\"os\"\n\n\t\"github.com/gsamokovarov/jump/cli\"\n\t\"github.com/gsamokovarov/jump/config\"\n\t\"github.com/gsamokovarov/jump/shell\"\n)\n\nfunc shellCmd(args cli.Args, _ *config.Config) {\n\thint := args.CommandName(... | go | edit | 0 | 2 | mit | 86aa9b4cb02e3055d502d4b8f5cd1fc19782a8a6 | gsamokovarov/jump | cmd/shell.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage models\n\nimport (\n\t\"github.com/herald-it/goncord/utils\"\n\n\t\"gopkg.in/yaml.v2\"\n\n\t\"io/ioutil\"\n)\n\ntype Setting struct {\n\tDatabase struct {\n\t\tHost string\n\t\tDbName string\n\t\tTokenTable string\n\t\tUserTab... | go | edit | 3 | 3 | mit | 2f6c1c4212b45d691891bc1276573546c6ab66cc | herald-it/goncord | models/settings.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2014 SteelSeries ApS. 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// This package implements a basic LISP interpretor for embedding in a go prog... | go | edit | 15 | 4 | bsd-3-clause | 9cbf4224d19af6e0ff9893bd6cd5c3d30acdced7 | SteelSeries/golisp,SteelSeries/golisp,SteelSeries/golisp | lisp_test.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage flagparse\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path\"\n)\n\n// ArgumentParser is a struct for parsing command line strings\ntype ArgumentParser struct {\n\tprog string\n}\n\n// NewArgumentParser returns new ArgumentParser pointer\nfunc... | go | edit | 0 | 5 | mit | 0a1d699df9de68f98542acdb502f385db5c4c080 | nekikara/flagparse,nekikara/clier,nekikara/clier,nekikara/flagparse | flagparse.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage source\n\nimport (\n\t\"github.com/pkg/errors\"\n\t\"github.com/dpb587/metalink/repository\"\n\t\"github.com/dpb587/metalink/repository/filter\"\n)\n\nfunc FilterInMemory(files []repository.RepositoryMetalink, filter filter.Filter) ([]r... | go | edit | 0 | 4 | mit | 885d51c4467d17e6893d079723c2534533fb84cd | dpb587/metalink | repository/source/filter_in_memory.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage integration_test\n\nimport (\n\t\"path/filepath\"\n\n\t\"github.com/cloudfoundry/libbuildpack/cutlass\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"deploy a staticfile app\", func() {\n\tva... | go | edit | 27 | 2 | apache-2.0 | 618784ccf0d66bf42d97089cccca88e997988dd6 | cloudfoundry/staticfile-buildpack,cloudfoundry/staticfile-buildpack,cloudfoundry/staticfile-buildpack,cloudfoundry/staticfile-buildpack | src/staticfile/integration/deploy_reverse_proxy_app_test.go | rejected_lint | Too many lint violations: 27 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright IBM Corp. All Rights Reserved.\n\nSPDX-License-Identifier: Apache-2.0\n*/\n\npackage ccintf\n\n//This package defines the interfaces that support runtime and\n//communication between chaincode and peer (chaincode support).\n//Curr... | go | edit | 0 | 1 | apache-2.0 | af196c8870166436eced86b31156cee7eb7b6344 | jimthematrix/fabric,binhn/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,binhn/fabric,manish-sethi/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric,hyperledger/fabric,hyperledger/fabric,jimthematrix/fabric,binhn/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,s... | core/container/ccintf/ccintf.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\tlog \"github.com/Sirupsen/logrus\"\n\tlogx \"github.com/cerana/cerana/pkg/logrusx\"\n\t\"github.com/cerana/cerana/provider\"\n\t\"github.com/cerana/cerana/providers/clusterconf\"\n\tflag \"github.com/sp... | go | edit | 0 | 2 | mit | 9868e88870cdd3927f618cfe7236197e12a19289 | cerana/cerana,cerana/cerana,cerana/cerana,cerana/cerana | cmd/clusterconfig-provider/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"strings\"\n\n\t\"github.com/bmorton/deployster/fleet\"\n)\n\ntype ExtractableUnit fleet.Unit\n\nfunc (eu *ExtractableUnit) ExtractBaseName() string {\n\ts := strings.Split(eu.Name, \"-\")\n\treturn s[0]\n}\n\nfun... | go | edit | 0 | 1 | mit | 2a014c0b295530dbe111d4568664fcd0b431e1be | bmorton/deployster | server/extractable_unit.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"testing\"\n\n\tassert \"github.com/stretchr/testify/require\"\n)\n\nfunc TestResizeImage(t *testing.T) {\n\ttmpfile, err := ioutil.TempFile(\"\", \"resized_image\")\n\tassert.NoError(t, e... | go | edit | 15 | 2 | mit | 9940844a01dea7d51fb352ff438d1f5bf01dea2e | brandur/sorg,brandur/sorg,brandur/sorg,brandur/sorg,brandur/sorg | build_test.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage of10\n\nimport \"net\"\n\ntype Match struct {\n\tWildcards uint32\n\tInPort PortNumber\n\tEthSrc net.HardwareAddr\n\tEthDst net.HardwareAddr\n\tVlanId VlanId\n\tVlanPriority VlanPriority\n\tpad1 [1]uin... | go | edit | 3 | 0 | mit | 04efe5ced34803c4d6a6663800611039194cfefd | oshothebig/goflow | openflow/of10/match.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ActiveObject\n\nimport (\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestActiveObject(t *testing.T) {\n\tvar activeObject IActiveObject\n\n\tvar wait sync.WaitGroup\n\twait.Add(1)\n\n\ta... | go | edit | 6 | 2 | mit | 0a1c57f44ee7ba6edddaf855b07a9e3c886d774b | irwansyahwii/Pattern-Oriented-Software-Architecture-With-Go | ConcurrencyPatterns/ActiveObject/ActiveObjectWithInterval_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage reflect\n\nimport (\n\t\"github.com/anaminus/rbxmk\"\n)\n\nfunc All() []func() rbxmk.Type {\n\treturn []func() rbxmk.Type{\n\t\tArray,\n\t\tAxes,\n\t\tBinaryString,\n\t\tBool,\n\t\tBrickColor,\n\t\tCFrame,\n\t\tColor3,\n\t\tColor3uint8,... | go | edit | 129 | 1 | mit | f5a039f44d4f20e1c50f221532af0977f2fc2ed4 | Anaminus/rbxmk,Anaminus/rbxmk | reflect/types.go | rejected_lint | Too many lint violations: 129 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage health\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n)\n\ntype HealthChecker struct {\n\tSubPID int\n}\n\n//TODO: Add additional health checks\n//TODO: add health check if Kubernetes API is still reachable\nfunc (hc HealthChecker) H... | go | edit | 0 | 3 | apache-2.0 | c7039772a09f1b10bd64950446e5c56c45508694 | F5Networks/k8s-bigip-ctlr,sjberman/k8s-bigip-ctlr,michaeldayreads/k8s-bigip-ctlr,sjberman/k8s-bigip-ctlr,F5Networks/k8s-bigip-ctlr,sjberman/k8s-bigip-ctlr,michaeldayreads/k8s-bigip-ctlr,sjberman/k8s-bigip-ctlr,F5Networks/k8s-bigip-ctlr,sjberman/k8s-bigip-ctlr,michaeldayreads/k8s-bigip-ctlr,michaeldayreads/k8s-bigip-ctl... | pkg/health/health.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"bufio\"\nimport \"fmt\"\nimport \"encoding/csv\"\nimport \"io\"\nimport \"os\"\n\nfunc check(err error) {\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nfunc parse_file(filename string) ([]string, []string, []string) {\n... | go | edit | 6 | 5 | apache-2.0 | 4b3466f683b9dd82a9754eeeee16e9584023d6f3 | wickedchicken/dwd-go | dwd.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage fnlog_test\n\nimport (\n\t\"github.com/northbright/fnlog\"\n\t\"log\"\n)\n\nvar (\n\tnoTagLog *log.Logger\n)\n\nfunc Example() {\n\tiLog := fnlog.New(\"i\")\n\twLog := fnlog.New(\"w\")\n\teLog := fnlog.New(\"e\")\n\n\t// Global *log.Log... | go | edit | 0 | 1 | mit | 8ecde54d772bad9bd6de683c6c44785794663756 | vonwenm/fnlog | unit_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2016 Hajime Hoshi\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apa... | go | edit | 0 | 1 | apache-2.0 | bbcee77b028aa3fbd9c54fe129efcbd61bbb6365 | hajimehoshi/ebiten,hajimehoshi/ebiten | internal/clock/now.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage formats\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/anaminus/rbxmk\"\n)\n\n// registry contains registered Formats.\nvar registry []func() rbxmk.Format\n\n// register registers a Format to be returned by All.\nfunc register(f func() rbxmk.... | go | edit | 0 | 2 | mit | ee0bb560054d6a1f103a1600838cf8e18c28bd88 | Anaminus/rbxmk,Anaminus/rbxmk | formats/0.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage characteristic\n\ntype Brightness struct {\n\t*Int\n}\n\nfunc NewBrightness(value int) *Brightness {\n\tinteger := NewInt(value, 0, 100, 1, PermsAll())\n\tinteger.Unit = UnitPercentage\n\tinteger.Type = CharTypeBrightness\n\n\treturn &B... | go | edit | 12 | 1 | apache-2.0 | 1000990885c356cd1cb1c68b5a944b76a2c0034e | ninjasphere/hc,mxlje/hc,brutella/hc,savaki/hc,sjfloat/hc,bahlo/hc | model/characteristic/brightness.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 Google Inc. All Rights Reserved.\n// This file is available under the Apache license.\n\n// Package watcher provides a way of watching for filesystem events and\n// notifying observers when they occur.\npackage watcher\n\ntype... | go | edit | 0 | 0 | apache-2.0 | 4ca7c4895f873317efdf03c0ced70ffa322180ed | google/mtail,google/mtail,SuperQ/mtail,SuperQ/mtail | internal/watcher/watcher.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage file_storage\n\nimport (\n\t\"github.com/photoshelf/photoshelf-storage/domain/model\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path\"\n)\n\ntype FileStorage struct {\n\tbaseDir string\n}\n\nfunc NewFileStorage(baseDir string) *FileStorage {\n\tr... | go | edit | 0 | 2 | mit | 13b588d4780024f3f95e4864a087696dba24ab6f | photoshelf/photoshelf-storage | infrastructure/datastore/file_storage/file_storage.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage sub\n\nimport (\n\t\"github.com/Symantec/Dominator/lib/filesystem\"\n\t\"github.com/Symantec/Dominator/lib/hash\"\n\t\"github.com/Symantec/Dominator/lib/triggers\"\n\t\"github.com/Symantec/Dominator/proto/common\"\n\t\"github.com/Symant... | go | edit | 0 | 0 | apache-2.0 | 94a1c4cf2d283dd428ba39836ae3b914b9d51fed | keep94/Dominator,keep94/Dominator,keep94/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator | proto/sub/messages.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//go:generate go run maketables.go > tables.go\n\npackage confusables\n\nimport (\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/unicode/norm\"\n)\n\n// TODO: document casefolding approaches\n// (suggest to force casefold strings; explain how to ... | go | edit | 3 | 3 | bsd-3-clause | fbd3b71e4957684e2fe2025ce0495f4d69ca18aa | mtibben/confusables | confusables.go | accepted | null | 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 btrees\n\n// findLCA walks the binary tree t and returns lowest c... | go | edit | 6 | 7 | mit | f4af5ba51a891e96f0478f1af78788956d0c36e6 | mrekucci/epi,mrekucci/epi | btrees/lca.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage app\n\nimport (\n\t\"strings\"\n\n\t\"github.com/materials-commons/config\"\n\t\"github.com/materials-commons/gohandy/ezhttp\"\n)\n\ntype mcapi struct{}\n\nvar MCApi mcapi\n\nfunc (a mcapi) MCUrl() string {\n\treturn config.GetString(\"... | go | edit | 0 | 3 | mit | ccee01185ebc75db8e3ca0770a02b9b3041ef860 | materials-commons/mcstore,materials-commons/mcstore,materials-commons/mcstore | pkg/app/mcapi.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cc_messages\n\ntype LRPInstanceState string\n\nconst (\n\tLRPInstanceStateStarting LRPInstanceState = \"STARTING\"\n\tLRPInstanceStateRunning LRPInstanceState = \"RUNNING\"\n\tLRPInstanceStateCrashed LRPInstanceState = \"CRASHED\"\n\t... | go | edit | 0 | 0 | apache-2.0 | 40b2949f5fc9ce21afbef2f10fb16dd5a12d83fa | cloudfoundry-incubator/runtime-schema | cc_messages/lrp_instance.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"regexp\"\n\t)\n\nfunc main() {\n\tfile, err := os.Open(\"targetlist.txt\")\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\tos.Exit(1)\n\t}\n\n\tdefer file.Close()\n\n\tscanner := b... | go | edit | 0 | 4 | bsd-3-clause | cb25012908b68435e335e57db0c988ea33179032 | yorickdewid/gocraw,yorickdewid/gocraw | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ishell\n\nimport \"strings\"\n\ntype iCompleter struct {\n\tcmd *Cmd\n}\n\nfunc (ic iCompleter) Do(line []rune, pos int) (newLine [][]rune, length int) {\n\twords := strings.Fields(string(line))\n\tvar cWords []string\n\tprefix := \"\"\... | go | edit | 3 | 8 | mit | d733db274330fc10b378c402cad2d53f51cfcc8d | abiosoft/ishell | completer.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hello\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n)\n\nfunc init() {\n\thttp.HandleFunc(\"/\", handler)\n\n}\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprint(w, \"Hello, world!\")\n\n}\n\n```\n\nApply this change: Cha... | go | edit | 0 | 1 | apache-2.0 | 4b78ef32bcc81ab9949f873779f8775c5ed0e0df | owulveryck/google-app-example | simple-polling.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage scoring\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"time\"\n)\n\n// A point of reference Score.Update and Score.Relevance use to reference the\n// current time. It is used in testing, so we always have the same current\n// time. This is oka... | go | edit | 0 | 1 | mit | 8067cafd70c1a14d313ff1afec7e7f1faff39952 | gsamokovarov/jump | scoring/score.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ocspd\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestParsePEM(t *testing.T) {\n\tfor _, tt := range []string{\"testdata/cert_only\", \"testdata/full\"} {\n\t\tcert, issuer, err := ParsePEMCertificateBundle(tt)\n\t\tif err != n... | go | edit | 0 | 6 | bsd-3-clause | e5e18959f1c2b67cab89e60a9975b30101cc1f18 | tbroyer/ocspd,tbroyer/ocspd | pem_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage async\n\n// import \"fmt\"\n\nfunc Waterfall(routines []Routine, callbacks ...Done) {\n l := New()\n l.Multiple(routines...)\n\n l.RunWaterfall(callbacks...)\n}\n\nfunc (l *List) RunWaterfall(callbacks ...Done) {\n fall := fall(l, c... | go | edit | 18 | 5 | mit | aeeda1e80e814ca09fd39bf405d86a69e00574a9 | Southern/async | waterfall.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage state\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nvar simpleFile = []byte(`\n{\"path\": \"/tmp/no-exist\", \"mode\": 644}\n`)\n\nvar simpleFileMeta = Metadata{\n\tName: \"Simple File\",\n\tType: \"file\",\n\tState: \"rendered\",\n}\n\nf... | go | edit | 6 | 3 | mit | 9208e8ab935914b6daaea10bfdf7f75386109b8d | vektorlab/otter,vektorlab/otter,vektorlab/otter | state/factory_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage flags\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestEnvConfig_Defaults(t *testing.T) {\n\tcmd := new(cobra.Comman... | go | edit | 18 | 1 | apache-2.0 | a70f61974c8ee15716a768ab436aa8c8ee41bd66 | v2tec/watchtower,v2tec/watchtower | internal/flags/flags_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage models\n\nimport (\n\t\"database/sql\"\n\n\t\"github.com/pborman/uuid\"\n\t\"github.com/stripe/stripe-go\"\n)\n\n/*Roaster has information retrieved from stripe and the db\n about billing for roaster entities*/\ntype Roaster struct {\n... | go | edit | 3 | 2 | mit | e80f713e08300c02f93c3cfda9f7d3d0cb608cbf | ghmeier/coinage,ghmeier/coinage | models/roaster.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\n * Datadog API for Go\n *\n * Please see the included LICENSE file for licensing information.\n *\n * Copyright 2013 by authors and contributors.\n */\n\npackage datadog\n\nimport (\n\t\"errors\"\n)\n\n// reqInviteUsers contains email addre... | go | edit | 3 | 1 | bsd-3-clause | c2f27b18a3d94298083d8a2dce491b883fe227aa | DataDog/go-datadog-api,seiffert/go-datadog-api,ojongerius/go-datadog-api,zorkian/go-datadog-api,zorkian/go-datadog-api | users.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//go:build !linux && !freebsd\n\npackage tuntap\n\nconst flagTruncated = 0\n\nfunc createInterface(ifPattern string, kind DevKind) (*Interface, error) {\n\tpanic(\"tuntap: Not implemented on this platform\")\n}\n\n```\n\nApply this change: Add ... | go | edit | 0 | 1 | apache-2.0 | a099b5569c226e498ab33e17a116be207557497d | mistsys/tuntap,mistsys/tuntap | tun_other.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage dns\n\nimport (\n\t\"testing\"\n)\n\nfunc TestRadixName(t *testing.T) {\n\ttests := map[string]string{\".\": \".\",\n\t\t\"www.miek.nl.\": \".nl.miek.www\",\n\t\t\"miek.nl.\": \".nl.miek\",\n\t\t\"mi\\\\.ek.nl.\": \".nl.mi\\\\.ek\"... | go | edit | 0 | 3 | bsd-3-clause | 76d5d8493f853da5e371e761e5c31515883d2ed9 | bragr/dns,benbearchen/dns,tempbottle/dns,janstk/dns,rolandshoemaker/dns,cloudflare/dns,flebarbe/dns,jdef/dns,jmhodges/dns,josephyzhou/dns,skyportsystems/dns,miekg/dns,Psiphon-Inc/dns,letsencrypt/dns,skynet/dns,hugozhu/dns,AlexCheong/dns,bboreham/dns,asergeyev/dns,modulexcite/dns,michaelharo/dns,curtiszimmerman/dns,ym/g... | zone_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main // import \"eriol.xyz/piken\"\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/Sirupsen/logrus\"\n\t\"github.com/mitchellh/go-homedir\"\n)\n\nfunc download(url, output string) error {\n\n\tr, err := http.Get(url)\n... | go | edit | 3 | 4 | bsd-3-clause | 4356e288fb9e4c79b42ea0f5d9b4b1e484b2057f | eriol/piken | utils.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (c) 2016, Janoš Guljaš <<EMAIL>>\n// All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage fileServer\n\nimport (\n\t\"net/http\"\n\t\"os\"\n\t\"pa... | go | edit | 0 | 2 | bsd-3-clause | c9ededb515aefc2e14a021cd38b9313845463524 | janos/httputils,janos/web | file-server/utils.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/mgutz/logxi/v1\"\n)\n\nfunc sendExternal(obj map[string]interface{}) {\n\t// normally you would send this to an external service like In... | go | edit | 9 | 4 | mit | 8da03b29850d4ccf120fae97a202ab7b44474150 | mgutz/logxi | v1/cmd/filter/main.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage system\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// parseCPUInfo returns a newline-delimited string slice of '/proc/cpuinfo'.\nfunc parseCPUInfo() []string {\n\tcached, _ := ioutil.ReadFile(\"/proc/cpui... | go | edit | 0 | 1 | unlicense | 9e0e24f71ab95114af4e1f3f228e51b6f232a344 | mmstick/i3gostatusbar | system/cpu.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2020 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 | 3 | 2 | apache-2.0 | cf440052ef862fdc929cac8f757963aea47c3ee4 | luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go | luciexe/invoke/terminate_unix.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage pachyderm\n\nimport \"go.pedge.io/proto/version\"\n\nconst (\n\t// MajorVersion is the current major version for pachyderm.\n\tMajorVersion = 0\n\t// MinorVersion is the current minor version for pachyderm.\n\tMinorVersion = 10\n\t// Mi... | go | edit | 3 | 0 | apache-2.0 | 77aa5c02fef055b7d1b75db85331c2c6cbe17e78 | pachyderm/pfs,pachyderm/pfs,pachyderm/pfs | pachyderm.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/billhathaway/webcounter\"\n)\n\nconst (\n\tdefaultPort = \"8080\"\n)\n\nfunc main() {\n\tport := flag.String(\"p\", defaultPort, \"listen port\")\n\tflag.Parse()\... | go | edit | 0 | 3 | apache-2.0 | 49a8b381177d46149c75210d3990b4e381bded6e | billhathaway/webcounter | wcserver/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage of10\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n)\n\nconst MaxPortNameLength = 16\nconst EthernetAddressLength = 6\n\ntype PortNumber uint16\ntype PortConfig uint16\ntype PortState uint16\ntype PortFeature uint16\n\ntype PhysicalP... | go | edit | 0 | 2 | mit | 4def0dfd5b3cb6a47b46798f5a660c33edd1c519 | oshothebig/goflow | of10/port.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nPackage aetest provides an API for running dev_appserver for use in tests.\n\nAn example test file:\n\n\tpackage foo_test\n\n\timport (\n\t\t\"testing\"\n\n\t\t\"google.golang.org/appengine/memcache\"\n\t\t\"google.golang.org/appengine/aete... | go | edit | 0 | 0 | apache-2.0 | 7bed6a18ea6f00deda4ea0b2797f715c7c555a6c | golang/appengine,fuchsia-mirror/third_party-github.com-golang-appengine,golang/appengine,fuchsia-mirror/third_party-github.com-golang-appengine | aetest/doc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage templates\n\nconst (\n\t/* Provider template */\n\tproviderTemplate = `\nprovider \"aws\" {\n\tregion = \"{{ .Region }}\"\n\tprofile = \"{{ .Account }}\"\n}\n`\n\n\t/* Terraform Backend */\n\tbackendTemplate = `\nterraform {\n\trequire... | go | edit | null | null | apache-2.0 | 59258b73f783d447d98711fe6dd6e75bf584d960 | bdastur/utils,bdastur/utils,bdastur/utils,bdastur/utils,bdastur/utils | tfbootstrap/src/github.com/bdastur/templates/templates.go | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage storage\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/docker/distribution\"\n\t\"github.com/docker/distribution/digest\"\n)\n\n// layerReader implements Layer and provides facilities for reading and\n// seeking.\ntype layerR... | go | edit | 18 | 2 | apache-2.0 | fdd631477622bdb475a6078007ea2975b2231175 | thaJeztah/distribution,thaJeztah/distribution | docs/storage/layerreader.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage httpd\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"github.com/Symantec/Dominator/lib/html\"\n\t\"net/http\"\n)\n\nfunc (s *state) statusHandler(w http.ResponseWriter, req *http.Request) {\n\twriter := bufio.NewWriter(w)\n\tdefer writer.Flus... | go | edit | 6 | 3 | apache-2.0 | 30e546432dac60a1497e4ada1c52b57e96b856b1 | rgooch/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator,keep94/Dominator,rgooch/Dominator,Symantec/Dominator,Symantec/Dominator,keep94/Dominator | lib/filegen/httpd/status.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage command\n\nimport (\n\t\"github.com/cloudfoundry/cli/cf/command_metadata\"\n\t\"github.com/cloudfoundry/cli/cf/requirements\"\n\t\"github.com/codegangsta/cli\"\n)\n\ntype Command interface {\n\tMetadata() command_metadata.CommandMetadat... | go | edit | 0 | 0 | apache-2.0 | 3581d8b25c9237bcd81004b0b7853423f2d8cbea | cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli | cf/command/command.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage mapper\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/wanelo/image-server/core\"\n\t\"github.com/wanelo/image-server/encoders/base62\"\n)\n\ntype SourceMapper struct {\n\tServerConfiguration *core.ServerConfiguration\n}\n\n// RemoteImageURL r... | go | edit | 0 | 2 | mit | 8d76955b45ff48ae33af6890960110a552c55f9a | wanelo/image-server,image-server/image-server,wanelo/image-server,image-server/image-server,image-server/image-server | source_mapper/waneloS3/mapper.go | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.