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 twse\n\nimport (\n\t\"encoding/csv\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/toomore/gogrs/utils\"\n)\n\ntype QFIIS struct {\n\tDate time.Time\n}\n\nfunc (q QFIIS) URL() string {\n\treturn fmt.Sprintf(\"%s%s\", utils.TWS... | go | edit | 3 | 2 | mit | ed6f7e390f705143cdfa449b4dc83f45092aabb0 | toomore/gogrs,toomore/gogrs | twse/qfiis.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage model\n\n// TemplateGenerationType is the model class what represents template generation\ntype TemplateGenerationType struct {\n\tTemplateGeneration\n}\n\n// NewTemplateGenerationType creates a template generation model instance\nfunc ... | go | edit | 3 | 1 | mit | 59bb68fc295665df6807ec32234c34421aef93c9 | qb0C80aE/clay | model/template_generation_type.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage game\n\nimport (\n \"fmt\"\n)\n\ntype Game struct {\n Name string\n SetupRules []SetupRule\n}\n\nfunc NewGame(name string, rules []SetupRule) *Game {\n return &Game{\n Name: name,\n SetupRules: rules,\n }\n}\n\nfunc (game *Ga... | go | edit | 6 | 2 | mit | 9bce6cad74f30ccc1117f4a76f25d8737213c6cb | rkbodenner/parallel_universe | game/game.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//+build go1.17\n\n// This variant contains a trivial wrapper around \"runtime/cgo\".Handle.\n\npackage yara\n\nimport \"runtime/cgo\"\n\ntype cgoHandle cgo.Handle\n\nfunc cgoNewHandle(v interface{}) cgoHandle { return cgo.NewHandle(v) }\n\n```... | go | edit | 0 | 1 | bsd-2-clause | 309929481e1e5074241053571827951094ca7f50 | hillu/go-yara,hillu/go-yara | handle.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport(\n \"fmt\"\n \"os\"\n)\n\nconst(\n LUNCHY_VERSION = \"0.1.0\"\n)\n\nfunc printUsage() {\n fmt.Printf(\"Lunchy %s, the friendly launchctl wrapper\\n\", LUNCHY_VERSION)\n fmt.Println(\"Usage: lunchy [start|stop|restart... | go | edit | 0 | 4 | mit | 337f5fe789330cbaed5593c40a2dd52a924a4179 | sosedoff/lunchy-go,sosedoff/lunchy-go | lunchy.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build darwin\n// This file is compiled only on mac. It contains paths used by the mac\n// browser bundle.\n// http://golang.org/pkg/go/build/#hdr-Build_Constraints\n\npackage main\n\nconst (\n\t// The TorBrowser.app.meek-http-helper directo... | go | edit | 0 | 0 | cc0-1.0 | ffb534a1c2f2024ccafe4965f1a3bea5145c7524 | scucoco/meek,projectarkc/meek,projectarkc/meek,projectarkc/meek,projectarkc/meek,Yawning/meek,projectarkc/meek,wyuelin/mymeek,infinity0/meek,wyuelin/mymeek,gorshell/forkmeek,Yawning/meek,gorshell/forkmeek,wyuelin/mymeek,arlolra/meek,Yawning/meek,gorshell/forkmeek,arlolra/meek,infinity0/meek,infinity0/meek,Yawning/meek,... | meek-client-torbrowser/mac.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage q\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n)\n\nvar (\n\tLogFile = \"/var/log/q\"\n)\n\nfunc Println(a ...interface{}) {\n\tfd, err := os.OpenFile(LogFile, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)\n\tif er... | go | edit | 0 | 4 | mit | 072568f64861329b996635a4c286c9929f678895 | y0ssar1an/qq,soider/d,y0ssar1an/qq,y0ssar1an/q | q.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n)\n\nvar sourceURITests = []struct {\n\tsrc string\n\tdst string\n}{\n\t{\n\t\t\"https://github.com/sunaku/vim-unbundle\",\n\t\t\"https://github.com/sunaku/vim-unbundle\",\n\t},\n\n\t{\n\t\t\"Shougo/neob... | go | edit | 0 | 4 | mit | 457c1eda5f6025f80e8dda547ade623e11be30b3 | kusabashira/vub | package_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage behaviors\n\nimport (\n\t\"testing\"\n\n\t\"github.com/workfit/tester/assert\"\n)\n\nfunc TestRoundRobin(t *testing.T) {\n\tvar b interface{}\n\tb = &RoundRobin{}\n\t_, ok := b.(Interface)\n\tassert.For(t).ThatActual(ok).IsTrue()\n}\n\n... | go | edit | 12 | 1 | apache-2.0 | c6e8a8aeb93d1f565081758efb40a63bd4b85cd1 | jkomoros/boardgame,jkomoros/boardgame,jkomoros/boardgame | behaviors/main_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/jessevdk/go-flags\"\n\t\"github.com/tarm/serial\"\n)\n\ntype Options struct {\n\tPort string `short:\"p\" long:\"port\" description:\"Serial Port\"`\n\tBaud... | go | edit | 3 | 4 | mit | b242877875fad0b7d485d3af8cdcee6cabf0c2ee | nocd5/serial | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage rice\n\n// LocateMethod defines how a box is located.\ntype LocateMethod int\n\nconst (\n\tLocateFS = LocateMethod(iota) // Locate on the filesystem according to package path.\n\tLocateAppended ... | go | edit | 12 | 2 | bsd-2-clause | 649b0d0237096545cbef18e0b0ccf8a9672d983c | GeertJohan/go.rice | config.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//\n// Copyright © 2011 Guy M. Allard\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://... | go | edit | 24 | 3 | apache-2.0 | 220aaabb37888f9ed137558613c40010fb70888a | gmallard/stompngo | send.go | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage schema\n\nimport (\n\t\"github.com/coopernurse/gorp\"\n\t\"log\"\n\t\"time\"\n)\n\nfunc toString(t time.Time) string { return t.Format(time.UnixDate) }\nfunc fromString(st string) time.Time {\n\tt, err := time.Parse(time.UnixDate, st)\n... | go | edit | 0 | 0 | mit | 2fa00279bfb36f6ff83a923a26e719a2f3e2f3cc | crockeo/personalwebsite,crockeo/personalwebsite,crockeo/personalwebsite,crockeo/personalwebsite,crockeo/personalwebsite | database/schema/post.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage incus\n\nimport \"log\"\n\ntype RedisConsumer struct {\n\tcommands <-chan RedisCommand\n\tpool *redisPool\n}\n\nfunc NewRedisConsumer(commands <-chan RedisCommand, pool *redisPool) *RedisConsumer {\n\tconsumer := &RedisConsumer{\n\t... | go | edit | 0 | 4 | mit | a30a47b712e37d50147090c0ae5f14e8a31880e2 | AdriVanHoudt/incus,samuelebistoletti/incus,AdriVanHoudt/incus,AdriVanHoudt/incus,Imgur/incus,samuelebistoletti/incus,Imgur/incus,Imgur/incus,samuelebistoletti/incus | redis_consumer.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build windows\n\n// Package config wraps xdgdir.Config to allow for OS-independent configuration.\npackage config\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\nfunc Open(filename string) (*os.File, error) {\n\tdir := os.Getenv... | go | edit | 0 | 2 | mit | 50284cdfda2142263ff7ba33c6c3bff46f26bea4 | adam000/goutils,adam000/goutils | config/config_windows.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage clang\n\n// #cgo darwin LDFLAGS: -L/opt/local/libexec/llvm-3.5/lib\nimport \"C\"\n\n//EOF\n\n```\n\nApply this change: Use homebrew version of llvm"
},
{
"role": "assistant",
"content": "package clang\n\n// #cgo darwin LDFLA... | go | edit | 0 | 0 | bsd-2-clause | 99b4364f58cb587c0174b745c76c7158d737313d | surullabs/go-clang,surullabs/go-clang | cgoflags_darwin.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nPackage main provides go-bigv, the command line interface to Bytemark's BigV service\n*/\npackage main\n\n// TODO(telyn): Change all instances of uk0 to api when we move to api.bigv.io - `make find-uk0` will help\n\n```\n\nApply this change... | go | edit | 0 | 0 | mit | cb0d7d0cfbe88c944bc42f01c372f9aa23e12214 | BytemarkHosting/bytemark-client,BytemarkHosting/bytemark-client,BytemarkHosting/bytemark-client | main/doc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage dir_test\n\nimport (\n\t\"os\"\n\t\"path\"\n\t\"testing\"\n\n\t\"github.com/mlafeldt/chef-runner/resolver/dir\"\n\t\"github.com/mlafeldt/chef-runner/util\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nconst CookbookPath = \"test-cook... | go | edit | 0 | 2 | apache-2.0 | 268e0768a3cc63b48bbce34a3d53f870a50d168a | mlafeldt/chef-runner,mlafeldt/chef-runner,mlafeldt/chef-runner,rajthilakmca/chef-runner,rajthilakmca/chef-runner,rajthilakmca/chef-runner | resolver/dir/resolver_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"database/sql\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/sotoz/Ferrytale/controller\"\n\t\"github.com/sotoz/Ferrytale/database\"\n)\n\n// Config describes the configuration struct for the ap... | go | edit | 0 | 3 | apache-2.0 | 1bf8f5b45ec96e26ca50a162c0090612a171fe06 | sotoz/Ferrytale | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main_test\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\n\t\"testing\"\n)\n\nfunc TestMain(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tdir, err := os.Getwd()\n\t... | go | edit | 18 | 1 | apache-2.0 | 127d51abc31132564e54280022195157879ab473 | cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli | main/main_suite_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"os\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"github.com/concourse/docker-image-resource/cmd/print-metadata/passwd\"\n)\n\ntype imageMetadata struct {\n\tUser string `json:\"user\"`\n\tEnv []str... | go | edit | 0 | 3 | apache-2.0 | b8b3602976fd85e310d7cb718c6654617a1b4c94 | ggeorgiev/docker-image-resource,concourse/docker-image-resource,barthy1/docker-image-resource,barthy1/docker-image-resource,SillyMoo/docker-image-resource,concourse/docker-image-resource,ggeorgiev/docker-image-resource,SillyMoo/docker-image-resource | cmd/print-metadata/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/keltia/ripe-atlas\"\n\t\"github.com/urfave/cli\"\n\t\"log\"\n\t\"os\"\n\t\"strconv\"\n)\n\n// init injects our \"ip\" related commands/options.\nfunc init() {\n\t// Fill-in the various command... | go | edit | 12 | 5 | mit | 4eba8f1ba77dec3bbf9127a4121046441d9c51a8 | keltia/ripe-atlas | cmd/atlas/cmd_ip.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage testclient\n\nimport (\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/parnurzeal/gorequest\"\n)\n\n// TODO consider drop *testing.T parameter\nfunc New(t *testing.T, handler http.Handler) *gor... | go | edit | 0 | 1 | mit | 4ab900d14eb2fafec4b92c9a08d085259da489ea | diyan/assimilator,diyan/assimilator,diyan/assimilator | testutil/testclient/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)\n\nfunc main() {\n\thttp.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\t\tfmt.Fprintln(w, \"Hello Go!! Brought to you by Travis CI.\")\n\t})\n\n\tlog.Fatal(h... | go | edit | 0 | 1 | mit | 4eb32e5330ef57c9488f6cd483743979276cf3a4 | breerly/hellogo | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage goanna\n\nimport (\n\t\"bytes\"\n\t\"log\"\n\t\"runtime/debug\"\n\t\"strings\"\n\t\"time\"\n)\n\nconst LogRequestTemplate = `\n----------------------------------------------------------------------\n%s\n\nUrl: %s\nMethod: %s\nTimestamp:... | go | edit | null | null | mit | 07abde73cf7dea2d4bf8d364449362885582eb81 | 99designs/goodies | goanna/requestlogger.go | rejected_code_smell | Internal duplication: ~22% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage integration\n\nimport (\n\t\"os\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"kismatic docker registry feature\", func() {\n\tBeforeEach(func() {\n\t\tdir := setupTestWorkingDir()\n\t\tos.C... | go | edit | 39 | 1 | apache-2.0 | 3204745417d2011c065d70c4b290e5704f9b7dfc | apprenda/kismatic,apprenda/kismatic,apprenda/kismatic | integration/docker_registry_test.go | rejected_lint | Too many lint violations: 39 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (c) 2015, Peter Mrekaj. All rights reserved.\n// Use of this source code is governed by a MIT-style\n// license that can be found in the LICENSE.txt file.\n\npackage lists\n\n// MergeSorted merges int nodes from l and f sorted list... | go | edit | 12 | 8 | mit | 2bac908d8f8fe2d17d6fe61c7c4e7d806251af25 | mrekucci/epi,mrekucci/epi | lists/mergesorted.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage space\n\n// Planet names\ntype Planet string\n\nconst secondsInEarthYear = 31557600\n\nvar orbitalPeriods = map[Planet]float64{\n\t\"Mercury\": 0.2408467,\n\t\"Venus\": 0.61519726,\n\t\"Mars\": 1.8808158,\n\t\"Jupiter\": 11.862615,... | go | edit | 0 | 1 | mit | b1dbaed4bbcd324754a604657224b2484f8df2fb | rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism | go/space-age/space_age.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\r\n\r\nimport (\r\n\t\"log\"\r\n\t\"os\"\r\n\t\"os/exec\"\r\n\t\"path/filepath\"\r\n)\r\n\r\nfunc init() {\r\n\tif Version == \"\" || Branch == \"\" {\r\n\t\tlog.Printf(\"Version info isn't set. Must be on openshift. Let's try to... | go | edit | 9 | 3 | mit | 908a02f76e2ae8cbcf977a6ee870785b37af617e | THUNDERGROOVE/sde-search,THUNDERGROOVE/sde-search | verfix.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage system\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n\t\"syscall\"\n)\n\n// Via http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7b21fddd087678a70ad64afc0f632e0f1071b092\n//\n// We need different setns values for the d... | go | edit | 0 | 3 | apache-2.0 | 0e3181a0b0ab36c750708324599a368f69bab601 | jhjeong-kr/runc,han-wang/runc,rhatdan/runc,mapk0y/runc,chenchun/runc,runcom/libcontainer,mYmNeo/runc,whosthatknocking/runc,intfrr/runc,docker/runc,dieface/runc,rootfs/runc,kolyshkin/runc,fabiokung/runc,stefanberger/runc,maxamillion/runc,inatatsu/runc,cloudfoundry-incubator/runc,haijunTan/runc,mikebrow/runc,adrianreber/... | system/setns_linux.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gosnitch\n\nimport \"testing\"\n\nfunc TestPidof(t *testing.T) {\n\t_, err := Pidof(\"go\")\n\tif err != nil {\n\t\tt.Error(\"Did not find pid of 'go'\")\n\t}\n}\n\nfunc TestPidofNotExisting(t *testing.T) {\n\tpid, err := Pidof(\"fake-p... | go | edit | 0 | 2 | bsd-2-clause | c31fc60b8c177aacf91ae0b197ebe7484fbc6d90 | mulander/gosnitch | gosnitch_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage geoip\n\nimport (\n\t\"github.com/spf13/cobra\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"log\"\n\t\"testing\"\n)\n\n// todo: Write meaningful test\nfunc TestGeoIP(t *testing.T) {\n\tassert.IsType(t, &cobra.Command{}, Command(log.P... | go | edit | 6 | 1 | bsd-3-clause | 043804af00d3b1f10100c616a5cd00dd1db52c86 | sima-land/go-toolkit | geoip/geo_ip_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage requirements\n\nimport (\n\t\"cf\"\n\t\"cf/configuration\"\n\t\"cf/terminal\"\n\t\"fmt\"\n)\n\ntype ApiEndpointRequirement struct {\n\tui terminal.UI\n\tconfig configuration.Reader\n}\n\nfunc NewApiEndpointRequirement(ui terminal.UI... | go | edit | 0 | 2 | apache-2.0 | 4c1189010453905be238298049a6ff245619a5a9 | cf-routing/cli,nimbus-cloud/cli,cgvarela/cli,zhang-hua/cli,nttlabs/cli,18F/cli,srikanth88infy/cli,EngineerBetter/cli,simonleung8/cli,SrinivasChilveri/cli,HuaweiTech/cli,cgvarela/cli,rastasheep/trash-can,ofer43211/cli,xingzhou/cli,xingzhou/cli,18F/cli,pishro-cc/cli,nimbus-cloud/cli,saurabhguptasg/cli,nttlabs/cli,markstg... | src/cf/requirements/api_endpoint.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage medias\n\nimport (\n\t\"io/ioutil\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"log\"\n\t\"github.com/mitchellh/mapstructure\"\n)\n\nvar Medias []Media\n\nconst path_to_config string = \"data/medias.config.json\"\n\nfunc LoadMedias() {\n\t/... | go | edit | 12 | 3 | mit | 9d94bb83334c9bf2230be28246437987ec22e9e5 | Zenika/MARCEL,Zenika/MARCEL,Zenika/MARCEL,Zenika/MARCEL | backend/medias/mediamanager.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage scoring\n\nimport (\n\t\"reflect\"\n\t\"sort\"\n\t\"testing\"\n)\n\nfunc TestEntriesSort(t *testing.T) {\n\te1 := Entry{\"/foo\", &Score{100, Now}}\n\te2 := Entry{\"/foo/bar\", &Score{200, Now}}\n\n\tentries := Entries([]Entry{e1, e2})\... | go | edit | 12 | 2 | mit | 9966e68f5cd9ad3c77cede7578e1b32fa5d0a42b | gsamokovarov/jump | scoring/entries_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Printf(\"Hello, world.\\n\")\n}\n\n```\n\nApply this change: Implement process to create user for client"
},
{
"role": "assistant",
"content": "package main\n\nimport (\n\t\"buf... | go | edit | 3 | 5 | mit | d76054118c5c82990465a1f216deb0aec7da1773 | keichi/friend | src/github.com/keichi/friend/friend-client/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 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 gl\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/go-gl/gl/v3.2-core/gl\"\n)\n... | go | edit | 0 | 8 | bsd-3-clause | 0b871e418a39c5637d235e4eb6f412aa7188bb5f | ylong/gxui,Anaminus/gxui,rnubel/gxui,mzgnr/gxui,henrikhodne/gxui,treejames/gxui,xinhuang327/gxui,leelib/gxui,crr0004/gxui,MeGaPk/gxui,CodyGuo/gxui,abadojack/gxui,cainiaocome/gxui,insionng/gxui,henrylee2cn/gxui,pombredanne/gxui,jmptrader/gxui,UIKit0/gxui,Drahoslav7/gxui,google/gxui | drivers/gl/draw_mode.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage server\n\ntype ServerRes struct {\n\tServer string\n\tIsQueued bool\n\tErrorMessage string\n}\n\n```\n\nApply this change: Add the missing Links field to the ServerRes type."
},
{
"role": "assistant",
"content": "p... | go | edit | 0 | 0 | apache-2.0 | 02e2eebf07da56ec80b2a13a4c4784a34368883c | CenturyLinkCloud/clc-go-cli,CenturyLinkCloud/clc-go-cli | models/server/server_res.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage stow_test\n\nimport (\n\t\"errors\"\n\t\"net/url\"\n\t\"testing\"\n\n\t\"github.com/cheekybits/is\"\n\t\"github.com/graymeta/stow\"\n)\n\nfunc TestKindByURL(t *testing.T) {\n\tis := is.New(t)\n\tu, err := url.Parse(\"test://container/it... | go | edit | 3 | 1 | apache-2.0 | 5bc9b7a6744253f155d17c77fb3cc0b380e7b7b2 | graymeta/stow | stow_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage backend\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\ntype recordingHTTPTransport struct {\n\treq *http.Request\n}\n\nfunc (t *recordingHTTPTransport) RoundTrip(req *http.Request... | go | edit | 3 | 2 | mit | 18d00f79e0ec80e65714bb4e1fea20dd122e11b3 | solarce/worker,solarce/worker,solarce/worker,travis-ci/worker,travis-ci/worker,travis-ci/worker | backend/package_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage mux\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n)\n\n// Converts patterns like \"/users/:id\" to \"/users/(?P<id>\\d+)\"\nfunc convertSimplePatternToRegexp(pattern string) string {\n\tparts := strings.Split(pattern, \"/\")\n\n\... | go | edit | 0 | 3 | mit | 7b24330b68d8ddc5a5d8b83d09002580140b5211 | DVI-GI-2017/Jira__backend | mux/helpers.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/hanwen/go-fuse/termite\"\n\t\"flag\"\n\t\"io/ioutil\"\n\t\"log\"\n)\n\nvar _ = log.Printf\n\nfunc main() {\n\tcachedir := flag.String(\"cachedir\", \"/tmp/worker-cache\", \"content cache\")\n\tsecretFile... | go | edit | 0 | 2 | bsd-3-clause | 92f040c291bf5e56d9f1be3ad4943642f6afdfb8 | hanwen/termite,hanwen/termite,hanwen/termite | bin/worker/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage redirect\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/fabioberger/airtable-go\"\n)\n\nconst (\n\t// DefaultRedirectKey should be fetched if the requested key is not found.\n\tDefaultRedirectKey = \"default\"\n\tredirectTableName = \"Redire... | go | edit | 15 | 3 | mit | 6e4e98cc5a52142df1d883c977cf99e4ebc8b490 | zqureshi/go | redirect/client.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2018 The Hugo 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 at\... | go | edit | 3 | 0 | apache-2.0 | 2221b5b30a285d01220a26a82305906ad3291880 | gohugoio/hugo,gohugoio/hugo,gohugoio/hugo | common/hugo/version_current.go | rejected_duplicate | Near-duplicate of sample 117991 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage g\n\nimport (\n\t\"time\"\n)\n\n// changelog:\n// 3.1.3: code refactor\n// 3.1.4: bugfix ignore configuration\n// 5.0.0: 支持通过配置控制是否开启/run接口;收集udp流量数据;du某个目录的大小\n// 5.1.0: 同步插件的时候不再使用checksum机制\nconst (\n\tVERSION = \"5.1.2\"\n\... | go | edit | 0 | 0 | apache-2.0 | d0034c1c6a36f75cf8f086ca7e13ab144902bb5c | Cepave/open-falcon-backend,Cepave/agent,masato25/open-falcon-backend,Cepave/open-falcon-backend,Cepave/open-falcon-backend,masato25/open-falcon-backend,Cepave/agent,Cepave/agent,Cepave/open-falcon-backend,masato25/open-falcon-backend,Cepave/agent,Cepave/open-falcon-backend,masato25/open-falcon-backend,masato25/open-fal... | g/const.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage output\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestTextDoesRegisterItself(t *testing.T) {\n\tassert.Equal(t, \"*output.Text\", reflect.TypeOf(ForName(\"text\")).String())\n}\n\n``... | go | edit | 6 | 1 | mit | 6c4726e879b3e8662632615c24cf1ca9bf906d6d | hoop33/limo | output/text_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage avalanche\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\ntype HTTPWriterConfig struct {\n\tHost string\n\n\tGenerator Generator\n}\n\ntype HTTPWriter struct {\n\tc HTTPWriterConfig\n}\n\nfunc NewHTTPWriter(c HTTPWriterCon... | go | edit | 6 | 3 | mit | 2a0ebf7c4fd958ac0ee0b25d74f3aaa98e49fea2 | mark-rushakoff/mountainflux | avalanche/http_writer.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage pluggo\n\nimport \"testing\"\n\nfunc TestRegister1(t *testing.T) {\n\terr := Register(\"ep1\", func() interface{} {\n\t\treturn \"1\"\n\t})\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n\nfunc TestRegister2(t *testing.T) {\n\terr := Reg... | go | edit | 15 | 2 | mit | 5e73619f8e2f98fa7ac2cefe533472acd1f783a0 | CAFxX/pluggo | plugin_test.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage config\n\nimport (\n\t\"path\"\n\n\t\"github.com/octavore/naga/service\"\n\t\"github.com/octavore/nagax/config\"\n)\n\ntype Config struct {\n\tDataDir string `json:\"data_dir\"` // themes, plugins\n}\n\ntype Module struct {\n\t*config.M... | go | edit | 3 | 3 | apache-2.0 | a4f07ee962cf45bbf6c309d3b604281e64ed2b11 | ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup | server/config/config.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2019 The gVisor 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://... | go | edit | 0 | 0 | apache-2.0 | 8fe48dcb1ebbdd4d705000ad20077a7dbeec19ab | google/gvisor,google/gvisor,google/gvisor,google/gvisor,google/gvisor,google/gvisor,google/gvisor,google/gvisor | pkg/sentry/syscalls/linux/linux64.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gen\n\ntype Config struct {\n\tSource string `json:\"source\"`\n\tDestination string `json:'destination\"`\n\tSafe bool `json:\"safe\"`\n\tExcluede []string `json:\"exclude\"`\n\tInclude string `json\"\"incl... | go | edit | 3 | 0 | mit | 8c7db7220495d7d173942d37a049434b83c4d7fd | gernest/wuxia,gernest/wuxia,gernest/wuxia,gernest/wuxia | gen/config.go | rejected_duplicate | Near-duplicate of sample 117950 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage yum\n\nimport (\n\t\"testing\"\n\n\t\"github.com/hnakamur/commango/jsonutil\"\n)\n\nfunc TestInstalled(t *testing.T) {\n\tresult, err := Installed(\"kernel\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n _, err = jsonutil.Encode(res... | go | edit | 12 | 3 | mit | 9cc78714d5355f8a8036d9a5e34de6b37dd40cf8 | hnakamur/commango | modules/redhat/yum/yum_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage appdefaults\n\nconst (\n\tAddress = \"npipe:////./pipe/buildkitd\"\n\tRoot = \".buildstate\"\n\tConfigDir = \"\"\n)\n\nfunc UserAddress() string {\n\treturn Address\n}\n\nfunc EnsureUserAddressDir() error {\n\treturn nil\n}\n\nfu... | go | edit | 0 | 1 | apache-2.0 | e11b881c126b3fe2c31bdc1691ae6efa969062cd | tonistiigi/buildkit_poc,tonistiigi/buildkit_poc | util/appdefaults/appdefaults_windows.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nconst version = \"0.1.3\"\n\nfunc testPrint(w io.Writer) {\n\tfmt.Fprint(w, \"Hello world!! \"+version+\"\\n\")\n}\n\nfunc main() {\n\ttestPrint(os.Stdout)\n}\n\n```\n\nApply this ch... | go | edit | 0 | 1 | mit | e41ed07b5b098a59f9b792856ebe7b83bd7dbd9d | manabu/wercker-golang-helloworld-build-cmd | helloworld.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/zenazn/goji\"\n\t\"github.com/zenazn/goji/web\"\n)\n\nfunc put(c web.C, w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprintf(w, \"Put a thing\")\n}\n\nfunc get(c web.C, w... | go | edit | 0 | 2 | mit | 8702a31d404b4ecaa096553133676dbc97686204 | richo/roving,richo/roving,richo/roving,richo/roving | server/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gobreak\n\nimport \"time\"\n\ntype runFunc func() error\ntype fallbackFunc func(error) error\n\nconst (\n\tSuccess = \"success\"\n\tErrReject = \"reject\"\n\tErrFail = \"fail\"\n)\n\n// Do runs your function in a synchronous manner,... | go | edit | 15 | 5 | mit | 84754d34a09bcadc95d689470dd5ea7de77cb78b | hnlq715/gobreak | gobreak.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hooks\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/deckarep/gosx-notifier\"\n)\nimport \"text/template\"\n\n// NotificationDriver is a driver that notifications some texts to the terminal\ntype NotificationDriver struct {\n\tline string\n... | go | edit | 3 | 3 | mit | 4be8c98cf87aaadd3c8f8ce81dc69e43e5a29446 | moul/advanced-ssh-config,moul/advanced-ssh-config,moul/advanced-ssh-config | pkg/hooks/driver_notification.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage util_test\n\nimport (\n\t. \"github.com/naaman/busl/util\"\n\t\"testing\"\n)\n\nfunc TestIsTrueTrueValueIsTrue(t *testing.T) {\n\ttrueCheck, _ := IsTrue.Check([]interface{}{true}, []string{})\n\tif !trueCheck {\n\t\tt.Errorf(\"Expected ... | go | edit | 21 | 3 | mit | 615b894aab2d9ee84a7cea6ef72d7fccf15216f8 | heroku/busl,heroku/busl,cyx/busl | util/checkers_test.go | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage helpers\n\nimport (\n\t\"os/exec\"\n)\n\nfunc SetProcessGroup(cmd *exec.Cmd) {\n}\n\nfunc KillProcessGroup(cmd *exec.Cmd) {\n\tif cmd == nil || cmd.Process == nil {\n\t\treturn\n\t}\n\n\tcmd.Process.Kill()\n}\n\n```\n\nApply this change... | go | edit | 6 | 3 | mit | 68a64d1b90a498bc576df3483f5d8a28e5625d88 | soiff/gitlab-ci-multi-runner,hu19891110/gitlab-ci-multi-runner,soiff/gitlab-ci-multi-runner,hu19891110/gitlab-ci-multi-runner,soiff/gitlab-ci-multi-runner,ayufan/gitlab-ci-multi-runner,ayufan/gitlab-ci-multi-runner,hu19891110/gitlab-ci-multi-runner,ayufan/gitlab-ci-multi-runner | helpers/process_group_windows.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// The igo command starts a Go kernel for IPython.\npackage main\n\nimport (\n \"flag\"\n \"io\"\n \"log\"\n \"os\"\n igo \"github.com/takluyver/igo/igopkg\"\n)\n\nfunc main() {\n debug := flag.Bool(\"debug\", false, \"Log ext... | go | edit | 0 | 3 | mit | 00b07aebe897112da160810b5ce3365638d7936e | takluyver/igo,axw/go-jupyter | igo.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage medtronic\n\nconst (\n\tLastHistoryPage Command = 0x9D\n\tHistoryPage Command = 0x80\n)\n\nfunc (pump *Pump) LastHistoryPage() int {\n\tdata := pump.Execute(LastHistoryPage)\n\tif pump.Error() != nil {\n\t\treturn 0\n\t}\n\tif len(d... | go | edit | 0 | 5 | mit | 8804623c7fe4f9daf73505ed7f8e56e51f224077 | ecc1/medtronic,ecc1/medtronic | historypage.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage keg\n\nimport (\n\t\"time\"\n\t\"net\"\n\t\"log\"\n)\n\ntype KegStatus struct {\n\tTemperature float64\n\tCurrentFlow float64\n\tCapacity float64\n\tAvailable float64\n\tLastUpdate time.Time\n\tConnection* net.UDPConn\n}\n\nfunc Initial... | go | edit | 0 | 3 | mit | 3416a80f4fb79493fa62faf62d463374e2747eb2 | Aspenware/ardrinko-server | keg/keg.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"net/http\"\n\t\"strings\"\n)\n\nvar (\n\t// Whitelist crawlers here\n\tcrawlerPatterns = [...]string{\n\t\t\"Google (+https://developers.google.com/+/web/snippet/)\",\n\t\t\"Googlebot\",\n\t\t\"bingbot\",\n\t\t\"MS... | go | edit | 0 | 3 | mit | f7929c0b4c656af1219802524fa724a3e744f614 | ptt/pttweb | useragent.go | accepted | null | true |
[
{
"role": "user",
"content": "Write go code for the following: Disable auto downloading of plugins in sensorbee binary"
},
{
"role": "assistant",
"content": "//go:generate build_sensorbee --output-dir=. --output-filename=default_main.go --download-plugins=false\npackage main\n"
}
] | go | new_file | 0 | 0 | mit | 0f9bff359e2a09146cd671150c8e873296191ba9 | sensorbee/sensorbee,sensorbee/sensorbee | cmd/sensorbee/genmain.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage http2\n\nimport \"github.com/summerwind/h2spec/spec\"\n\nfunc StartingHTTP2() *spec.TestGroup {\n\ttg := NewTestGroup(\"3\", \"Starting HTTP/2\")\n\n\ttg.AddTestGroup(StartingHTTP2ForHTTPURIs())\n\ttg.AddTestGroup(HTTP2ConnectionPreface... | go | edit | 6 | 1 | mit | b720face45ad6c89ae631885582ccf62c2dddec7 | summerwind/h2spec | http2/3_starting_http2.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage tests\n\nimport (\n\t\"github.com/gojp/nihongo/app/models\"\n\t\"github.com/robfig/revel\"\n)\n\ntype ModelsTest struct {\n\trevel.TestSuite\n}\n\nfunc (s *ModelsTest) Before() {\n}\n\nfunc (s *ModelsTest) After() {\n}\n\nfunc (s *Model... | go | edit | 9 | 1 | mit | d83f19128560cc9ee325b61b384243185c4dc285 | shawnps/nihongo,shawnps/nihongo,gojp/nihongo,shawnps/nihongo,gojp/nihongo,gojp/nihongo,shawnps/nihongo,gojp/nihongo | tests/modelstest.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2016 The Gosl Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage num\n\nimport (\n\t\"testing\"\n\n\t\"gosl/chk\"\n)\n\nfunc TestNlsCon... | go | edit | 3 | 1 | bsd-3-clause | d8c56a9536ea3aba8b44cdc08947422f7c2d3780 | cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl | num/t_nlsolverconfig_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage api\n\n// InstanceConsoleControl represents a message on the instance console \"control\" socket.\n//\n// API extension: instances\ntype InstanceConsoleControl struct {\n\tCommand string `json:\"command\" yaml:\"command\"`\n\... | go | edit | 0 | 0 | apache-2.0 | 73dd2ae69c4b915faa51e7f582bf93453e9f8419 | hallyn/lxd,stgraber/lxd,atxwebs/lxd,lxc/lxd,stgraber/lxd,hallyn/lxd,lxc/lxd,atxwebs/lxd,lxc/lxd,Skarlso/lxd,stgraber/lxd,Skarlso/lxd,stgraber/lxd,atxwebs/lxd,stgraber/lxd,hallyn/lxd,stgraber/lxd,Skarlso/lxd,mjeanson/lxd,Skarlso/lxd,lxc/lxd,lxc/lxd,lxc/lxd,lxc/lxd,hallyn/lxd,atxwebs/lxd,hallyn/lxd,stgraber/lxd,mjeanson/... | shared/api/instance_console.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\n\tmgo \"gopkg.in/mgo.v2\"\n\t\"gopkg.in/mgo.v2/bson\"\n\n\t\"github.com/blevesearch/bleve\"\n)\n\nfunc main() {\n\n}\n\n// Bleve example\nfunc bleveExample() {\n\t// open a new index\n\tmapping ... | go | edit | 0 | 3 | mit | 9d4fc977e481f2f1e38021e78100d445dc1b9a82 | artonge/Tamalou,artonge/Tamalou | Tamalou.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gogist\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/gorilla/mux\"\n)\n\nconst t = `\n<html>\n <head>\n <meta name=\"go-import\" content=\"%s git https://gist.github.com/%s.git\" />\n <script>window.location='https://g... | go | edit | 0 | 1 | apache-2.0 | 45d3882de1772ba4d9d07d7cbc920ae544871b3d | ImJasonH/go-gist | app.go | rejected_duplicate | Near-duplicate of sample 117071 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage agent\n\nimport (\n \"time\"\n \"fmt\"\n \"github.com/crowdmob/goamz/aws\"\n \"github.com/crowdmob/goamz/cloudwatch\"\n)\n\nconst (\n SCHEDULED_LOOP = 6\n)\n\nvar cw *cloudwatch.CloudWatch\n\nfunc init() {\n region := ... | go | edit | 18 | 3 | mit | 82c0d4527af6b3cf9510020517ccd4552da23bdc | wdalmut/cloudwatch-agent | agent/sender.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"github.com/guregu/kami\"\n\t\"golang.org/x/net/context\"\n)\n\nfunc main() {\n\tkami.Get(\"/contacts/\", getContacts)\n\tkami.Serve()\n}\n\nfunc getContacts(\n\... | go | edit | 3 | 3 | mit | ee32d63b4ba635c2a23cb9503d22b4513ff6a892 | konjoot/benches,konjoot/benches,konjoot/benches | kami/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gdax\n\ntype Message struct {\n\tType string `json:\"type\"`\n\tProductId string `json:\"product_id\"`\n\tTradeId int `json:\"trade_id,number\"`\n\tOrderId string `json:\"order_id\"`\n\tSequen... | go | edit | 3 | 0 | mit | 24b77db0ed9042c1c916d1bbd9f02fe8fb1bd153 | preichenberger/go-coinbase-exchange | message.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage rc4\n\n// #cgo LDFLAGS: -lcrypto\n// #include <openssl/rc4.h>\n\nimport \"C\"\n\nimport (\n\t\"strconv\"\n)\n\ntype Cipher struct {\n\tkey *_Ctype_RC4_KEY\n}\n\ntype KeySizeError int\n\nfunc (k KeySizeError) Error() string {\n\treturn \... | go | edit | 18 | 3 | bsd-3-clause | 81be4fbc6e5935f53e57961728c836fcf0ac3db4 | jgrahamc/go-openssl | rc4/rc4.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t// \"fmt\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/codykrieger/jeeves\"\n)\n\nfunc main() {\n\tj := jeeves.New()\n\tj.RegisterSkill(&jeeves.Skill{\n\t\tName: \"Hello\",\n\t\tEndpoint: \"/skills/hel... | go | edit | 0 | 4 | mit | 3e02622ac624b15363b38c3e5f13f65c83408f65 | codykrieger/jeeves | examples/simple/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/docker/docker/api/types\"\n\t\"github.com/docker/docker/api/types/swarm\"\n\t\"golang.org/x/net/context\"\n)\n\n// ServiceUpdate updates a Service.\... | go | edit | 6 | 5 | apache-2.0 | eafb5565c9cb876fb2de19c4d02bf4462f9d6310 | allencloud/cli,cpuguy83/cli,redpanda/cli,thaJeztah/cli,gdevillele/cli,redpanda/cli,Zebrilee/cli,e11137/cli,dnephin/cli,allencloud/cli,ashfall/cli,riyazdf/cli,Zebrilee/cli,ashfall/cli,thaJeztah/cli,e11137/cli,docker/cli,cpuguy83/cli,dnephin/cli,riyazdf/cli,docker/cli | service_update.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage database_test\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/josephspurrier/gocleanarchitecture/database\"\n\t\"github.com/josephspurrier/gocleanarchitecture/domain/user\"\n)\n\n// TestClient ensures the client works properly.\n... | go | edit | 18 | 1 | mit | 8d60934d211f5c161246dfd3168013edef59ebda | josephspurrier/gocleanarchitecture,pt-arvind/gocleanarchitecture | database/client_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage iruka\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype Client struct {\n\t// The URL of the iruka API to communicate with.\n\tURL string\n}\n\nfunc NewClient() *Client {\n\turl := \"http://localhost:3000/api/v1\"\n\n\treturn ... | go | edit | 0 | 3 | mit | 987488ab356a17cb3337495a916596c578f3b424 | spesnova/iruka,spesnova/iruka,spesnova/iruka,spesnova/iruka | client/iruka.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage slackapi\n\n// ResponseBot defines the JSON-encoded output for Bot.\ntype ResponseBot struct {\n\tResponse\n\tBot BotEntity `json:\"bot\"`\n}\n\n// BotEntity defines the expected data from the JSON-encoded API response.\ntype BotEntity ... | go | edit | 0 | 1 | mit | 97bbf8713c67e3c6bfc1178eee130b3a0253dbc5 | cixtor/slackapi | bots.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/aws/aws-sdk-go/service/cloudwatchevents\"\n)\n\ntype Rules struct {\n\tRules []Rule\n}\n\ntype Rule struct {\n\tDescription string `yaml:\"description\"`\n\tEventPattern string `yaml:\"e... | go | edit | 0 | 0 | mit | 3200a600ce392c6c7e4a61adaeed5b6d3f091f70 | unasuke/maekawa | structs.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// errchk $G $D/$F.go\n\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Used to crash the compiler.\n// http://code.google.c... | go | edit | 3 | 1 | bsd-3-clause | 83372e07c5f355e275822be2b47e6d0bde1b4084 | sanjosh/sanjos100-tipc,webfd/go-zh,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,scirelli/scirelli-go,d0f/go-zh,rflanagan/reginaldflanagan-project1,d0f/go-zh,glycerine/jeaten-go-arrayof-structof,rflanagan/reginaldflanagan-project1,bryanxu/go-zh,mhennings/marcohennings-go,glycerine/jeaten-go-arrayof-str... | test/fixedbugs/bug215.go | rejected_duplicate | Near-duplicate of sample 117487 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage actors\n\nimport (\n\t\"github.com/cloudfoundry/cli/cf/i18n\"\n\tgoi18n \"github.com/nicksnyder/go-i18n/i18n\"\n)\n\nvar T goi18n.TranslateFunc\n\nfunc init() {\n\tT = i18n.Init(\"actors\", i18n.GetResourcesPath())\n}\n```\n\nApply this... | go | edit | 0 | 1 | apache-2.0 | cb99b9dafe92b22e8ed5fee286e70bc7fc3bc2e8 | cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli | cf/actors/i18n_init.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage api\n\nimport (\n\t\"github.com/matttproud/prometheus/rules\"\n\t\"github.com/matttproud/prometheus/rules/ast\"\n \"time\"\n)\nfunc (serv MetricsService) Query(Expr string, Json string, Start string, End string) (result string) {... | go | edit | 3 | 3 | apache-2.0 | ab746d068e6b193ed3db170b79d489f5ab782069 | PrFalken/prometheus,mtanda/prometheus,kangwoo/prometheus,ton31337/prometheus,msiebuhr/prometheus,slok/prometheus,dpatel06/prometheus,Conorbro/prometheus,Conorbro/prometheus,datajet-io/prometheus,fabric8io/prometheus,abhishekamralkar/prometheus,dln/prometheus,Stackdriver/stackdriver-prometheus,agaoglu/prometheus,GoogleC... | api/query.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/brettbuddin/victor\"\n\t\"os\"\n\t\"os/signal\"\n)\n\nfunc main() {\n\tbot := victor.New(\"campfire\", \"victor\", \":8000\")\n\n\tbot.HandleFunc(bot.Direct(\"hello|hi|howdy\"), func(s *victor... | go | edit | 0 | 1 | mit | cfb4962efb1ea40322b99ada892bc3203dce6d7c | thebyrd/victor,brettbuddin/victor,FogCreek/victor | examples/simple/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage observers\n\nimport (\n\t\"github.com/sirupsen/logrus\"\n\n\t\"github.com/ivan1993spb/snake-server/objects/corpse\"\n\t\"github.com/ivan1993spb/snake-server/objects/snake\"\n\t\"github.com/ivan1993spb/snake-server/world\"\n)\n\ntype Sna... | go | edit | 0 | 5 | bsd-2-clause | 0a933492b0feee22f3b5f73fa6eb432d8d217348 | ivan1993spb/clever-snake | observers/snake_observer.go | rejected_duplicate | Near-duplicate of sample 118299 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t_ \"github.com/sheenobu/quicklog/filters/uuid\"\n\t\"github.com/sheenobu/quicklog/inputs/stdin\"\n\t_ \"github.com/sheenobu/quicklog/outputs/stdout\"\n\t_ \"github.com/sheenobu/quicklog/parsers/plain\"\n\n\t\"golang.... | go | edit | 0 | 1 | mit | 3aa439b17e1cdc99545770639d28e730d82e035e | sheenobu/quicklog,sheenobu/quicklog,sheenobu/quicklog | examples/embedded/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 Jonathan J Lawlor. All rights reserved.\n// Use of this source code is governed by a MIT-style\n// license that can be found in the LICENSE file.\n\npackage matrixexp\n\nimport (\n\t\"github.com/gonum/blas/blas64\"\n)\n\n// Ge... | go | edit | 0 | 1 | mit | 524561a02a86159dc335c276cd1c8a287d8e7ad6 | jonlawlor/matrixexp | general.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2014 SteelSeries ApS. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// This package implements a basic LISP interpretor for embedding in a go prog... | go | edit | 12 | 1 | bsd-3-clause | 9b7cd3ec74750744ec31303411a216b35f712930 | SteelSeries/golisp,SteelSeries/golisp,SteelSeries/golisp | lisp_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Package golang implements the \"golang\" runtime.\npackage golang\n\nimport (\n\t\"github.com/apex/apex/function\"\n\t\"github.com/apex/apex/plugins/nodejs\"\n)\n\nfunc init() {\n\tfunction.RegisterPlugin(\"golang\", &Plugin{})\n}\n\nconst (... | go | edit | 0 | 3 | mit | 46b45d47e7638b8843087788eff31cbdb2bc4b20 | llun/apex,llun/apex,apex/apex,ianrtracey/apex,apex/apex,DaveBlooman/apex,ianrtracey/apex,ianrtracey/apex,llun/apex,DaveBlooman/apex,llun/apex,DaveBlooman/apex,DaveBlooman/apex,tobyjoe/apex,ianrtracey/apex,DaveBlooman/apex,tobyjoe/apex,apex/apex,DaveBlooman/apex,ianrtracey/apex,apex/apex,tobyjoe/apex,apex/apex,apex/apex... | plugins/golang/golang.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage model\n\nimport (\n\t\"time\"\n\n\t\"gopkg.in/mgo.v2/bson\"\n)\n\nconst OfferGroupPostCollectionName = \"offer_group_post\"\n\ntype (\n\tOfferGroupPost struct {\n\t\tID bson.ObjectId `json:\"_id,omitempty\" bson:\"... | go | edit | 0 | 1 | bsd-3-clause | 3dbae591d8779dc08f641adfad75290fe68b6999 | Lunchr/luncher-api | db/model/offer_group_post.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n\npackage dirscanner\n\nimport (\n \"fmt\"\n \"io/ioutil\"\n \"path\"\n)\n\nfunc ScanDir(a_path string, a_fileMsgs chan FileMsg,\n a_events chan Event) {\n\n if files, err := ioutil.ReadDir(a_path); err == nil {\n for _, f... | go | edit | 18 | 4 | mit | 41c77d92452c138c4aec8fe3190431aa6b525659 | odanielson/dirscanner | scandir.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*-\n * Copyright (c) 2016, Jörg Pernfuß <<EMAIL>>\n * All rights reserved\n *\n * Use of this source code is governed by a 2-clause BSD license\n * that can be found in the LICENSE file.\n */\n\npackage msg\n\n\ntype Supervisor struct {\n\tVer... | go | edit | 3 | 0 | bsd-2-clause | a5456f98186a108f1ea57b33724f3b5fae624c63 | 1and1/soma | lib/msg/supervisor.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hsup\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"runtime\"\n)\n\nvar ErrNoReleases = errors.New(\"No releases found\")\n\ntype Notifier interface {\n\tNotify() <-chan *Processes\n}\n\ntype Processes struct {\n\tRel *Release\n\tForms []Fo... | go | edit | 9 | 4 | bsd-2-clause | dcd47ba6c002705500a0a57276c83e3a9a3d5101 | heroku/hsup,heroku/hsup,fdr/hsup-fdr,fdr/hsup-fdr | processes.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage geocodio\n\nimport (\n\t\"errors\"\n)\n\nconst (\n\t// GeocodioAPIBaseURLv1 is the Geocod.io Base URL\n\tGeocodioAPIBaseURLv1 = \"https://api.geocod.io/v1.4\"\n)\n\n// NewGeocodio is a helper to create new Geocodio pointer\nfunc NewGeoc... | go | edit | 6 | 2 | mit | e27c615a9099a872b19a5f86ef7500db5a8e9da4 | stevepartridge/geocodio | geocodio.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hashvalues\n\nimport (\n\t\"hash\"\n\t\"net/url\"\n)\n\ntype HashValues struct {\n\tValues *url.Values\n\thashfunc hash.Hash\n\thashkey []byte\n}\n\nfunc NewHashValues(hashkey []byte, hashfunc hash.Hash) *HashValues {\n\treturn &Hash... | go | edit | 0 | 1 | mit | 829dec7b60276e766c2b0a298f70174b5fa4e8ee | toomore/hashvalues | hashvalues.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage pair\n\nimport(\n \"io\"\n \"fmt\"\n)\n\ntype PairingHandler interface {\n Handle(Container) (Container, error)\n}\n\nfunc HandleReaderForHandler(r io.Reader, h PairingHandler) (io.Reader, error) {\n cont_in, err := NewTLV8C... | go | edit | 12 | 4 | apache-2.0 | e9240292ea960d075aebd23ee1c8930ccfa56e07 | sjfloat/hc,bahlo/hc,mxlje/hc,savaki/hc,ninjasphere/hc,brutella/hc | pair/pairing_handler.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"github.com/guregu/kami\"\n\t\"golang.org/x/net/context\"\n)\n\nfunc main() {\n\tkami.Get(\"/contacts/\", getContacts)\n\tkami.Serve()\n}\n\nfunc getContacts(ctx... | go | edit | 3 | 3 | mit | 27f418ce9da5a3cf0be752a7c47d938237c266bf | konjoot/benches,konjoot/benches,konjoot/benches | kami/main.go | rejected_duplicate | Near-duplicate of sample 117212 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (c) 2019 Sick Yoon\n// This file is part of gocelery which is released under MIT license.\n// See file LICENSE for full license details.\n\npackage gocelery\n\nimport (\n\t\"log\"\n\n\t\"github.com/streadway/amqp\"\n)\n\n// deliver... | go | edit | 0 | 4 | mit | 9e6db73b9cece24d3a5813af5847e8b8390f1d6b | shicky/gocelery,shicky/gocelery | amqp.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (c) 2016, Daniel Martí <<EMAIL>>\n// See LICENSE for licensing information\n\npackage sh\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n)\n\nfunc TestParse(t *testing.T) {\n\tpaths, err := filepath.Glob(\"testdata/*.sh\... | go | edit | 6 | 3 | bsd-3-clause | e1f20b9613cfd1c2d31b1fac5de4614d0af4559a | mvdan/sh,mvdan/sh,mvdan/sh,mvdan/sh | sh_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\"log\"\n\t\"os\"\n\t\"fmt\"\n\t\"github.com/timakin/ts/loader\"\n\t\"github.com/codegangsta/cli\"\n)\n\nvar Commands = []cli.Command{\n\tcommandAll,\n\tcommandBiz,\n\tcommandHack,\n}\n\nvar commandAll = cli.Command{... | go | edit | 0 | 2 | mit | ded70ace33c11aa33c8c565cbf852b0b31afa055 | timakin/ts,timakin/ts | commands.go | rejected_duplicate | Near-duplicate of sample 117151 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.