max_stars_repo_path stringlengths 9 49 | max_stars_repo_name stringlengths 13 29 | max_stars_count int64 0 2.08k | id stringlengths 3 5 | content stringlengths 155 23.7k | version stringclasses 1
value |
|---|---|---|---|---|---|
testcases/string_args.go | xyproto/go2cpp17 | 51 | 414 | package main
import "fmt"
func threecat(a, b, c string) string {
return a + b + c
}
func main() {
threecat("in", "cred", "ible")
fmt.Println("hi")
}
| 1.10 |
diff/cyclic_detection_test.go | yazgazan/jaydiff | 83 | 1554 | package diff
import "testing"
func TestCircular(t *testing.T) {
first := map[int]interface{}{}
second := map[int]interface{}{
0: first,
}
first[0] = second
notCyclic := map[int]interface{}{
0: map[int]interface{}{
0: map[int]interface{}{
0: "foo",
},
},
1: []interface{}{
"bar", "baz",
},
... | 1.10 |
mongo/description/topology.go | 2HgO/mongo-go-driver | 0 | 6417 | <filename>mongo/description/topology.go
// Copyright (C) MongoDB, Inc. 2017-present.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
package de... | 1.10 |
sender.go | nickvanw/ircx | 45 | 7561 | package ircx
import (
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
irc "gopkg.in/sorcix/irc.v2"
)
// Sender is an interface for sending IRC messages
type Sender interface {
// Send sends the given message and returns any errors.
Send(*irc.Message) error
}
// serverSender is a barebones writer u... | 1.10 |
vendor/github.com/xyproto/simplehstore/creator.go | HarshCasper/algernon | 2,080 | 10733 | <gh_stars>1000+
package simplehstore
import (
"github.com/xyproto/pinterface"
)
// PostgresCreator is a general struct to create datatypes with.
// The main purpose is to implement pinterface.ICreator.
type PostgresCreator struct {
host *Host
}
// NewCreator can be used to create a new PostgresCreator.
// The main... | 1.10 |
testcases/var_multi.go | xyproto/go2cpp17 | 51 | 15418 | <gh_stars>10-100
package main
import "fmt"
var (
switchExpressionCounter int = -1
b bool
)
var (
x, y, z float64
)
var x2, y2, z2 float32 = 3.14, 3.15, 3.16
func main() {
fmt.Println(b, "asdf", x2)
}
| 1.10 |
convert.go | sazor/strcaseconv | 0 | 18405 | package strcaseconv
import "strings"
const (
snakeDelimiter = '_'
kebabDelimiter = '-'
capitalDiff = 'a' - 'A'
)
// SnakeToUpperCamel converts original snake_case string to UpperCamelCase
func SnakeToUpperCamel(original string) string {
return toCamel(original, snakeDelimiter, true)
}
// SnakeToLowerCamel co... | 1.10 |
pkg/proc/native/threads_linux.go | abhi212/delve | 0 | 23569 | package native
import (
"fmt"
sys "golang.org/x/sys/unix"
"github.com/go-delve/delve/pkg/proc"
)
type WaitStatus sys.WaitStatus
// OSSpecificDetails hold Linux specific
// process details.
type OSSpecificDetails struct {
registers sys.PtraceRegs
running bool
}
func (t *Thread) stop() (err error) {
err = s... | 1.10 |
x/bsonx/reflectionfree_d_codec.go | gabbyasuncion/mongo-go-driver | 31 | 25639 | // Copyright (C) MongoDB, Inc. 2017-present.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
package bsonx
import (
"fmt"
"math"
"reflect"
... | 1.10 |
example_client_test.go | maksialexandr/amqp | 0 | 27612 | package amqp_test
import (
"errors"
"fmt"
"log"
"os"
"time"
"github.com/maksialexandr/amqp"
)
// This exports a Session object that wraps this library. It
// automatically reconnects when the connection fails, and
// blocks all pushes until the connection succeeds. It also
// confirms every outgoing message, s... | 1.10 |
mongo/collection_test.go | MaxBreida/mongo-go-driver | 0 | 29082 | <filename>mongo/collection_test.go<gh_stars>0
// Copyright (C) MongoDB, Inc. 2017-present.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
pack... | 1.10 |
mongo/mongocryptd.go | yang20150702/mongo-go-driver | 0 | 29687 | // Copyright (C) MongoDB, Inc. 2017-present.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
package mongo
import (
"context"
"os/exec"
"st... | 1.10 |
GO code examples for specific versions. Generated with: https://www.kaggle.com/code/conjuring92/bigcode-starcoderdata-go
- Downloads last month
- 45