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 state\n\nimport \"encoding/json\"\n\ntype Metadata struct {\n\tName string // Unique name to associate with a state\n\tType string // The type of state \"package\", \"file\", etc.\n\tState string // The desired state \"installed\", \"...
go
edit
0
5
mit
186cf60b9b7108b3850edd824a2f3973ab9f233d
vektorlab/otter,vektorlab/otter,vektorlab/otter
state/metadata.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n\t\"github.com/Shopify/sarama/mocks\"\n\t\"github.com/Shopify/sarama\"\n\t\"github.com/docker/docker/daemon/logger\"\n\t\"time\"\n\t\"encoding/json\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\n\n\...
go
edit
3
2
mit
712b6578b62e50af8632f006a311c0f0a68ec010
MickayG/moby-kafka-logdriver
kakfa_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage database\n\nimport (\n\t\"log\"\n\n\t\"github.com/ChristianNorbertBraun/seaweed-banking/seaweed-banking-account-updater/config\"\n\tmgo \"gopkg.in/mgo.v2\"\n)\n\nvar session *mgo.Session\n\n// Configure establish connection to mongodb\n...
go
edit
0
2
mit
65d96f196b6bc1a593f3785c2c6be428bd64cb57
ChristianNorbertBraun/seaweed-banking,ChristianNorbertBraun/seaweed-banking
seaweed-banking-account-updater/database/connection.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/clusterhq/dvol/cmd\"\n\t\"os\"\n\t// \"github.com/ClusterHQ/dvol/dockercontainers\"\n\t// \"github.com/ClusterHQ/dvol/plugin\"\n)\n\nfunc main() {\n\tif err := cmd.RootCmd.Execute(); err...
go
edit
0
2
apache-2.0
4e44e276df3ff74fb1736a418784a39b25862a8f
ClusterHQ/dvol,ClusterHQ/dvol,ClusterHQ/dvol
dvol.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"net/http\"\n)\n\ntype fileHandler struct {\n\tfilename string\n\ttimes int\n}\n\nfunc (f fileHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\thttp.ServeFile(w, r, f.filename)\n}\n\nfunc main() {\n...
go
edit
0
2
mit
3c1c6a964f3d4b4f11ac0ead0008ebac2c267aec
nindalf/goof
goof.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"net\"\n\n\t\"github.com/davecheney/mdns\"\n)\n\nfunc main() {\n\t// A simple example. Publish an A record for my router at 192.168.1.254.\n\n\tmdns.PublishA(\"router.local.\", 3600, net.IPv4(192, 168, 1, 254))\n\n\...
go
edit
9
1
bsd-2-clause
ad4a901c1cbb6af959bd58717d6fb0255fc12422
homburg/mdns,brianm/mdns,davecheney/mdns
examples/mdns-publisher/publisher.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\n\nconch0 collects file info from the \"testfiles\" directory and concurrently\nprocesses the files by decompressing the contents and then printing the\ndata or related error.\n\nThe \"width\" of concurrency is set by the constant \"width\"....
go
edit
0
0
mit
6c8f01d85b89bd09aca011b16204e4a83b0c1aca
daved/conch0
doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage nom\n\n// Object is the interface of all structs in the network object model.\ntype Object interface {\n\t// GOBDecode decodes the object from a byte array using the GOB encoding.\n\tGOBDecode(b []byte) error\n\t// GOBEncode encodes the...
go
edit
3
3
apache-2.0
9e5e66da598121e08526de41d7fb7b0e956a0cb5
kandoo/beehive-netctrl,soheilhy/beehive-netctrl
nom/object.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\n//simple is a simple function, with no combinators.\ntype simple interface {\n\tFunc\n\tcontains(char) bool\n}\n\nfunc (c char) contains(other char) bool { return c == other }\n\nfunc (p pair) contains(c char) bool {\n\tvar firs...
go
edit
21
2
bsd-3-clause
7b8803a317794afd4337f9da1e5de740a97c13a2
anschelsc/pure,anschelsc/pure
eliminate.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"github.com/datamaglia/gimbal/spinner\"\n)\n\nfunc main() {\n config := spinner.LoadJsonConfig(\"test.json\")\n spinner.ExecuteTestConfig(config)\n}\n\n```\n\nApply this change: Set input file from the comma...
go
edit
0
1
mit
2a1d3b6d6408df98f095497c8555bd111d60e1d8
Datamaglia/gimbal
gimbal.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2013 The Bufferpool Authors. All rights reserved.\n// Use of this source code is governed by the BSD 2-Clause license,\n// which can be found in the LICENSE file.\n\npackage bufferpool_test\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"...
go
edit
0
2
bsd-2-clause
e1d649b029930cd0df4625277d37b7abb04fc2db
pushrax/bufferpool
bufferpool_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage test\n\nimport (\n\t\"github.com/gruntwork-io/terratest/modules/aws\"\n\t\"testing\"\n)\n\n// Get the IP address from a randomly chosen EC2 Instance in an Auto Scaling Group of the given name in the given\n// region\nfunc getIpAddressOf...
go
edit
0
2
apache-2.0
22d4a84c24acc9d603d006936ac3a76ebd4f58a1
MatthiasScholz/terraform-aws-nomad,MatthiasScholz/terraform-aws-nomad
test/aws_helpers.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage brands\n\n// Brand structure used by API\ntype Brand struct {\n\tUUID string `json:\"uuid\"`\n\tPrefLabel string `json:\"prefLabel\"`\n\tDescription string `json:\"description\"`\n\tParentUUID string `json:\"parent...
go
edit
0
0
mit
3e9f3ef907b96934280363a3fc8f3356497ea6d9
Financial-Times/brands-rw-neo4j
brands/model.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage serializer\n\nimport (\n\t\"github.com/jinzhu/gorm\"\n\t\"github.com/mingrammer/meetup-api/api/model\"\n)\n\ntype ParticipantSerialzer struct {\n\tID uint `json:\"id\"`\n\tName string `json:\"name\"`\n}\n\nfunc SerializeParticipant(db...
go
edit
0
1
mit
eae28e37654089792133385b5b0df697beddb098
mingrammer/meetup-api
api/serializer/user.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n//go:generate got valueorderedkeys.got zzz_desirednodes.go p=lowring new=newDesiredNodes T=desiredNodes K=byDesire k=Node V=toDesire v=int32\n//go:generate got valueorderedkeys_test.got zzz_desirednodes_test.go p=lowring new=new...
go
edit
0
0
bsd-3-clause
45da7e9021b72bfec610f98d24ae40c5284963c7
gholt/ring
lowring/package.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage twitterbot\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/ChimeraCoder/anaconda\"\n)\n\ntype TBot struct {\n\tapi *anaconda.TwitterApi\n\tkeys *Keys\n}\n\nfunc NewBot(config string) (*TBot, error) {\n\tkeys, err := ReadConfig(con...
go
edit
6
4
mit
34a8a447d17052cbcfafae7bdb4d9594011495e6
timwilkens/twitterbot
generate_bot.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage magick\n\nimport (\n\t\"github.com/nfnt/resize\"\n\t\"image\"\n\t_ \"image/png\"\n\t\"os\"\n\t\"testing\"\n)\n\nfunc BenchmarkResizePng(b *testing.B) {\n\tim := decodeFile(b, \"wizard.png\")\n\tb.ResetTimer()\n\tfor ii := 0; ii < b.N; i...
go
edit
6
4
mit
399651fc66737e35c78482c2c433873370aed48d
etix/magick,rainycape/magick,rainycape/magick,etix/magick,zuriu/magick,500px/magick,zuriu/magick,etix/magick,rainycape/magick,500px/magick,500px/magick,zuriu/magick
bench_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write go code for the following: Add better tests for json" }, { "role": "assistant", "content": "package goat\n\nimport (\n\t\"bytes\"\n\t\"net/http/httptest\"\n\t\"testing\"\n)\n\nfunc TestWriteError(t *testing.T) {\n\t// In\n\tcode := 500\n\terr := \"foo\"\n\n\t/...
go
new_file
3
4
mit
351e79a723d28b1ea9dc04e2813bd2be4f5b339e
bahlo/goat
json_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package logrusx is a logrus formatter that adds better error value handling\n// to the logrus.JSONFormatter\npackage logrusx\n\nimport (\n\tlog \"github.com/Sirupsen/logrus\"\n)\n\ntype (\n\t// MistifyFormatter is a custom logrus formatter e...
go
edit
0
4
mit
68e8a57429c4221defb6c24b04aafec4108a4d4a
mistifyio/mistify-logrus-ext
formatter.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage layout\n\nimport \"github.com/elves/elvish/styled\"\n\n// ModePrompt returns a styled text that is suitable as the prompt in the codearea\n// of a combobox.\nfunc ModePrompt(content string, space bool) func() styled.Text {\n\tp := style...
go
edit
0
2
bsd-2-clause
61963d486cf99461b907b8e2970a7f0b74556b10
elves/elvish,elves/elvish,elves/elvish,elves/elvish,elves/elvish
cli/layout/modeline.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/codegangsta/cli\"\n\t\"github.com/monder/kaylee/command\"\n\t\"os\"\n)\n\nfunc main() {\n\tapp := cli.NewApp()\n\tapp.Version = \"0.1.0\"\n\tapp.Usage = \"Container orchestration system for fleet\"\n\n\t...
go
edit
0
1
mit
c8cb29649076f1215cc0aea696219ff8c88839c6
monder/kaylee
kaylee.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage core\n\nimport (\n \"errors\"\n \"fmt\"\n \"image\"\n \"image/png\"\n \"io\"\n \"os\"\n \"os/exec\"\n)\n\ntype PNGHandler struct {\n}\n\nfunc (p *PNGHandler) ImageType() string {\n return \"image/png\"\n}\n\nfunc...
go
edit
0
4
mit
cde0d6ca780553b280359991026e415e49fd88d6
lotrekagency/piuma,lotrekagency/piuma
core/image_png.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2017 The casbin Authors. All Rights Reserved.\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 a...
go
edit
0
4
apache-2.0
7e5939556e7a6c9435fc67fb2a4e7337d74cfd1e
hsluoyz/casbin,casbin/casbin,faceless-saint/casbin
model/assertion.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n)\n\nvar (\n\t// I'm not sure these make sense. However they can be overridden at runtime\n\t// and in the configuration, so we have some flexibility.\n\tdefaultConfigFile = os.Getenv(\"SYSTEMDRIVE\") ...
go
edit
0
0
apache-2.0
39594e7a537755b6ecc313ef29740ad8a7e7820d
maxmind/geoipupdate,maxmind/geoipupdate,maxmind/geoipupdate
cmd/geoipupdate/defaults_windows.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"github.com/kr/pty\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n)\n\ntype Cmd struct {\n\t*exec.Cmd\n\tPty *os.File\n\toutput io.Reader\n\tOutput chan []byte\n}\n\nfunc Command(prog string, args ...string) ...
go
edit
0
5
mit
f7fb39be298640a05189f01612ee4df09c023971
chrisseto/Sux
command.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (C) 2015 Thomas de Zeeuw.\n//\n// Licensed under the MIT license that can be found in the LICENSE file.\n\npackage logger\n\nimport \"testing\"\n\n\nvar (\n\tbenchmarkResultTagString string\n\tbenchmarkResultTagBytes []byte\n\tben...
go
edit
9
2
mit
0674669d32f7ea3de194ec8d9c68fc4a7ebbd17f
Thomasdezeeuw/logger
benchmark_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\tlog \"github.com/Sirupsen/logrus\"\n\tlogx \"github.com/mistifyio/mistify-logrus-ext\"\n\t\"github.com/mistifyio/mistify/provider\"\n\t\"github.com/mistifyio/mistify/providers/metrics\"\n\tflag \"github.com/spf13/pfl...
go
edit
0
2
mit
a075c2ce8e86410d3eea87ffb39b48ae2b19549d
cerana/cerana,cerana/cerana,cerana/cerana,cerana/cerana
cmd/metrics-provider/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ninja\n\nimport (\n\t\"time\"\n)\n\ntype ServiceClient struct {\n\tconn *Connection\n\ttopic string\n}\n\n//\n// OnEvent builds a simple subscriber which supports pulling apart the topic\n//\n// \terr := sm.conn.GetServiceClient(\"$dev...
go
edit
3
1
mit
ef8ab46cc4e6344cb9855eaac719ffeddff8082c
ninjasphere/go-ninja,ninjasphere/go-ninja
api/ServiceClient.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t_ \"github.com/noxoin/golink/server\"\n)\n\nfunc main() {\n\tport := os.Getenv(\"PORT\")\n\tif port == \"\" {\n\t\tport = \"8080\"\n\t\tlog.Printf(\"Defaulting to por...
go
edit
0
2
apache-2.0
c5aa15a221bdb624019312994a2a92e91a4e6ba4
Noxoin/golink,Noxoin/golink,Noxoin/golink
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage console\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tcmdTcGet = unix.TCGETS\n\tcmdTcSet = unix.TCSETS\n)\n\nfunc ioctl(fd, flag, data uintptr) error {\n\tif _, _, err := unix.Syscall(uni...
go
edit
0
2
apache-2.0
dbd69c59b81ec72258da35a335605e4b3ea17e6a
containerd/console
tc_linux.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage osin\n\nimport (\n\t\"encoding/base64\"\n\t\"strings\"\n\n\t\"code.google.com/p/go-uuid/uuid\"\n)\n\n// AuthorizeTokenGenDefault is the default authorization token generator\ntype AuthorizeTokenGenDefault struct {\n}\n\nfunc removePaddi...
go
edit
6
2
bsd-3-clause
82578cf9b5e2dc4f6acb6320454b99165ee04652
arekkas/osin,RangelReale/osin,jonnyreeves/osin,agtorre/osin,gogap/oauth2,paytm/osin,observadorpt/osin,outrightmental/go-osin,lonelycode/osin,lancecarlson/osin,Inflatablewoman/osin,helojo/osin,DejaMi/osin,girirajsharma/osin,ahmet/osin,Iceyer/osin,oyediyildiz/osin,hoysoft/osin,liggitt/osin,go-osin/osin,gpndata/osin,airon...
tokengen.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dskvs\n\nimport (\n\t\"sync\"\n)\n\ntype page struct {\n\tisDirty bool\n\tisDeleted bool\n\tbasepath string\n\tcoll string\n\tkey string\n\tvalue []byte\n\tsync.RWMutex\n}\n\nfunc newPage(basepath, coll, key string) *p...
go
edit
6
2
mit
ff9e934df8529175014958473741e08ac6650943
aybabtme/dskvs,aybabtme/dskvs,aybabtme/dskvs
page.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage api\n\nimport (\n\t\"fmt\"\n\n\t\"bitbucket.org/mundipagg/boletoapi/log\"\n\tgin \"gopkg.in/gin-gonic/gin.v1\"\n)\n\n//RequestLogger faz o log no SEQ para toda request\nfunc RequestLogger() gin.HandlerFunc {\n\treturn func(c *gin.Contex...
go
edit
0
1
mit
6556ef062b4f674faab17b04f2ace2484cb90494
mundipagg/boleto-api,mundipagg/boleto-api,mundipagg/boleto-api
api/middlewares.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage tempredis\n\nimport \"fmt\"\n\n// Config is a key-value map of Redis config settings.\ntype Config map[string]string\n\n// Host returns the host for a Redis server configured with this Config as\n// \"host:port\".\nfunc (c Config) Host(...
go
edit
0
3
mit
94057549958ead7b7450d57b846578be402b88b6
stvp/tempredis
config.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage client\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n)\n\nfunc TestBytes(t *testing.T) {\n\tr := client.Cmd(\"get\", \"k\").Bytes()\n\n\tif !bytes.Equal(r, []byte(\"v\")) {\n\t\tt.Logf(\"expect bytes [% #x], but get[ % #x]\\n\", []byte(\"v\"...
go
edit
6
2
mit
863a9fc3cd9215aa3894aba43ae452e7e5f384f0
kofj/redlot
client/reply_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\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/vandosant/commandeer/models\"\n)\n\nvar commands models.Commands\n\nfunc CommandHandler(w http.ResponseWriter, r *http.Request) {\n\tw.Header()...
go
edit
0
2
mit
949b59607ba26cdf2ab1d740265005d1d02b42ad
vandosant/commandeer
main.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
d6237f789da65556a587d8ab7a250e9fed934add
landonia/landotube,landonia/landotube
landoblog/landoblog.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage httpstat\n\nimport (\n\t\"io\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/tcnksm/go-httpstat\"\n)\n\nfunc Example() {\n\treq, err := http.NewRequest(\"GET\", \"http://deeeet.com\", nil)\n\tif err != nil {\...
go
edit
6
4
mit
9109ec19082bfdd7e9bb0211746fe20a339f045b
tcnksm/go-httpstat,JoseIgnacioTamayo/go-httpstat
example_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 \"github.com/go-martini/martini\"\n)\n\n\nfunc main() {\n m := martini.Classic()\n\n m.Get(\"/.*\", martini.Static(\"\"))\n\n m.Run()\n}\n\n```\n\nApply this change: Add some basic functions hostname, ps, ...
go
edit
0
3
apache-2.0
52ceb9fbc6674c9fa4f409d989b9b8c832e1aed7
AaronO/dashd,AaronO/dashd
main.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)\n\nfunc main() {\n\tapp := cli.NewApp()\n\tapp.Name = \"docker-inject\"\n\tapp.Usage = \"Copy files/directories from hosts to running Docker containers\"\n\tapp....
go
edit
3
3
mit
80e5a2ca5170370cd2f0e334498f154a9ccfd4ea
y-taka-23/docker-inject
main.go
accepted
null
true
[ { "role": "user", "content": "Write go code for the following: Add a (failing) test case for using source mode to mock something that depends on a vendored package." }, { "role": "assistant", "content": "package vendor_dep\n\n//go:generate mockgen -package vendor_dep -destination mock.go github....
go
new_file
0
0
apache-2.0
c4148b88831348a44b678990b79f463881a6828a
golang/mock,golang/mock
mockgen/tests/vendor_dep/doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage storebench\n\nimport (\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\t\"strconv\"\n\t\"testing\"\n\n\t\"github.com/skyec/astore\"\n\tblobs \"github.com/skyec/astore/testing\"\n)\n\nvar benchStore astore.WriteableStore\nvar benchDir string\n\n...
go
edit
0
6
mit
5b824940c9f7180694289e00fe0e0419782651e3
skyec/astore
testing/storebench/write_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage invdendpoint\n\ntype EmailRequest struct {\n\tTo []EmailDetail `json:\"to,omitempty\"`\n\tBcc string `json:\"bcc,omitempty\"`\n\tSubject string `json:\"subject,omitempty\"`\n\tMessage string `json:\"mes...
go
edit
0
1
mit
2078a83634ecc93097dad5a189537b39d59116f5
Invoiced/go-invoiced-api,Invoiced/invoiced-go,Invoiced/invdapi
invdendpoint/emails.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"cjdavis.me/elysium/services\"\n)\n\nfunc main() {\n\thttp.HandleFunc(\"/\", handler)\n\n\tport := os.Getenv(\"PORT\")\n\tif port == \"\" {\n\t\tport = \"9...
go
edit
0
2
mit
5b4fae30f46a0004e9b6fec5abc2807a9d7c043e
Crevax/Elysium
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/codegangsta/cli\"\n)\n\nvar (\n\t// exitCode to terminate.\n\texitCode = 0\n)\n\nfunc main() {\n\tos.Exit(realMain())\n}\n\nfunc realMain() int {\n\tapp := cli.NewApp()\n\tapp.Name...
go
edit
6
3
mit
499b0f3d071dbc6f95a8194e190146721d85e191
Tomohiro/air
main.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage test_helpers\n\nimport \"github.com/pivotal-cf-experimental/cf-mysql-quota-enforcer/database\"\n\nfunc NewRootDatabaseConfig(dbName string) database.Config {\n\treturn database.Config{\n\t\tHost: \"127.0.0.1\",\n\t\tPort: 3306,\...
go
edit
0
3
apache-2.0
32daf238e1f3ceb63b590198648a81a6cd56048b
pivotal-cf-experimental/cf-mysql-quota-enforcer,pivotal-cf-experimental/cf-mysql-quota-enforcer
test_helpers/database_config.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !linux\n\npackage file\n\nimport (\n\t\"github.com/moby/buildkit/solver/llbsolver/ops/fileoptypes\"\n\t\"github.com/moby/buildkit/solver/pb\"\n\t\"github.com/pkg/errors\"\n\tcopy \"github.com/tonistiigi/fsutil/copy\"\n)\n\nfunc readUs...
go
edit
0
2
apache-2.0
3c96d0b863bcf562484c8e32f8a0b3d38d29e189
tonistiigi/buildkit_poc,tonistiigi/buildkit_poc
solver/llbsolver/file/user_nolinux.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage taskmanager\n\n// TaskManager ...\n// A TaskManager contains functions for dealing with RabbitMQ methods\n// and APIs. Both `MasterManager` and `JobManager` implement the methods in\n// this interface\ntype TaskManager interface {\n ...
go
edit
0
0
mit
c86eb9feb8ef92596c20edacc94e1d8c98338f4b
jspc/workflow-engine,gincorp/gin,gincorp/gin
taskmanager/taskmanager.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"runtime\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n)\n\nfunc MakeSymbolicLink(link, target string) {\n\tvar cmd *exec.Cmd\n\tswitch runtime.GOOS {\n\tcase \"windows\":\n\t\tcmd = exec.Command(\"cmd.exe\", \"/c\", s...
go
edit
0
2
mit
fa01586706b15056e707065d9b5ab9a1fa3392ab
Perlmint/goautoenv
util.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage editor\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"regexp\"\n\t\"strings\"\n)\n\nfunc Open(editorCommand string, fileName, helperText string, removeSharps bool) (text string, err error) {\n\tfilePath := fmt.Spr...
go
edit
0
7
mit
a94db1aa4f4e0a668a7264f6b480b113d3cf814e
gumieri/act
lib/editor/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/danryan/hal\"\n\t_ \"github.com/danryan/hal/adapter/shell\"\n\t_ \"github.com/danryan/hal/adapter/slack\"\n\t_ \"github.com/danryan/hal/store/memory\"\n\t\"os\"\n)\n\nvar canYouHandler = hal.Hear(\"(Tim|...
go
edit
0
0
mit
369668ecdd6a291766a5ed274258cef3636ef9cd
alexandre-normand/everytimisawesome
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"github.com/cristianoliveira/ergo/commands\"\n\t\"github.com/cristianoliveira/ergo/proxy\"\n\t\"os\"\n)\n\nconst VERSION = \"0.0.4\"\n\nconst USAGE = `\nErgo proxy.\nThe local proxy agent for ...
go
edit
0
6
mit
22c25f1179571e5f3b06ff0de9bd5b19d6dbd372
cristianoliveira/ergo,cristianoliveira/ergo,cristianoliveira/ergo
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage libkbfs\n\n// Current version (should be MAJOR.MINOR.PATCH)\nconst Version = \"1.0.0\"\n\n// Build\nconst Build = \"21\"\n\n```\n\nApply this change: Increment build number (testing release scripts)" }, { "role": "assistant", ...
go
edit
0
0
bsd-3-clause
cea25ab53ab4a49be3048ef99b1aa5b91116b00d
keybase/client,keybase/kbfs,keybase/client,keybase/client,keybase/client,keybase/kbfs,keybase/kbfs,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/kbfs
libkbfs/version.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage brain\n\nimport \"fmt\"\n\n// VLAN is a representation of a VLAN, as used by admin endpoints\ntype VLAN struct {\n\tID int `json:\"id\"`\n\tNum int `json:\"num\"`\n\tUsageType string `json:\"usage_type\"`\n}\n\n// Str...
go
edit
0
1
mit
96f278f02752f6849ca2d49d8127178d6d52118e
BytemarkHosting/bytemark-client,BytemarkHosting/bytemark-client,BytemarkHosting/bytemark-client
lib/brain/vlan.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage client\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/stripe/stripe-go\"\n)\n\nfunc TestErrors(t *testing.T) {\n\tc := &Api{}\n\tc.Init(\"bad_key\", nil, nil)\n\n\t_, err := c.Account.Get()\n\n\tif err == nil {\n\t\tt.Errorf(\"Expected ...
go
edit
6
4
mit
c048869595edefaf309e69cff70685c2e25dedd3
mondough/stripe-go,shazow/stripe-go,dominicphillips/stripe-go,froatsnook/stripe-go,ChannelMeter/stripe-go,stripe/stripe-go,froatsnook/stripe-go,BearchInc/stripe-go,getbread/stripe-go,ryanlower/stripe-go,stripe/stripe-go,gcnonato/stripe-go,hyperworks/stripe-go,collinglass/stripe-go,ChannelMeter/stripe-go,dominicphillips...
client/error_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage webrtc\n\nimport (\n\t\"github.com/pkg/errors\"\n)\n\n// RTPTransceiver represents a combination of an RTPSender and an RTPReceiver that share a common mid.\ntype RTPTransceiver struct {\n\tMid string\n\tSender *RTPSender\n\tRe...
go
edit
24
5
mit
3bc9a312bbe1324487589cc739a901996206206f
pion/webrtc,pion/webrtc,pion/webrtc,pion/webrtc
rtptransceiver.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/codegangsta/negroni\"\n\t\"github.com/digital-ocean-service/interfaces\"\n\t\"github.com/digital-ocean-service/usecases\"\n\t\"github.com/gorilla/mux\"\n)\n\nfunc main() {\n\tdoInteractor := usecases.DOI...
go
edit
0
2
mit
e4d2e040f8436ddc8cb5bfa13e9358712fecec04
Tinker-Ware/digital-ocean-service,Infrastructure-Solutions/digital-ocean-service
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2017 Martin Lindner <<EMAIL>>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without re...
go
edit
0
1
mit
f1e4952e73bd1951b30578baff86eed808ae478c
martinlindner/go-vtm-cli
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage objectserver\n\nimport (\n\t\"github.com/Symantec/Dominator/lib/hash\"\n\t\"io\"\n)\n\ntype FullObjectServer interface {\n\tObjectServer\n\tListObjectSizes() map[hash.Hash]uint64\n\tListObjects() []hash.Hash\n\tNumObjects() uint64\n}\n\...
go
edit
0
1
apache-2.0
3c5e9a32cff19c6abcabbb51c78e4647b8aece29
Symantec/Dominator,Symantec/Dominator,Symantec/Dominator,keep94/Dominator,rgooch/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator,keep94/Dominator
lib/objectserver/api.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\nimport \"strconv\"\n\nfunc main() {\n\ttest := \"aaabbbccbddd\"\n\tresult := compress(test)\n\tfmt.Println(result)\n}\n\nfunc compress(uncompressed string) string {\n\tprev := 0\n\tvar letter string\n\tvar next s...
go
edit
0
5
apache-2.0
7010948e20cdc2b4eaa971ae711fd3b8ef2355af
armiller/puzzles,armiller/puzzles
compression/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage piece\n\nimport (\n\t\"chessboard\"\n\t\"point\"\n)\n\ntype Piece struct {\n\tmovable []point.Point\n\twhite byte\n\tblack byte\n}\n\nfunc NewPiece(movable []point.Point, white, black byte) *Piece {\n\tpiece := new(Piece)\n\tpiece.m...
go
edit
0
4
mit
53c82c2ac9337b7fe4994758159df5abc01657a3
Roadagain/Chess
src/piece/piece.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2012-2013 Apcera Inc. All rights reserved.\n\npackage test\n\nimport (\n\t\"runtime\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestSimpleGoServerShutdown(t *testing.T) {\n\tbase := runtime.NumGoroutine()\n\ts := RunDefaultServer()\n\t...
go
edit
12
3
apache-2.0
f04e44fad7786d9cfaef4cd7d2dbe408abb80293
ericpromislow/gnatsd,wallyqs/gnatsd,glycerine/hnatsd,brkt/gnatsd,nats-io/gnatsd,apcera/gnatsd,tylertreat/gnatsd,glycerine/hnatsd,brkt/gnatsd,mitghi/gnatsd,glycerine/gnatsd,tylertreat/gnatsd,wallyqs/gnatsd,nats-io/gnatsd,glycerine/hnatsd,apcera/gnatsd,zquestz/gnatsd,zquestz/gnatsd,mitghi/gnatsd,glycerine/gnatsd,ericprom...
test/gosrv_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage onlinestats\n\n// From http://queue.acm.org/detail.cfm?id=2534976\n\nimport \"math\"\n\ntype ExpWeight struct {\n\tn int\n\tm1 float64\n\tv float64\n\talpha float64\n}\n\nfunc NewExpWeight(alpha float64) *ExpWeight {\n\tretur...
go
edit
0
2
mit
91a8fc22ba247b57c243ab90b49049fb734c47c3
dgryski/go-onlinestats
expweight.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage datamanclient\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"github.com/jacksontj/dataman/src/query\"\n)\n\n// TODO: support per-query config?\n// TODO support switching config in-flight? If so then we'll need to store a\n// pointer to i...
go
edit
3
2
mit
25e72fe46f2a38bd5ae368da14b7bbd9994d722d
jacksontj/dataman
src/client/client.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage leetcode\n\n// 345. Reverse Vowels of a String\nfunc reverseVowels(s string) string {\n\tres := make([]byte, 0)\n\tvowels := make([]byte, 0)\n\tfor i := 0; i < len(s); i++ {\n\t\tswitch b := s[i]; b {\n\t\tcase 'a', 'i', 'u', 'e', 'o', ...
go
edit
0
6
mit
1d2eec1084c16165f49add5975e2e52c286e8daa
motomux/go-algo
leetcode/345_reverse_vowels_of_a_string.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\t\"strings\"\n\n\t. \"gist.github.com/7480523.git\"\n\t. \"gist.github.com/7651991.git\"\n)\n\nfunc main() {\n\truntime.GOMAXPROCS(runtime.NumCPU())\n\n\treduceFunc := func(in string) (string,...
go
edit
6
5
mit
e1816c099e0c8c19cd8cf51ea2237d27caf528ae
shurcooL/gostatus
main.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage handler\n\nimport (\n\t\"github.com/materials-commons/config/cfg\"\n)\n\ntype mapHandler struct {\n\tvalues map[string]interface{}\n}\n\nfunc Map() cfg.Handler {\n\treturn &mapHandler{values: make(map[string]interface{})}\n}\n\nfunc (h ...
go
edit
0
3
mit
a9587fb60e15796ee9360edd2cc692fe80642486
materials-commons/config,materials-commons/config
handler/map.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"go/build\"\n\t\"log\"\n\t\"math/rand\"\n\t\"time\"\n\n\t\"github.com/esimov/diagram/canvas\"\n\t\"github.com/esimov/diagram/io\"\n\t\"github.com/esimov/diagram/ui\"\n\t\"github.com/fogleman/imview\"\n)\...
go
edit
0
5
mit
83d1dd042e8cc2fd916aba6d51c19a33fe14893d
esimov/diagram,esimov/diagram
main.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 main\n\nimport (\n\t\"log\"\n\t\"net\"\n\n\t\"github.com/paultag/go-dictd/database\"\n\t\"github.com/paultag/go-dictd/dictd\"\n)\n\nfunc main() {\n\tserver := dictd.NewServer(\"pault.ag\")\n\tserver.RegisterDatabase(&database.FnordDatab...
go
edit
0
5
mit
17aa2ea5fbef831866c00afeea2419576985e6a3
paultag/go-dictd
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// harbour project main.go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\n\t\"github.com/huawei-openlab/harbour/mflag\"\n\t\"github.com/huawei-openlab/harbour/opts\"\n\n\t\"github.com/Sirupsen/logrus\"\n)\n\nfunc main() {\n\tm...
go
edit
24
8
mit
d8dbf7a4c3c518c47be5f4c8fc7ce5e982462c50
huawei-openlab/harbour
harbour.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage pooly\n\nimport (\n\t\"net\"\n\t\"time\"\n)\n\n// Conn abstracts user connections that are part of a Pool.\ntype Conn struct {\n\tiface interface{}\n\ttimer *time.Timer\n\tclosed bool\n}\n\n// Create a new connection container, wrappi...
go
edit
3
2
bsd-3-clause
35bd112788f0624bd66105f5630bc0423bcb0805
0intro/pooly,3XX0/pooly
conn.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\t_ \"net/http/pprof\" // import for side effects\n\n\t\"encoding/json\"\n\t\"github.com/gorilla/mux\"\n)\n\nfunc main() {\n\tr := mux.NewRouter()\n\tr.HandleFunc(\"/hello/{name}\", helloHand...
go
edit
0
2
mit
410ff68df0b32f3bafdcbb74e7e95cb799f04a28
hack4impact/transcribe4all,hack4impact/transcribe4all,hack4impact/transcribe4all,hack4impact/audio-transcription-service
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc main() {\n\tmode := \"\"\n\n\tif len(os.Args) > 1 {\n\t\tmode = os.Args[1]\n\t\tif len(os.Args) > 2 {\n\t\t\tos.Args = append(os.Args[:1], os.Args[2:]...)\n\t\t} else {\n\t\t\t...
go
edit
9
6
mit
89c231525d32930e7368c324ac80597dc64ff353
hut8labs/kerouac,hut8labs/kerouac
main.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dockerfile_test\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\n\t\"testing\"\n)\n\nfunc TestDockerfileutils(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Dockerfileutils Suite\")\n}\n\n```...
go
edit
6
1
apache-2.0
e13cc606eddc90c9f975bac441444b4384beea4a
CloudCredo/cloudrocker,agilemobiledev/cloudfocker,CloudCredo/cloudrocker,CloudCredo/cloudrocker,CloudCredo/cloudrocker,CloudCredo/cloudrocker,CloudCredo/cloudrocker,agilemobiledev/cloudfocker,agilemobiledev/cloudfocker,CloudCredo/cloudrocker,agilemobiledev/cloudfocker,agilemobiledev/cloudfocker,CloudCredo/cloudrocker,a...
dockerfile/dockerfile_suite_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\ntype ChunkMask interface {\n\tIsMasked(x, z int) bool\n}\n\ntype RectangeChunkMask struct {\n\tx0, z0, x1, z1 int\n}\n\nfunc (m *RectangeChunkMask) IsMasked(x, z int) bool {\n\treturn x <= m.x0 || x > m.x1 || z <= m.z0 || z > m....
go
edit
0
4
bsd-2-clause
6205608474a3637d975e8fa4313a78d7e4db51ad
quag/mcobj,quag/mcobj
chunkmasks.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage bot\n\nimport (\n\t\"github.com/graffic/wanon/telegram\"\n)\n\n// RouteNothing do nothing in handling\nconst RouteNothing = 0\nconst (\n\t// RouteAccept handle the message\n\tRouteAccept = 1 << iota\n\t// RouteStop stop handling more me...
go
edit
3
5
bsd-3-clause
435b63ff092f54d7a7739d2010345bb917d0fbfc
graffic/wanon
bot/router.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t_ \"expvar\"\n\t\"fmt\"\n\t\"github.com/codegangsta/negroni\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tRun()\n}\n\nfunc Run() {\n\tm := http.DefaultServeMux\n\n\tm.HandleFunc(\"/\", func(w http.ResponseWriter, req *htt...
go
edit
3
1
mit
76789307c9cf489907521ce3de0c06279db84029
mattbostock/leavediary
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\nfunc check(e error) {\n\tif e != nil {\n\t\tpanic(e)\n\t}\n}\n\nfunc pasteHandler(w http.ResponseWriter, req *http.Request) {\n\tbuf, _ := ioutil.ReadAll(req.Body)\n\tpaste := buf[...
go
edit
0
3
mit
a32b275cd52ed6736ad93b7f8ce3b08360423b11
ewhal/Pastebin,patchon/Pastebin,ewhal/Pastebin,patchon/Pastebin,patchon/Pastebin,ewhal/Pastebin
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar output string\n\nfunc init() {\n\tflag.Usage = func() {\n\t\tfmt.Printf(\"Usage: %s [-out=out.path] in.path\\n\\n\", os.Args[0])\n\t\tflag.PrintDefaults()\n\t}\n\n\tflag.String...
go
edit
0
3
mit
2ef130c031d1e946b6517650a69d674114e7e30a
konjoot/go-inspect
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage wrap\n\nimport \"strings\"\n\n// Line will wrap a single line of text at the given length.\n// If limit is less than 1, the string remains unchanged.\n//\n// If a word is longer than the given limit, it will not be broken to fit.\n// Se...
go
edit
0
5
mit
4713703d0743deb32a5cf24061de7c0238948a5a
bbrks/wrap
wrap.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\trouter := NewRouter()\n\n\tlog.Fatal(http.ListenAndServe(\":8080\", router))\n}\n\n```\n\nApply this change: Change to run on port 80" }, { "role": "assistant", ...
go
edit
3
1
mit
8cfb81140ced435e94761b9af29c4529fd76880e
bjschafer/easy-notifier
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// tgotop project main.go\npackage main\n\nimport (\n\t//\tproc \"github.com/cespare/goproc\"\n\tui \"github.com/gizak/termui\"\n\ttm \"github.com/nsf/termbox-go\"\n\t// \"time\"\n)\n\nfunc main() {\n\terr := ui.Init()\n\tif err != nil {\n\t\tp...
go
edit
0
7
mit
1a3cf365e54522885174df94e163d3e42ba4fb0b
NHOrus/tgotop
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"math/rand\"\nimport \"time\"\n\nconst DEFAULT_AD_CHANCE = 95\n\ntype Plug struct {\n\tID int\n\tS3ID string\n\tOwner string\n\tViewsRemaining int\n\tApproved bool\n\tPresignedURL s...
go
edit
0
5
mit
3fa16d4655d3043ba9d864eca2b428d481f11ffa
liam-middlebrook/csh-plug
plug.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage veneur\n\nimport (\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestReadConfig(t *testing.T) {\n\texampleConfig, err := os.Open(\"example.yaml\")\n\tassert.NoError(t, err)\n\...
go
edit
9
2
mit
6105e4fac9aa214dca91c0b77403d54f047567b2
gphat/veneur,gphat/veneur,evanj/veneur,evanj/veneur,stripe/veneur,gphat/veneur,stripe/veneur,evanj/veneur
config_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sechat\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n)\n\n// postForm is a utility method for sending a POST request with form data. The\n// fkey is automatically added to the form data sent.\nfunc ...
go
edit
3
8
mit
fddd17b872d3987910a5695b478c5fdcf611c264
nathan-osman/go-sechat
post.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\"os/exec\"\n\t\"regexp\"\n\t\"strings\"\n)\n\nvar (\n\tnewlinePattern = regexp.MustCompile(\"\\r\\n|\\r|\\n\")\n)\n\nfunc getLocalIP() string {\n\tfor _, i := range []string{\"en0\", \"en1...
go
edit
0
6
mit
0292261bc4fb1511f197df986705327fd0b77f1d
creasty/rid,creasty/rid
util.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\t\"autotcpdump/parser\"\n\t\"autotcpdump/executer\"\n\t\"autotcpdump/checker\"\n)\n\nfunc main() {\n\tconfig := parser.ConfigParser{}\n\tif err := config.Parse(\"config/config.json\")...
go
edit
0
7
mit
b34f14b4ecf41e131b3da3b7044a027be4a23603
zulhilmizainuddin/autotcpdump
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/ayoisaiah/stellar-photos-server/routes\"\n\t\"github.com/joho/godotenv\"\n\t\"github.com/rs/cors\"\n)\n\nfunc main() {\n\terr := godotenv.Load()\n\n\tif ...
go
edit
0
2
mit
8caf9e14cfc4df8be2b1b0a413ce50aa2aac0f5f
ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os/exec\"\n\t\"strings\"\n\n\t\"github.com/PuerkitoBio/goquery\"\n)\n\nfunc main() {\n\tlocationId := 13168\n\tdoc, err := goquery.NewDocument(fmt.Sprintf(\"http://trimet.org/arrivals/small/tr...
go
edit
0
4
apache-2.0
364922c69c21fadc6eb770194dd6e5815dc7e53f
thecarlhall/busstop
main.go
accepted
null
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 accesscontrol\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/hyperledger/fabric/bccsp\"\n\t\"github.com/hyperledger/fabric/bccsp/factor...
go
edit
18
1
apache-2.0
33cc43ff8645eb214c756b09622c11ef38bc2473
muralisrini/fabric,stemlending/fabric,stemlending/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,hyperledger/fabric,stemlending/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,jimthematrix/fabric,manish-sethi/fabric-sidedb,jimthematrix/fabric,binhn/fabric,manish-sethi/fabric-sidedb,manish-set...
core/chaincode/accesscontrol/mapper_test.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage nsqhandler\n\nimport (\n\t\"testing\"\n)\n\nfunc TestNew(t *testing.T) {\n\tfakePublish := func(topic string, body []byte) error {\n\t\treturn nil\n\t}\n\thandler := New(fakePublish)\n\tif handler == nil {\n\t\tt.Fatal(\"Expected *Handl...
go
edit
3
4
bsd-3-clause
3407b0d8714b06084af37013d3cc72d7ae57a541
avct/apexovernsq
nsqhandler_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// gogl provides a framework for representing and working with graphs.\npackage gogl\n\n// Constants defining graph capabilities and behaviors.\nconst (\n\tE_DIRECTED, EM_DIRECTED = 1 << iota, 1<<iota - 1\n\tE_UNDIRECTED, EM_UNDIRECTED\n\tE_WEI...
go
edit
0
0
mit
345285a30844773b5141f898962dc7b10738a76b
sdboyer/gogl,sdboyer/gogl
graph.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage auth\n\nimport (\n\t\"net/http\"\n)\n\nconst CookieName = \"ATC-Authorization\"\n\ntype CookieSetHandler struct {\n\tHandler http.Handler\n}\n\nfunc (handler CookieSetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tcooki...
go
edit
0
3
apache-2.0
fe8ec541980121ba74b630825728b8d62dfa46d4
concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse
cookie_set_handler.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (C) 2014 Yasuhiro Matsumoto <<EMAIL>>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n// +build windows\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -I. -fno-stack-check -f...
go
edit
0
0
apache-2.0
61be1322444f6fa13d47dc56cca63c8b49208fdf
helight/helight_code,xeodou/go-sqlcipher,danderson/go-sqlite3,helight/helight_code,shaxbee/go-sqlite3,lyonel/go-sqlite3,helight/helight_code,mattn/go-sqlite3,lyonel/go-sqlite3,lyonel/go-sqlite3,mattn/go-sqlite3,helight/helight_code,helight/helight_code,xeodou/go-sqlcipher,mattn/go-sqlite3,accense/go-sqlite3,shaxbee/go-...
sqlite3_windows.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage medtronic\n\nimport (\n\t\"github.com/ecc1/cc1100\"\n)\n\ntype Pump struct {\n\tRadio *cc1100.Radio\n\n\tDecodingErrors int\n\tCrcErrors int\n}\n\nfunc Open() (*Pump, error) {\n\tr, err := cc1100.Open()\n\tif err != nil {\n\t\tretu...
go
edit
0
6
mit
7b938e859b4bc267e96f8c4ef63627bfed2288ca
ecc1/medtronic,ecc1/medtronic
pump.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage vm\n\nimport \"testing\"\n\nfunc TestY(t *testing.T) {\n\tfor _, n := range []float64{0, 1, 2, 3, 4, 5, 6, 100} {\n\t\tn1 := float64(Y(Normal(NewLazyFunction(lazyFactorial))).(Callable).Call(NumberThunk(n)).(Number))\n\t\tn2 := strictFa...
go
edit
33
4
mit
c76e444a00f4e2bf177c7b929ba9f2fc916a0d60
raviqqe/tisp,raviqqe/tisp,tisp-lang/tisp,tisp-lang/tisp,raviqqe/tisp
src/lib/vm/y_test.go
rejected_lint
Too many lint violations: 33
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage twigo\n\nfunc NewClient(account_sid, auth_token, number string) (*Client, error) {\n\n\tc := &Client{AccountSid:account_sid,AuthToken:auth_token,Number:number}\n\treturn c, nil\n}\n\nfunc (c *Client) Text(msg_sms *SMS) (*TwilioResponse,...
go
edit
24
2
mit
a90419e98835ea696c1f20d91b2b8e0cfbd335c3
fibonacci1729/twigo
client.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) 2015, Ben Morgan. 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\n// Package alpm works with parts of Arch Linux packages.\npackage alpm\n\nimpor...
go
edit
0
3
mit
0924b8f14e9f224c5613f9ae37bc95abbf4fb9d1
goulash/pacman,cassava/repoctl
alpm/format.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage irc\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"sync\"\n)\n\nconst (\n\tmotdHeader = \"- %s Message of the day - \"\n\tmotdFooter = \"- End of /MOTD command\"\n)\n\nvar (\n\tmotdOnce sync.Once\n\tmotd []string\n)\n\n// sendMO...
go
edit
18
5
mit
d65ae684bf25d664a38b07acdf81ce796a57bf0f
fimad/ggircd
irc/send_motd.go
rejected_lint
Too many lint violations: 18
true