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 osin\n\nimport (\n\t\"encoding/base64\"\n\t\"strings\"\n\n\t\"github.com/satori/go.uuid\"\n)\n\n// AuthorizeTokenGenDefault is the default authorization token generator\ntype AuthorizeTokenGenDefault struct {\n}\n\nfunc removePadding(to... | go | edit | 11 | 2 | bsd-3-clause | 245d299b4d56287925324dba0e1607cbf3103ce0 | liggitt/osin,Iceyer/osin,gpndata/osin,airondumael/osin,DejaMi/osin,observadorpt/osin,lancecarlson/osin,go-osin/osin,jonnyreeves/osin,girirajsharma/osin,oyediyildiz/osin,gogap/oauth2,ahmet/osin,agtorre/osin,hoysoft/osin,Inflatablewoman/osin,RangelReale/osin,helojo/osin | tokengen.go | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2012 Aaron Jacobs. All Rights Reserved.\n// Author: <EMAIL> (Aaron Jacobs)\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 o... | go | edit | 3 | 1 | apache-2.0 | 5224e2f04ebbc5220b0f66b70affe592b69d20cd | jacobsa/aws | s3/auth/signer.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright (c) 2014 VMware, Inc. All Rights Reserved.\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... | go | edit | 3 | 0 | apache-2.0 | 094fbdfe85e6366606f8f8c851876ec50de2ab2f | l1jiang/govmomi,cgtexmex/govmomi,bruceadowns/govmomi,dougm/govmomi,kristinn/govmomi,mevansam/vsphere-govmomi,mevansam/vsphere-govmomi,dougm/govmomi,RotatingFans/govmomi,l1jiang/govmomi,l1jiang/govmomi,jrmycanady/govmomi,vmware/govmomi,vmware/govmomi,bruceadowns/govmomi,caglar10ur/govmomi,mevansam/vsphere-govmomi,ilikej... | object/network_reference.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//\n// openzwave provides a thin Go wrapper around the openzwave library.\n//\n// The following shows a simple use of the API which will log every notification received.\n//\n// var loop = func(api openzwave.API) {\n// fmt... | go | edit | 0 | 0 | mit | 1af71d9558e7ed102f1daf97fa14f13196fe4c72 | ninjasphere/go-openzwave,ninjasphere/go-openzwave,ninjasphere/go-openzwave,ninjasphere/go-openzwave,ninjasphere/go-openzwave,ninjasphere/go-openzwave | overview.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2014-2015 Chadev. 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 meetup\n\nimport (\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestGetM... | go | edit | 0 | 3 | bsd-3-clause | 94ac13fd9f4cdc91c70211f97ff4c2c6a78bda66 | chadev/Chadev_ircbot | meetup/meetup_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/pierrre/mangadownloader\"\n)\n\nfunc main() {\n\tvar service mangadownloader.Service = &mangadownloader.MangaReaderService{}\n\tmangas, err := service.Mangas()\n\tif err != nil {\n\t\tpanic(er... | go | edit | 0 | 5 | mit | b2e639cf10840f7f423406a100ea9ef52e45b6f6 | pierrre/mangadownloader | cmd/mangadownloader.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(\"CF Dotnet Buildpack\", func() {\n\tvar (\... | go | edit | 30 | 1 | apache-2.0 | f9d787a45976c8dc0eafb564a67124d6b385293a | cloudfoundry-community/asp.net5-buildpack | src/dotnetcore/integration/deploy_app_with_multiple_projects_test.go | rejected_lint | Too many lint violations: 30 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//go:build openbsd\n// +build openbsd\n\npackage kernel\n\nimport (\n\t\"fmt\"\n\t\"runtime'\n)\n\n// A stub called by kernel_unix.go .\nfunc uname() (*Utsname, error) {\n\treturn nil, fmt.Errorf(\"Kernel version detection is not available on %... | go | edit | 3 | 1 | apache-2.0 | a39bbc7f52c0ae1356610a5f1eaf1b31c8821956 | containers/storage,containers/storage,containers/storage | pkg/parsers/kernel/uname_unsupported.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage middleware\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"github.com/nats-io/nuid\"\n)\n\ntype ctxRequestIDKeyType int\n\nconst CtxRequestIDKey int = 0\n\nconst (\n\theaderXRequestID = \"X-Request-ID\"\n)\n\ntype RequestID struct {\n... | go | edit | 0 | 2 | mit | 64ca0405ad515b212c4869fcc2e56138f5227b18 | celrenheit/lion | middleware/requestid.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage peer\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"testing\"\n)\n\nfunc TestCrStates(t *testing.T) {\n\tt.Log(\"Running Peer Tests\")\n\n\ttext, err := ioutil.ReadFile(\"crstates.json\")\n\tif err != nil {\n\t\tt.Log(err)\n\t}\n\tcrState... | go | edit | 0 | 5 | apache-2.0 | 8070bfeb4ec352f45c6337ca342b26ed1f349d0d | orifinkelman/incubator-trafficcontrol,amiryesh/incubator-trafficcontrol,amiryesh/incubator-trafficcontrol,knutsel/traffic_control-1,mdb/incubator-trafficcontrol,hbeatty/incubator-trafficcontrol,zhilhuan/incubator-trafficcontrol,mdb/incubator-trafficcontrol,mdb/incubator-trafficcontrol,serDrem/incubator-trafficcontrol,h... | traffic_monitor/experimental/traffic_monitor/peer/peer_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/base64\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc BasicAuth(handler http.HandlerFunc, username, password string) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\t\tauthError ... | go | edit | 0 | 4 | mit | 0942997609b90a6b1bd031d628503f7387840a61 | donatj/explainer | http.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n\tloop(100000)\n}\n\nfunc loop(duration int) {\n\tfor i := 0; i < duration; i++ {\n\t\tfmt.Println(fmt.Sprintf(\"Loop number %d\", i))\n\t}\n}\n\n```\n\nApply this change: Use the same number ope... | go | edit | 0 | 2 | mit | 02b17f39ca22db1414899965b9a17b1e171baa48 | lukevers/go-and-hack,lukevers/go-and-hack | looping/looping.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*-\n * Copyright (c) 2016, Jörg Pernfuß <<EMAIL>>\n * All rights reserved\n *\n * Use of this source code is governed by a 2-clause BSD license\n * that can be found in the LICENSE file.\n */\n\npackage msg\n\nimport (\n)\n\ntype Supervisor st... | go | edit | 9 | 0 | bsd-2-clause | 37c7fb771a7127467932ec3da0873bc762fd2916 | 1and1/soma | lib/msg/supervisor.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"net/http\"\n\n// Wiki represents the entire Wiki, contains the db\ntype Wiki struct {\n\tstore Storage\n}\n\n// NewWiki creates a new Wiki\nfunc NewWiki(s Storage) *Wiki {\n\t// Setup the wiki.\n\tw := &Wiki{store: s}\n... | go | edit | 21 | 7 | mit | 5241cdb4403e99e6debd06c2d6ed2d8e4d1f3bfd | kalafut/finiki,kalafut/finiki,kalafut/finiki,kalafut/finiki | wiki.go | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage pubsub\n\ntype Subscriber interface {\n\tSubscribe(name, topic string) (<-chan Event, error)\n}\n\nfunc (p *Inmem) Subscribe(name, topic string) (<-chan Event, error) {\n\tevents := make(chan Event)\n\tsub := subscription{\n\t\tname: ... | go | edit | 18 | 4 | mit | e000fec3c0d47b5752523614bf52ed120936a7da | groob/micromdm,micromdm/micromdm,mosen/micromdm,micromdm/micromdm,natewalck/micromdm,mosen/micromdm,groob/micromdm | pubsub/consumer.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage chuper\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/PuerkitoBio/fetchbot\"\n)\n\ntype Context struct {\n\t*fetchbot.Context\n\tC Cache\n}\n\nfunc (c *Context) Cache() Cache {\n\treturn c.C\n}\n\nfunc (c *Context) Queue() *fetchbot.Queue... | go | edit | 15 | 3 | bsd-3-clause | 94eb97bfe9d18ee8093b83562e17ee600c055a1b | sluceno/chuper,oli-g/chuper | context.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage metafora\n\n// CoordinatorContext is the context passed to coordinators by the core\n// consumer.\ntype CoordinatorContext interface {\n\tLogger\n}\n\n// Coordinator is the core interface Metafora uses to discover, claim, and\n// tasks ... | go | edit | 3 | 0 | apache-2.0 | 6bfb9080471305e088ad2ecd39313e404106ddf8 | schmichael/metafora,lytics/metafora,schmichael/metafora,lytics/metafora | coordinator.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gitbucket\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n)\n\ntype RepositoriesService struct {\n\tclient *Client\n}\n\n// Repository represents a API user.\ntype Repository struct {\n\tName *string `json:\"name\"`\n\tFullName *s... | go | edit | 0 | 3 | mit | f06c3c212042ec7f2be2388796a068aad7d1dda3 | shiena/go-gitbucket | gitbucket/repos.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage env\n\nimport \"io/ioutil\"\n\nfunc WriteScriptTo(fileName string, contents string) error {\n\treturn ioutil.WriteFile(fileName, []byte(contents), 0744)\n}\n\nfunc ExecuteScript(scriptPath string) (string, error) {\n\treturn ExecuteComm... | go | edit | 3 | 1 | apache-2.0 | 7495e1c99c57f91d9a150af200d4d91b407907e0 | maxamillion/flamingo,tmrts/flamingo,maxamillion/flamingo,rtnpro/flamingo,tmrts/flamingo | pkg/env/script.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nfunc main() {\n\tLog(\"main.start\")\n\n\tqueryInterval := QueryInterval()\n\tdatabaseUrl := DatabaseUrl()\n\tlibratoAuth := LibratoAuth()\n\tqueryFiles := ReadQueryFiles(\"./queries/*.sql\")\n\n\tmetricBatches := make(chan []in... | go | edit | 39 | 1 | mit | d242ab9b1479a6aebe8e5cbd6b6ae48fb845f950 | mmcgrana/pg2librato | pg2librato.go | rejected_lint | Too many lint violations: 39 | true |
[
{
"role": "user",
"content": "Write go code for the following: Add test for the Route.Watch/3 method."
},
{
"role": "assistant",
"content": "package devd\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/cortesi/termlog\"\n)\n\nfunc ad... | go | new_file | 3 | 5 | mit | e002607a44f4bfbc36f6be6be6f7077b0073bae3 | cortesi/devd,cortesi/devd,cortesi/devd,cortesi/devd | watch_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage faker\n\nimport (\n\t\"math/rand\"\n\t\"time\"\n)\n\nfunc getRandValueInRange(rangeSize int, epsilon float64) float64 {\n\trand.Seed(time.Now().UTC().UnixNano())\n\n\tmaxDataWithError := float64(rangeSize) + 2*epsilon\n\n\tdataInRange :... | go | edit | 0 | 1 | mit | 8eda5a1e6afc21ad5231db1e6ade6e772df9a263 | mingrammer/go-codelab | faker/range.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar (\n\tformat string\n)\n\nfunc main() {\n\tvar jsonObjects []map[string]interface{}\n\n\tenc := json.NewDecoder(os.Stdin)\n\t_ = enc.Decode(&jsonObjects)\n\... | go | edit | 0 | 3 | mit | 242acf38561a7eeb35eba2bec04cafb14f12dd74 | carlmjohnson/junix | cmd/format/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage commands\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\t\"syscall\"\n\n\t\"github.com/khlieng/name_pending/Godeps/_workspace/src/github.com/spf13/cobra\"\n\n\t\"github.com/khlieng/name_pending/storage\"\n)\n\nvar (\n\ted... | go | edit | 0 | 5 | mit | 1f5dd7a5e07da465712eb2b558af27e3714f010d | khlieng/name_pending,postfix/name_pending,khlieng/dispatch,khlieng/dispatch,postfix/name_pending,khlieng/name_pending,khlieng/name_pending,postfix/name_pending,khlieng/dispatch,postfix/name_pending,khlieng/name_pending | commands/config.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage commands\n\nimport (\n\t\"fmt\"\n\t\"github.com/codegangsta/cli\"\n\t\"github.com/brooklyncentral/brooklyn-cli/api/application\"\n\t\"github.com/brooklyncentral/brooklyn-cli/command_metadata\"\n\t\"github.com/brooklyncentral/brooklyn-cl... | go | edit | 0 | 1 | apache-2.0 | 6a5a115fedc5ce48cc016a3ca4809356882fbc4f | brooklyncentral/brooklyn-cli,brooklyncentral/brooklyn-cli,lloyddave/brooklyn-cli,lloyddave/brooklyn-cli | commands/create.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2013 Chris McGee <<EMAIL>>. 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\n\npackage gdblib\n\nimport (\n\t\"go/build\"\n\t\"os\"... | go | edit | 0 | 3 | bsd-2-clause | 772aff99a91161cae47caa031c7c6dedafce9a83 | albfan/gdblib,sirnewton01/gdblib | osutil_windows.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (C) 2017 Damon Revoe. All rights reserved.\n// Use of this source code is governed by the MIT\n// license, which can be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc substTestCase(t... | go | edit | 0 | 4 | mit | 2d2ec43ef2e47a2645b15c99a72758d5ebe6721b | revl/autoforge | paths_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"errors\"\n)\n\ntype row []int\ntype matrix []row\n\n// check returns an error if matrix is irregular\n// and cannot be transposed.\nfunc (m matrix) check() (err error) {\n\tl := len(m[0])\n\tfor _, x := range m {\n... | go | edit | 0 | 4 | isc | a6bcef8e744492c3b2bb1ca31f6ecb2690b5c11d | sstark/droguedrums,sstark/droguedrums,sstark/droguedrums,sstark/droguedrums | src/matrix.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2013 Landon Wainwright. 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// Starts up the blog system using the default values\npackage main\n\nimport... | go | edit | 0 | 2 | bsd-3-clause | bc76cf8d6c5690df7f769d7919fcc37206a5aea3 | landonia/landotube,landonia/landotube | landoblog/landoblog.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/phalaaxx/cdb\"\n)\n\n/* VerifyLocal checks if named mailbox exist in a local cdb database */\nfunc VerifyLocal(name string) bool {\n\tvar value *string\n\terr := cdb.Lookup(\n\t\tLocalCdb,\n\t\tfunc(db *... | go | edit | 0 | 4 | bsd-2-clause | b0fac61f1787ca6eb4988c5ca0141d3266398a57 | phalaaxx/ratemilter | local.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage client\n\nimport (\n\t\"github.com/ibrt/go-oauto/oauto/api\"\n\t\"net/http\"\n\t\"fmt\"\n\t\"encoding/json\"\n\t\"github.com/go-errors/errors\"\n\t\"bytes\"\n)\n\nfunc Authenticate(baseURL string, request *api.AuthenticateRequest) (*api... | go | edit | 0 | 5 | mit | 9de9885e958bd7cbbdb26aa325e477d841f82e18 | ibrt/go-oauto,ibrt/go-oauto | oauto/client/authenticate.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage etcdutil\n\nimport (\n\t\"path\"\n\n\t\"github.com/coreos/go-etcd/etcd\"\n)\n\n// Creates the given dir (and all of its parent directories if they don't\n// already exist). Will not return an error if the given directory already\n// exi... | go | edit | 0 | 6 | apache-2.0 | 908a92f10083be6315736df9d7a8dab39d188997 | grooveshark/golib,grooveshark/golib | etcdutil/etcdutil.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage irc\n\nimport(\n\t\"testing\"\n)\n\nfunc TestParseMessage(t *testing.T) {\n\tmsg_string := \":kyle!~kyle@localhost PRIVMSG #tenyks :tenyks: messages are awesome\"\n\tmsg := ParseMessage(msg_string)\n\tif msg == nil {\n\t\tt.Error(\"Expe... | go | edit | 9 | 5 | mit | a15624341856ac04f7aab1ee1014cebb1066f5fa | kyleterry/tenyks,kyleterry/tenyks,jtperreault/tenyks,jtperreault/tenyks | irc/message_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// (c) Copyright IBM Corp. 2021\n// (c) Copyright Instana Inc. 2020\n\npackage internal_test\n\nimport (\n\t\"sync/atomic\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/instana/go-sensor/autoprofile/internal\"\n\t\"github.com/instana/testify/as... | go | edit | 0 | 1 | mit | 871f9265c92d361e33efef58bb075ccb0189225a | instana/golang-sensor,instana/golang-sensor | autoprofile/internal/timer_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/ymichael/sessions\"\n\t\"github.com/zenazn/goji\"\n\t\"github.com/zenazn/goji/web\"\n)\n\nvar (\n\tSessions = sessions.NewSessionOptions(\"thisismysecret.\", &sessions.Memory... | go | edit | 0 | 2 | mit | 894c043193fefb2dcb9cc86b346f95a067adbc4c | ymichael/sessions | examples/server.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2016 The Fission 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.org... | go | edit | 15 | 1 | apache-2.0 | 3ed5e772cf8d104238ec083432151f391e12476e | life1347/fission,platform9/fission,ktrance/fission,ktrance/fission,life1347/fission,life1347/fission,platform9/fission,ktrance/fission,platform9/fission,ktrance/fission,life1347/fission,ktrance/fission,fission/fission,life1347/fission,life1347/fission,ktrance/fission,life1347/fission,platform9/fission,fission/fission,l... | router/router_test.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//----------------------------------------\n//\n// Copyright © ying32. All Rights Reserved.\n//\n// Licensed under Apache License 2.0\n//\n//----------------------------------------\n\n// +build windows linux\n// +build !tempdll\n// +build !mem... | go | edit | 0 | 1 | apache-2.0 | 14e2f48cd7611d9fdbfbbc77118cb732a1a0b557 | ying32/govcl | vcl/api/dylib_nontempdll.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage scwversion\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/smartystreets/goconvey/convey\"\n)\n\nfunc TestInit(t *testing.T) {\n\tConvey(\"Testing init()\", t, func() {\n\t\tSo(VERSION, ShouldNotEqual, \"\")\n\t\tSo(GITCOMMIT, ShouldNotE... | go | edit | 6 | 1 | mit | 0e8f50ede6cdb1d39c095e050db0f64522e33fdf | QuentinPerez/scaleway-cli,QuentinPerez/scaleway-cli,QuentinPerez/scaleway-cli | pkg/scwversion/version_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"compress/gzip\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"sync\"\n)\n\ntype gzipPool struct {\n\tmutex sync.Mutex\n\ttop *gzipPoolEntry\n}\n\ntype gzipPoolEntry struct {\n\tgz *gzip.Writer\n\tnext *gzipPoolEntry\n}\n\nfu... | go | edit | 6 | 2 | mit | 6007f1a99b0127608c7072b12684060a615b777e | DarthSim/imgproxy,DarthSim/imgproxy | gzippool.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage fastly\n\nimport (\n\t\"bytes\"\n\t\"encoding\"\n)\n\ntype statusResp struct {\n\tStatus string\n\tMsg string\n}\n\nfunc (t *statusResp) Ok() bool {\n\treturn t.Status == \"ok\"\n}\n\n// Ensure Compatibool implements the proper inter... | go | edit | 0 | 2 | mit | 2c6774b38ec06c84bff0feb701935ceab2f5b131 | alienth/go-fastly,sethvargo/go-fastly,aerostitch/go-fastly,aerostitch/go-fastly | fastly.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage providers\n\nimport (\n\t. \"bitbucket.org/sinbad/git-lob/Godeps/_workspace/src/github.com/onsi/ginkgo\"\n\t. \"bitbucket.org/sinbad/git-lob/Godeps/_workspace/src/github.com/onsi/gomega\"\n\t. \"bitbucket.org/sinbad/git-lob/util\"\n\t\"... | go | edit | 9 | 2 | apache-2.0 | 84246047aab398a8f6c54e3ea5f13b14154fb01f | atlassian/git-lob,atlassian/git-lob | providers/providers_suite_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nPackage response provides helpers and utils for working with HTTP response\n*/\npackage response\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\n// JSON returns data as json response\nfunc JSON(ctx context.Context, w h... | go | edit | 3 | 4 | mit | 8b3863b00d216214994608ebb88d0cf6bbdaa290 | vardius/go-api-boilerplate,vardius/go-api-boilerplate,vardius/go-api-boilerplate | pkg/http/response/json.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage moka\n\nimport \"testing\"\n\ntype Register struct{}\n\nfunc New(testingT *testing.T) Register {\n\treturn Register{}\n}\n\nfunc (r Register) Allow(double Double) Subject {\n\treturn Subject{double: double}\n}\n\nfunc (r Register) Expec... | go | edit | 0 | 1 | apache-2.0 | 3341cf60f76b52b73408c9dce4108ad37510afbe | gcapizzi/moka | register.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gister\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"flag\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\t\"strings\"\n)\n\nfunc Test_main() {\n\n}\n\n```\n\nApply this change: Move test to package main to mak... | go | edit | 0 | 1 | mit | eba2804e3318b997b120fdbf9fa7a2f57949f8dc | delta24/gist | gister_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\ntype Productor struct {\n\titems [][]string\n\tindexes []int\n\tch chan []int\n}\n\nfunc NewProductor(items [][]string, ch chan []int) *Productor {\n\treturn &Productor{\n\t\titems: items,\n\t\tindexes: make([]int, len(... | go | edit | 0 | 3 | mit | 1274b90cdba187b7e915de2155ea0a66b6a92032 | kusabashira/prod | product.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package rules contains specific rules as subpackages to check a Makefile against\npackage rules\n\nimport (\n\t\"github.com/mrtazz/checkmake/parser\"\n)\n\n// Rule is the type of a rule function\ntype Rule interface {\n\tName() string\n\tDes... | go | edit | 0 | 1 | mit | 9689d029f76ee968a224644a2bdfd0363271747b | mrtazz/checkmake | rules/rules.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cypress\n\nimport \"sync\"\n\nvar pbBufPool sync.Pool\n\nfunc init() {\n\tpbBufPool.New = newBuf\n}\n\nfunc newBuf() interface{} {\n\treturn make([]byte, 128)\n}\n\n```\n\nApply this change: Use a closure rather than a standalone func"
... | go | edit | 0 | 1 | bsd-3-clause | e15e9acf4cad6dd04a36131bff2cf42fd059e022 | vektra/cypress,vektra/cypress | buffer.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/yuya-takeyama/argf\"\n)\n\nvar (\n\tname = \"catn\"\n\tusage = fmt.Sprintf(\"usage: %s N [FILE]...\", name)\n)\n\nfunc printErr(err error) {\n\tfmt... | go | edit | 0 | 9 | mit | aae6f952495e2ec28264a58fa96a32787164f0ce | kusabashira/catn | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2014, Truveris Inc. All Rights Reserved.\n// Use of this source code is governed by the ISC license in the LICENSE file.\n\npackage ygor\n\nimport (\n\t\"regexp\"\n\t\"strings\"\n)\n\nvar (\n\t// Detect a MINIOMSG (minion communica... | go | edit | 0 | 3 | isc | f0d17c4283b4252b6d5cac6b8e0275f538a6765e | cnejame/ygor,truveris/ygor,cnejame/ygor,cnejame/ygor,cnejame/ygor,truveris/ygor,truveris/ygor | minionmsg.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\tlog \"github.com/Sirupsen/logrus\"\n\t\"github.com/bobtfish/AWSnycast/daemon\"\n\t\"os\"\n)\n\nvar (\n\tdebug = flag.Bool(\"debug\", false, \"Enable debugging\")\n\tf = flag.S... | go | edit | 12 | 5 | apache-2.0 | eaa30a038b8ab4e82f27c6289f4dedd09634f405 | bobtfish/docker-consul-awsnycast,bobtfish/docker-consul-awsnycast,bobtfish/AWSnycast,bobtfish/docker-consul-awsnycast,bobtfish/AWSnycast,bobtfish/AWSnycast | main.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build gofuzz\n\npackage types\n\nimport \"encoding/json\"\n\nfunc FuzzPlaceCountainer(data []byte) int {\n\tvar pc = &PlaceCountainer{}\n\n\t// Let's unmarshal, this is not our job so \"bleh\"\n\terr := json.Unmarshal(data, pc)\n\tif err !=... | go | edit | 3 | 3 | unlicense | 106a9e92176ce276487d495d0f9f84bb57efbb1f | aabizri/navitia,aabizri/navitia | place_fuzz.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage nativesequence\n\nimport (\n\t\"testing\"\n\t\"github.com/johnny-morrice/godelbrot/base\"\n\t\"github.com/johnny-morrice/godelbrot/nativebase\"\n)\n\nfunc TestSequence(t *testing.T) {\n\tif testing.Short() {\n\t\tpanic(\"nativesequence ... | go | edit | 3 | 3 | mit | 18d63456bc4be5f5d7c8aac402b8758a73e23b38 | johnny-morrice/godelbrot | nativesequence/nativesequentialrender_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage common\n\nconst (\n\tTHRUST_VERSION = \"0.7.5\"\n\tTHRUST_GO_VERSION = \"0.2.7\"\n)\n\n```\n\nApply this change: Update Version to 0.3.0 - Stable Windows"
},
{
"role": "assistant",
"content": "package common\n\nconst (\n\... | go | edit | 0 | 0 | mit | 4e189ddc0fc04691e2f5821ac9172b7747879a26 | miketheprogrammer/go-thrust,melvinodsa/go-thrust | common/versions.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n)\n\nconst (\n\tVERSION = \"0.1.0\"\n)\n\nvar options struct {\n\tPath string\n\tPort int\n\tToken string\n\tAuth bool\n}\n\nvar services []Service\n\nfunc main() {\n\tflag.StringVar... | go | edit | 9 | 5 | mit | 622c9c8e75c5ba11f3d931333bc641b605dbc823 | sosedoff/envd | envd.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"testing\"\n\nfunc TestNoSpacePackage(t *testing.T) {\n\tbuffer := `packagenospace\ntype T Peg {}\nGrammar <- !.\n`\n\tp := &Peg{Tree: New(false, false), Buffer: buffer}\n\tp.Init()\n\terr := p.Parse()\n\tif err == nil {... | go | edit | 9 | 2 | bsd-3-clause | 14e0cac4fd556844afa0caa972129253eb82bf58 | pointlander/peg | nospace_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"flag\"\n \"log\"\n\n \"github.com/fimad/ggircd/irc\"\n)\n\nvar configFile = flag.String(\"config\", \"/etc/ggircd.conf\",\n \"Path to a file containing the irc daemon's configuration.\")\n\nfunc main() {\n flag... | go | edit | 0 | 1 | mit | 98858f51dad950dddaa665096d4952b01c89528e | fimad/ggircd | ggircd/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hostaccess\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/gorilla/websocket\"\n\t\"github.com/rancher/go-rancher/client\"\n)\n\ntype RancherWebsocketClient client.RancherClient\n\nfunc (c *RancherWebsocketClient) GetHostAccess(resource client... | go | edit | 15 | 3 | apache-2.0 | bf030de1d0a769654eebe474c66fb55cf4b3152b | rancherio/go-rancher,rancher/go-rancher,rancherio/go-rancher,rancher/go-rancher | hostaccess/instance.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage crypto\n\nimport (\n\t\"io\"\n\n\tboshsys \"github.com/cloudfoundry/bosh-utils/system\"\n)\n\ntype Digest interface {\n\tVerify(io.Reader) error\n\tVerifyFilePath(filePath string, fs boshsys.FileSystem) error\n\tAlgorithm() Algorithm\n\... | go | edit | 0 | 0 | apache-2.0 | b334e8e896d41a860013216910c95565fa07883e | gu-bin/bosh-agent,mattcui/bosh-agent,mattcui/bosh-agent,mattcui/bosh-agent,gu-bin/bosh-agent,gu-bin/bosh-agent,cloudfoundry/bosh-agent,cloudfoundry/bosh-agent | vendor/github.com/cloudfoundry/bosh-utils/crypto/interfaces.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/codegangsta/cli\"\n\t\"os\"\n\t\"time\"\n)\n\nfunc main() {\n\tapp := cli.NewApp()\n\tapp.Name = \"tad\"\n\tapp.Usage = \"print the date and time\"\n\tapp.Action = func(c *cli.Context) {\n\t\t... | go | edit | 0 | 1 | mit | f5c692b31dadeaccb8227508f53136dcf58b0ab6 | brettchalupa/dat | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage herd\n\nimport (\n\t\"github.com/Symantec/Dominator/dom/mdb\"\n)\n\nfunc (herd *Herd) mdbUpdate(mdb *mdb.Mdb) {\n\therd.subsByIndex = nil\n\tif herd.subsByName == nil {\n\t\therd.subsByName = make(map[string]*Sub)\n\t}\n\tfor _, sub := ... | go | edit | 12 | 10 | apache-2.0 | 16bf85fc85d292271efdd3b9fcbc91abe1e2c4de | rgooch/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator,Symantec/Dominator,Symantec/Dominator,keep94/Dominator,rgooch/Dominator,keep94/Dominator | dom/herd/mdb.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage channels\n\nimport (\n\t\"log\"\n)\n\ntype FanState struct {\n\tSpeed *float64 `json:\"speed,omitempty\"` // the speed of the fan as a percentage of maximum\n\tDirection *string `json:\"direction,omitempty\"` // the direction o... | go | edit | 9 | 1 | mit | 692ad988d2c678785832561ea999fa22486baba1 | ninjasphere/go-ninja,ninjasphere/go-ninja | channels/Fanstat.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cliext\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n)\n\n// FlagsFlag is a github.com/codegangsta/cli.Flag based on a golang flag.Flag.\ntype FlagsFlag struct {\n\t*flag.Flag\n}\n\n// Apply adds a FlagsFlag to a flag.FlagSet.\nfunc (f FlagsFlag)... | go | edit | 0 | 1 | apache-2.0 | 70837d9759641a6e6c4a8b3869ff2faff35ca267 | sttts/elastic-etcd | cliext/flags.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage fiber\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\t\"github.com/airbrake/gobrake/v5\"\n\n\t\"github.com/gofiber/fiber/v2\"\n)\n\n// New returns a function that satisfies fiber.Handler interface\nfunc New(notifier *gobrake.Notifier) fib... | go | edit | 9 | 2 | mit | 86179ee4fda0562db48f7ceb6d7d7cae962a2d1c | airbrake/gobrake | fiber/fiberbrake.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\"github.com/emgee/go-xmpp/src/xmpp\"\n\t\"github.com/trasa/jabmud/commands\"\n\t\"github.com/trasa/jabmud/world\"\n\t\"log\"\n\t\"strings\"\n)\n\nfunc HandleIq(iq *xmpp.Iq) *xmpp.Iq {\n\tlog.Printf(\"iq: %T: %v\", i... | go | edit | 3 | 2 | mit | 3c0befa89f1d87ac7699a2d63febc0242aeeb582 | trasa/watchmud,trasa/jabmud,trasa/watchmud,trasa/jabmud,trasa/jabmud,trasa/jabmud | jabmud-server/iq.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage config\n\nimport \"flag\"\n\n/*\n\tGets config from command line arguments\n*/\nfunc FromFlags() *Config {\n\tvar expConf ExportConfig\n\n\tflag.StringVar(&expConf.URL, \"url\", \"\", \"Export target\")\n\tflag.StringVar(&expConf.Token,... | go | edit | 12 | 1 | mit | efe4422c9a5df7ed826f989d867e1ec9bc9d3b75 | kayex/chalmers-chop | config/flags.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage meta\n\nimport (\n\t\"errors\"\n\t\"io\"\n)\n\n// VerifyPadding verifies that the padding metadata block only contains 0 bits.\n// The provided io.Reader should limit the amount of data that can be read to\n// header.Length bytes.\nfunc... | go | edit | 0 | 5 | unlicense | 818de6e7da67a15639653699d03281b9471715aa | mewkiz/flac | meta/padding.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage lexers\n\nimport (\n\t. \"github.com/alecthomas/chroma/v2\" // nolint\n)\n\n// FortranFixed lexer.\nvar FortranFixed = Register(MustNewLexer(\n\t&Config{\n\t\tName: \"FortranFixed\",\n\t\tAliases: []string{\"fortranfi... | go | edit | 0 | 0 | mit | 298b727472f2de7563955a6e8414ce2502ecca2c | alecthomas/chroma,alecthomas/chroma,alecthomas/chroma,alecthomas/chroma | lexers/fortran_fixed.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\taguin_api \"aguin/api\"\n\t\"aguin/config\"\n\t\"flag\"\n\t\"fmt\"\n\t\"github.com/go-martini/martini\"\n\t\"github.com/martini-contrib/render\"\n\t\"net/http\"\n\t\"aguin/utils\"\n)\n\nfunc main() {\n\tvar (\n\t\tho... | go | edit | 0 | 3 | mit | 3e1567bd2e5f46fcc91c395834527e9b195f13cf | vanng822/aguin,vanng822/aguin,vanng822/aguin,vanng822/aguin,vanng822/aguin | aguin.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage goat\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"time\"\n)\n\nfunc LogMng(doneChan chan bool, logChan chan string) {\n\t// create log file and pull current time to add to logfile name\n\tcurrentTime := time.Now().Strin... | go | edit | 3 | 5 | mit | 614446ef01af9ab900027b2c3515d847a0a1c347 | mdlayher/goat | src/goat/logger.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage mdb\n\nimport (\n\t\"io\"\n\t\"log\"\n)\n\ntype Machine struct {\n\tHostname string\n\tRequiredImage string\n\tPlannedImage string\n}\n\ntype Mdb struct {\n\tMachines []Machine\n}\n\nfunc (mdb *Mdb) Len() int {\n\treturn len(mdb.M... | go | edit | 6 | 1 | apache-2.0 | a036b58e836fd4bbdc25f83ac658e04aa3ea8d80 | Symantec/Dominator,rgooch/Dominator,keep94/Dominator,keep94/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator,Symantec/Dominator | dom/mdb/api.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\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// Simple static webserver:\n\tlog.Fatal(http.ListenAndServe(\":8080\", http.FileServer(http.Dir(\"./webroot\"))))\n}\n\n```\n\nApply this change: Add some notes as to w... | go | edit | 0 | 1 | mit | cac90d50a1f81b223f5b111e0a943c386499b906 | yumaikas/PISC-mirror,yumaikas/PISC-mirror,yumaikas/PISC-mirror,yumaikas/PISC-mirror | web-ide/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage httpfs\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/CloudyKit/jet\"\n)\n\ntype httpFileSystemLoader struct {\n\tfs http.FileSystem\n}\n\n// NewLoader returns an initialized loader serving the passed http.FileSystem.... | go | edit | 0 | 3 | apache-2.0 | c65f894816be85903e392ce6e4d79cde6b81bfed | CloudyKit/jet,CloudyKit/jet,CloudyKit/jet | loaders/httpfs/loader.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 Jonathan J Lawlor. 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 matrixexp\n\n// not yet implemented\n\n```\n\nApply this change: Add ... | go | edit | 0 | 0 | mit | 23148addf0cb09e7fdd537272312e05823def0a5 | jonlawlor/matrixexp | inv.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage itertools\n\nimport \"math/rand\"\n\ntype seq struct {\n\ti []int\n}\n\n// Creates sequence of values from [0, n)\nfunc newSeq(n int) seq {\n\treturn seq{make([]int, n, n)}\n}\n\nfunc (me seq) Index(i int) (ret int) {\n\tret = me.i[i]\n... | go | edit | 0 | 3 | mit | 226d4725bf5aa05eda7ba36f28ac2f222aac8508 | anacrolix/missinggo | itertools/iterutils.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage raft\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc makeRVWithTerm(term TermNo) *RpcRequestVote {\n\treturn &RpcRequestVote{term, 0, 0}\n}\n\n// 1. Reply false if term < currentTerm (#5.1)\n// Note: this test assumes server in syn... | go | edit | 18 | 2 | mit | a22b83d754a105e7a2002519178e549528b2ab44 | divtxt/raft-consensus,divtxt/raft | consensus_requestvote_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage container\n\nimport (\n\t\"fmt\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"os\"\n\t\"reflect\"\n\t\"testing\"\n)\n\ntype testtype struct {\n\tFoo string\n\tBar string\n}\n\ntype testdata struct {\n\temp interface{}\n\tval interface... | go | edit | 6 | 2 | mit | e3da8c499b3233806806732f357831bd0ae71e65 | photoshelf/photoshelf-storage | infrastructure/container/container_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage challenge2\n\nimport \"testing\"\n\nfunc TestCase1(t *testing.T) {\n\tcases := []struct {\n\t\tin int\n\t\twant bool\n\t}{\n\t\t{120, false},\n\t\t{166, true},\n\t\t{141, true},\n\t\t{79, false},\n\t\t{26, true},\n\t\t{158, true},\n\t... | go | edit | 3 | 3 | mit | 779bc0d9a001c7cfdf7b170f33b731c832ac56ab | royvandewater/go-to-hell,royvandewater/go-to-hell | challenge2/challenge2_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Graceful restarts and shutdowns are not supported\n// on windows, so using usual http.Serve instead.\n//\n// +build windows\n\npackage main\n\nimport (\n\t\"net/http\"\n)\n\n// serve is a wrapper on standard http.Serve method.\nfunc serve(s ... | go | edit | 0 | 1 | bsd-2-clause | 048d623df27426fed084c29773216f08a40de38c | runner-mei/goal,runner-mei/goal,runner-mei/goal | skeleton/win.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2016 Marc-Antoine Ruel. All rights reserved.\n// Use of this source code is governed under the Apache License, Version 2.0\n// that can be found in the LICENSE file.\n\n// playing is a small app to play with the pins, nothing more.... | go | edit | 0 | 5 | apache-2.0 | c24799383bd539dc332fa8612523068a6eb25b45 | maruel/dlibox,maruel/dotstar,maruel/dotstar,maruel/dlibox,maruel/dlibox,maruel/dlibox,maruel/dlibox,maruel/dlibox,maruel/dlibox | cmd/playing/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage tmsh\n\n// ClientSSLProffile contains information about Client SSL profile\ntype ClientSSLProfile struct {\n\tName string `ltm:\"name\"`\n\tComponent string `ltm:\"component\"`\n\n\tCert string ... | go | edit | 0 | 4 | mit | 969ed9e69a9f594cf3c63c453a04479fd62ea981 | shiftky/go-tmsh | profile.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n)\n\n// In most projects, you'd copy asset.go into the current directory,\n// and the below would say \"go run asset.go\".\n//\n//go:generate -command asset go run ../asset.go\n//g... | go | edit | 9 | 3 | mit | 37d23e90183fd4f88613441444b5459ec84513b3 | tv42/becky,tv42/becky | example/main.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 The syscallinfo 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 syscallinfo_test\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/jroim... | go | edit | 0 | 3 | bsd-3-clause | 309349c61b7d68a003b45605b8b79cf4663dfeae | jroimartin/syscallinfo,jroimartin/syscallinfo | example_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage mdb\n\nimport (\n\t\"io\"\n)\n\ntype Machine struct {\n\tHostname string\n\tRequiredImage string `json:\",omitempty\"`\n\tPlannedImage string `json:\",omitempty\"`\n\tDisableUpdates bool `json:\",omitempty\"`\n\tOwnerGroup ... | go | edit | 6 | 2 | apache-2.0 | 9b970240ad45f3004841296c14e93f25838ce341 | Symantec/Dominator,keep94/Dominator,Symantec/Dominator,rgooch/Dominator,keep94/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator,rgooch/Dominator | lib/mdb/api.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage files\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\n// Copy copies a file to a given destination. It makes sur parent folders are\n// created on the way. Use `-` to copy to stdout.\nfunc Copy(src, dst string) error {\n\tif ... | go | edit | 3 | 4 | apache-2.0 | 98fe683f3a67d95435642002a181cc4959ff7e81 | dgageot/getme | files/copy.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright (C) 2016 Red Hat, Inc.\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.org/li... | go | edit | 3 | 1 | apache-2.0 | 7c1a9c7aabcd9f4a6cfb1a18c2b82f6144e7479c | jimmidyson/minishift,thatdocslady/minishift,LalatenduMohanty/minishift,jimmidyson/minishift,minishift/minishift,Preeticp/minishift,minishift/minishift,LalatenduMohanty/minishift,praveenkumar/minishift,budhrg/minishift,praveenkumar/minishift,Preeticp/minishift,minishift/minishift,jimmidyson/minishift,thatdocslady/minish... | pkg/minikube/cluster/cluster_windows.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"os\"\n\t\"os/exec\"\n\t\"os/signal\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/cybozu-go/log\"\n)\n\nvar (\n\tflgIgnoreSigPipe = flag.Bool(\"i\", false, \"ignore SIGPIPE\")\n\tflgClearErrorHandle... | go | edit | 0 | 8 | mit | 3ecb98129a0d5191969bc4c4046aa0a8d893852d | cybozu-go/log | testcmd/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2018 Frédéric Guillot. All rights reserved.\n// Use of this source code is governed by the Apache 2.0\n// license that can be found in the LICENSE file.\n\npackage cli // import \"miniflux.app/cli\"\n\nimport (\n\t\"fmt\"\n\t\"os\"... | go | edit | 3 | 6 | apache-2.0 | 6137b401eec5a96101a6acb3c3547e7269d7eeb6 | xqin/miniflux,miniflux/miniflux,xqin/miniflux,xqin/miniflux,miniflux/miniflux,xqin/miniflux,miniflux/miniflux | cli/create_admin.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ec2\n\nimport (\n\t\"errors\"\n\n\tgoaws \"github.com/aws/aws-sdk-go/aws\"\n\tawsec2 \"github.com/aws/aws-sdk-go/service/ec2\"\n)\n\ntype AvailabilityZoneRetriever struct {\n\tec2ClientProvider ec2ClientProvider\n}\n\nfunc NewAvailabili... | go | edit | 6 | 6 | apache-2.0 | 8884771ea88c8361f37ca313b9507ac55e68c97f | pivotal-cf-experimental/bosh-bootloader,pivotal-cf-experimental/bosh-bootloader,niroyb/bosh-bootloader,niroyb/bosh-bootloader | aws/ec2/availability_zone_retriever.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage index\n\nimport (\n\t\"database/sql\"\n\t\"html/template\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/concourse/atc\"\n\t\"github.com/concourse/atc/db\"\n\t\"github.com/pivotal-golang/lager\"\n)\n\ntype TemplateData struct{}\n\nfunc N... | go | edit | 0 | 4 | apache-2.0 | 3d5157391c693f892c9c25eeebb5fef4ac83cd81 | simonjjones/atc,pivotal-devin-fallak/atc,zachgersh/atc,zachgersh/atc,savaki/atc,zachgersh/atc,savaki/atc,utako/atc,simonjjones/atc,savaki/atc,utako/atc,pivotal-devin-fallak/atc,pivotal-devin-fallak/atc,simonjjones/atc,zachgersh/atc,utako/atc | web/index/handler.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/nlopes/slack\"\n)\n\nfunc main() {\n\tapi := slack.New(\"YOUR_TOKEN_HERE\")\n\tchannels, err := api.GetChannels(false)\n\tif err != nil {\n\t\tfmt.Printf(\"%s\\n\", err)\n\t\treturn\n\t}\n\t... | go | edit | 0 | 3 | bsd-2-clause | be1c037dea6f41b0029af0ee176ce054dbcda3c7 | nlopes/slack,james-lawrence/slack,178inaba/slack | examples/channels/channels.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage image\n\nimport (\n\t\"github.com/thoas/gostorages\"\n\t\"math\"\n\t\"mime\"\n\t\"path\"\n\t\"strings\"\n)\n\ntype ImageFile struct {\n\tSource []byte\n\tProcessed []byte\n\tKey string\n\tHeaders map[string]string\n\tFilepath... | go | edit | 3 | 2 | mit | 28ec40d32246cbb81166970843da2cf83b0535df | thoas/picfit,slidenetwork/picfit,lizdeika/picfit,lizdeika/picfit,nsf/picfit,thoas/picfit,slidenetwork/picfit,lizdeika/picfit,nsf/picfit,slidenetwork/picfit,nsf/picfit | image/file.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/pivotal-cf/cf-rabbit-release/src/rabbitmq-cluster-migration-tool/configuration\"\n)\n\nfunc main() {\n\tmigrator := configuration.NewMigrator(\"\")\n\terr := migrator.MigrateConfiguration()\... | go | edit | 0 | 1 | apache-2.0 | 30dfb23cefd77d780e4db4952e1b271394eb3f4f | pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release,ryheena/rabbitmq,ryheena/rabbitmq,pivotal-cf/cf-rabbitmq-release,shinji62/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release,shinji62/cf-rabbitmq-release | src/rabbitmq-cluster-migration-tool/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage db_test\n\nimport (\n\t\"cred-alert/mysqlrunner\"\n\t\"fmt\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\n\t\"testing\"\n)\n\nfunc TestDB(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"DB Suite\")\... | go | edit | 18 | 1 | apache-2.0 | 111efbfcf660b9fe15dfa608657e2f4274002339 | pivotal-cf/cred-alert,pivotal-cf/cred-alert | src/cred-alert/db/db_suite_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\"github.com/UserStack/ustackd/backends\"\n)\n\ntype UserCollection struct {\n}\n\nfunc (this UserCollection) All() []User {\n\treturn []User{\n\t\tUser{&backends.User{Uid: 1, Email: \"foo\"}},\n\t\tUser{&backends.... | go | edit | 9 | 3 | mit | 6ddfde263b7433e2ab8a9f03e64e3cf86f27b66b | UserStack/ustackweb,UserStack/ustackweb,UserStack/ustackweb,UserStack/ustackweb | src/ustackweb/models/user_collection.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\"encoding/json\"\n\t\"flag\"\n\tlog \"github.com/golang/glog\"\n\t\"github.com/jrupac/goliath/opml\"\n\t\"github.com/jrupac/goliath/storage\"\n)\n\nconst VERSION = \"0.01\"\n\nvar (\n\tdbPath = flag.String(\"dbPath\... | go | edit | 0 | 5 | mit | 37f4ad60ac7454a0400b18fbe2e1171030040c95 | jrupac/goliath,jrupac/goliath,jrupac/goliath,jrupac/goliath,jrupac/goliath | goliath.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*§\n ===========================================================================\n Caravel\n ===========================================================================\n Copyright (C) 2015 Gianluca Costa\n ===============================... | go | edit | 0 | 3 | apache-2.0 | 5362cf69e61de98adbc9e1150116ea98c27fd6b2 | giancosta86/caravel | user.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage browser\n\nfunc openBrowser(url string) error {\n\treturn runCmd(\"cmd\", \"/c\", \"start\", url)\n}\n\n```\n\nApply this change: Fix Windows code to allow multiple GET parameters"
},
{
"role": "assistant",
"content": "packa... | go | edit | 3 | 1 | bsd-2-clause | c13e00210eb1b377f37b8baea84913fc63db11f5 | pkg/browser | browser_windows.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage runid\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\n\t\"github.com/anacrolix/missinggo/expect\"\n)\n\ntype T int64\n\nfunc New(db *sql.DB) (ret *T) {\n\tctx := context.Background()\n\tconn, err := db.Conn(ctx)\n\texpect.Nil(err)\n\t... | go | edit | 0 | 1 | mit | 1ab2af89c3c32bf788d1d1985c1b601489c7b331 | anacrolix/missinggo | runid/sqlite3.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage stats\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"time\"\n)\n\ntype Server struct {\n\tbase\n\n\thistory map[string][]*baseSnapshot\n}\n\nconst (\n\tserverSnapshotIntervl = 5 * time.Second\n\tserverHistorySize =... | go | edit | 24 | 4 | mit | 349d830a609415002acfabe14e8932057eff780d | localhots/satan,localhots/satan,localhots/satan,localhots/satan | stats/server.go | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage openstack\n\nconst (\n\tBaseOps = `---\n- type: replace\n path: /azs\n value:\n - name: z1\n cloud_properties:\n availability_zone: ((az))\n - name: z2\n cloud_properties:\n availability_zone: ((az))\n - name: z3\n ... | go | edit | 0 | 0 | apache-2.0 | 73f5faba9cd044a44c3b2e25f4f8a8fd5327567d | pivotal-cf-experimental/bosh-bootloader,pivotal-cf-experimental/bosh-bootloader | cloudconfig/openstack/base_ops_template.go | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.