blob_id
stringlengths
40
40
content_id
stringlengths
40
40
repo_name
stringlengths
5
114
path
stringlengths
5
318
language
stringclasses
5 values
extension
stringclasses
12 values
length_bytes
int64
200
200k
license_type
stringclasses
2 values
content
stringlengths
143
200k
bec6af61168fca42dc692a83f2f363daee8851fe
7f70930697f06978c6d1ebbf6276f1aa7b14bee8
SmartKeyerror/prometheus
/storage/secondary.go
Go
go
3,958
permissive
// Copyright 2017 The Prometheus Authors // 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 // // Unless required by applicable law or agreed to...
0809cb6b9f3d97f00afc0d6d12e3fc573aa8ec14
13f7009aea02c9a37552260d46373665675ab8eb
bradmwilliams/release-controller
/cmd/release-controller-api/http_upgrade_graph.go
Go
go
7,142
permissive
package main import ( "bytes" "encoding/json" "fmt" "net/http" "os/exec" "strconv" "strings" "text/template" viz "github.com/awalterschulze/gographviz" releasecontroller "github.com/openshift/release-controller/pkg/release-controller" "k8s.io/apimachinery/pkg/labels" "k8s.io/klog" ) type ReleaseNode str...
d6fa43ded21ac6ccd47ec1f2036caf50cf2dac52
6e72c361c258477dabcea22da21555e84458e6ea
dsu-igeek/velero-plugin-for-vsphere
/pkg/cmd/utils_test.go
Go
go
22,729
permissive
/* Copyright 2020 the Velero contributors. 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 Unless required by applicable law or agreed to in writing, sof...
b9975c739071aa06837f708d6489b326c401959e
ac6367f3aef9d2f79df03b84fd467d39e3e98676
synectiks-ems/ems-ui
/pkg/services/sqlstore/temp_user.go
Go
go
3,793
permissive
package sqlstore import ( "time" "github.com/synectiks-ems/ems-ui/pkg/bus" m "github.com/synectiks-ems/ems-ui/pkg/models" ) func init() { bus.AddHandler("sql", CreateTempUser) bus.AddHandler("sql", GetTempUsersQuery) bus.AddHandler("sql", UpdateTempUserStatus) bus.AddHandler("sql", GetTempUserByCode) bus.Add...
8a42bdccf86e2e8873cc6cc0bfa2905bf3b3614e
486bee57ff9b033150054d182c40970fb90023af
samson-crypto/chain-indexing
/usecase/event/proposal_ended_test.go
Go
go
1,208
permissive
package event_test import ( event_entity "github.com/crypto-com/chain-indexing/entity/event" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" event_usecase "github.com/crypto-com/chain-indexing/usecase/event" ) var _ = Describe("Event", func() { registry := event_entity.NewRegistry() event_usecase.Registe...
08d5241ccc0d8480d85af30f7e642c89447cf3a8
5f0f3b649ecf0c739dd6377665f14e49f9602293
srlehn/sio
/sio_test.go
Go
go
31,319
permissive
// Copyright (C) 2018 Minio Inc. // // 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 // // Unless required by applicable law or agreed to ...
4b377a22c2ba1214d267c38ab9f5b4c628899a87
ea6311a44710efe642a5a586be41bbb529432b93
MrRickSan/godog-selenium
/support/base.go
Go
go
922
no_license
package support import ( "bytes" "fmt" "image" "image/png" "log" "os" "time" "github.com/tebeka/selenium" ) var driver selenium.WebDriver // WDInit retorna uma instancia do WebDriver func WDInit() selenium.WebDriver { var err error caps := selenium.Capabilities(map[string]interface{}{"browserName": "chrom...
5b2dbc5ea12a43e561807e4bea291b179d2ab492
4f5dc9e17f27c33129079a7dc8be87496c378d1e
FINCTIVE/scripts-bot
/cmd/bot.go
Go
go
9,075
no_license
package main import ( "context" tb "gopkg.in/tucnak/telebot.v2" "gopkg.in/yaml.v2" "io/ioutil" "log" "net/http" "os" "os/exec" "path/filepath" util "scripts-bot/internal" "strconv" "time" ) // FILE HIERARCH STRUCTURE // . // ├── bot // └── configs // ├── config.yaml // └── scripts // └── (...
a1754c69b26197eb3e445aa4374ca37232894227
a41100ab92701cecdec6f5a5ce7cb03b91a2e5b3
gottwald/coredns
/plugin/kubernetes/object/service.go
Go
go
2,824
permissive
package object import ( api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ) // Service is a stripped down api.Service with only the items we need for CoreDNS. type Service struct { // Don't add new fields to this struct without talking to the CoreDNS maintainers. Version string Name string ...
41e0cedbf5d4a77e0de642c57488fc6b30554000
d69103ae87795e7c562397c7c4bf2e3ff87c6bf6
forksarchive/utahfs
/vendor/modernc.org/cc/v3/type.go
Go
go
48,427
permissive
// Copyright 2019 The CC Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Parts of the documentation are modified versions originating in the Go // project, particularly the reflect package, license of which is reproduced // below....
c9b880818ce75bc3fa84b9d86fc92f877bd52157
9ffd3619a74b7f37edb31e78a7541fade1df6f90
LdDl/gorgonia
/operations.go
Go
go
18,470
permissive
package gorgonia import ( "fmt" "github.com/pkg/errors" "gorgonia.org/tensor" ) // contains all public operations that can be performed on nodes // all the functions here have the signature: // func (...) (*Node, error) /* BINARY FUNCTIONS */ func binOpNode(op BinaryOp, a, b *Node) (retVal *Node, err error) { ...
a2362152aa6e42e8be976013ea4677d88dd8299e
96a6e1a90579c9b3b7637755b6c5fc763feaa027
echobygo/game_server
/hall/web_server_pay_yts.go
Go
go
2,135
permissive
package hall import ( "encoding/json" "game_server/easygo" "game_server/for_game" "github.com/astaxie/beego/logs" "io/ioutil" "net/http" "time" ) /* 云通商支付回调服务入口 */ type YTSResp struct { Amount float64 `json:"amount"` SysOrderID string `json:"sys_order_id"` CreateTime string `json:"create_time"` Sig...
ad1953b2f521a1485b1fbef3e4ff0dad0e142d36
32673bb7be274d996fbd9d2183ef84a90f87d59c
isabella232/node-maintenance-operator
/pkg/controller/nodemaintenance/utils.go
Go
go
742
permissive
package nodemaintenance import corev1 "k8s.io/api/core/v1" // ContainsString checks if the string array contains the given string. func ContainsString(slice []string, s string) bool { for _, item := range slice { if item == s { return true } } return false } // RemoveString removes the given string from th...
3ad2a49e14c60ed12f5d6e628a6457a7e6c506b9
387aa38da86f577817b55580745088057b2b0e0c
burdiyan/schemagen
/vendor/github.com/Landoop/schema-registry/client.go
Go
go
5,069
permissive
// Package schemaregistry provides a client for Confluent's Kafka Schema Registry REST API. package schemaregistry import ( "encoding/json" "fmt" "io" "net/http" "net/url" "path" ) // DefaultUrl is the address where a local schema registry listens by default. var DefaultUrl = "http://localhost:8081" // These n...
2229e1aea7d1d78da3303f8b9154ab62bdf616b7
b00a59d16f62d7ac90e0b50db22bb4eabc5bdc59
justwatchcom/sql_exporter
/vendor/github.com/apache/arrow/go/v12/arrow/array/record.go
Go
go
10,668
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
2af70a7fb2dd3acf3df9377309dacee8261c275f
0c9d03fdc96f31ad5b6e5c9a8676a46f35c1f8ed
gurkalov/go-course
/src/tree/avl_tree.go
Go
go
3,137
no_license
package tree import "course/stack" type AvlTree struct { Tree root *Node } func (T *AvlTree) Insert (key int) *Node { z := &Node{nil, nil, nil, key, 1} if T.root == nil { T.root = z return z } T.root = T.insert(T.root, z) return T.root } func (T *AvlTree) insert(p *Node, new *Node) *Node { if p == nil...
78c299cb1df1ea1ba90070f7bdadc4139c61ea5a
daccb605a79b25072810e89996d5b7a8f63aea9d
kanisterio/kanister
/pkg/caller/frame.go
Go
go
1,416
permissive
package caller import ( "regexp" "runtime" "strings" ) // Frame contains information about the caller. This is a subset of the fields // in runtime.Frame. type Frame struct { Function string File string Line int } // kanisterPathRe matches the kanister component of the filesystem path // // For example...
6250d5472ce1a73e060cc74e2068b9f077ae1fd3
ece6d36dfc805c28f4413cc13b6684dfc9af16e1
michalzurawski/gohan
/cli/template.go
Go
go
13,785
permissive
package cli import ( "encoding/json" "fmt" "io/ioutil" "os" "path" "regexp" "strings" "github.com/cloudwan/gohan/schema" "github.com/cloudwan/gohan/util" "github.com/codegangsta/cli" "github.com/flosch/pongo2" "github.com/vattle/sqlboiler/strmangle" ) func deleteGohanExtendedProperties(node map[string]in...
9ff28df75873096bd924f5c4a607da3ee971db5c
e357931f9ff0f70594c79f21b874be05c927f2d2
fudali113/esalert
/api/config_api.go
Go
go
662
permissive
package api import ( "config" ) // 获取原始配置信息 func getConfig(ctx Context) { ctx.WriteJson(config.OriginConfig) } // 获取原始api配置信息 func getApiConfig(ctx Context) { ctx.WriteJson(config.OriginConfig.ApiInfo) } // 获取原始rule配置信息 func getRulesConfig(ctx Context) { ctx.WriteJson(config.OriginConfig.Rules) } // 获取某条rule原始...
d21b0c5ed5619f7f199a0559e727543ddbacc14a
7e051e4d6fec12a36711075e7979016fb845a768
devmarkpro/wingo
/response/payload_types.go
Go
go
301
no_license
package response const ( // QuestionPayloadEnum : type name of question message QuestionPayloadEnum = "question" // UserInfoPayloadEnum : type name of question message UserInfoPayloadEnum = "user_info" // DeadlinePayloadEnum : type name of deadline message DeadlinePayloadEnum = "deadline" )
4e3794b43bc3c9ec286d4f90d56cb97bbe6cacd5
2bb53b9bf33c0a46d47085bc72ab8fae905f31db
jaksi/sshesame
/request.go
Go
go
5,546
permissive
package main import ( "bytes" cryptoRand "crypto/rand" "encoding/binary" "errors" mathRand "math/rand" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "golang.org/x/crypto/ssh" ) type globalRequestPayload interface { reply(context *connContext) []by...
84957e70a2bd883e23ec5960f2a7a831f31928ce
d23096c4272c6d9b537207dbb10d3cc1289183f5
bun919tw/gqlgen-todos
/server.go
Go
go
691
no_license
package main import ( "log" "net/http" "os" "github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/playground" "github.com/bun919tw/gqlgen-todos/graph" "github.com/bun919tw/gqlgen-todos/graph/generated" ) const defaultPort = "8080" func main() { port := os.Getenv("PORT") if port...
e0220b54e77d09c1318bec556256766acda8c89f
aca6d92023c6b3c76f4bc7d8386df12e7d1158c5
yunify/confd
/vendor/github.com/BurntSushi/toml/parse.go
Go
go
13,545
permissive
package toml import ( "fmt" "log" "strconv" "strings" "time" "unicode" "unicode/utf8" ) type parser struct { mapping map[string]interface{} types map[string]tomlType lx *lexer // A list of keys in the order that they appear in the TOML data. ordered []Key // the full key for the current hash in ...
2a46bc16a293084d7ff3d08498f15707aacec3db
aedd7e11c1d539c566e2f452411b3d43cd504305
NageNalock/DiceyLua
/luago/vm/opcode.go
Go
go
5,171
permissive
package vm const ( // 操作模式 IABC = iota IABx IAsBx IAx ) const ( // 指令码, 共 47 条, 每条 6 比特 OP_MOVE = iota OP_LOADK OP_LOADKX OP_LOADBOOL OP_LOADNIL OP_GETUPVAL OP_GETTABUP OP_GETTABLE OP_SETTABUP OP_SETUPVAL OP_SETTABLE OP_NEWTABLE OP_SELF OP_ADD OP_SUB OP_MUL OP_MOD OP_POW O...
3e6c85836f7037a5ad4acee968f4be41a9748eb9
f2f6eb9237afc8813139ea5d8e7922108460628a
neat-soft/tsuru
/event/eventtest/checker.go
Go
go
4,376
permissive
// Copyright 2016 tsuru authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package eventtest import ( "fmt" "strings" "time" "github.com/globalsign/mgo/bson" "github.com/tsuru/tsuru/db" "github.com/tsuru/tsuru/event" check "gop...
c62275cdc4ce2bfa978808104741ca021b786ccd
dd0a5585910058dc798020a0130287187aea6948
Miolyn/OpenFaas-IM-Server
/server/connect/pkg/logger/logger.go
Go
go
2,673
no_license
package logger import ( "fmt" "io" "os" "path" "strings" oplogging "github.com/op/go-logging" ) var ( Logger *oplogging.Logger Module = "Miolyn" prefix = "[Miolyn]" level = "DEBUG" logDir = "log" defaultFormatter = `%{color:bold} %{time:2006/01/02 15:04:...
4f7027eebe2027fb36134c403a6c082a9f07c601
f17af877bd2a3ddd2951fb32a914a1c220e3677c
amus-sal/leetcode-problems
/unique-path.go
Go
go
621
no_license
var pos [][]int func uniquePaths(m int, n int) int { pos = make([][]int, m) for indR := range pos { pos[indR] = make([]int, n) for ind := range pos[indR] { pos[indR][ind] = -1 } } return getPath(0, 0, m-1, n-1) } func getPath(stRo int, stCo int, m int, n int) int { if pos[stRo][stCo] != -1 { return po...
666fa4a6bd970fa3f270b98cd69cb593f0b9242a
df2374072563cc33ac0e18ac24a58b51aa85f009
viktor-viktor/ReverseProxy
/Authentication/Auth_bench_test.go
Go
go
1,940
no_license
package Authentication import ( "encoding/json" "fmt" "github.com/mitchellh/mapstructure" "testing" ) func BenchmarkReadAuthFromFile(b *testing.B) { byt := []byte(`{"Auth": [{ "name": "public", "auth_addr": "localhost:5000", "auth_type": "epp", "auth_scheme": "http", "url_path": "/api/authorization/pub...
16422ca1e5f5cb10a47cd6208b0c1445d46bc233
d4371e7ad056f2cb727808041e0ba3a66a241546
fahaxike/goStudy
/.history/src/base/06conv/main_20210717145430.go
Go
go
758
no_license
package main import ( "fmt" "strconv" ) func main() { // //int2str // i1 := 55 // s1 := fmt.Sprintf("%d", i1) // //float2str // f1 := 5.5555 // ss1 := fmt.Sprintf("%.3f", f1) // fmt.Printf("s1 %T value %s ;ss1 %T value %s\n", s1, s1, ss1, ss1) // s2 := strconv.Itoa(i1) // ss2 := strconv.FormatFloat(f1, 'f...
06bbff588d624aced847f42bce6c79fe6684e032
e49846f095f612dde17a0dd653f0556204e6c66d
sgtest/monorepo-test-3
/kubernetes-2/pkg/controller/podautoscaler/replica_calculator.go
Go
go
11,689
permissive
/* Copyright 2016 The Kubernetes Authors. 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 Unless required by applicable law or agreed to in writing, ...
62c7c2dac05e52ac0ea62a10673b55e090637671
d7442a56c6b5f4c189fd348e4d2f8e76cbfadc8b
sillyhatxu/sillyhat
/module/logstash/test7/lfshook/lfshook.go
Go
go
4,665
no_license
package lfshook import ( "fmt" "github.com/sirupsen/logrus" "io" "log" "os" "path/filepath" "reflect" "sync" ) // We are logging to file, strip colors to make the output more readable. var defaultFormatter = &logrus.TextFormatter{DisableColors: true} // PathMap is map for mapping a log level to a file's path...
5b115caa393f940879e2afb9a621ebccf8dff8db
36df9a5b29239d3adfbdce93335c123c7c04c5bd
bencornelis/gophercises
/quiz/main.go
Go
go
1,525
no_license
package main import ( "bufio" "encoding/csv" "flag" "fmt" "log" "os" "strings" "time" ) func main() { var fileName string var timeLimit int flag.StringVar( &fileName, "csv", "problems.csv", "a csv file in the format of 'question,answer'", ) flag.IntVar( &timeLimit, "limit", 30, "the time ...
a4c90fecf6480f332414666517d643ee8ce0a610
148283a593756466198d1dc79f55f01bb7c9a319
gttiankai/jvmgo
/ch05/instructions/loads/lload.go
Go
go
827
no_license
package loads import ( "jvmgo/ch05/instructions/base" "jvmgo/ch05/rtda" ) func _lload(frame *rtda.Frame, index uint) { val := frame.LocalVars().GetLong(index) frame.OperandStack().PushLong(val) } type LLOAD struct { base.Index8Instruction } func (self *LLOAD) Execute(frame *rtda.Frame) { _lload(frame, self.I...
dfe2e11d3edd3ecc2945cb1c7ee3ff72a01720c0
6c6d3680d5d343e31ea99aa1c8de509e56c6a345
once10301/dueros-dpl
/dpl/component/component_test.go
Go
go
980
permissive
package component import ( "testing" "github.com/zmrnet/dueros-dpl/dpl/command" ) func TestComponent(t *testing.T) { audio := Audio("component-audio", "http://localhost/upload/audio_001.mp3"). SetPropsJSON(`{"looping":false,"autoplay":true,"type":"music"}`). SetStylesCSS("height:220dp;width:300dp"). BindEve...
7c94d3a3d1680451b5d43ab57fcfb19693085cfd
3e5100999f197355d0206ec89c077a33bfbe5b0c
github/vitess-gh
/go/vt/vtgate/executor_test.go
Go
go
95,882
permissive
/* Copyright 2019 The Vitess Authors. 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 Unless required by applicable law or agreed to in writing, soft...
5d94bafdcdfc41e7367eb3a37877f2aefcf4552a
87da43778cd2da331524b14b9ea283d8ff21bea7
kilgarth/gotimeout
/expirator.go
Go
go
6,698
no_license
// Package gotimeout provides a facility for expiring objects after a set period of time. // It is meant to be used in a manner not dissimilar from a daemon - the key difference // being that it runs in a goroutine as part of your process. package gotimeout import ( "bytes" "encoding/gob" "sync" "time" ) // Expir...
c65b8c9d1ad8a6957d9036b774bee81b9c4598ec
20d3368841741462cb17f37a6633d7489dfbd1d2
chenxiaoqing-cxq/fission
/pkg/fission-cli/cmd/timetrigger/create.go
Go
go
3,807
permissive
/* Copyright 2019 The Fission Authors. 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 Unless required by applicable law or agreed to in writing, sof...
a24613e22230f5d8e2d2d557f1b969c3ba25b694
460d99ad346d0921a3346060dff224cda8d59425
greenpipig/leetcode
/7. 整数反转-easy.go
Go
go
697
no_license
package main import ( "math" "strconv" ) //整数反转第7题,值得学习的是平方运算 func reverse(x int) int { judge := false if x < 0 { x = -x judge = true } stra := strconv.Itoa(x) revse := func(a string) int { strrevse := "" for i := 0; i < len(a); i++ { strrevse += string(a[len(a)-1-i]) } inta, _ := strconv.Atoi(s...
0b3e5e2e87f018a78adbd2e9c2012b0b36fd7805
4c41dfc7f61f0c6a82f49acd81c3704257ee6a12
affilares/dalfox
/pkg/server/model.go
Go
go
422
permissive
package server import "github.com/hahwul/dalfox/pkg/model" // Req is struct of request type Req struct { URL string `json:"url"` Options map[string]interface{} `json:"options"` } // Res is struct of response type Res struct { Code int `json:"code"` Msg string `json:"msg"` Data []model.Issue `json:"data"` } //...
a6ef0beac6db454e423777455f61c9afeda77003
93cbe7479736c19661b1d25240ddb97dec79bf24
pyhuo/tidb
/planner/core/physical_plans.go
Go
go
36,065
permissive
// Copyright 2016 PingCAP, Inc. // // 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 // // Unless required by applicable law or agreed to i...
c792ce83a850c481ab03e26afd864397aab9c276
39c7a492b58fdda525569c8f2b0ebb4258bd739c
fcorrea/tilt
/internal/hud/server/server_test.go
Go
go
8,331
permissive
package server_test import ( "bytes" "fmt" "net/http" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" "github.com/windmilleng/tilt/internal/assets" "github.com/windmilleng/tilt/internal/engine" "github.com/windmilleng/tilt/internal/hud/server" "github.com/windmilleng/tilt/internal/sail/cl...
60e4341b0f5d99e8c3e4ddfa0b63991397a32b17
cc2c16bf11d426f6f690096425df26690b48cbc4
skhan-anjum/ODIM
/svc-api/models/version.go
Go
go
728
permissive
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP // //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 // //Unless required by a...
43afbffc347f75bc449a837ca58448da1a1e6bc7
6137e18328f40d461e946876cb235f7f27c768be
bogdandrutu/opentelemetry-collector-contrib
/receiver/postgresqlreceiver/integration_test.go
Go
go
5,435
permissive
// Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 //go:build integration // +build integration package postgresqlreceiver import ( "context" "net" "path/filepath" "testing" "time" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" "github.com/test...
b44148d77cfb002286064c387668ee957b79eb39
b5dc7238b1cb2dbe006dc1c95f2ff347d13873f3
DigitalDataPlatform/groups-api
/api/router/groupRouter.go
Go
go
2,402
no_license
package router import ( "net/http" "github.com/apex/log" "github.com/go-chi/chi" "github.com/go-chi/render" ddpportal "gitlab.adeo.com/ddp-portal-api" repository "gitlab.adeo.com/ddp-portal-api/api/repository" ) type GroupRequest struct { *ddpportal.Group `json:"group"` User string `json:"user,om...
af617ecffc03562d68a569e7264b7c50329f8ad1
550c070266c10be28155130e4d42ed3f5c35e5e2
i3h/leetcode
/p23-merge-k-sorted-lists/merge.go
Go
go
1,282
no_license
package main type ListNode struct { Val int Next *ListNode } func mergeKLists(lists []*ListNode) *ListNode { head := &ListNode{ Val: 0, Next: nil, } //fmt.Println("head: ", head) q := head pList := make([]*ListNode, len(lists)) for i := 0; i < len(pList); i++ { pList[i] = lists[i] //fmt.Println(pLis...
f91976d2ebdaab46242990f14615d114d506c029
7cfb7d0e2b14c42f7621155004a3eb3848b079c8
chxchx/mixer
/pkg/config/store/convert_test.go
Go
go
2,809
permissive
// Copyright 2017 Istio Authors // // 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 // // Unless required by applicable law or agreed to i...
3d40e677c5bfffd46bd6ca6378eede7ad26c194a
f27e81ff05a35454dda28b5604776206cb779368
greydog8/serve
/serve.go
Go
go
432
no_license
package main import ( "log" "net/http" "os" ) func serve(w http.ResponseWriter, r *http.Request) { file := "www" + r.URL.Path http.ServeFile(w, r, file) log.Print(file) } func main() { var port = ":8039" if len(os.Args) == 2 { port = ":" + os.Args[1] } log.Print("SERVING www on" + port) http.HandleFun...
8a63bf0cebea51e4009a1727a5021417a8ab324d
c8062ce128b57ac986086e722888be7eb63af0d1
thanhtv-diqit/tbox_backend
/src/repository/user_token_repo.go
Go
go
2,157
permissive
package repository import ( "encoding/json" "fmt" "tbox_backend/src/common" "tbox_backend/src/entity" dl "tbox_backend/src/repository/data_layer" "github.com/globalsign/mgo" "github.com/globalsign/mgo/bson" "github.com/gomodule/redigo/redis" ) type IUserTokenRepo interface { GetTokenByUserID(string) (entit...
ea6d07275c4c068e1dcffa16d7ba9fc5494a4d40
4ab3f8f2319b8453b2e194aa96278cdd6ae411a0
luscinia/minio
/cmd/update-main.go
Go
go
12,265
permissive
/* * Minio Cloud Storage, (C) 2015, 2016, 2017 Minio, Inc. * * 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 * * Unless required by a...
61539c32ff9de57b5d9bf40c3d5e4075d159d289
8730a6876ab9a23edcf007cc6bbf565f566c6b05
kylelemons/adventofcodesolutions
/2021/day05/day05_test.go
Go
go
3,671
no_license
// Copyright 2021 Kyle Lemons // // 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 // // Unless required by applicable law or agreed to in ...
289e6fdc3af20612ba32fdfd46af5da4d761c661
5f83f700a733e2085ecf522dbc5b3e8f8e247366
frankh/arachnacoin
/node/node.go
Go
go
6,889
no_license
package node import ( "bufio" "bytes" "encoding/json" "github.com/frankh/arachnacoin/block" "github.com/frankh/arachnacoin/store" "log" "net" "strings" "time" ) type Message struct { Type string `json:"type"` } type MessageBlock struct { Type string `json:"type"` Block block.Block `json:"block"` } ...
28c49255d6e2c0fe158de7d734c16213f1642698
511bf8bb5de18eb9df4bc6d16bb678f332a785d0
henderjon/checkstyle
/cmd/chksutil/main.go
Go
go
388
permissive
package main import ( "context" "flag" "os" "github.com/google/subcommands" ) func main() { subcommands.Register(subcommands.HelpCommand(), "") subcommands.Register(subcommands.FlagsCommand(), "") subcommands.Register(subcommands.CommandsCommand(), "") subcommands.Register(&DiffCmd{}, "") flag.Parse() ct...
03a6f6cc4a07c373f07d413572da00587e67b702
3311caf03cddf6485674c572b900d895550a90ca
kiran-113/compute-image-tools
/cli_tools/gce_ovf_export/exporter/instance_export_cleaner.go
Go
go
4,732
permissive
// Copyright 2020 Google Inc. All Rights Reserved. // // 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 // // Unless required by appl...
123bf2f8ae9853dbeffe98977a098535a103c9b7
08b0f2338c875b63d6a43564afb388a3a022f391
JamesStewy/envconfig
/field.go
Go
go
5,536
permissive
package envconfig import ( "bytes" "fmt" "os" "reflect" "sort" "strings" "unicode" ) // Field represents a single field in a configuration struct. type Field struct { name fieldName value reflect.Value strValue string customName string defaultVal string note ...
75624418ff907ad29edec258ea4a5417fe448b16
2bf83898a508e5f823cbada70a3b7cfdefb56fc6
jstockall/microservices-docker-go-mongodb
/bookings/main.go
Go
go
420
no_license
package main import ( "log" "net/http" "github.com/mmorejon/cinema/common" "github.com/mmorejon/cinema/bookings/routers" ) // Entry point for the program func main() { // Calls startup logic common.StartUp() // Get the mux router object router := routers.InitRoutes() server := &http.Server{ Addr: com...
b03270643e6bfda171c013a7b9dbdba79283758d
203254fe0083d2867c9471bb4b74fe95835c1552
eandre/engi
/level.go
Go
go
1,970
permissive
package engi import "image/color" type Level struct { Width int Height int TileWidth int TileHeight int Tiles []*tile LineBounds []Line Images []*tile } func (lvl *Level) Render(b *Batch, render *RenderComponent, space *SpaceComponent) { for _, img := range lvl.Images { if img.Image != n...
6c6bbb9ddb75207dfe7518acb315c5e1061fa64b
b081267c37d1fd4ec264a113b33c5c144ff943ba
arttor/helmify
/pkg/processor/pod/pod.go
Go
go
8,514
permissive
package pod import ( "fmt" "strings" "github.com/arttor/helmify/pkg/cluster" "github.com/arttor/helmify/pkg/helmify" securityContext "github.com/arttor/helmify/pkg/processor/security-context" "github.com/iancoleman/strcase" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s....
af4b928cc1217d3e9e8a7863345134162888f600
42fcae5d945e9868f1ffbde2870713406bd2fa5e
mehulsbhatt/serviced
/zzk/service/lock.go
Go
go
2,337
permissive
// Copyright 2015 The Serviced Authors. // 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 // // Unless required by applicable law or agreed...
186f181d40eb0ec69165b3cb7c0a7970ea839976
7f8856797f91fcb29208e9844d72e7224bf54fdb
wajika/v2ray-core
/common/protocol/command.pb.go
Go
go
4,426
permissive
package protocol import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import serial "v2ray.com/core/common/serial" import internet "v2ray.com/core/transport/internet" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ =...
c9e41580a3ff56578a2043a0e1c8764959f25ef0
a533b3e34e0958354414dcf71e2dcf8677423ae3
Majornevermore/SecondKill
/pkg/discover/discovery_client.go
Go
go
692
no_license
package discover import ( "SecondKill/pkg/common" "github.com/go-kit/kit/sd/consul" "github.com/hashicorp/consul/api" "log" "sync" ) type KitDiscoveryClient struct { Host string // Host Port int // Port // 连接 consul 的配置 config *api.Config client consul.Client mutex sync.Mutex // 服务实例缓存字段 instancesM...
165284dbe07031a8b3b05615966a9989d0083003
40873faa43d3883f34dd8078dd36a3887a84de17
OyutianO/arena
/pkg/operators/volcano-operator/client/clientset/versioned/typed/batch/v1alpha1/batch_client.go
Go
go
2,542
permissive
/* Copyright 2019 The Kubernetes Authors. 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 Unless required by applicable law or agreed to in writing, ...
0cf166855e79b0da449b4d4d2586503c82c87d3a
98557ed6b00c7f811b614707ef6cdf84b4819e3b
ackleymi/traderui
/vendor/github.com/quickfixgo/fixt11/trailer.generated.go
Go
go
1,612
permissive
package fixt11 import ( "github.com/quickfixgo/field" "github.com/quickfixgo/quickfix" "github.com/quickfixgo/tag" ) //Trailer is the fixt11 Trailer type type Trailer struct { *quickfix.Trailer } //SetCheckSum sets CheckSum, Tag 10 func (t Trailer) SetCheckSum(v string) { t.Set(field.NewCheckSum(v)) } //SetSig...
b37e014d5791bbb1c3230bf3039e856e30b8e454
c7d1325cb7aed93faf9175253e7a9cba896c6012
isgasho/Gochat
/src/gochat/events.go
Go
go
10,529
permissive
package gochat import ( "strings" "fmt" "time" "gochat/utils" ) // 事件类型 type EventType int const ( _ EventType = iota GEN_UUID_EVENT // 生成Uuid SCAN_CODE_EVENT // 已扫码,未确认 CONFIRM_AUTH_EVENT // 已确认授权登录 LOGIN_EVENT // 已登录 INIT_EVENT // 初始化完成 CONTACTS_INIT_EVENT // 联系人初始化完 LISTEN_FAILED_EVENT //...
99b68a36efc9ea18f7c7ae0e084e5df0cb16e106
66fc90d29a9e1aef664713760ca52b930eba3afb
dinosk/go-git-providers
/gitprovider/types_validation_test.go
Go
go
4,009
permissive
/* Copyright 2020 The Flux CD contributors. 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 Unless required by applicable law or agreed to in writing...
71f067fe52595a19782f1e76dc33174ccb511ce7
a1d57f8ac74b5a02d1939a645804a77b6a2ee8d2
hypernova-za/hcpb
/hcpb.go
Go
go
2,008
no_license
package hcpb import ( "fmt" "math" "strconv" "time" ) const ( pieces = 40 refresh = 0.2 ) type ProgressBar struct { started time.Time max int pos int lastDraw time.Time longestLine int } func (b *ProgressBar) Inc() { b.pos += 1 b.draw() } func New(max int) *ProgressBar { b := &Progr...
50210ca7e9122931b1e4955b3b152a73d10eed5f
7c8cfebc659652f0b173d701d1858ce1bda1fff5
tawawhite/immudb
/cmd/immutest/immutest.go
Go
go
907
permissive
/* Copyright 2019-2020 vChain, Inc. 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 Unless required by applicable law or agreed to in writing, software ...
8acb21ea66306f956514304c86ec438542ed804e
ae41311d9c73b15f604be2d568de34574e68b960
Qjawko/div-01
/ztail/ztail.go
Go
go
3,127
no_license
package main import ( "fmt" "io/ioutil" "os" student ".." ) func main() { args := os.Args[1:] if student.StringArrLen(args) == 0 { ioutil.ReadAll(os.Stdin) defer os.Stdin.Close() } if contains(args, "-c") { if student.StringArrLen(args) == 3 { nbr, tailErr := Atoi(args[1]) //kolvo symbols kototrie ...
d3a0c94ab88be699adb5f75c92ed6b00560230ac
b8e692cda9c891db0d5ca4c0b13a401750ab22f5
x0me/sealms-cli
/main.go
Go
go
640
no_license
/* Copyright © 2020 Sealms 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 Unless required by applicable law or agreed to in writing, software distribut...
8326beeacd6f616ce6973926f1d029a1cf7f4c35
c735e5161b4ccb8d9738b4827795fd1f3a9251f6
m1093782566/kubernetes
/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go
Go
go
3,601
permissive
/* Copyright 2016 The Kubernetes Authors. 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 Unless required by applicable law or agreed to in writing, ...
6c575cbbc15c3c65911d55a6277635cb17f5ed55
89d3b841029a62bde544c5159cc304a438f8fdb1
guzhongzhi/esp8266-mqtt-client
/pkg/server/http.go
Go
go
7,250
no_license
package server import ( "camera360.com/tv/pkg" app2 "camera360.com/tv/pkg/app" "camera360.com/tv/pkg/dto" "encoding/json" "fmt" "github.com/gorilla/mux" "io/ioutil" "log" "net/http" "os" "path/filepath" "strings" "time" ) func appByRequest(writer http.ResponseWriter, request *http.Request) *pkg.App { r ...
a91aade72e0105a6a3399a8a81e21ca0bff3e07d
6e713318e54b2fb528575b80441f3f494cc27e64
ollien/advent-of-code-2018
/day1/part1/main.go
Go
go
544
permissive
package main import ( "fmt" "io/ioutil" "os" "strconv" "strings" ) func main() { if len(os.Args) != 2 { fmt.Println("Usage: ./main in_file") return } inFile := os.Args[1] inFileContents, err := ioutil.ReadFile(inFile) if err != nil { panic(err) } rawNums := strings.Split(string(inFileContents), "\n...
a233f135efd13787185fffb3f2734bdc14103851
c4de5b3007e59bbd988abbf581b02ea7c61a6e7e
acetnis/golang-book
/chapter13-13/main.go
Go
go
237
no_license
package main import "fmt" func main() { ch := make(chan int) //ch := make(chan int, 2) // Fix by use buffered channel go func() { ch <- 1 }() go func() { ch <- 2 }() go func() { ch <- 3 }() fmt.Println(<-ch) fmt.Println(<-ch) }
ac9f444561609b4eb49f43673424a763c6d9ea4c
c6e25c1a64f6f7d970c43bbb0014c89f0364ce3a
12441409/serverinfo
/getinfo.go
Go
go
3,320
no_license
package main import ( "fmt" "os" "os/exec" "strings" "net" ) func GetServerInfo() { var ip []byte var err error var cmd *exec.Cmd var s string // 执行单个shell命令时, 直接运行即可 cmd = exec.Command("/bin/sh", "-c", `dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product|Serial"|tr -d "\t"`)...
11388a81c00e29f126ace8d2e5f3f31d3578df81
fcbb957bd93f98a6228cdd78417e5a79f91ead4b
xiaojun207/nacos-sdk-go
/clients/naming_client/naming_client.go
Go
go
9,679
permissive
/* * Copyright 1999-2020 Alibaba Group Holding Ltd. * * 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 * * Unless required by applica...
28768db64eda6b78aa3fcba086e329b6d66c4b8d
523c64b35e107c010bac3349528d846fbb0db454
aricd/completion
/content/validate_test.go
Go
go
2,182
permissive
package content import ( "testing" ) type test struct { data interface{} expectError bool } var tests = []test{ {File{}, true}, {&File{}, true}, {&File{Contents: "Something"}, true}, {&File{Name: "Something"}, false}, {&File{Name: "Something", Contents: "Something"}, false}, {&SourceLocation{}, true}...
424a8febb52cae173d45b1149663b0b90dd704c9
e23beb44298ad58c712e8104c5f6800883d2ebeb
aiman-zaki/go_attrio_http
/wrappers/json.go
Go
go
320
no_license
package wrappers import ( "encoding/json" "net/http" ) //JSONDecodeWrapper : decode any models to json func JSONDecodeWrapper(w http.ResponseWriter, r *http.Request, data interface{}) { err := json.NewDecoder(r.Body).Decode(&data) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return } }
038b20442552da036af9bef8ba73dd8067f5edf9
9a36dc2ecf288c6564af363d9e15a09e80634e4d
alanding1989/Java-demos
/1.Java基础-demo/learn-go/algorithm/sort.go
Go
go
759
no_license
package algorithm import ( "fmt" "sort" ) func PrimitiveSort() { strs := []string{"c", "a", "b"} sort.Strings(strs) fmt.Println("Strings: ", strs) ints := []int{7, 2, 4} sort.Ints(ints) fmt.Println("Ints: ", ints) s := sort.IntsAreSorted(ints) fmt.Println("Sorted: ", s) } //...
5fa55f9a4f00f09d5942e506962dea5dfa5e0a7f
0b3b72a5c6820e9e7b6589b73256a2b3a0e76531
Jorduque16/subcommander
/internal/executor_test.go
Go
go
5,634
no_license
package internal import ( "encoding/json" "testing" "github.com/sirupsen/logrus" "github.com/sirupsen/logrus/hooks/test" "github.com/stretchr/testify/assert" ) func toMap(f logrus.Fields, n string) logrus.Fields { return f[n].(logrus.Fields) } func Test_exec_ok(t *testing.T) { logger, hook := test.NewNullLog...
e3c053db7d16c14d7487b3942f273bf3b125a0fe
18ed5fc4e21b6894feebbeb30a284710fb6ce012
1and1/bosh-oneandone-cpi
/registry/agent_settings.go
Go
go
4,771
permissive
package registry import "encoding/json" const defaultSystemDisk = "/dev/sda" const ephemeralSystemDisk = "/dev/sdb" type agentSettingsResponse struct { Settings string `json:"settings"` Status string `json:"status"` } // AgentSettings are the Agent settings for a particular VM. type AgentSettings struct { // A...
62f5a52925fe1c027434b26b8e10373d67ef59c4
cb32a779713a2ed3b938a09ae128aca40f947b08
zzheffn/m3
/src/m3ninx/index/segment/fst/options.go
Go
go
3,734
permissive
// Copyright (c) 2018 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
7550feb0fe8d56b8cb7f8b45811e8c07b4b9f7d7
89795af4d9e580fb5354d9f11a84a634dcde4429
kfsone/findupe
/main.go
Go
go
6,507
no_license
package main // Looks for duplicate files under a given path. // // see args.go for command line arguments. import ( "crypto/md5" "crypto/sha512" "encoding/hex" "fmt" "hash" "io" "log" "os" "path/filepath" "strings" "sync" flag "github.com/spf13/pflag" ) // FileHash is a response to and request for fil...
1794b94c7626696aa5ca5e01f59c8fdfe328073b
e79cbb5f19e3923fd8d8fc881f70fba5e7e5a8c2
JoelSpeed/cluster-api-provider-azure
/controllers/azuremachine_controller_test.go
Go
go
1,570
permissive
/* Copyright 2019 The Kubernetes Authors. 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 Unless required by applicable law or agreed to in writing, ...
45ab209b612520c2c9d3599576b5023a75ea09a4
c19ab63975d30c388927c69e838f6cea7066d3dd
kernt/kiali
/tests/data/service_data.go
Go
go
1,072
permissive
package data import ( "github.com/kiali/kiali/kubernetes" "github.com/kiali/kiali/models" ) func CreateFakeServiceList(serviceNames []string, namespace string) models.ServiceList { serviceList := models.ServiceList{ Services: []models.ServiceOverview{}, } for _, sName := range serviceNames { serviceList.Serv...
e58959502c217a890e00f9d1de33fa325ff33da9
e1b12084a6223213dbb1ab97b6f4ebc61a65dfe9
gabstv/godot-go
/godot/visualshadernodevectorop.gen.go
Go
go
3,700
permissive
package godot import ( "github.com/gabstv/godot-go/gdnative" ) /*------------------------------------------------------------------------------ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Any updates should be don...
f0330d011408106a6b6272529fd7be5431bd8d96
cc6c025b9822d85639024c502676955a35296770
OpenTrustGroup/fuchsia
/garnet/public/lib/component/go/src/app/context/io.go
Go
go
11,392
permissive
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package context import ( "bytes" "encoding/binary" "fmt" "io" "runtime" "strings" "syscall" "syscall/zx" "syscall/zx/fdio" "syscall/zx/fidl" "u...
6eacee89ae83292be5b12ade96a008d5bbb92089
c3f76eb5d6cc94f735275366c6d268e7493c7016
beme/abide
/example/main.go
Go
go
1,516
permissive
package main import ( "encoding/json" "net/http" "strconv" "time" "github.com/beme/abide/example/models" ) func firstHandler(w http.ResponseWriter, r *http.Request) { data := map[string]string{ "foo": "bar", } body, err := json.Marshal(data) if err != nil { http.Error(w, err.Error(), http.StatusInterna...
1d863bb6426fc42454a51a7f6f783ba60b5bd2d6
358fb587e290d412149b94f640a61a873d932ced
NyaMisty/overture
/core/outbound/clients/remote.go
Go
go
2,903
permissive
/* * Copyright (c) 2019 shawn1m. All rights reserved. * Use of this source code is governed by The MIT License (MIT) that can be * found in the LICENSE file.. */ // Package outbound implements multiple dns client and dispatcher for outbound connection. package clients import ( "github.com/miekg/dns" log "github...
20f84de5e7e57d7a76ed3241947d1ade7f9950dc
0567a2fe9c038539f44ed94357a4d242ba3ced38
ninjayoto/syndesis
/install/operator/pkg/syndesis/upgrade/migrations.go
Go
go
4,964
permissive
/* * Copyright (C) 2019 Red Hat, Inc. * * 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 * * Unless required by applicable law or agreed t...
a1c52c5bdb40628dc1534c52b02539a8dbea9008
6562e8ff999e355f65a8c611f99790dc4266f5cb
microsoftgraph/msgraph-beta-sdk-go
/drives/item_items_item_workbook_functions_gamma_inv_post_request_body.go
Go
go
9,344
permissive
package drives import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" ie8677ce2c7e1b4c22e9c3827ecd078d41185...
84a3d93921509da336f7e096ec8b548f1680e0e2
1a95df76007053dba0b329b70c0273b62a51e637
bububa/opentaobao
/model/nazca/AlibabaNazcaAuthChangeauthapplyCallbackAPIRequest.go
Go
go
1,916
permissive
package nazca import ( "net/url" "github.com/bububa/opentaobao/model" ) // AlibabaNazcaAuthChangeauthapplyCallbackAPIRequest 变更认证回调 API请求 // alibaba.nazca.auth.changeauthapply.callback // // 变更认证回调 type AlibabaNazcaAuthChangeauthapplyCallbackAPIRequest struct { model.Params // 变更认证回调参数 _paramChangeAuthCallBackD...
2361524eeddfe87b4d8e4da655232be872a7d8fb
dda0cd00163f735a1f8211279721b7cc1712cd96
cyrilhl/aries-framework-go
/pkg/crypto/tinkcrypto/primitive/composite/ecdhes/subtle/ecdhes_concatkdf_kw_test.go
Go
go
1,586
permissive
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package subtle import ( "testing" hybrid "github.com/google/tink/go/hybrid/subtle" commonpb "github.com/google/tink/go/proto/common_go_proto" "github.com/google/tink/go/subtle/random" "github.com/stretchr/testi...
fca7cace31368b5581f98aa81bd8e3420f992852
a56ec0688123f58e2381fb65d8d59b654bb6859f
gashcrumb/camel-k
/pkg/trait/deployment.go
Go
go
5,317
permissive
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this fi...
f3bb0f866e0a4b022f3ab81f7ccc3548832094cd
c801ef3548e076eaa69d40f7971cb6f1cfaca87e
glowatsk/go-practice
/cyoa/cmd/main.go
Go
go
2,325
no_license
package main import ( "flag" "fmt" "html/template" "log" "net/http" "os" "strings" cyoa "github.com/glowatsk/go-projects/go-practice/cyoa/tmp" ) func main() { port := flag.Int("port", 3000, "the port to start the CYOA web application on") filename := flag.String("file", "gopher.json", "the JSON file with t...
fbc70e191d736f3fdf72fd3072918b24238f6fc7
15b8fcadb646c3b253bd452c05c1dfd931497048
storagebits/cds
/engine/api/authentication/session_test.go
Go
go
1,228
permissive
package authentication_test import ( "context" "testing" "time" jwt "github.com/dgrijalva/jwt-go" "github.com/go-gorp/gorp" "github.com/stretchr/testify/require" "github.com/ovh/cds/engine/api/authentication" "github.com/ovh/cds/engine/api/bootstrap" "github.com/ovh/cds/engine/api/test" "github.com/ovh/cds...
7a287fe481936c5619b548f4e7076be3af6935a3
ede9dface655b4307670925ecb4c1ae2c1725c6f
mahmali/dbDeneme
/main.go
Go
go
355
no_license
package main import ( "fmt" "time" ) type User struct { Name string Age int Birthday time.Time } func main() { var user []User db.Find(&user) //db deki verileri getirme işlemi yapıyor db.First(&user) // db deki ilk eşleşen veriyi gettirir for index, usercik := range user { fmt.Println(index, us...
6caf574444b5cefaa0a9f516c788e8db41068a2b
0eeba303ad4b41051d84e9a12b13eabb518d1e8b
MoreBlue/steins-gate-visitor-count
/main.go
Go
go
1,293
permissive
package main import ( "bytes" "github.com/labstack/echo" "github.com/labstack/echo/middleware" "image" "image/png" "log" "net/http" "os" "time" ) func main() { port := os.Getenv("port") if port == "" { port = "8080" } digits := make([]image.Image, 10) cacheImages(&digits) e := echo.New() e.Use(mid...
d1ea64d1812cac6f44dbc73408bf0d8c269dedda
38befc3ba9dc58b5552a595d2a2d34f7d63b7983
hei6775/GoLeafServer
/LeafNotes/leafreadfile/readfile.go
Go
go
5,223
permissive
package Rf import ( "encoding/csv" "encoding/json" "errors" "fmt" "os" "reflect" "strconv" ) //leaf框架配置读取修改 var Comma = ',' var Comment = '#' type Index map[interface{}]interface{} type RecordFile struct { Comma rune Comment rune typeRecord reflect.Type records []interface{} indexes []In...
b5381a7a1c4a1b1f13da00fb95104dd54d9fc623
3ae0b6c037af6144b0a337438314ff7fd85ff270
5l1v3r1/Mirai-Botnet-fixed-
/loader/cnc/main.go
Go
go
2,092
no_license
package main import ( "fmt" "net" "errors" "time" ) const DatabaseAddr string = "127.0.0.1:3306" const DatabaseUser string = "root" const DatabasePass string = "Admin@123" const DatabaseTable string = "Hilix" var clientList *ClientList = NewClientList() var database *Database = NewDatabase(Dat...
2d08f59e6b77cf15ad72983bfe4f621ae2a6f66a
1f042bd024155d4c5afc902a1356f35cad38ae0e
samuel-soubeyran/vstore
/repo.go
Go
go
5,589
no_license
package main import ( "encoding/json" "fmt" "github.com/samuel-soubeyran/gojsonpointer" "gopkg.in/src-d/go-git.v4" "gopkg.in/src-d/go-git.v4/plumbing/object" "io/ioutil" "log" "os" "path/filepath" "time" ) const ( REPO_FOLDER_NAME = "repo" STORE_FOLDER_NAME = "store" AUTHOR_NAME = "vstore" AUTHOR...
0337edad3aed2ee2a6149fdfeb6ab57ccd0cca6a
bda730603bd073dec6dad6fbe5a58f4d43102b0a
okteto/okteto
/pkg/cmd/build/buildkit.go
Go
go
9,859
permissive
// Copyright 2023 The Okteto Authors // 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 // // Unless required by applicable law or agreed to in ...