messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/md14454/gosensors\"\n)\n\nfunc main() {\n\tgosensors.Init()\n\tdefer gosensors.Cleanup()\n\n\tchips := gosensors.GetDetectedChips()\n\n\tfor i := 0; i < len(chips); i++ {\n\t\tchip := chips[... | go | edit | 0 | 4 | mit | 685257ee0c059ce3e395de606e29fe1f7188d391 | md14454/gosensors | example/gosensors.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage test\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/b2aio/typhon/server\"\n)\n\n// InitServer for testing\nfunc InitServer(t *testing.T, name string) server.Server {\n\t// Initialize our Server\n\tserver.Init(&server.Config{\n... | go | edit | 0 | 3 | mit | 52f5e8da29dc6530400ceb9a0d51c4dedf5fd2ac | mondough/typhon,monzo/typhon | test/server.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/coreos/go-etcd/etcd\"\n)\n\nfunc main() {\n\tclient := etcd.NewClient([]string{\"http://104.130.8.142:4001\"})\n\tresp, err := client.Get(\"testcluster\", false, false)\n\tif err != nil {\n\... | go | edit | 0 | 3 | apache-2.0 | 4d66a86150e620f96c777fbd2db1accc737bddb4 | cedbossneo/corekube,kitwalker12/corekube,jyidiego/corekube,million12/corekube,invenfantasy/corekube,v1k0d3n/corekube,jamiehannaford/corekube | fetch/fetch.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build !windows\n\npackage main\n\nimport (\n\t\"log\"\n\t\"log/syslog\"\n)\n\nfunc initLogger(slog bool) {\n\tif slog {\n\t\tlw, err := syslog.New(syslog.LOG_INFO, \"cbfs\")\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Can't initialize syslog: ... | go | edit | 0 | 3 | apache-2.0 | 022e2514f0d22ea9799edfd31f0396f8bad0ea77 | couchbaselabs/cbfs,couchbaselabs/cbfs,couchbaselabs/cbfs | logging.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t. \"github.com/stefanhans/go-present/slides/HighOrderFunctions/hof\"\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar list = ListOfInt{-2, -1, 0, 2, 2, 3}\n\n\ttenTimes := func(x int) int { return x * 10 }\n\tisEven := func(x i... | go | edit | 3 | 1 | mit | 3642a072c6f9c0a7c6313b52a864968a0b079a77 | stefanhans/go-present,stefanhans/go-present | slides/HighOrderFunctions/currying.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/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/aws/session\"\n\t\"github.com/aws/aws-sdk-go/service/ec2\"\n)\n\nfunc main() {\n\tsvc := ec2.New(session.New(), &aws.Config{Region: aws.St... | go | edit | 0 | 6 | mit | 820964a2e18b16020bd780b86e7722350d7163f1 | daniel-bryant-uk/go-aws-sdk-exp | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\n Copyright 2018 Padduck, LLC\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \thttp://www.apache.org/licenses... | go | edit | 0 | 4 | apache-2.0 | 131b04445d5539c6ec67e611792118758aaee414 | PufferPanel/PufferPanel,PufferPanel/PufferPanel,PufferPanel/PufferPanel,PufferPanel/PufferPanel | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main \n\nimport (\n \"net/http\"\n \"io/ioutil\"\n \"os\"\n)\n\n\nfunc saveHandler(w http.ResponseWriter, r *http.Request) {\n\tfolder := \"/PRODUCTION/EXPERIMENT/web/savedfiles/\"\n filename := generateRandomURL()\n path... | go | edit | 9 | 3 | mit | 6b98a7793d78c8ca51293400263e17da6936580e | elifkus/very-simple-service,elifkus/very-simple-service,elifkus/very-simple-service | src/webservice/server.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage apollostats\n\nimport (\n\t\"html\"\n\t\"strings\"\n)\n\n// Func to take care of garbled text data.\nfunc filter_string(s string) string {\n\t// Fuck it, might aswell assume all text has been escaped.\n\ttmp := html.UnescapeString(s)\n\... | go | edit | 0 | 1 | mit | 8f4c0844faa0a40594b59dd21e682ce73543997d | lmas/ApolloStats,Apollo-Community/ApolloStats,lmas/ApolloStats,Apollo-Community/ApolloStats | src/utils.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage split\n\nimport (\n\t\"bytes\"\n\t\"mime\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"net/textproto\"\n)\n\n// WriteResponses serialize the responses passed as argument into the ResponseWriter\nfunc WriteResponses(w http.ResponseWriter,... | go | edit | 6 | 3 | mit | 95e619abf226c8ab9d27688f6a0a5b3e52397637 | aarnone/httpbatcher | split/responses_packer.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\"os\"\n\t\"strings\"\n)\n\nfunc init() {\n\thome := os.Getenv(\"HOME\")\n\tpaths := []string{\n\t\thome + \"/bin\",\n\t\thome + \"/.vvmn/vim/current/bin\",\n\t\t\"/usr/local/bin\",\n\t\t\"/usr/local/opt/coreutils/li... | go | edit | 0 | 4 | mit | b864cd44a0c77cc7c5b76eb03f266e094b2293f5 | elpinal/coco3 | path.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage editor\n\nimport (\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestInsertMode(t *testing.T) {\n\ti := insert{}\n\ti.init()\n\tinput := \"abc\"\n\ti.in = NewReader(strings.NewReader(input))\n\tfor n := range input {\n\t\tc, _, err := i.Run(... | go | edit | 21 | 5 | mit | 21fb4878fff9d58759bebca6b6c5ccb094ee4d29 | elpinal/coco3 | editor/insert_test.go | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path\"\n)\n\nconst BUFFER_SIZE = 1024\n\n// fatal crashes the program if the given error is non-nil\n// This isn't a good way to perform production error-handling,\n// but it will serve for thi... | go | edit | 0 | 3 | mit | 8b64f546caf55d1050f9118c01c4ae096d067efa | NaturalFractals/matterleast,LinuxAtApp/matterleast | spikes/config/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage pgpass\n\nimport (\n\t\"os\"\n\t\"os/user\"\n\t\"path\"\n)\n\n// OpenDefault opens default pgpass file, which is ~/.pgpass\nfunc OpenDefault() (f *os.File, err error) {\n\tusr, err := user.Current()\n\tif err != nil {\n\t\treturn\n\t}\n... | go | edit | 0 | 3 | mit | acc398fbd68973900a45d1ed0443666788d2d599 | tg/pgpass | file.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ungo\n\nimport (\n\t\"net/http/cookiejar\"\n\t\"regexp\"\n\t\"fmt\"\n)\n\nfunc Picnictrans(url string) (string, error) {\n\tcookie, _ := cookiejar.New(nil)\n\n\tHH.Host = \"picnictrans.com\"\n\thtml := htmlDownload(url, cookie)\n\n\turl... | go | edit | 6 | 1 | mit | 9f2e288b0803d9f607cf8662f73f4513945b7b43 | ReiGelado/Ungo | shorteners/picnictrans.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage goat\n\nimport (\n\t\"net\"\n)\n\n// ConnHandler interface method Handle defines how to handle incoming network connections\ntype ConnHandler interface {\n\tHandle(c net.Conn) bool\n}\n\n// HttpConnHandler handles incoming HTTP (TCP) ne... | go | edit | 3 | 1 | mit | 35a21eec968d7a7a325a70ba42f30cb32e9f4102 | mdlayher/goat | src/goat/connHandler.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\n// TODO: Write required setup for a local resolver with a variety of domains and test cases\nfunc TestCheckWildcard(t *testing.T) {\n\t// A simple test domain -- please don't abuse it... | go | edit | 0 | 2 | mit | a182d8c416747c42cf9fa35a8841da98ab7675df | zxsecurity/glugger | main_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage learn\n\nimport (\n\t\"davidb.org/x/stenome/timelearn\"\n)\n\n// The UI is responsible for asking the user a question, and\n// determining if they got it right. The prob argument will always\n// point to the problem to learn. 'next' m... | go | edit | 3 | 1 | mit | fec55e7fe9f34ab5ea4eb54df8c945dc5ab46e70 | d3zd3z/stenome,d3zd3z/stenome | learn/ui.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\"testing\"\n)\n\nfunc runTemplateFunctionTest(t *tes... | go | edit | 3 | 2 | mit | 45e069a7f553085c07c0049a9bce043577276b77 | revl/autoforge | tmpl_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"github.com/alinpopa/barvin/handlers/slack\"\n\t\"github.com/op/go-logging\"\n\t\"os\"\n\t\"sync\"\n)\n\nfunc main() {\n\tuserID := flag.String(\"userid\", \"\", \"The privileged slack userid.\")\n\ttoke... | go | edit | 9 | 2 | unlicense | 10479c4bd846de19bb1842eb06172c7b2c5ce970 | alinpopa/barvin | main.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage watch\n\nimport etcd \"github.com/coreos/etcd/clientv3\"\n\n// OpOption is a simple typedef for etcd.OpOption.\ntype OpOption etcd.OpOption\n\n// WithFilterPut discards PUT events from the watcher.\nfunc WithFilterPut() OpOption {\n\tre... | go | edit | 0 | 1 | apache-2.0 | d09bdbb3e5da1bbdf0c005359b7a03148308cce0 | pachyderm/pfs,pachyderm/pfs,pachyderm/pfs | src/server/pkg/watch/op.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage nzb\n\nimport \"strings\"\n\ntype File struct {\n\tPoster string `xml:\"poster,attr\"`\n\tDate int `xml:\"date,attr\"`\n\tSubject string `xml:\"subject,attr\"`\n\tGroups []string `xml:\"groups>group,internalxml\"`\... | go | edit | 3 | 2 | mit | ad6cc5d0e3d3a1c2772c644f526d2ccdbe88fccb | andrewstuart/go-nzb | file.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage time\n\nimport (\n\t\"testing\";\n\t\"time\";\n)\n\nexport func TestTick... | go | edit | 6 | 4 | bsd-3-clause | 3faba6bf3cf82dbf8f5eff0a8927d1a8a954d2f3 | abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go | src/lib/time/tick_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nconst entryTmpl = `\nentity \"{{ .Name }}\" {\n{{- if .Comment.Valid }}\n {{ .Comment.String }}\n ..\n{{- end }}\n{{- range .Columns }}\n {{- if .IsPrimaryKey }}\n + {{ .Name }}:{{ .DDLType }} [PK]{{if .IsForeignKey }}[FK]{{... | go | edit | 0 | 0 | mit | d5ec187c78a710e84f4124f51fccea14c89157e2 | achiku/planter,achiku/planter | template.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage core\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/akutz/gofig\"\n\n\t\"github.com/emccode/rexray/util\"\n)\n\nfunc init() {\n\tinitDrivers()\n\n\tgofig.SetGlobalConfigPath(util.EtcDirPath())\n\tgofig.SetUserConfigPath(fmt.Sprintf(\"%s/.rexr... | go | edit | 3 | 1 | apache-2.0 | 6df26a90341c925b1f2157a0bdef32e3e5394836 | thecodeteam/rexray,thecodeteam/rexray,cduchesne/rexray,oppodeldoc/rexray,emccode/rexray,clintonskitson/rexray,oppodeldoc/rexray,emccode/rexray,clintonskitson/rexray,codedellemc/rexray,oppodeldoc/rexray,cduchesne/rexray,oppodeldoc/rexray,cduchesne/rexray,cduchesne/rexray,oppodeldoc/rexray,codedellemc/rexray,cduchesne/re... | core/core.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage meep\n\ntype ErrInvalidParam struct {\n\tTraitAutodescribing\n\tTraitTraceable\n\tParam string\n\tReason string\n}\n\ntype ErrNotYetImplemented struct {\n\tTraitAutodescribing\n\tTraitTraceable\n}\n\ntype ErrProgrammer struct {\n\tTrai... | go | edit | 21 | 0 | apache-2.0 | e069b2d669c02a3296abab9cb209d5a836544a2a | polydawn/meep,polydawn/meep | common_errors.go | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage sort\n\nimport (\n\t\"testing\"\n\n\t\"github.com/ready-steady/support/assert\"\n)\n\nfunc TestQuickSort(t *testing.T) {\n\tdata := []float64{3, 1, 6, 9, 4, 2}\n\n\torder1, order2 := Quick(data)\n\n\tassert.Equal(data, []float64{1, 2, 3... | go | edit | 3 | 1 | mit | e39469e60a903fbd6c4dacd7b2b532eab776fee6 | ready-steady/sort | quick_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// The MIT License (MIT)\n//\n// Copyright (c) 2015 Douglas Thrift\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 t... | go | edit | 3 | 1 | mit | 4622ddb274a6fb05535cd671316a7e7f883d2fcf | douglaswth/rsrdp | rdp_darwin.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage api\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nconst apiURL string = \"https://api.onedrive.com/v1.0/\"\n\nvar client *http.Client\n\nfunc init() {\n\tc, err := getClient()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tcli... | go | edit | 3 | 2 | mit | 6b05c6b149dc64052777b5cda144172e2194081e | ggobbe/onedrive-sync | api/drive.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage rpcd\n\nimport (\n\t\"github.com/Symantec/Dominator/imageunpacker/unpacker\"\n\t\"github.com/Symantec/Dominator/lib/srpc\"\n\t\"io\"\n\t\"log\"\n\t\"sync\"\n)\n\ntype srpcType struct {\n\tunpacker *unpacker.Unpacker\n\tlogger ... | go | edit | 3 | 1 | apache-2.0 | e2b896b362fc906d5c883a7e6656633b88dab81e | keep94/Dominator,Symantec/Dominator,Symantec/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator,keep94/Dominator,rgooch/Dominator,Symantec/Dominator | imageunpacker/rpcd/api.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2018 The Ebiten Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://w... | go | edit | 3 | 1 | apache-2.0 | af77a17aaab97dff22a4e3aeba0a9a8e572d391d | hajimehoshi/ebiten,hajimehoshi/ebiten | internal/devicescale/impl_mac.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/krasin/cobra\"\n)\n\nfunc main() {\n\trootCmd := &cobra.Command{\n\t\tUse: \"steel\",\n\t\tShort: \"A tool to tinker with STL files\",\n\t\tLong: \"Command-line processor for STL files\",... | go | edit | 0 | 4 | mit | c504d4f85ec22c2915993dc5b634d6d0095103a7 | krasin/steel | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage edit\n\nimport (\n\t\"testing\"\n\n\t\"github.com/elves/elvish/edit/ui\"\n)\n\nvar (\n\ttheLine = \"qw search 'foo bar ~y'\"\n\ttheLastCmd = newLastCmd(theLine)\n\n\tlastcmdFilterTests = []listingFilterTestCases{\n\t\t{\"\", []shown{... | go | edit | 18 | 1 | bsd-2-clause | 634c7418e45fb68584ae64d5a1c2156fd74d1091 | elves/elvish,elves/elvish,elves/elvish,elves/elvish,elves/elvish | edit/lastcmd_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage prometheus\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"k8s.io/client-go/pkg/api/v1\"\n\n\t\"github.com/coreos/prometheus-operator/pkg/client/monitoring/v1alpha1\"\n)\n\nfunc TestStatefulSetLabelingAndAnnotations(t *testing.T) {\n\t... | go | edit | 3 | 3 | apache-2.0 | 6f21e960a134a467ebb0bc7bccf43f9c32b04de0 | mmerrill3/prometheus-operator,sjuxax/prometheus-operator,gianrubio/prometheus-operator,mmerrill3/prometheus-operator,eedugon/prometheus-operator,mmerrill3/prometheus-operator,gianrubio/prometheus-operator,jescarri/prometheus-operator,sjuxax/prometheus-operator,brancz/prometheus-operator,gianrubio/prometheus-operator,ee... | pkg/prometheus/statefulset_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage http2\n\nimport (\n\t\"github.com/summerwind/h2spec/config\"\n\t\"github.com/summerwind/h2spec/spec\"\n)\n\nfunc HTTP2ConnectionPreface() *spec.TestGroup {\n\ttg := NewTestGroup(\"3.5\", \"HTTP/2 Connection Preface\")\n\n\ttg.AddTestCas... | go | edit | 3 | 2 | mit | ed64b27081e9cc7e6c3c0caa5abd8ce905c5ed10 | summerwind/h2spec | http2/3_5_http2_connection_preface.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage manager\n\nimport (\n\tds \"github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/deliveryservice\"\n\t\"sync\"\n)\n\ntype DSStatsThreadsafe struct {\n\tdsStats *ds.Stats\n\tm *sync.RWMutex\n}\n\nfunc New... | go | edit | 0 | 1 | apache-2.0 | d6851c152024dbff9f8777c6cb6f7b8b0ff1a389 | jeffmart/incubator-trafficcontrol,amiryesh/incubator-trafficcontrol,amiryesh/incubator-trafficcontrol,rscrimojr/incubator-trafficcontrol,alficles/incubator-trafficcontrol,knutsel/traffic_control-1,amiryesh/incubator-trafficcontrol,zhilhuan/incubator-trafficcontrol,naamashoresh/incubator-trafficcontrol,mdb/incubator-tra... | traffic_monitor/experimental/traffic_monitor/manager/dsstats.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage imageserver\n\nimport (\n\t\"encoding/gob\"\n\t\"github.com/Symantec/Dominator/lib/filesystem\"\n)\n\nfunc init() {\n\tgob.Register(&filesystem.RegularInode{})\n\tgob.Register(&filesystem.SymlinkInode{})\n\tgob.Register(&filesystem.Spec... | go | edit | 0 | 1 | apache-2.0 | ab30bfd812fc770d2bc8d2918717dc2b81e8fda1 | keep94/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator,keep94/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator | proto/imageserver/gob.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"fmt\"\n)\n\ntype Synchronizer struct {\n\tStorage *Storage\n}\n\nfunc NewSynchronizer(storage *Storage) *Synchronizer {\n\ts := new(Synchronizer)\n\ts.Storage = storage\n\n\treturn s\n}\n\nfunc (synchron... | go | edit | 9 | 3 | mit | 614155f3a0775318f9e22bdd786615551285a428 | asjustas/dea | synchronizer.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"hello app\")\n\n}\n\n```\n\nApply this change: Add http server and search template"
},
{
"role": "assistant",
"content": "package main\n\nimport (\n\t\"html/template\"... | go | edit | 3 | 5 | mit | 95b12b14c47c6b7bb7d62917d25fb5e04598ecb4 | psimika/secure-web-app | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage batcher\n\nimport (\n\t\"runtime\"\n\t\"time\"\n)\n\nconst backoff = time.Microsecond\n\nvar yield func()\n\nfunc yieldWithSleep() {\n\ttime.Sleep(backoff)\n}\n\nfunc yieldWithGoSched() {\n\truntime.Gosched()\n}\n\nfunc init() {\n\tyiel... | go | edit | 0 | 1 | apache-2.0 | 5d17e68c022433f84664dbd69238cfb61f7216e4 | funkygao/dbus,funkygao/dbus | pkg/batcher/yield.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage golog\n\nimport \"testing\"\n\nfunc TestFacts (t *testing.T) {\n db := NewDatabase().\n Asserta(NewTerm(\"father\", NewTerm(\"michael\"))).\n Asserta(NewTerm(\"father\", NewTerm(\"marc\")))\n t.Logf(\"%s\\n\"... | go | edit | 18 | 6 | mit | a28d7be3abc4923bc48061df17c80117e878bc9f | mndrix/golog,vzaramel/golog,bransorem/golog,mndrix/golog,samuell/golog,vzaramel/golog,bransorem/golog,samuell/golog | prove_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage sqlutil\n\n// Returns a string containing the expression IN with one or more question\n// marks for parameter interpolation. If numArgs argument is 3, the returned\n// value would be \"IN (?, ?, ?)\"\nfunc InParamString(numArgs int) str... | go | edit | 0 | 4 | apache-2.0 | fba604682b50b71ee56344e203c51b8e70a19642 | jaypipes/procession,jaypipes/procession | pkg/sqlutil/sqlutil.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nctxcopy is a Golang package which provides helper functions for performing context-aware copy task.\n\n*/\npackage ctxcopy\n\n```\n\nApply this change: Add 'Package' before description to remove golint warnings."
},
{
"role": "assis... | go | edit | 0 | 0 | mit | 823a279eeb4dc4f8714e6441a2c6048320369845 | northbright/ctx | ctxcopy/doc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage core\n\nimport (\n\t\"fmt\"\n)\n\n// writer points a shared state. sharedStateSink will point to the same shared state\n// even after the state is removed from the context.\ntype sharedStateSink struct {\n\twriter Writer\n}\n\n// NewSha... | go | edit | null | null | mit | 1fc892b542818a213e695f50705ec567da08f332 | sensorbee/sensorbee,sensorbee/sensorbee | core/shared_state_sink.go | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage connections\n\ntype OutputMessageType uint8\n\nconst (\n\tOutputMessageTypeGame OutputMessageType = iota\n\tOutputMessageTypePlayer\n\tOutputMessageTypeBroadcast\n)\n\nvar outputMessageTypeLabels = map[OutputMessageType]string{\n\tOutpu... | go | edit | 0 | 2 | bsd-2-clause | 80273fcbcc880810d8bb3a420513a81721b39c20 | ivan1993spb/clever-snake | connections/output_message.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\"os\"\n)\n\nfunc main() {\n\thttp.HandleFunc(\"/\", handler)\n\tfmt.Println(\"listening...\")\n\terr := http.ListenAndServe(\":\"+os.Getenv(\"PORT\"), nil)\n\tif err != nil {\n\t\tpanic(er... | go | edit | 3 | 2 | mit | 7ed88d3e87f15021145c708bacd41ccd030c56ab | jayeshsolanki93/slack9gag | slack9gag.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage urlfetch\n\nimport \"testing\"\nimport \"fmt\"\n\n// Local helper functions\nfunc test_getdata4urls(urls []string) {\n // create HTTP client\n client := HttpClient()\n\n ch := make(chan []byte)\n n := 0\n for _, url := ra... | go | edit | 6 | 4 | mit | 8767b28f7025242ade66feee0c7438e69db19efe | vkuznet/urlfetch2go,vkuznet/urlfetch2go | src/urlfetch/proxy_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\"fmt\"\n\t\"mime\"\n\t\"strings\"\n)\n\nfunc main() {\n\tfmt.Println(strings.SplitN(mime.TypeByExtension(\".avi\"), \"/\", 2)[0])\n}\n\n```\n\nApply this change: Update the play file for testing dms.MimeTypeByPath"
... | go | edit | 0 | 2 | bsd-3-clause | 3de3d059403188fc5efc67d9aecbbc892af49383 | anacrolix/dms,anacrolix/dms | play/mime.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage bittrex\n\n// Used in getmarkethistory\ntype Trade struct {\n\tOrderUuid string `json:\"OrderUuid\"`\n\tTimestamp jTime `json:\"TimeStamp\"`\n\tQuantity float64 `json:\"Quantity\"`\n\tPrice float64 `json:\"Price\"`\n\tTotal ... | go | edit | 3 | 0 | mit | b9c9f6ee854f9dde42b8f8f170a114497582bac7 | jyap808/go-bittrex,toorop/go-bittrex | trade.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\n\n// I am using a programming skill call precomputation.\n// It has a very good performance\nconst ans = `\n 34\n- 09\n-----\n 25\n+ 86\n-----\n 111\n=====\n\n 36\n- 09\n-----\n 27\n+ 84\n-----\n 111\n=====\n... | go | edit | 3 | 1 | mit | 214f8cc14203d1a1a1f670e3805b7cb117bc4dfb | dng8888/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,min... | golang/ABCDEFGHPPP.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"gform\"\n\t\"syscall\"\n\t\"w32\"\n)\n\nconst IDR_PNG1 = 100\n\nfunc onpaint(arg *gform.EventArg) {\n\tif data, ok := arg.Data().(*gform.PaintEventData); ok {\n\t\tif bmp, err := gform.NewBitmapFromResource(\n\t\t\... | go | edit | 3 | 3 | bsd-3-clause | 6acf8d0fbb33d3fa96af3900ddb9d062df5fa8a5 | AllenDang/gform,AllenDang/gform,AllenDang/gform | demo/canvas/testcanvas.go | accepted | null | 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\n\terr := Validate(*c)\n\n\tif err != nil {\n\t\treturn nil,err\n\t}\n\n\t... | go | edit | 30 | 2 | mit | 32aca3e1323886c478141cd488e1a5221fbaa04f | fibonacci1729/twigo | client.go | rejected_lint | Too many lint violations: 30 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage log\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"time\"\n)\n\ntype Logger struct {\n\tPrintDebug bool\n\tOutput io.Writer\n\tDateFormat string\n}\n\nfunc NewLogger(opts ...func(*Logger)) *Logger {\n\tl := &Logger{\n\t\tPrintDebug... | go | edit | 0 | 2 | unlicense | 96327f6fb00c1ef2d65028d2b1fd6b0dba4ebf3c | elwinar/rambler | log/logger.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2017 Pilosa Corp.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apa... | go | edit | 0 | 1 | apache-2.0 | 68581d50c0a53c9fe82484ae55ffb477b457cee6 | travisturner/pilosa | statik/filesystem.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage day9\n\nimport \"fmt\"\n\nfunc Solution() string {\n\treturn fmt.Sprintf(\"Part 1: %d, Part 2: %s\",\n\t\tlen(decode(data)), decode(data))\n}\n\nfunc decode(input string) string {\n\treturn input\n}\n\n```\n\nApply this change: Add day ... | go | edit | 3 | 4 | mit | 859c5921555ff1d21fa446eaabab8feaec1a8f25 | domdavis/adventofcode | 2016/day9/day9.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\t\"os/exec\"\n)\n\nfunc main() {\n\tcommand := os.Args[1:]\n\tcmd := exec.Command(command[0], command[1:]...)\n\tcmd.Stdout = os.Stdout\n\tcmd.Stderr = os.Stderr\n\terr := cmd.Run()\n\tif err != n... | go | edit | 0 | 3 | mit | 44c830670f242705d17b89225669c2d1fe45c700 | leocassarani/pew | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage github\n\nimport (\n\t\"github.com/github/hub/git\"\n)\n\nfunc IsHttpsProtocol() bool {\n\thttpProtocol, _ := git.Config(\"hub.protocol\")\n\tif httpProtocol == \"https\" {\n\t\treturn true\n\t}\n\n\thttpClone, _ := git.Config(\"--bool ... | go | edit | 0 | 2 | mit | b38a3185dda1d8c820d604e186de0008343182b3 | github/hub,github/hub,github/hub,github/hub | github/util.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage admin\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\t\"strings\"\n\n\t\"github.com/rakyll/statik/fs\"\n\n\t_ \"github.com/influxdb/influxdb/statik\"\n)\n\ntype HttpServer struct {\n\tport string\n\tlistener net.Listener\n\tclosed bool\... | go | edit | 0 | 4 | mit | 8bb95cb151b733f8263485aa80c6a40a25652bdf | jgeiger/influxdb,apigee/influxdb,nickrobinson/influxdb,runcom/influxdb,n1tr0g/influxdb,Yong-Lee/influxdb,mash0304/influxdb,no2key/influxdb,nickrobinson/influxdb,chenziliang/influxdb,toorop/influxdb,atyenoria/influxdb,nickrobinson/influxdb,imcom/influxdb,Yong-Lee/influxdb,paulstuart/influxdb,chenziliang/influxdb,Venu4th... | admin/admin.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage brokers\n\nimport (\n\t\"github.com/kafkactl/api/client\"\n)\n\ntype BrokerAdd struct{}\n\nfunc Add(api client.APIClient, in *BrokerAdd) error {}\n\n```\n\nApply this change: brokers: Add minor error fix (imports & return)"
},
{
... | go | edit | 0 | 1 | mit | 5f32b70817be38e3ba02530c32dc69df076a3b71 | eddyzags/kafkactl | brokers/brokers_add.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\ntype basicEditor struct {\n\tpos int\n\tbuf []rune\n}\n\n// move moves the position.\n// Given invalid position, move sets the position at the end of the buffer.\nfunc (e *basicEditor) move(to int) {\n\tswitch {\n\tcase to >= le... | go | edit | 0 | 3 | mit | 6901af9d7b87c6460438ea379ea532587ef02eac | elpinal/coco3 | basiceditor.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage safe\n\nimport (\n\t\"github.com/bndw/pick/errors\"\n)\n\nfunc (s *Safe) Add(name, username, password string) (*Account, error) {\n\tif _, exists := s.Accounts[name]; exists {\n\t\treturn nil, &errors.AccountExists{}\n\t}\n\n\taccount :... | go | edit | 6 | 3 | mit | c7dd24fe69bffe6b07407a8cff07b4c3e78cb6e8 | bndw/pick,bndw/pick | src/safe/add.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage airplay\n\nimport \"github.com/armon/mdns\"\n\n// A Device is an AirPlay Device.\ntype Device struct {\n\tName string\n\tAddr string\n\tPort int\n}\n\n// Devices returns all AirPlay devices in LAN.\nfunc Devices() []Device {\n\tdevices ... | go | edit | 0 | 3 | mit | 8a1c3fb12494bf435a2bcdd536f49b05f71a4585 | gongo/go-airplay | device.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gogopro\n\nimport (\n\t\"io/ioutil\"\n)\n\ntype Power struct {\n\tAPIRequester *APIRequester\n}\n\nfunc (p *Power) Init() *Power {\n\treturn p\n}\n\nfunc CreatePower(APIRequester *APIRequester) *Power {\n\tpower := &Power{}\n\tpower.API... | go | edit | 24 | 2 | apache-2.0 | e785014f8ef37cce066b7b25c845ec37e3acf019 | wagnerm/gogopro | power.go | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://w... | go | edit | 0 | 1 | apache-2.0 | 1442fee229bb6d536fa29d2a3aefccf5786d036a | mikebrow/containerd,dmcgowan/containerd,dmcgowan/containerd,thaJeztah/containerd,estesp/containerd,estesp/containerd,thaJeztah/containerd,mikebrow/containerd,containerd/containerd,containerd/containerd | oci/mounts_freebsd.go | rejected_duplicate | Near-duplicate of sample 116944 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage dog\n\nimport \"runtime\"\n\n// DefaultRunner defines the runner to use in case the task does not specify it.\n//\n// The value is automatically assigned based on the operating system when the\n// package initializes.\nvar DefaultRunner... | go | edit | 0 | 0 | apache-2.0 | 1719e4ae6067d04d12522aee36b1285f91f3dc1c | dogtools/dog,xsb/dog | init.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2017 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.... | go | edit | 0 | 0 | apache-2.0 | 5de60655cd7172d6c153283489ebd361c26a5819 | alejandroEsc/kubernetes,wongma7/kubernetes,ravisantoshgudimetla/kubernetes,intelsdi-x/kubernetes,pweil-/kubernetes,liggitt/kubernetes,khenidak/kubernetes,BenTheElder/kubernetes,du2016/kubernetes,tomerf/kubernetes,marun/kubernetes,kevin-wangzefeng/kubernetes,vmware/kubernetes,mahak/kubernetes,luxas/kubernetes,JacobTanen... | pkg/apis/storage/v1/doc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n)\n\nfunc main() {\n\tres, err := ping(\"google.com\", 5)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Printf(\"Min: %f ms\\n\", res.Min)\n\tlog.Printf(\"Avg: %f ms\\n\", res.Avg)\n\tlog.Printf(\"Max: ... | go | edit | 3 | 3 | mit | 78ebc2e8d3e078b6c29cd65f300c2b447bc4679b | grahamrhay/go-ping,grahamrhay/go-ping | main.go | rejected_duplicate | Near-duplicate of sample 117783 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package u5 currently provides a single utility to fetch the importers of a GoPackage via godoc.org API.\npackage u5\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\n\t\"github.com/shurcooL/go/gists/gist7480523\"\n)\n\ntype goPackage struc... | go | edit | 0 | 4 | mit | afa0d213cb73b6c2705dcd6e548a909c9f6ac1f8 | shurcooL/go | u/u5/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// config.go\n//\n// This file implements the configuration part for when you need the API\n// key to modify things in the Atlas configuration and manage measurements.\n\npackage atlas\n\nimport (\n\n)\n\nconst (\n\tapiEndpoint = \"https://atla... | go | edit | 0 | 0 | mit | 5a83d85a68ffe2a46a9737a4a578c8b17b7c0f08 | keltia/ripe-atlas | common.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage lrserver_test\n\nimport (\n\t\"github.com/jaschaephraim/lrserver\"\n\t\"golang.org/x/exp/fsnotify\"\n\t\"log\"\n\t\"net/http\"\n)\n\n// html includes the client JavaScript\nconst html = `<!doctype html>\n<html>\n<head>\n <title>Example... | go | edit | 0 | 3 | mit | 7de7af33013a1756a89752d01af64baafac9029c | jaschaephraim/lrserver | example_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage lib\n\nimport (\n\t\"time\"\n)\n\nconst windows = 2\n\ntype RateLimit struct {\n\tPeriod time.Duration\n\tRate uint\n\ttoks chan struct{}\n\tpaused bool\n}\n\nfunc (r *RateLimit) Start() {\n\tr.paused = false\n\tif r.toks == nil {\n... | go | edit | 0 | 4 | apache-2.0 | 1476a2934390afd2dc6520a02a57eee9926d47eb | danmarg/outtake | lib/ratelimit.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 metadata_test\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n\t\"testing\"\n\n\tcommon \"github.com/hyperledger/fabric/common/metadata\"\n\t\"github.com/... | go | edit | 0 | 2 | apache-2.0 | 7d59d5a757d427f8c9db4d69ed33762ffe0bf27c | binhn/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,xixuejia/fabric,blockc/fabric,stemlending/fabric,mqshen/fabric,ckeyer/fabric,mqshen/fabric,manish-sethi/fabric,lukehuangch/fabric,blockc/fabric,lukehuangch/fabric,stemlending/fabric,stemlending/fabric,lukehuangch/fabric,ckeyer/fabric,ckeyer/fabric,mqshe... | orderer/common/metadata/metadata_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build linux\n\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"). You may\n// not use this file except in compliance with the License. A copy of the... | go | edit | 3 | 1 | apache-2.0 | 84876b147f7e618b588500a54fe2623ec8d20f9f | kiranmeduri/amazon-ecs-agent,swipely/amazon-ecs-agent,swipely/amazon-ecs-agent,aws/amazon-ecs-agent,aws/amazon-ecs-agent,swipely/amazon-ecs-agent,swipely/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,aws/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,aws/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent | agent/config/parse_linux.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage msgp\n\nimport (\n\t\"testing\"\n)\n\n// EndlessReader is an io.Reader\n// that loops over the same data\n// endlessly. It is used for benchmarking.\ntype EndlessReader struct {\n\ttb *testing.B\n\tdata []byte\n\toffset int\n}\n\n... | go | edit | 0 | 2 | mit | 65796be8032ba01ee7467f63c0429e038868fd0f | appneta/msgp,skatsuta/msgp,appneta/msgp,mengzhuo/msgp,ebfe/msgp,DrGo/msgp,kgrz/msgp,jfbus/msgp,dockbiz/msgp,eliothedeman/msgp,tinylib/msgp,tinylib/msgp,darvik80/msgp | msgp/circular.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2014 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.... | go | edit | 0 | 0 | apache-2.0 | 4c6829b8f790f173c3fa0bfdab357b24e878df05 | kubernetes/examples,kubernetes/examples,kubernetes/examples,kubernetes/examples,kubernetes/examples,kubernetes/examples,kubernetes/examples,kubernetes/examples | doc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage transactions\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/jinzhu/gorm\"\n\t\"github.com/joshheinrichs/geosource/server/config\"\n\t_ \"github.com/lib/pq\"\n)\n\nvar db *gorm.DB\n\nvar ErrInsufficientPermission error = errors.N... | go | edit | 0 | 6 | mit | 996433d42f8ea3467a5e3d6b3ccb484b0bf76c2a | Decateron/geosource,Decateron/geosource,Decateron/geosource | server/transactions/transactions.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"cahbot/tgbotapi\"\n \"log\"\n)\n\nfunc main() {\n bot, err := NewCAHBot(Token)\n if err != nil {\n log.Panic(err)\n }\n\n bot.Debug = true\n\n log.Printf(\"Authorized on account %s\", bot... | go | edit | 3 | 3 | mit | 3fe576c561ce25c9449a2818c045b5500a66345f | thedadams/cahtelegram,thedadams/cahbot | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\n\nfunc a() error {\n\tfmt.Println(\"this function returns an error\")\n\treturn nil\n}\n\nfunc b() (int, error) {\n\tfmt.Println(\"this function returns an int and an error\")\n\treturn 0, nil\n}\n\nfunc main() {... | go | edit | 12 | 1 | mit | 88f114139e84441a059e5ed97422bece3d91b815 | zimmski/errcheck,gdm85/errcheck,dominikh/errcheck,alecthomas/errcheck,kisielk/errcheck | example/main.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"github.com/nsf/termbox-go\"\nimport \"time\"\nimport \"flag\"\n\nfunc main() {\n\tloops := flag.Int(\"loops\", 0, \"number of times to loop (default: infinite)\")\n\tdelay := flag.Int(\"delay\", 75, \"frame delay in ms\... | go | edit | 15 | 9 | mit | 356540cb3c8008ac682f9c4febc37e937cf00410 | jmhobbs/terminal-parrot | parrot.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 Google Inc. All Rights Reserved.\n// This file is available under the Apache license.\n\npackage exporter\n\nimport (\n\t\"expvar\"\n\t\"flag\"\n\t\"fmt\"\n\n\t\"github.com/google/mtail/metrics\"\n)\n\nvar (\n\tstatsdHostPort ... | go | edit | 3 | 1 | apache-2.0 | 04d70fa168908caef6f43b0620234840ec7b9fa2 | SuperQ/mtail,4honor/mtail,google/mtail,4honor/mtail,google/mtail,SuperQ/mtail | exporter/export_statsd.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage alertsv2\n\nimport \"net/url\"\n\ntype ExecuteCustomActionRequest struct {\n\t*Identifier\n\tActionName string `json:\"-\"`\n\tUser string `json:\"user,omitempty\"`\n\tSource string `json:\"source,omitempty\"`\n\tNote st... | go | edit | 3 | 2 | apache-2.0 | 8359b7406152a9b7562584686e2d7a7ce5bbfe50 | opsgenie/opsgenie-go-sdk | alertsv2/execute_custom_action_request.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage models\n\nimport (\n\t\"time\"\n)\n\n// ProjectStatus is a type alias which will be used to create an enum of acceptable project status states.\ntype ProjectStatus string\n\n// ProjectStatus pseudo-enum values\nconst (\n\tStatusPublishe... | go | edit | 6 | 3 | mit | 695a2f91d2c89d99cf77f0b535ab0a5d50d96c6f | georgizk/ims-release,georgizk/ims-release,georgizk/ims-release | models/project.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"). You may\n// not use this file except in compliance with the License. A copy of the\n// Lic... | go | edit | 0 | 1 | apache-2.0 | 5fa17bf98aaab98b5bb47c851924b98df226e80b | aws/amazon-ecs-agent,swipely/amazon-ecs-agent,swipely/amazon-ecs-agent,aws/amazon-ecs-agent,aws/amazon-ecs-agent,swipely/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,swipely/amazon-ecs-agent,aws/amazon-ecs-agent | agent/handlers/logging_handler.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage plist\n\nimport (\n\t\"testing\"\n\t\"testing/quick\"\n)\n\nfunc TestCFData(t *testing.T) {\n\tf := func(data []byte) []byte { return data }\n\tg := func(data []byte) []byte {\n\t\tcfData := convertBytesToCFData(data)\n\t\tdefer cfRelea... | go | edit | 18 | 2 | bsd-3-clause | cb31e3a15a79059b4b4f2739eb31fe4f999e93bb | kballard/go-osx-plist | convert_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage coreos\n\nimport (\n\t\"github.com/bernardolins/clustereasy/scope\"\n\t\"github.com/bernardolins/clustereasy/service/etcd\"\n\t\"github.com/bernardolins/clustereasy/service/flannel\"\n\t\"github.com/bernardolins/clustereasy/service/flee... | go | edit | 6 | 3 | apache-2.0 | ce90b40072aa2ac1032db2db5584dd6756afe840 | bernardolins/clustereasy,bernardolins/clustereasy | scope/coreos/coreos.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"testing\"\n\n\t\"github.com/urfave/cli\"\n)\n\nfunc TestCmdToot(t *testing.T) {\n\ttoot := \"\"\n\ttestWithServer(\n\t\tfunc(w http.ResponseWriter, r *http.Request) {\n\t\t\tswitch r.URL.... | go | edit | 3 | 2 | mit | 1c95b0742837c7651dee104af54f753f66ddd4d9 | 178inaba/go-mastodon,mattn/go-mastodon,mattn/go-mastodon | cmd/mstdn/cmd_toot_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage sirius\n\n/*\nThe MessageAction interface represents an action\nthat an extension wishes to perform on the\ncurrent message after execution has finished.\n\nA MessageAction may return an error if it could\nnot be performed for any reaso... | go | edit | 0 | 1 | mit | 9d82577a970814f7ee60cd1ce75db7f74666dfa9 | kayex/sirius | action.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"../../cmd\"\n\n \"fmt\"\n )\n\nfunc main() {\n commander := &cmd.Cmd{}\n commander.Init()\n\n commander.Commands[\"ls\"] = func(line string) (stop bool) {\n fmt.Println(\"listing stuff\")\n ... | go | edit | 0 | 1 | mit | 26692a28dc68e1760322314d820391b08ea9270c | gobs/cmd,calgaryscientific/cmd | example/main.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 main\n\nimport \"testing\"\n\nfunc TestGetMeetupEvents(t *testing.T) {\n\t_... | go | edit | 3 | 3 | bsd-3-clause | b593fc243e010d1c19416c3b282ca20bca4055d7 | chadev/Chadev_ircbot | devlunch_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage refctx\n\nimport (\n\t\"context\"\n\t\"sync/atomic\"\n)\n\n// RefCtr cancels a context when no references are held\ntype RefCtr struct {\n\tcancel context.CancelFunc\n\trefcnt int32\n}\n\n// Incr increments the refcount\nfunc (r *RefCtr... | go | edit | 0 | 2 | mit | cd44a3fcebfc3f67f87a9e4614d1848b0c617204 | SentimensRG/ctx | refctx/refctx.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage libclc\n\nimport (\n \"text/template\"\n \"bufio\"\n)\n\ntype File struct {\n Path string\n Content string\n Owner string\n Permissions string\n}\n\ntype CloudConfig struct {\n DiscoveryUrl string\n Files []*File\n}\n\nfunc Writ... | go | edit | 6 | 1 | apache-2.0 | e8a87530700a1987eef05c94d6b0bbc985bf8f00 | winkapp/libclc,winkapp/libclc | cc.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/heroku/busl/assets\"\n\t\"github.com/heroku/busl/broker\"\n\t\"github.com/heroku/busl/storage\"\n\t\"github.com/heroku/busl/util\"\n)\n\nfunc handleError(w http.ResponseWriter, r *htt... | go | edit | 0 | 6 | mit | 565d8da8471ee5149b65b343eb68ff660e45be0a | cyx/busl,heroku/busl,heroku/busl | server/errors.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cnmidori_test\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path\"\n\n\t\"github.com/northbright/cnmidori\"\n\t\"github.com/northbright/pathhelper\"\n)\n\nconst (\n\tsettingsStr string = `\n{\n \"redis-servers\":[\n {... | go | edit | 0 | 3 | mit | 20e2b0dde6f58535d426c4f500bd7cd1a7bd31b8 | northbright/cnmidori,northbright/cnmidori | server_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage uploadService\n\nimport (\n\t\"strings\"\n)\n\nfunc CheckTrackers(trackers []string) bool {\n\t// TODO: move to runtime configuration\n\tvar deadTrackers = []string{ // substring matches!\n\t\t\"://open.nyaatorrents.info:6544\",\n\t\t\"... | go | edit | 0 | 5 | mit | 90c52bf7d32c3f3daacd59598d6df31dbb1166c5 | kipukun/nyaa,yueou/nyaa,Nutjob/nyaa,ipatrol/nyaa,moose65468/nyaa,steindornatorinn/nyaa,Nutjob/nyaa,ipatrol/nyaa,moose65468/nyaa,kipukun/nyaa,yueou/nyaa,ElegantMonkey/nyaa,Nutjob/nyaa,steindornatorinn/nyaa,NyaaPantsu/nyaa,Nutjob/nyaa,ipatrol/nyaa,ElegantMonkey/nyaa,ElegantMonkey/nyaa,steindornatorinn/nyaa,majestrate/nya... | service/upload/upload.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nPackage \"matrix\" provides types which represent matrix, scalar and iterator of elements.\n*/\npackage matrix\n\nimport (\n\t\"github.com/mitsuse/matrix-go/internal/types\"\n)\n\ntype Matrix interface {\n\ttypes.Matrix\n}\n\ntype Cursor in... | go | edit | 0 | 0 | mit | fde0f4623511455826005e1dda31649c3d41488a | mitsuse/matrix-go,jmptrader/matrix-go | matrix.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage fleet\n\nimport (\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net\"\n\t\"net/http\"\n)\n\ntype Client struct {\n\thttp *http.Client\n}\n\ntype Unit struct {\n\tCurrentState string `json:\"currentState\"`\n\tDesiredState string `json:\"de... | go | edit | 0 | 3 | mit | ab43e7899928afbb11add20351517b9486336dd8 | bmorton/deployster | fleet/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage keys\n\nimport \"fmt\"\n\n// Kind expresses usage of the ambient internal key.\ntype Kind int\n\nconst (\n\t// Delete represents deletion of this key.\n\tDelete = 0\n\t// Value represents value setting of this key.\n\tValue = 1\n\tmax... | go | edit | 0 | 3 | mit | 717a9309963d4e4767abf32ef614f33667ce6a07 | kezhuw/leveldb,kezhuw/leveldb | internal/keys/kind.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage vm\n\nvar (\n\tnullClass *RNull\n\t// NULL represents Goby's null objects.\n\tNULL *NullObject\n)\n\n// RNull is the built in class of Goby's null objects.\ntype RNull struct {\n\t*BaseClass\n}\n\n// NullObject represnts the null value ... | go | edit | 24 | 1 | mit | 51aafa6d23a1c2105a7806de5c3bceeb0783a8f1 | st0012/Rooby,hachi8833/goby,goby-lang/goby,Maxwell-Alexius/goby,goby-lang/goby,hachi8833/goby,hachi8833/goby,goby-lang/goby,Maxwell-Alexius/goby,Maxwell-Alexius/goby,st0012/Rooby | vm/null.go | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage wayang\n\ntype Endpoint map[string]map[string]interface{}\ntype Mock map[string]Endpoint\n\ntype DataStore interface {\n\tNewMock(Mock) (string, error)\n\tGetEndpoint(string, string) (Endpoint, error)\n\tUpdateEndpoint(string, Mock) err... | go | edit | 0 | 0 | bsd-3-clause | df87f92c7d38682f9712644f1b9e595b9b9716ce | rahulg/wayang,rahulg/wayang | src/wayang/wayang/data.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/jessevdk/go-flags\"\n)\n\ntype Option struct {\n\tDelimiter string `short:\"d\" long:\"delimiter\" default:\"\"`\n\tUseRegexp bool `short:\"r\" long:\"regexp\" default:\"false\"`\n\tCount int ... | go | edit | 0 | 2 | mit | 28ed3c5df6c23ebc3520516f0e993a3fa91c1488 | kusabashira/alita | option.go | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.