Dataset Viewer
Auto-converted to Parquet Duplicate
conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update functional test to error correctly if a needed file is missing\n" }, { "from": "human", "value": "package hoverfly_test\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\n\t\"github.com/SpectoLabs/hoverfly/functional-tests\"\n\t\"github.com/dgh...
go
chosen
[ { "from": "system", "value": "Move the package comments above package" }, { "from": "human", "value": "/*\nCopyright 2018 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...
go
chosen
[ { "from": "system", "value": "Refactor test to provide `RollMany` function\n" }, { "from": "human", "value": "package bowling\n\nimport \"testing\"\n\nfunc TestGutterGame(t *testing.T) {\n\tgame := new(Game)\n\n\tfor i := 0; i < 20; i++ {\n\t\tgame.Roll(0)\t\t\n\t}\n\n\tscore := game.Score()\n\n...
go
chosen
[ { "from": "system", "value": "Fix import cycle and build error\n\nImporting the current package from it's external source creates an import cycle; changing the package name for this test breaks the cycle. Also, \"err := nil\" is ambiguous and causes a compile-time failure." }, { "from": "human", ...
go
chosen
[ { "from": "system", "value": "Add example of building your own struct mapping atlas, with details.\n\nSigned-off-by: Eric Myhre <2346ad27d7568ba9896f1b7da6b5991251debdf2@exultant.us>\n" }, { "from": "human", "value": "package refmt_test\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\n\t\"github.com/polyd...
go
chosen
[ { "from": "system", "value": "Add observerFunc to observe with a Gauge\n" }, { "from": "human", "value": "// Copyright 2016 The Prometheus Authors\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 ma...
go
chosen
[ { "from": "system", "value": "Fix string formatting in URL path\n\n`go vet` message:\n\n```\nsrc/cf-metrics/events.go:29: arg url.QueryEscape(since.Format(time.RFC3339)) for printf verb %E of wrong type: string\n```\n\nI suspect that this wasn’t doing quite what I thought it was, due to\nstring formatting a...
go
chosen
[ { "from": "system", "value": "Revert \"Use string as underlining data type\"\n\nThis reverts commit 286b63f64eb31716c766891614ae38a4af7f3100.\n" }, { "from": "human", "value": "package charts\n\nimport \"bytes\"\n\ntype ChartType string\n\nconst (\n\tUnknownChart ChartType = \"UnknownChart\"\n\t...
go
chosen
[ { "from": "system", "value": "Use creator function for DateReporter\n" }, { "from": "human", "value": "package main\n\nimport (\n\t\"github.com/cburkert/go-statusbar/reporters/battery\"\n\t\"github.com/cburkert/go-statusbar/reporters/volume\"\n)\n\nfunc main() {\n\tstatusBar := NewStatusBar(\" |...
go
chosen
[ { "from": "system", "value": "Fix the Hugo.Generator tag so it can be used\n" }, { "from": "human", "value": "package hugolib\n\nconst Version = \"0.13-DEV\"\n\nvar (\n\tCommitHash string\n\tBuildDate string\n)\n\nvar hugoInfo *HugoInfo\n\n// HugoInfo contains information about the current Hugo...
go
chosen
[ { "from": "system", "value": "Update expected results of generated liting\n" }, { "from": "human", "value": "// Package main is used for testing of generated 'views' listing.\n// There is no way to include a new import dynamically, thus\n// we are running this test from generate_test.go\n// as a...
go
chosen
[ { "from": "system", "value": "Remove error from ioutil.ReadAll because it's very hard to make it fail\n" }, { "from": "human", "value": "package wally\n\nimport (\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\trdb \"github.com/dancannon/gorethink\"\n\t\"github.com/nylar/odlaw\"\n)\n\nfunc GrabUrl(url str...
go
chosen
[ { "from": "system", "value": "Refactor `New()` for naming convention\n\nUsing `r` instead of `n` to represent the new Matrix root element.\n" }, { "from": "human", "value": "package goDLX\n\n// Matrix is the fundamental unit in the Algorithm X implementation\n// as described in [Knuth, Donald (2...
go
chosen
[ { "from": "system", "value": "Switch from goblin to ginkgo for testing\n" }, { "from": "human", "value": "package main\n\nimport (\n . \"github.com/franela/goblin\"\n\n \"errors\"\n \"testing\"\n)\n\nfunc Test(t *testing.T) {\n g := Goblin(t)\n\n g.Describe(\"Run\", func() {\n extensionE...
go
chosen
[ { "from": "system", "value": "Fix the DeployResources() call args.\n" }, { "from": "human", "value": "// Copyright 2016 Canonical Ltd.\n// Licensed under the AGPLv3, see LICENCE file for details.\n\npackage resourceadapters\n\nimport (\n\t\"github.com/juju/errors\"\n\tcharmresource \"gopkg.in/ju...
go
chosen
[ { "from": "system", "value": "Introduce focusing on specific test file\n" }, { "from": "human", "value": "package main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"testing\"\n\n\t. \"github.com/VonC/godbg\"\n\t. \"github.com/smartystreets/goconvey/convey\"\n)\n\nfunc TestGoPanic(t *tes...
go
chosen
[ { "from": "system", "value": "Add test for fileurl input validation\n" }, { "from": "human", "value": "package api\n\nimport (\n\t\"testing\"\n)\n\nfunc TestValidateConfig(t *testing.T) {\n\n\tif New().validateConfig().Error() != \"Modulepath must be set before starting the API server\" {\n\t\tt...
go
chosen
[ { "from": "system", "value": "Use generator for clock example\n" }, { "from": "human", "value": "package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/voxelbrain/pixelpixel/pixelutils\"\n\t\"time\"\n)\n\nfunc main() {\n\twall, _ := pixelutils.PixelPusher()\n\tpixel := pixelutils.NewPixel()\n\tbigP...
go
chosen
[ { "from": "system", "value": "Use StdCopy to write logs to buffer\n" }, { "from": "human", "value": "package appui\n\nimport (\n\t\"io\"\n\n\t\"github.com/moncho/dry/ui\"\n\t\"github.com/nsf/termbox-go\"\n)\n\n//Stream shows the content of the given stream on screen\nfunc Stream(screen *ui.Scree...
go
chosen
[ { "from": "system", "value": "Implement meta by using the bconf package (separate repository).\n" }, { "from": "human", "value": "package index\n\ntype Index struct {\n\tbr *blob_reader\n\tDocs map[uint32][]byte\n\tAttrs map[string][]IbDoc\n}\n\nfunc Open(name string) (*Index, error) {\n\tva...
go
chosen
[ { "from": "system", "value": "Initialize all maps in the StateChange when created\n" }, { "from": "human", "value": "package response\n\nimport (\n\t\"warcluster/entities\"\n)\n\ntype StateChange struct {\n\tbaseResponse\n\tMissions map[string]*entities.Mission `json:\",omitempty\"`\n\tRa...
go
chosen
[ { "from": "system", "value": "Add test number to assertion\n" }, { "from": "human", "value": "package indexing\n\nimport (\n \"bytes\"\n \"testing\"\n)\n\nvar testWrites = []struct {\n docs []Document\n out string\n}{\n {[]Document{},\n // Header | End of Docs\n \"searchme\\x00\\x00\"...
go
chosen
[ { "from": "system", "value": "Make it easier to add new test cases.\n" }, { "from": "human", "value": "package main\n\nimport(\n \"testing\"\n)\n\nfunc TestFindURLs(t *testing.T) {\n if len(FindURLs(\"Wie sieht es aus wenn man http://starship-factory.ch/blah?foo=bar http://foo?baz=...
go
chosen
[ { "from": "system", "value": "Fix a Gavin hint :)\n" }, { "from": "human", "value": "package godless\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nfunc TerminalConsole(addr string) error {\n\tfmt.Printf(\"The console should send user commands to '%v'.\\n\", addr)\n\tfmt.Println(\"Data found in the ...
go
chosen
[ { "from": "system", "value": "Add Method to Context interface\n" }, { "from": "human", "value": "package chuper\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/PuerkitoBio/fetchbot\"\n\t\"github.com/Sirupsen/logrus\"\n)\n\ntype Context interface {\n\tCache() Cache\n\tQueue() Enqueuer\n\tLog(fields ...
go
chosen
[ { "from": "system", "value": "Set up rpath properly on OS X.\n" }, { "from": "human", "value": "// 13 december 2015\n\npackage ui\n\n// #cgo LDFLAGS: -L${SRCDIR} -lui -framework CoreFoundation -lpthread\n// #include <CoreFoundation/CoreFoundation.h>\n// #include <pthread.h>\n// extern void _CFRu...
go
chosen
[ { "from": "system", "value": "Include filename in reading/parsing errors.\n\nFixes issue #2.\n" }, { "from": "human", "value": "// Copyright (c) 2013 The Go Authors. All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file ...
go
chosen
[ { "from": "system", "value": "Use idiomatic form for build constraints.\n\nSee http://golang.org/pkg/go/build/#hdr-Build_Constraints.\n" }, { "from": "human", "value": "//+build linux freebsd\n\npackage glfw3\n\n//#define GLFW_EXPOSE_NATIVE_X11\n//#define GLFW_EXPOSE_NATIVE_GLX\n//#include <X11/...
go
chosen
[ { "from": "system", "value": "Use github.com/martini-contrib/cors instead of github.com/zachlatta/cors.\n" }, { "from": "human", "value": "package v1\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/codegangsta/martini\"\n\t\"github.com/coopernurse/gorp\"\n\t\"github.com/hackedu/backend...
go
chosen
[ { "from": "system", "value": "Update tests so they pass\n" }, { "from": "human", "value": "package main\n\nimport (\n \"testing\"\n . \"github.com/franela/goblin\"\n)\n\nfunc Test(t *testing.T) {\n g := Goblin(t)\n\n g.Describe(\"Run\", func() {\n g.Describe(\".command_for_file\", func() ...
go
chosen
[ { "from": "system", "value": "Use charset from Content-Type header instead of assuming all pages are UTF-8.\n" }, { "from": "human", "value": "package main\n\n// scanning an HTTP response for phrases\n\nimport (\n\t\"http\"\n\t\"mahonia.googlecode.com/hg\"\n)\n\n// phrasesInResponse scans the co...
go
chosen
[ { "from": "system", "value": "sys: Fix DumpStack to return the correct part of the buffer.\n" }, { "from": "human", "value": "package sys\n\nimport \"runtime\"\n\nfunc DumpStack() string {\n\tbuf := make([]byte, 1024)\n\tfor runtime.Stack(buf, true) == cap(buf) {\n\t\tbuf = make([]byte, cap(buf)...
go
chosen
[ { "from": "system", "value": "[Ninan] Add go:generate comment to generate mock of prompt\n" }, { "from": "human", "value": "package prompt\n\nimport (\n\t\"github.com/AlecAivazis/survey/v2\"\n\t\"log\"\n)\n\ntype Prompt interface {\n\tConfirm(string) bool\n}\n\nfunc NewPrompt() Prompt {\n\tretur...
go
chosen
[ { "from": "system", "value": "Replace method of struct with function.\n" }, { "from": "human", "value": "package markdown\n\nimport (\n\t\"io/ioutil\"\n\t\"path\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestParse(t *testing.T) {\n\tm := new(Markdown)\n\tfiles, _ := ioutil.ReadDir(\"./data\")\n\...
go
chosen
[ { "from": "system", "value": "Enhance the test of values\n" }, { "from": "human", "value": "package values_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/xgfone/go-tools/values\"\n)\n\nfunc TestSlice(t *testing.T) {\n\tms := []interface{}{\"test\"}\n\tss := []interface{}{11, \"aa\", values.SM...
go
chosen
[ { "from": "system", "value": "Add an accessor for the connection\n" }, { "from": "human", "value": "package campfire\n\nimport (\n \"fmt\"\n)\n\ntype Message struct {\n conn *Connection\n\n Id int `json:\"id,omitempty\"`\n Type string `json:\"type\"`\n UserId int...
go
chosen
[ { "from": "system", "value": "Add parameter to get json data\n" }, { "from": "human", "value": "package neko\n\nimport (\n\t\"github.com/julienschmidt/httprouter\"\n\t\"mime/multipart\"\n\t\"net/http\"\n)\n\ntype routerParams struct {\n\treq *http.Request\n\tparams httprouter.Params\n}\n\nfun...
go
chosen
[ { "from": "system", "value": "Revert to v0.10 method of signature generation\n" }, { "from": "human", "value": "package utility\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/bitspill/bitsig-go\"\n\t\"github.com/btcsuite/btcutil\"\n)\n\nvar utilIsTestnet bool = false\n\nfunc SetTestnet(testnet...
go
chosen
[ { "from": "system", "value": "Simplify and fix client example\n" }, { "from": "human", "value": "package turnpike_test\n\nimport (\n\t\"code.google.com/p/go.net/websocket\"\n\t\"github.com/jcelliott/turnpike\"\n\t\"net/http\"\n)\n\nfunc ExampleClient_NewClient() {\n\tc := turnpike.NewClient()\n\...
go
chosen
[ { "from": "system", "value": "HACK: Make sure JSON scheme is a string\n" }, { "from": "human", "value": "/*\npackage proto defines a set of structures used to negotiate an update between an\nan application (the client) and an equinox update service.\n*/\npackage proto\n\nimport \"time\"\n\ntype ...
go
chosen
[ { "from": "system", "value": "Add runc to usable executor options!\n\nSigned-off-by: Eric Myhre <2346ad27d7568ba9896f1b7da6b5991251debdf2@exultant.us>\n" }, { "from": "human", "value": "package executordispatch\n\nimport (\n\t\"path/filepath\"\n\n\t\"polydawn.net/repeatr/def\"\n\t\"polydawn.net/...
go
chosen
[ { "from": "system", "value": "Add NewError -> Result with no data\n" }, { "from": "human", "value": "package types\n\nimport (\n\t\"fmt\"\n)\n\ntype Result struct {\n\tCode CodeType\n\tData []byte\n\tLog string // Can be non-deterministic\n}\n\nfunc NewResult(code CodeType, data []byte, log str...
go
chosen
[ { "from": "system", "value": "Make the shortcut configurable so @luhova can replace z\n" }, { "from": "human", "value": "package cmd\n\nimport (\n\t\"os\"\n\n\t\"github.com/gsamokovarov/jump/cli\"\n\t\"github.com/gsamokovarov/jump/config\"\n\t\"github.com/gsamokovarov/jump/shell\"\n)\n\nfunc she...
go
chosen
[ { "from": "system", "value": "Add scaled sphere to check that works\n" }, { "from": "human", "value": "package main\n\nimport \"trace\"\n\nconst (\n\timageW = 640\n\timageH = 480\n)\n\nfunc createRandomImage() [][]trace.Color {\n\timage := make([][]trace.Color, imageH)\n\tfor i := range image {\...
go
chosen
[ { "from": "system", "value": "Work on generated reference files\n" }, { "from": "human", "value": "// Generates reference files for a given language\n\n// +build !release\n\npackage main\n\nimport \"ldss/lib\"\n\ntype generateReference struct {\n\tappinfo\n}\n\nfunc init() {\n\taddApp(\"generate...
go
chosen
[ { "from": "system", "value": "Make bencode.Bytes work with pointer and nonpointer receivers\n" }, { "from": "human", "value": "package bencode\n\ntype Bytes []byte\n\nvar (\n\t_ Unmarshaler = &Bytes{}\n\t_ Marshaler = &Bytes{}\n)\n\nfunc (me *Bytes) UnmarshalBencode(b []byte) error {\n\t*me = ...
go
chosen
[ { "from": "system", "value": "Add basic documentation for lib/stringutil package.\n" }, { "from": "human", "value": "package stringutil\n\nimport \"sync\"\n\ntype StringDeduplicator struct {\n\tlock bool\n\tmutex sync.Mutex\n\tmapping map[string]string\n\tstatistics StringDuplicati...
go
chosen
[ { "from": "system", "value": "Fix JavaScript timer to never leak resources\n\nStop() might have leaked the firing goroutine.\n" }, { "from": "human", "value": "// +build js\n\npackage ninchat\n\nimport (\n\t\"github.com/gopherjs/gopherjs/js\"\n)\n\ntype duration int64\n\nconst (\n\tsecond d...
go
chosen
[ { "from": "system", "value": "Add documentation to ExtractableUnit in the server package.\n" }, { "from": "human", "value": "package server\n\nimport (\n\t\"strings\"\n\n\t\"github.com/bmorton/deployster/fleet\"\n)\n\ntype ExtractableUnit fleet.Unit\n\nfunc (eu *ExtractableUnit) ExtractBaseName(...
go
chosen
[ { "from": "system", "value": "Make Only operator appear correctly in pkg.go.dev\n" }, { "from": "human", "value": "/*\nOnly (e.g. OnlyInt32) filters the value stream of an observable and lets\nonly the values of a specific type pass.\n\nSo in case of OnlyInt32 it will only let int32 values pass ...
go
chosen
[ { "from": "system", "value": "Add struct labels to ResizeOptions\n" }, { "from": "human", "value": "package gobrightbox\n\n// Volume represents a Brightbox Volume\n// https://api.gb1.brightbox.com/1.0/#volume\ntype Volume struct {\n\tID string\n\tName string\n\tStatus string...
go
chosen
[ { "from": "system", "value": "Store links as Link type\n" }, { "from": "human", "value": "package crawler\n\nimport (\n\t\"net/url\"\n)\n\ntype Fetcher interface {\n\t// Fetch returns the body of URL and\n\t// a slice of URLs found on that page.\n\tFetch(url string) (body string, urls []string, ...
go
chosen
[ { "from": "system", "value": "Change .goyave.toml file to .goyave\n" }, { "from": "human", "value": "/*\nPackage consts implements constants for the entire project\n*/\npackage consts\n\n// ConfigurationFileName is the configuration file name of Goyave\nconst ConfigurationFileName = \".goyave.to...
go
chosen
[ { "from": "system", "value": "Update ban_datetime on allowed status change\n" }, { "from": "human", "value": "package v1\n\nimport \"git.zxq.co/ripple/rippleapi/common\"\n\ntype setAllowedData struct {\n\tUserID int `json:\"user_id\"`\n\tAllowed int `json:\"allowed\"`\n}\n\n// UserManageSetAllo...
go
chosen
[ { "from": "system", "value": "Switch to the proper \"Ticker\" implementation\n\nA timer will only fire once. A ticker will fire once per interval\n" }, { "from": "human", "value": "package main\n\nimport (\n\t\"log\"\n\t\"time\"\n)\n\nvar (\n\tonemin = time.Minute * 1\n\tfivemin = time.Minute *...
go
chosen
[ { "from": "system", "value": "Fix race condition on AppVeyor. Increase timeout a bit.\n" }, { "from": "human", "value": "package markdown\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestWatcher(t *testing.T) {\n\texpected := \"12345678\"\n\tinterval :=...
go
chosen
[ { "from": "system", "value": "Fix code format in documentation\n" }, { "from": "human", "value": "package alice\n\n// Module is a marker interface for structs that defines how to initialize instances.\ntype Module interface {\n\t// IsModule indicates if this is a module.\n\tIsModule() bool\n}\n\...
go
chosen
[ { "from": "system", "value": "Split test function in 2 functions\n" }, { "from": "human", "value": "package envh\n\nimport (\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestCreateTreeFromDelimiterFilteringByRegexp(t *testing.T) {\n\tsetTestingEnvsForTree()...
go
chosen
[ { "from": "system", "value": "Update one remaining context import.\n" }, { "from": "human", "value": "package reception\n\nimport (\n\tetcd \"github.com/coreos/etcd/client\"\n\t\"golang.org/x/net/context\"\n)\n\ntype (\n\tkeysAPI interface {\n\t\tGet(path string) (*etcd.Response, error)\n\t\tSet...
go
chosen
[ { "from": "system", "value": "Fix the binary packet pool and x2 its capacity\n" }, { "from": "human", "value": "package tarantool\n\ntype BinaryPacketPool struct {\n\tqueue chan *BinaryPacket\n}\n\nfunc newPackedPacketPool() *BinaryPacketPool {\n\treturn &BinaryPacketPool{\n\t\tqueue: make(chan ...
go
chosen
[ { "from": "system", "value": "Fix a sluice test with probablistic failure.\n\nThe synchronization wasn't wrong: the test was. If you sign up another channel first, *then* send, it's random -- up to map order -- which one will get it.\n\nThe test now sends that message, then signs up the next channel, makin...
go
chosen
[ { "from": "system", "value": "Add comments for types and functions to be published\n" }, { "from": "human", "value": "package acgen\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"sync\"\n)\n\ntype Command struct {\n\tName string\n\tFlags []*Flag\n}\n\ntype Flag struct {\n\tShort []string\n\tLong ...
go
chosen
[ { "from": "system", "value": "Remove debug flags in cgo\n\nSigned-off-by: Steeve Morin <7f3ba7bbc079b62d3fe54555c2b0ce0ddda2bb7c@gmail.com>\n" }, { "from": "human", "value": "package libtorrent\n\n// #cgo pkg-config: libtorrent-rasterbar openssl\n// #cgo darwin LDFLAGS: -lm -lstdc++\n// #cgo lin...
go
chosen
[ { "from": "system", "value": "Change response status type from string to bool\n" }, { "from": "human", "value": "package handlers\n\nimport (\n\t\"encoding/json\"\n\t\"log\"\n\t\"net/http\"\n)\n\n//ReturnInternalServerError returns an Internal Server Error\nfunc ReturnInternalServerError(w http....
go
chosen
[ { "from": "system", "value": "Improve acceptance test assertion by printing out error type\n\nThis is useful to distinguish between e.g. a 500 and 404 status code.\n" }, { "from": "human", "value": "package helper\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n)\n\n// Asserts that the request ...
go
chosen
[ { "from": "system", "value": "klientctl: Break from loop if requirement is found\n" }, { "from": "human", "value": "package main\n\n// +build linux darwin\n\nimport (\n\t\"errors\"\n\n\t\"github.com/koding/klient/cmd/klientctl/util\"\n)\n\n// AdminRequired parses through an arg list and requires...
go
chosen
[ { "from": "system", "value": "Refactor dependency resolver + add test for later on\n" }, { "from": "human", "value": "package gomposer\n\nimport (\n \"os\"\n\n \"encoding/json\"\n)\n\ntype Reader interface {\n\tRead(filename string) *Version\n}\n\ntype PackageReader struct {\n}\n\nfunc (pr...
go
chosen
[ { "from": "system", "value": "Add returned value from LoadSettings method.\n" }, { "from": "human", "value": "package models\n\nimport (\n\t\"github.com/herald-it/goncord/utils\"\n\n\t\"gopkg.in/yaml.v2\"\n\n\t\"io/ioutil\"\n)\n\ntype Setting struct {\n\tDatabase struct {\n\t\tHost string\...
go
chosen
[ { "from": "system", "value": "Add the test for compare\n" }, { "from": "human", "value": "package compare_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/xgfone/go-tools/compare\"\n)\n\nfunc TestCompare(t *testing.T) {\n\tv1 := []uint16{1, 2, 4}\n\tv2 := []uint16{1, 2, 3}\n\tif !compare.GT(v1,...
go
chosen
[ { "from": "system", "value": "Add DockerInfo & DockerVersion struct\n" }, { "from": "human", "value": "package dockerguard\n\ntype Container struct {\n\tId string\n\tHostname string\n}\n" }, { "from": "gpt", "value": "package dockerguard\n\ntype DockerInfo struct {\n\tContainer...
go
chosen
[ { "from": "system", "value": "Fix Windows Server version for RS4 in comment\n\nSigned-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>\n" }, { "from": "human", "value": "package osversion\n\nconst (\n\t// RS1 (version 1607, codename \"Redstone 1\") corresponds to W...
go
chosen
[ { "from": "system", "value": "Print error message when receive unrecogonized arguments.\n" }, { "from": "human", "value": "package flagparse\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path\"\n)\n\n// ArgumentParser is a struct for parsing command line strings\ntype ArgumentParser struct {\n\tprog str...
go
chosen
[ { "from": "system", "value": "Use Type method in error message, if possible.\n" }, { "from": "human", "value": "package formats\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/anaminus/rbxmk\"\n)\n\n// registry contains registered Formats.\nvar registry []func() rbxmk.Format\n\n// register registers a ...
go
chosen
[ { "from": "system", "value": "Add getters for query things (BM Portal)" }, { "from": "human", "value": "package databath\n\nimport ()\n\ntype QueryConditions struct {\n\tcollection string\n\twhere []QueryCondition\n\tpk *uint64\n\tfieldset *string\n\tlimit *int64\n\tfilter ...
go
chosen
[ { "from": "system", "value": "Improve error message for SliceContains\n\nAlso, use the types we defined in SliceContains for the params\n" }, { "from": "human", "value": "package assert\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype Line []string\n\nfunc (line Line) String() string {\n\treturn...
go
chosen
[ { "from": "system", "value": "Add test for handling config files.\n\nChecks also default config file which is a big plus as it will fail the\ntest if there will be errors.\n" }, { "from": "human", "value": "package main\n" }, { "from": "gpt", "value": "package main\n\nimport \"testin...
go
chosen
[ { "from": "system", "value": "Change name of package to 'gomad'\n" }, { "from": "human", "value": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pgombola/knowmads/client\"\n)\n\nfunc main() {\n\tnodes := client.Status()\n\tfor _, node := range nodes {\n\t\tfmt.Printf(\"ID=%v;Name=%v;Drai...
go
chosen
[ { "from": "system", "value": "Make sure s.Relevance is normalized (0, 1)\n" }, { "from": "human", "value": "package scoring\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"time\"\n)\n\n// A point of reference Score.Update and Score.Relevance use to reference the\n// current time. It is used in testing, ...
go
chosen
[ { "from": "system", "value": "Fix TestParsePEM: use t.Error rather than t.Fatal in table-driven test\n" }, { "from": "human", "value": "package ocspd\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestParsePEM(t *testing.T) {\n\tfor _, tt := range []string{\"testdata/cert_only\", \"testdat...
go
chosen
[ { "from": "system", "value": "Use quiet mode for lisp tests when running go test\n" }, { "from": "human", "value": "// 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 packag...
go
chosen
[ { "from": "system", "value": "Clarify that this package supports profiling\n" }, { "from": "human", "value": "// Package httpclient provides an HTTP client with several conveniency\n// functions.\n//\n// This package is cross platform, so it works on both standalone deployments\n// as well as on...
go
chosen
[ { "from": "system", "value": "Make sure the param passed is correct\n" }, { "from": "human", "value": "package ActiveObject\n\nimport (\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestActiveObject(t *testing.T) {\n\tvar activeObject IActiveObject...
go
chosen
[ { "from": "system", "value": "Add underscore to the commandline\n" }, { "from": "human", "value": "package main\n\nimport (\n\t\"fmt\"\n\t\"flag\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"github.com/robertkrimen/otto\"\n)\n\nfunc main() {\n\tflag.Parse()\n\tvar script []byte\n\tvar err error\n\tfilename ...
go
chosen
[ { "from": "system", "value": "Add delete filter to watch package\n" }, { "from": "human", "value": "package watch\n\nimport etcd \"github.com/coreos/etcd/clientv3\"\n\n// OpOption is a simple typedef for etcd.OpOption.\ntype OpOption struct {\n\tGet etcd.OpOption\n\tWatch etcd.OpOption\n}\n\n/...
go
chosen
[ { "from": "system", "value": "Adjust ProgressSpinner tick time to 110 ms\n" }, { "from": "human", "value": "package tuikit\n\nimport \"time\"\n\ntype ProgressSpinner struct {\n\t*TextView\n\n\tspinRunes []rune\n\tcurrent int\n}\n\nfunc NewProgressSpinner() *ProgressSpinner {\n\tps := &Progress...
go
chosen
[ { "from": "system", "value": "Implement Put for Document struct\n" }, { "from": "human", "value": "package data\n\nimport (\n\t\"time\"\n\n\t\"gopkg.in/mgo.v2\"\n\t\"gopkg.in/mgo.v2/bson\"\n)\n\ntype Document struct {\n\tID bson.ObjectId `bson:\"_id\"`\n\tShortId string `bson...
go
chosen
[ { "from": "system", "value": "Remove comment to see outputs works in godoc\n" }, { "from": "human", "value": "package fnlog_test\n\nimport (\n\t\"github.com/northbright/fnlog\"\n\t\"log\"\n)\n\nvar (\n\tnoTagLog *log.Logger\n)\n\nfunc Example() {\n\tiLog := fnlog.New(\"i\")\n\twLog := fnlog.New(...
go
chosen
[ { "from": "system", "value": "Remove commented import that isn't used\n" }, { "from": "human", "value": "package async\n\n// import \"fmt\"\n\nfunc Waterfall(routines []Routine, callbacks ...Done) {\n l := New()\n l.Multiple(routines...)\n\n l.RunWaterfall(callbacks...)\n}\n\nfunc (l *List) R...
go
chosen
[ { "from": "system", "value": "Add stubs for non-linux, non-freebsd platforms to fix builds on MacOS.\n" }, { "from": "human", "value": "//go:build !linux && !freebsd\n\npackage tuntap\n\nconst flagTruncated = 0\n\nfunc createInterface(ifPattern string, kind DevKind) (*Interface, error) {\n\tpani...
go
chosen
[ { "from": "system", "value": "Add zone test from Alex Polvi\n" }, { "from": "human", "value": "package dns\n\nimport (\n\t\"testing\"\n)\n\nfunc TestRadixName(t *testing.T) {\n\ttests := map[string]string{\".\": \".\",\n\t\t\"www.miek.nl.\": \".nl.miek.www\",\n\t\t\"miek.nl.\": \".nl.miek\",...
go
chosen
[ { "from": "system", "value": "Simplify open function for file server\n" }, { "from": "human", "value": "// Copyright (c) 2016, Janoš Guljaš <janos@resenje.org>\n// All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npa...
go
chosen
[ { "from": "system", "value": "Remove fmt since it's not used\n" }, { "from": "human", "value": "package system\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// parseCPUInfo returns a newline-delimited string slice of '/proc/cpuinfo'.\nfunc parseCPUInfo() []string {\...
go
chosen
[ { "from": "system", "value": "Include meta4 path in filtering errors\n" }, { "from": "human", "value": "package source\n\nimport (\n\t\"github.com/pkg/errors\"\n\t\"github.com/dpb587/metalink/repository\"\n\t\"github.com/dpb587/metalink/repository/filter\"\n)\n\nfunc FilterInMemory(files []repos...
go
chosen
[ { "from": "system", "value": "Fix integration tests due to Google Privacy Policy content changes.\n\nSigned-off-by: Danny Joyce <656eadb1608d5e3ea5db131e513d97abdf96b075@pivotal.io>\n" }, { "from": "human", "value": "package integration_test\n\nimport (\n\t\"path/filepath\"\n\n\t\"github.com/clo...
go
chosen
[ { "from": "system", "value": "[FAB-15484] Fix goimport errors in core/container\n\nChange-Id: I4bd71cdfc8996d3e2ce72f89ff3bde0e400afb3d\nSigned-off-by: Brett Logan <24e15547523ce4bb6c2ac877c9de72671df60332@ibm.com>\n" }, { "from": "human", "value": "/*\nCopyright IBM Corp. All Rights Reserved.\n...
go
chosen
[ { "from": "system", "value": "Update clusterconfig-provider binary to use logrusx.JSONFormatter\n" }, { "from": "human", "value": "package main\n\nimport (\n\t\"time\"\n\n\tlog \"github.com/Sirupsen/logrus\"\n\tlogx \"github.com/cerana/cerana/pkg/logrusx\"\n\t\"github.com/cerana/cerana/provider\...
go
chosen
[ { "from": "system", "value": "Add test for without MozJPEG\n" }, { "from": "human", "value": "package main\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"testing\"\n\n\tassert \"github.com/stretchr/testify/require\"\n)\n\nfunc TestResizeImage(t *testing.T) {\n\ttmpfile, err := ioutil.TempFile(\"\",...
go
chosen
[ { "from": "system", "value": "Declare constant related to wildcard\n" }, { "from": "human", "value": "package of10\n\nimport \"net\"\n\ntype Match struct {\n\tWildcards uint32\n\tInPort PortNumber\n\tEthSrc net.HardwareAddr\n\tEthDst net.HardwareAddr\n\tVlanId VlanId\n...
go
chosen
[ { "from": "system", "value": "Add TypeTable(), Operate() and MustOperate() to orm.Interface\n\nAll those methods are implemented by both Orm and Tx\n" }, { "from": "human", "value": "package orm\n\nimport (\n\t\"gnd.la/orm/query\"\n)\n\n// Interface is implemented by both Orm\n// and Transaction...
go
chosen
[ { "from": "system", "value": "clock: Use time.Since for monotonic timer\n\nFixes #875\n" }, { "from": "human", "value": "// Copyright 2016 Hajime Hoshi\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n...
go
chosen
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
15