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
50e2f86145c25972b9145717a4dec99a8874be5b
98f8fee556c2b8f7eda80bf25b775b5836fddb66
atlassion/zgrab2
/modules/banner/scanner.go
Go
go
6,370
permissive
// Package banner provides simple banner grab and matching implementation of the zgrab2.Module. // It sends a customizble probe (default to "\n") and filters the results based on custom regexp (--pattern) package banner import ( "bytes" "encoding/base64" "errors" "fmt" "github.com/Positive-Engineer/zgrab2" "io"...
add560657ba57875c832ea39f149d8966f002188
aece06c6157518385c9dc000bd86367b415ccb54
muharihar/oci-go-sdk
/dts/multiple_transfer_devices.go
Go
go
845
permissive
// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
412fd964bf96f9dacc04f9a30bf0cf188dc86736
a760d0362c52afb88437c5c5431412edb2673ba6
fdhex/telegraf
/plugins/inputs/nats_consumer/nats_consumer.go
Go
go
3,947
permissive
package natsconsumer import ( "fmt" "log" "sync" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/plugins/inputs" "github.com/influxdata/telegraf/plugins/parsers" "github.com/nats-io/nats" ) type natsError struct { conn *nats.Conn sub *nats.Subscription err error } func (e natsError) Err...
d9a34785b6c8d524643466bf2d068990652dd467
1cea40ec0fc2336364bf24918e7880b8ecfbaba6
LuxorLabs/Hyperspace
/node/api/wallet_test.go
Go
go
42,499
permissive
package api import ( "encoding/json" "fmt" "net/url" "os" "path/filepath" "testing" "time" "github.com/HyperspaceApp/Hyperspace/build" "github.com/HyperspaceApp/Hyperspace/crypto" "github.com/HyperspaceApp/Hyperspace/modules" "github.com/HyperspaceApp/Hyperspace/modules/consensus" "github.com/HyperspaceAp...
43d1bf46004d3cbb878452ae8a65b8883b6143eb
db4b08381928661320822ffd2e489b0a9f2d3fca
3115826227/baby-fried-rice
/internal/pkg/module/accountDao/db/init_test.go
Go
go
1,933
no_license
package db import ( "baby-fried-rice/internal/pkg/kit/constant" "baby-fried-rice/internal/pkg/kit/db" "baby-fried-rice/internal/pkg/kit/db/tables" "baby-fried-rice/internal/pkg/kit/handle" "baby-fried-rice/internal/pkg/kit/models" "strconv" "testing" "time" ) func TestInitDB(t *testing.T) { var conf = models...
fee441fe1258ebb6605ef9956f8370a2bd308a3b
1b2e0fda9858f6b9c6c6003fe4c99478c9a7f886
woniupapa/direktiv
/pkg/dlog/db/handler.go
Go
go
3,670
permissive
package db import ( "context" "database/sql" "encoding/json" "fmt" "strings" "sync" "time" "github.com/inconshreveable/log15" ) type Handler struct { db *sql.DB args *HandlerArgs queueMutex sync.Mutex logQueue chan *log15.Record queuedLogs []log15.Record closed chan bool } type Han...
1277887d901f4e77ba691a9106e9763423bbc8fb
69ef64d405959cb171094e91cc19d926f3f99d10
delta94/ping-service
/benchmark/boomer.go
Go
go
1,861
no_license
package benchmark import ( "github.com/myzhan/boomer" log "github.com/sirupsen/logrus" ) const PING = "ping" var managerClient *ManagerClient //BoomerClient boomer client type BoomerClient struct { } //LoadManagerClient load manager client func (boomerClient *BoomerClient) LoadManagerClient(manager *ManagerClien...
c5431808f7c9313be3f99775e41d3392b3fec267
91ec1da21a61393d182a91f4cf1bf94945c94ca2
frank-spec/sourcegraph
/cmd/frontend/graphqlbackend/search_pagination.go
Go
go
22,100
permissive
package graphqlbackend import ( "context" "fmt" "sort" "sync" "time" "github.com/graph-gophers/graphql-go" "github.com/graph-gophers/graphql-go/relay" "github.com/inconshreveable/log15" otlog "github.com/opentracing/opentracing-go/log" "github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/graphqlu...
d54e1d3984287851abe2e5de1199034c9606bf5a
31a41af1ed5f71b879b68a75c0efeb69bb6edbcd
hanlsin/coinstackd
/btcd.go
Go
go
6,298
permissive
// Copyright (c) 2016 BLOCKO INC. // Copyright (c) 2013-2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package main import ( "fmt" "log" "net" "net/http" _ "net/http/pprof" "os" "runtime" "runtime/debug" "runtime/pprof" "githu...
7f821fabe3b2fbaa13c49e1ecc13a01094d0df36
b4d54803cbed4719f533788f0abd8fbec1aa7a7e
hiroebe/rosgo
/ros/master.go
Go
go
1,184
permissive
package ros import ( "fmt" "github.com/fetchrobotics/rosgo/xmlrpc" ) func callRosApi(calleeUri string, method string, args ...interface{}) (interface{}, error) { result, err := xmlrpc.Call(calleeUri, method, args...) if err != nil { return nil, err } var ok bool var xs []interface{} var code int32 var mes...
6f9c94a3eb417e49ff1055d8b1f7da2c5f62a165
d8769f23a91860356c6392633f017a3617d67054
nickbruun/gocommons
/zkutils/event_multiplexer.go
Go
go
1,087
permissive
package zkutils import ( "github.com/samuel/go-zookeeper/zk" "sync" ) var ( eventMultiplexerSubscriberBuffer = 16 ) // Event multiplexer. type EventMultiplexer struct { in <-chan zk.Event outs []chan zk.Event lock sync.Mutex } // New event multiplexer. func NewEventMultiplexer(eventChan <-chan zk.Event) *Ev...
d9ad9305375414fae4923e7b4a4e32bbc997090e
1035c9cc77bf6d317eb1fa800d42414016dab9ea
ian-mi/sdk-go
/v2/protocol/kafka_sarama/sender.go
Go
go
1,640
permissive
package kafka_sarama import ( "context" "github.com/Shopify/sarama" "github.com/cloudevents/sdk-go/v2/binding" ) // Sender implements binding.Sender that sends messages to a specific receiverTopic using sarama.SyncProducer type Sender struct { topic string syncProducer sarama.SyncProducer transformers...
18698477c2f0ed28b9a9b197d6e8df1286725b31
285236c38a525f435a302d500d3aba1a20202657
exchideas/TiDB-for-PostgreSQL
/executor/batch_checker.go
Go
go
6,021
permissive
// Copyright 2018 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...
837a6aad47f4320a76dcfe3219e6a3127d4057f8
6c6eadc8b538443b19bd2689a8e82d85887a6a67
wo4zhuzi/htdf
/x/crisis/keeper.go
Go
go
1,057
permissive
package crisis import ( sdk "github.com/orientwalt/htdf/types" "github.com/orientwalt/htdf/x/params" ) // Keeper - crisis keeper type Keeper struct { routes []InvarRoute paramSpace params.Subspace distrKeeper DistrKeeper bankKeeper BankKeeper feeCollectionKeeper FeeCollectionKeeper } // ...
862436ea0232ac1ede25ae267f796074e9bc7fa8
8444cd7840011210715df5ce6e65e2dd09669566
duda/kubernetes
/pkg/api/validation/validation_test.go
Go
go
78,142
permissive
/* Copyright 2014 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 applicable law or agreed to in ...
b7e7999070b75a9eca0c134f5c05cb8885760e19
fb9cbe2f6e7f623cbd8557c80a88173927d98465
cjoster/origin
/vendor/github.com/openshift/imagebuilder/dispatchers.go
Go
go
15,154
permissive
package imagebuilder // This file contains the dispatchers for each command. Note that // `nullDispatch` is not actually a command, but support for commands we parse // but do nothing with. // // See evaluator.go for a higher level discussion of the whole evaluator // package. import ( "flag" "fmt" "os" "path/fil...
1220908bbc258dd24b8cf9260bf736a31c21686c
0a84884141e6c87a81db8befd6afb4239ed2cc72
GeekyVenkat/Go-Apps
/Pointers/Sample/Pointer.go
Go
go
294
no_license
package main import "fmt" func main() { fmt.Println("") a := 42 fmt.Println(a) fmt.Println(&a) fmt.Printf("%T\n", a) fmt.Printf("%T\n", &a) b := &a fmt.Println(b) fmt.Println(*b) *b = 43 fmt.Println(a) fmt.Println(&a) fmt.Println(b) fmt.Println(*&a) }
fdc523ffeca02a14448e133640b983436f173793
c7ee29259e5adf617095c231084dfb2b3f4c104b
drobit/fargatecli
/cmd/lb_destroy.go
Go
go
905
permissive
package cmd import ( "fmt" "github.com/awslabs/fargatecli/console" ELBV2 "github.com/awslabs/fargatecli/elbv2" "github.com/spf13/cobra" ) type LoadBalancerDestroyOperation struct { LoadBalancerName string } var loadBalancerDestroyCmd = &cobra.Command{ Use: "destroy <load-balancer-name>", Short: "Destroy lo...
72b8c3332297d8216a5c000da0e9514d52504707
42112e337d0b6931e5e8748c003549b657cff040
mnzaki/perkeep
/pkg/blobserver/handlers/enumerate.go
Go
go
3,536
permissive
/* Copyright 2011 The Perkeep 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...
c16e933bbc38916cb389d0d4193e60d43b5618f4
3fa2b40ca34a3d4b972150da092de1058005d776
whip-networks/lambdarouter
/router.go
Go
go
4,266
permissive
package lambdarouter import ( "context" "encoding/json" "fmt" "net/http" "regexp" "strings" "github.com/aws/aws-lambda-go/events" "github.com/aws/aws-lambda-go/lambda" iradix "github.com/hashicorp/go-immutable-radix" ) // Router holds the defined routes for use upon invocation. type Router struct { events ...
18cdcf3e9384e9f83f0fbb7ecb7ab5da89a23b56
36323d68fa11b819d149b104cfdfc631fbaf1130
woohong666/aliyunpan
/aliserver/link/share115.go
Go
go
5,887
no_license
package link import ( "aliserver/aliyun" "aliserver/utils" "errors" "log" "net/url" "regexp" "strconv" "strings" "sync" "github.com/tidwall/gjson" ) /* File115Model {"fid":"1862054705834608552","uid":84855794,"cid":1861939744516982705,"n":"\u795e\u96d5.mkv","s":3284977491,"t":"1591990218","d":1,"c":0,"e":"...
01eaee264adbc964a05f4dcbd6507f6b5179bc13
089c50e62e2625e736e9077e82a844ad3e90513b
driusan/dgit
/zlib/reader.go
Go
go
5,017
permissive
// Copyright 2009 The Go 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 zlib implements reading and writing of zlib format compressed data, as specified in RFC 1950. The implementation provides filters that uncompress du...
5a4534892c08fa8fa8e0da4280a3f39b3a702a75
63f6d05c2071c29b3b2f1e12721c307ff4f499c9
OneOfOne/otk
/sched.go
Go
go
2,739
permissive
package otk import ( "context" "errors" "sync" "time" "golang.org/x/xerrors" ) type TaskFunc = func(ctx context.Context, t time.Time) error // ErrStopTask can be returned to stop the run loop var ErrStopTask = errors.New("STOP") func NewScheduler(pctx context.Context) *Scheduler { ctx, cfn := context.WithCan...
7aa98fc3abc80198700a7aa6d555c0920c854882
e6616aeb8f783a03c0a2ce51b19eaa8d3e25e0b6
alex-zissis/lstna
/gen.go
Go
go
268
no_license
//+build generate package main import "github.com/zserge/lorca" func main() { // You can also run "npm build" or webpack here, or compress assets, or // generate manifests, or do other preparations for your assets. lorca.Embed("main", "assets.go", "www/dist") }
5a3478cd69b44dd65009af742cf0625c30ca65aa
720a28c0654cff4e7bcc4d86c86b6a33f4ed60b5
chenpfeisoo/tencentcloud-sdk-go
/tencentcloud/cam/v20190116/models.go
Go
go
79,729
permissive
// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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 // ...
31d8cecc4e4329eafd412afcfcd4203f491fff00
479f190291e03c8d0995c94d9d09c773a07a14c2
FranklinHarry/devspace-cloud-plugin
/pkg/cloud/client/token_test.go
Go
go
3,409
no_license
package client import ( "context" "encoding/base64" "encoding/json" "net/http" "strings" "testing" "time" testconfig "github.com/devspace-cloud/devspace-cloud-plugin/pkg/cloud/config/testing" "github.com/devspace-cloud/devspace-cloud-plugin/pkg/cloud/config/versions/latest" "github.com/devspace-cloud/devspa...
fe2ad2100d7a01b8e8b1317aee2b558c887f878a
2b43d13a48912720aa513831404ffd2b84b4efad
v2pro/plz
/msgfmt/jsonfmt/level_0/error_test.go
Go
go
641
permissive
package test import ( "testing" "github.com/v2pro/plz/msgfmt/jsonfmt" "errors" "github.com/v2pro/plz/test" "github.com/v2pro/plz/countlog" "github.com/v2pro/plz/test/must" ) type testError struct { onePtr *int } func (err testError) Error() string { return "hello" } func Test_error(t *testing.T) { t.Run("p...
c433cd4c82324b192e986803ab78749a039d4816
1788f1122fc0ee9494489ef56fac39473cbbd99e
agurha/tunnel
/server/registry.go
Go
go
5,322
no_license
package server import ( "encoding/gob" "fmt" "net" "sync" "time" "github.com/agurha/tunnel/pkg/cache" "github.com/agurha/tunnel/pkg/log" ) const ( cacheSaveInterval time.Duration = 10 * time.Minute ) type cacheUrl string func (url cacheUrl) Size() int { return len(url) } // TunnelRegistry maps a tunnel UR...
9d5d3ae540a7664c2f58d379e4b1987d4bea2544
298621701e6d1a8d55ef5966854db024e6e64691
edulop91/go-sdk
/db/default.go
Go
go
926
permissive
package db import ( "sync" ) var ( defaultConnection *Connection defaultLock = sync.Mutex{} ) // SetDefault sets an alias created with `CreateDbAlias` as default. This lets you refer to it later via. `Default()` // // spiffy.CreateDbAlias("main", spiffy.NewDbConnection("localhost", "test_db", "", "")) // sp...
de948d5226711f0c5e04fb1f99e1e0c762dfa2ca
be04f508f8986820213dda4f10e39bf2bec699a3
catocodex/aingle-alpha
/plugins/webapi/info.go
Go
go
3,528
no_license
package webapi import ( "net/http" "time" "github.com/gin-gonic/gin" "github.com/iotaledger/iota.go/consts" "github.com/Ariwonto/aingle-alpha/pkg/config" "github.com/Ariwonto/aingle-alpha/pkg/metrics" "github.com/Ariwonto/aingle-alpha/pkg/model/tangle" "github.com/Ariwonto/aingle-alpha/plugins/cli" "github...
f589293860ff4593efd8ca860d12d3b830034fd5
d202ba11faa2e301b7987cb9370bdf781baaf26d
Laugusti/gopl
/ch12/exercise_12_6/cmd/main.go
Go
go
1,017
no_license
package main import ( "fmt" "log" "github.com/Laugusti/gopl/ch12/exercise_12_6" ) type Movie struct { Title, Subtitle string Year int Color bool Actor map[string]string Oscars []string Sequel *string } func main() { strangelove := Movie{ Title: "Dr. St...
ba1123ff30376c6f8c91b1d6498489783cd9e4d1
d7f1862647ebe466236b3b4ed9967769e21041e7
kaleb-wade-nc/gatekeeper
/vendor/github.com/open-policy-agent/frameworks/constraint/pkg/client/client_test.go
Go
go
20,388
permissive
package client import ( "context" "errors" "reflect" "testing" "text/template" "github.com/open-policy-agent/frameworks/constraint/pkg/client/drivers/local" "github.com/open-policy-agent/frameworks/constraint/pkg/core/templates" "github.com/open-policy-agent/frameworks/constraint/pkg/types" "k8s.io/apiextens...
331297eae7991374c99468e6216956c20c7bfefd
800582984f6a037d0583373271e0297314559736
scoury/LSP-Tool
/Server/utils/sshSessionManager.go
Go
go
5,403
no_license
/* Copyright 2016 Juniper Networks, Inc. All rights reserved. * Licensed under the Juniper Networks Script Software License (the "License"). * You may not use this script file except in compliance with the License, which is located at * http://www.juniper.net/support/legal/scriptlicense/ * Unless required by applic...
dd6afa49baca1f48b31b6cf89a2f643a85db6449
d8cb30216b43ecffe7aa65ee0509f731b2c49f8b
guozanhua218/aistore
/fs/mountfs.go
Go
go
28,502
permissive
// Package fs provides mountpath and FQN abstractions and methods to resolve/map stored content /* * Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved. */ package fs import ( "errors" "fmt" "math" "os" "path/filepath" "sync" "syscall" "time" "unsafe" "github.com/NVIDIA/aistore/3rdparty/atom...
fee6c776668794097500ebaf00b53c7a3258e440
bb4244f7d4618e0303d002497742f427d35bf2a8
woeoio/mirgo
/ut/util.go
Go
go
3,070
no_license
package ut import ( "bufio" "io" "math" "math/rand" "os" "path" "path/filepath" "strings" "unicode" ) func Uint16(v int) uint16 { return uint16(Clamp(v, 0, math.MaxUint16)) } func Int8(v int) int8 { return int8(Clamp(v, math.MinInt8, math.MaxInt8)) } func Uint8(v int) uint8 { return uint8(Clamp(v, 0, ma...
b1e88688498a6b47bbcc6900cf683d00c2a652f8
51cccda0dfe635005f6ea26353117665f4d3fd44
jangocheng/star_go
/util_file.go
Go
go
434
permissive
package starGo import "os" // 文件夹是否存在(obsolete) func IsDirExists(path string) bool { file, err := os.Stat(path) if err != nil { return false } else { return file.IsDir() } } // 文件是否存在 func IsFileExists(path string) (bool, error) { file, err := os.Stat(path) if err == nil { return file.IsDir() == false, n...
255d6c4861f04600c81809edf53ded2c731dd7bb
d97ba24fa74f0c700ae1a3524efcf6425facf091
sparky8342/adventofcode
/2022/day7/day7.go
Go
go
1,801
no_license
package main import ( "fmt" "io/ioutil" "math" "strconv" "strings" ) const MAX_DIR_SIZE = 100000 const TOTAL_DISK = 70000000 const SPACE_NEEDED = 30000000 type Dir struct { dirs map[string]*Dir parent *Dir files []int } func NewDir(parent *Dir) *Dir { d := new(Dir) d.parent = parent d.dirs = map[strin...
024a89f2761433e6d0fd833527b932a39223f662
8f02bb77fabc07e9bca9f4d6d1b05db1ff720b27
Realhitvz/udemyTraining
/Struct/EmbeddedType/main.go
Go
go
565
no_license
package main import "fmt" type person struct { first string last string age int } type DoubleZero struct { person LicenceToKill bool } func (p person) greet() { fmt.Println("I'm a regular person") } func (dz DoubleZero) greet() { fmt.Println("The names Bond") } func main() { p1 := DoubleZero{ ...
1f0daf595e24c0321c0db698cfbc90fdebadd2b5
d347d8abd4af7c212a036b80aafac1a666e4adae
jipings/hello-go
/go-design/08/countdown1/countdown.go
Go
go
274
no_license
package main import ( "fmt" "time" ) func main() { fmt.Println("Commencing countdown.") tick := time.Tick(1 * time.Second) for countdown := 10; countdown >0 ;countdown-- { fmt.Println(countdown) <-tick } launch() } func launch() { fmt.Println("Lift off!") }
c75621bc311c74e565941e106cafe579ecc828eb
e6e217c6f1006521059b56b9ca323df7efdcc17b
5112100070/Trek
/src/app/user/user.go
Go
go
14,575
permissive
package user import ( "bytes" "encoding/json" "errors" "io/ioutil" "log" "net/http" "net/url" "strconv" "strings" "time" "github.com/5112100070/Trek/src/conf" headerConst "github.com/5112100070/Trek/src/constants/header" urlConst "github.com/5112100070/Trek/src/constants/url" "github.com/5112100070/publ...
538b7eba516d0874f00767d2b8af67d268a1de81
ca4619fe5b65fd7bb9017c94ec07d32c191d3f78
mattl/wpt.fyi
/api/query/search_test.go
Go
go
4,391
permissive
// +build small // Copyright 2018 The WPT Dashboard Project. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package query import ( "bytes" "net/http" "net/http/httptest" "net/url" "sort" "strings" "testing" "github.com/golang/mock...
c610322b9949d8fec86c06aed05707ae7d81e93f
71fc0bc81b08ecbd93f15078eb5d0d308813f30c
shaunstanislaus/sudolikeaboss
/main.go
Go
go
1,693
permissive
package main import ( "fmt" "github.com/ravenac95/sudolikeaboss/onepass" "os" "strconv" "time" ) const DEFAULT_TIMEOUT_STRING_SECONDS = "30" const DEFAULT_HOST = "sudolikeaboss://local" const WEBSOCKET_URI = "ws://127.0.0.1:6263/4" const WEBSOCKET_PROTOCOL = "" const WEBSOCKET_ORIGIN = "resource://onepassword4-a...
bb5523c855dfe9247a4e392eaecc4a1857472326
2352f6ba2c6636f3bed08d1c89e63ade6ab5e354
ondrejbudai/test-delete-me-later
/internal/distro/fedora32/distro.go
Go
go
21,676
permissive
package fedora32 import ( "encoding/json" "errors" "fmt" "sort" "github.com/osbuild/osbuild-composer/internal/distro" osbuild "github.com/osbuild/osbuild-composer/internal/osbuild1" "github.com/google/uuid" "github.com/osbuild/osbuild-composer/internal/blueprint" "github.com/osbuild/osbuild-composer/intern...
527c29b222465ae265513208253e4cfea9b6d093
a0942aa9cb91ed3d4b661818d2bfa1d5ca8d6a71
teecee99/golang_html
/main.go
Go
go
3,694
no_license
package main import ( "database/sql" "log" "net/http" "text/template" _ "github.com/go-sql-driver/mysql" ) type Employee struct { Id int Name string City string } func dbConn() (db *sql.DB) { dbDriver := "mysql" dbUser := "root" dbPass := "" dbName := "golang_db" db, err := sql....
28d24105ebe86dc57071700b27aeb27c76f7a57c
0f3d9b4ea486105fa79920f7a194a29cf2101eb4
vompressor/mkpw
/shadowlogin.go
Go
go
664
no_license
package mkpw import ( "github.com/tredoe/osutil/user/crypt" _ "github.com/tredoe/osutil/user/crypt/apr1_crypt" _ "github.com/tredoe/osutil/user/crypt/common" _ "github.com/tredoe/osutil/user/crypt/md5_crypt" _ "github.com/tredoe/osutil/user/crypt/sha256_crypt" _ "github.com/tredoe/osutil/user/crypt/sha512_crypt"...
502a922f36565b848193241d41188f21665fa8ea
a363597eefa4ed07a512943fc02d57dc8dd80844
NiftySoft/go-raylib
/examples/shaders/postprocessing/postprocessing.go
Go
go
4,323
permissive
package main import ( rl "github.com/chunqian/go-raylib/raylib" "fmt" "runtime" ) var ( MAX_POSTPRO_SHADERS = 12 ) type PostproShader int32 const ( FX_GRAYSCALE PostproShader = iota FX_POSTERIZATION FX_DREAM_VISION FX_PIXELIZER FX_CROSS_HATCHING FX_CROSS_STITCHING FX_PREDATOR_VIEW FX_SCANLINES FX_FISH...
5274ae1ed51b93eadd7592a5bef970e2eb2d08cc
1547c8bcdca6dbae9d6e42e2555e3a4720ac5201
nullcore1024/gosrt
/srt/srt.go
Go
go
6,648
permissive
// Copyright (c) 2018 CyberAgent, Inc. All rights reserved. // https://github.com/openfresh/gosrt // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // https://github.com/golang/go /* package srt provides a por...
b77836686ebb807eb57aaff3a9c5fa0612f62942
2b5eee8be1e2a84b01c7e6c8742494c080b20cc8
FrankHitman/playGo
/goroutine-channel/main/chan_explain.go
Go
go
343
permissive
package main import ( "fmt" "time" ) func goroutineA(a <-chan int) { val := <- a fmt.Println("G1 received data: ", val) return } func goroutineB(b <-chan int) { val := <- b fmt.Println("G2 received data: ", val) return } func main() { ch := make(chan int) go goroutineA(ch) go goroutineB(ch) ch <- 3 tim...
e421e5f9bccc82336b42228b8b18c7a065b1839d
cbb310c9fc23844da9016d0a996d1d2e35ec3a00
imtolexo/aqua
/rest_server.go
Go
go
4,018
permissive
package aqua import ( "fmt" "github.com/gorilla/mux" "github.com/imtolexo/aero/cache" "net/http" "reflect" "strings" "time" ) var defaults Fixture = Fixture{ Root: "", Url: "", Version: "*", Pretty: "false", Vendor: "vnd.api", Modules: "", Cache: "", Ttl: "", Auth: "", Log: fals...
bac97ec70f56bd717d6104c1b7d884d37b603126
a771f56d6326859777af35253cba8f520e44667e
sshyran/automate
/components/automate-deployment/pkg/backup/artifact_repo_helpers_test.go
Go
go
3,163
permissive
package backup import ( "bufio" "compress/gzip" "io" "os" "path" "sort" "testing" "github.com/chef/automate/lib/io/fileutils" "github.com/chef/automate/lib/stringutils" "github.com/leanovate/gopter" "github.com/leanovate/gopter/gen" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/stretc...
f5c18dffeaced351fb2e3ef15b923601f7b30d2c
c29a1c2955c870bf3d56ca5929a5afa233a5cc3b
awesome-product/gochat
/vendor/github.com/lucas-clemente/quic-go/client.go
Go
go
9,400
permissive
package quic import ( "context" "crypto/tls" "errors" "fmt" "net" "strings" "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/logging" ) type client struct { sconn sendConn // If the client is created with DialAddr, ...
7c8ae7bde169309a0ef9a8a5997dbe146d0f240a
eaf8589cb3c4a1f551515a7f12feab33de57aba8
ionchain/ionchain-core
/core/types/block.go
Go
go
13,655
no_license
// Copyright 2014 The go-ionchain Authors // This file is part of the go-ionchain library. // // The go-ionchain library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
b9cf093b69c56c5aaea540c90869d168396fd0d7
8779e9ac055cbd153fe529739f5071fe1449f76e
perpetualy/seaweedfs
/weed/server/filer_server.go
Go
go
6,810
permissive
package weed_server import ( "context" "fmt" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "net/http" "os" "sync" "time" "github.com/chrislusf/seaweedfs/weed/stats" "google.golang.org/grpc" "github.com/chrislusf/seaweedfs/weed/util/grace" "github.com/chrislusf/seaweedfs/weed/operation" "github.com/...
f175575fcd557606e6993b8bcd2ed48185b9927f
20e31d34771f32636b68a6b1eee8aafa9ee2a98b
alexcb/doit
/commands/domains.go
Go
go
8,359
permissive
package commands import ( "errors" "io" "github.com/bryanl/doit" "github.com/bryanl/doit/Godeps/_workspace/src/github.com/digitalocean/godo" "github.com/bryanl/doit/Godeps/_workspace/src/github.com/spf13/cobra" ) // Domain creates the domain commands heirarchy. func Domain() *cobra.Command { cmd := &cobra.Comm...
e23c523d13ee58875dd34dbb2775cc7c34ce30f1
ca2cc0a4c61139296a4659e6f5e76e51021f25b9
xclud/triggers
/pkg/logging/logging.go
Go
go
1,880
permissive
/* Copyright 2019 The Tekton 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, softwar...
7e4b7a4a404c92e3e4d0a73146d92f3b964f713c
c8a45dcd02b167e133d08d7982062106848ca671
artheadsweden/go-jan-18
/Day1/Array/Array.go
Go
go
703
no_license
package main import ( "fmt" "unsafe" ) func main() { var arr1 [5]int fmt.Println(arr1) arr1[1] = 4 arr1[2] = 5 fmt.Println(arr1) arr2 := [5]int{10, 20, 30, 40, 50} fmt.Println(arr2) arr3 := [...]int{10, 20, 30, 40, 50} fmt.Println(arr3) arr4 := [5]int{1: 10, 3: 15} fmt.Println(arr4) ptrArr := [5]*in...
97a1473f0beab3b08bb759c29a52be5ffa3f1746
883b0fad0633785840fcbb84a31dff97941fb93a
backwardn/dendrite
/cmd/dendritejs/main.go
Go
go
8,841
permissive
// Copyright 2020 The Matrix.org Foundation C.I.C. // // 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...
55925a64de37dea1d381f456471a4f98ba7f0597
43047c9f3a014ea2bd651be4bde8299a87d2a0dd
zx9597446/ghbot
/main.go
Go
go
1,505
permissive
package main import ( "crypto/hmac" "crypto/sha1" "flag" "fmt" "io/ioutil" "log" "net/http" "os" "os/exec" "github.com/go-martini/martini" ) var port = flag.Int("p", 9527, "port to listen") var secret = flag.String("s", "", "github secret") var script = flag.String("e", "", "script to execute") var test = ...
d3872b6751b38134010c4ff9c207f907efad26aa
625f281fa0cc4ac811d6fa76ad18e65b2b2100b8
EddCS/sifnode
/x/clp/types/events.go
Go
go
727
no_license
package types // clp module event types const ( EventTypeCreatePool = "created_new_pool" EventTypeDecommissionPool = "decommission_pool" EventTypeCreateLiquidityProvider = "created_new_liquidity_provider" EventTypeAddLiquidity = "added_liqudity" EventTypeRemoveLiquidity = "...
61f6634c12af848efbe5d79b9eeb1060d4fb879a
26a70b26258ceebcd8fef03ff2a208ae00973d85
lucasmls/problem-solving
/subtracttheproductandsumofdigitsofaninteger/subtracttheproductandsumofdigitsofaninteger_test.go
Go
go
403
permissive
package subtracttheproductandsumofdigitsofaninteger import ( "testing" "github.com/stretchr/testify/assert" ) func TestSubtractProductAndSum(t *testing.T) { tt := []struct { input int output int }{ // #1 { input: 234, output: 15, }, // #2 { input: 4421, output: 21, }, } for _, t...
a1ccdc21b2de2f8d94c4d3e7434d73369d551c2d
dba0870e27154bfc758beb5ea7ea31e551d8c92a
sttts/kubernetes
/vendor/github.com/libopenstorage/openstorage/api/spec/spec_handler.go
Go
go
5,360
permissive
package spec import ( "fmt" "regexp" "strconv" "github.com/libopenstorage/openstorage/api" "github.com/libopenstorage/openstorage/pkg/units" ) // SpecHandler provides conversion function from what gets passed in over the // plugin API to an api.VolumeSpec object. type SpecHandler interface { // SpecFromString ...
c3b0da80c90afceac4a34fc8f42a9d7372be5a09
180e6d164654d615c54ba3ee028e0b0d1fe73a79
kubernetes/kubernetes
/pkg/volume/volume_linux_test.go
Go
go
12,423
permissive
//go:build linux // +build linux /* Copyright 2020 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 applic...
253b49fd5219edd8f667892aa27caa8c8eafcf69
b190cc44e1bc4e112df61c650281587d88e9c86d
huaweicloud/huaweicloud-sdk-go-v3
/services/frs/v2/model/model_detect_live_by_url_response.go
Go
go
911
permissive
package model import ( "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" "strings" ) // DetectLiveByUrlResponse Response Object type DetectLiveByUrlResponse struct { VideoResult *LiveDetectRespVideoresult `json:"video-result,omitempty"` // [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud....
9d70b05926edab1d85026ab032374e2780db210d
5c44fefc6301a554b588dd0ba19fabe54604079e
phoenixyu123/Go-
/SGG/chapter10/structcreate/main.go
Go
go
351
no_license
package main import "fmt" type Person struct { Name string Age int } func main() { //case1 p1 := Person{"Mary", 20} //case2 var p2 Person //case3 var p3 *Person = new(Person) (*p3).Name = "Smith" p3.Age = 30 //case4 var p4 *Person = &Person{} (*p4).Name = "Hippo" p4.Age = 99 fmt.Println(p1, p2, *...
3a2e43f9d46039df003e0b2bdef480cf947bda38
81fd667658c56b794f66135aba655f4509e4846e
krousey/temporal
/service/history/visibilityQueueTaskExecutor.go
Go
go
14,928
permissive
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 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 Soft...
ec3b1bff7f89f18ad872deb8e49097069ba65e29
95cc0dc271c1224159cca007b26e382a7731a90b
blatong/chef-runner
/chef/runlist/runlist_test.go
Go
go
1,670
permissive
package runlist_test import ( "testing" . "github.com/mlafeldt/chef-runner/chef/runlist" "github.com/stretchr/testify/assert" ) func TestBuild(t *testing.T) { tests := []struct { cookbook string recipes []string runList []string errString string }{ { cookbook: "cats", recipes: []string{}, ...
677f2888cde997d6947bc085f43bddbeb7ffb785
6a2a36d5bf4387d117a5299c337dfd7c9b156ae5
TayyabTalha/ari
/ext/play/session.go
Go
go
6,609
permissive
package play import ( "context" "errors" "sync" "time" "github.com/CyCoreSystems/ari" ) // Session describes a structured Play session. type Session interface { // Add appends a set of AudioURIs to a Play session. Note that if the Play session // has already been completed, this will NOT make it start again....
56f58a8d5e4741ab99b9f86ef4cb35cbc63740aa
ef79d0d65653e66e7bf89926dd6dc8468d98fc1b
logonmy/oversea
/app/stdout/error.go
Go
go
1,196
no_license
package stdout const ( HttpStatusSuccess = 200 HttpStatusFail = 201 HttpStatusNotFound = 404 HttpNotAuthorization = 401 HttpForbidded = 403 ) const ( Success = 0 // 数据库错误 或更新修改等操作失败 DBError = 1000 // 参数错误 ParamsError = 2000 NotAuthorizationError = 2001 ) // 后台errMsg const ( ParamsErrorMsg = "参数错误" ...
60a1dd96f55b5029e9ab5a597a57ff554eecb0c1
f7bb17c9fa0ce40026199cccd361a3c200946600
lukedemi/goformation
/cloudformation/resources/aws-elasticloadbalancingv2-listenercertificate.go
Go
go
5,308
permissive
package resources import ( "bytes" "encoding/json" "fmt" "github.com/lukedemi/goformation/cloudformation/policies" ) // AWSElasticLoadBalancingV2ListenerCertificate AWS CloudFormation Resource (AWS::ElasticLoadBalancingV2::ListenerCertificate) // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/...
c16901199be2dbed30c475e63368c35557836c7f
d5b13c76266ba56a92f2c6f8b756790323429521
cndoit18/ks-devops
/controllers/suite_test.go
Go
go
2,411
permissive
/* 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 distributed under the License...
2809e09af676d8226273ac8a78f6c8515c14f5d6
d8f80b9ccc61560eba350cb4bfa596028a717f4f
rahul799/keptn
/cli/cmd/create_project.go
Go
go
6,371
permissive
package cmd import ( "encoding/base64" "errors" "fmt" keptnv2 "github.com/keptn/go-utils/pkg/lib/v0_2_0" "io/ioutil" "net/http" "os" "time" "github.com/keptn/keptn/cli/pkg/credentialmanager" "github.com/keptn/keptn/cli/pkg/logging" apimodels "github.com/keptn/go-utils/pkg/api/models" apiutils "github.com...
1781029b7bb791a511f156644909950e207113be
e5d9a94d499bc51aa47c3e01e5a4c413fb741c95
difengo/plugins
/goakit/example_server_files.go
Go
go
9,306
permissive
package goakit import ( "os" "path/filepath" "strings" "goa.design/goa/codegen" "goa.design/goa/design" httpcodegen "goa.design/goa/http/codegen" httpdesign "goa.design/goa/http/design" ) // ExampleServerFiles returns and example main and dummy service // implementations. func ExampleServerFiles(genpkg string...
ca267afa36f9cff417c5ea43b32536f7714fb25c
29e97cf51708ec4b14d478ff7be707c4d0aa7714
naveenkumaran/robot-shop
/dispatch/vendor/github.com/instana/go-sensor/adapters.go
Go
go
4,841
permissive
package instana import ( "context" "net/http" "runtime" ot "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" otlog "github.com/opentracing/opentracing-go/log" ) type SpanSensitiveFunc func(span ot.Span) type ContextSensitiveFunc func(span ot.Span, ctx context.Context) // Sens...
a66693f6d817f502ed33473aa355cf43fab7eef3
ec5d284fd97a9e458a0dcea5cf2b176b85ee8099
confluentinc/azure-sdk-for-go
/profiles/latest/cognitiveservices/luis/authoring/models.go
Go
go
25,740
permissive
// +build go1.9 // Copyright 2019 Microsoft Corporation // // 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...
69a83976f2cc61808a4c2553bad941d05217d168
713edb62217d4ae4ee4343286edba8550f4c377e
liuxueguo6921/onecloud
/pkg/mcclient/modules/mod_stastics.go
Go
go
2,058
permissive
// Copyright 2019 Yunion // // 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 writi...
14bc0fe6b2b60141470145fb1a7e805d7f3ad718
755cbfcc45c073ad8d85b785b05e0a8a94fff5f6
cockroachdb/vendored
/github.com/cockroachdb/pebble/internal/keyspan/span.go
Go
go
15,301
permissive
// Copyright 2018 The LevelDB-Go and Pebble 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 keyspan // import "github.com/cockroachdb/pebble/internal/keyspan" import ( "bytes" "fmt" "sort" "strconv" "strings" "unicode"...
d33eb5078ac9759b963faa360f0db0b2f71faca7
e22c143a1a87a14226fd406ec6473f138bcf7766
gdeepesh/google-api-go-client
/fcm/v1/fcm-gen.go
Go
go
50,462
permissive
// Copyright 2020 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Code generated file. DO NOT EDIT. // Package fcm provides access to the Firebase Cloud Messaging API. // // For product documentation, see: https://firebase.google.com/docs/cloud-me...
a6f3dfc458995d46062e10ede078674625c64629
44a6cc79fda3aaaa52c8b2204fe7896c076e074e
Vorringer/oci-go-sdk
/core/update_drg_route_distribution_statements_request_response.go
Go
go
3,441
permissive
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
9645a54dd074e46b64a1fad09e675e688849db32
42dea38401e3af5a10692949566021aac35e0bbf
gitter-badger/cpustat
/pidlist.go
Go
go
1,978
permissive
// Copyright (c) 2016 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...
189c3928cebbd8f0ebcbdd1952acace54d1bb771
d972075a7776440750adab43deab4ead934063aa
palantir/godel-dep-plugin
/generated_src/internal/github.com/golang/dep/internal/importers/glide/importer.go
Go
go
6,042
permissive
// Copyright 2016 The Go 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 glide import ( "bytes" "io/ioutil" "log" "os" "path" "path/filepath" "github.com/palantir/godel-dep-plugin/generated_src/internal/github.com/go...
76ce818093986c2ed10d04d3e9b1c916d1a8d4eb
7733afed6a72c0d92724a9722c1212f8c5ac9ad2
lufeng4828/beego
/namespace_test.go
Go
go
4,719
permissive
// Copyright 2014 beego Author. 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 applica...
d7ff459cb21173956bb6f3a41011b5fc2a489c41
a3d839540136a487eae3f8ebc63cb05205021b08
umarquez/GolangGOL
/main.go
Go
go
6,655
no_license
package main import ( "engo.io/ecs" "engo.io/engo" "engo.io/engo/common" "fmt" "image/color" "strings" ) const ( // Default cell dimension CellSize = 8 // Default screen width dimension ScreenWidth = 8 * 85 // Default screen height dimension ScreenHeight = 8 * 85 ) var initialStatus Design var cells []*C...
7776ae7964bf54ee5edb5383ab54920442ae4645
b9dde596c08fc4e8c864a23482260cfc20c452a1
Manifaust/GolangPostgresCompose
/main.go
Go
go
588
no_license
package main import ( "net/http" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" "github.com/Manifaust/GolangPostgresCompose/controller" "github.com/Manifaust/GolangPostgresCompose/storage" ) func main() { // Echo instance e := echo.New() storage.NewDB() // Middleware e.Use(middlewar...
8f28ef0c80555baf6f5ff66455e2e1815ff2fb35
bbb0b0a59d7e0144d131a4b8ea94e18a4d5d95b2
gianrubio/nerd
/command/workload_download.go
Go
go
3,539
permissive
package command import ( "context" "crypto/md5" "fmt" "os" "path" "strings" "github.com/mitchellh/cli" "github.com/nerdalize/nerd/nerd/aws" v1datatransfer "github.com/nerdalize/nerd/nerd/service/datatransfer/v1" "github.com/pkg/errors" ) //WorkloadDownload command type WorkloadDownload struct { *command }...
0ac4edbceaffa4091246966d575119024fdcebc8
8d154b3749c041b22a81e4c0ad9bb058ddd53501
im-wmkong/go-tour
/methods/errors.go
Go
go
327
permissive
package main import ( "fmt" "time" ) type MyError struct { When time.Time What string } func (e MyError) Error() string { return fmt.Sprintf("at %v, %s", e.When, e.What) } func run() error { return &MyError{ time.Now(), "it didn't work", } } func main() { if err := run(); err != nil { fmt.Println(err...
fa3f470ff45344e15cb549b98628d94819b57ef7
aca8afa35c7e087763c93b323fd7984557feb1ea
stqp/go-training
/ch04/ex11/main.go
Go
go
2,838
no_license
package main import ( "bytes" "encoding/json" "flag" "fmt" "io/ioutil" "net/http" "os" ) type response struct { *http.Response NextPage int PrevPage int FirstPage int LastPage int } const ( baseURL = "https://api.github.com/" repo = "go-training" owner = "stqp" ) var ( gitUser = "stqp" gitP...
15d7ee0c58f9989fb9f4b8b441a15cb9248f6f89
16c9848aaf422fc3b637d654212ce12d7938689d
fsa-streamotion/exposecontroller
/vendor/github.com/openshift/origin/pkg/authorization/client/clientset_generated/release_1_3/fake/clientset_generated.go
Go
go
1,672
permissive
package fake import ( clientset "github.com/openshift/origin/pkg/authorization/client/clientset_generated/release_1_3" v1core "github.com/openshift/origin/pkg/authorization/client/clientset_generated/release_1_3/typed/core/v1" fakev1core "github.com/openshift/origin/pkg/authorization/client/clientset_generated/rele...
91a7b9f613df377759d8636fde6447bf2806120a
c3781f5dc4c91a618fe38716e7b6d5854faf15db
michaelgibson/heka-zlib
/zlib_encoder.go
Go
go
2,494
no_license
/***** BEGIN LICENSE BLOCK ***** # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # The Initial Developer of the Original Code is the Mozilla Foundation. # Portions cre...
f7949cebaa03d2f8e32893e7955de0ee61fd9148
6c1dc7b52be495aa76e663efe1bec1213c0ed6ee
thexdesk/pls
/vendor/github.com/docker/notary/tuf/signed/verifiers.go
Go
go
8,313
permissive
package signed import ( "crypto" "crypto/ecdsa" "crypto/rsa" "crypto/sha256" "crypto/x509" "encoding/pem" "fmt" "math/big" "reflect" "github.com/agl/ed25519" "github.com/docker/notary/tuf/data" "github.com/sirupsen/logrus" ) const ( minRSAKeySizeBit = 2048 // 2048 bits = 256 bytes minRSAKeySizeByte = ...
dbbafac8c2f717fad561ca9108e4c45d3edfebef
aec16e865eecedc0461e7257a4cc8696ece38ece
linml/serverProj
/go/src/Common/model/error.go
Go
go
947
no_license
package model type ErrorType int const ( InnerError ErrorType = 1 // 内部错误 RequestParamError ErrorType = 2 // 参数错误 ) type ErrorStatus int const ( LoginParamErrorStatus ErrorStatus = 100 // 登录参数出错 WXLoginErrorStatus ErrorStatus = 101 // 微信登陆出错 WXUpdateErrorStatus ErrorStatus = 102 // 同步微信用户数据出错 Creat...
73d7d0841ef8f82b1a6e3f693b01974409c75e84
2b7d31769d2cb9b6f980882f192ae1eeee19c43e
kokizzu/livego-1
/parser/parser.go
Go
go
1,421
permissive
package parser import ( "fmt" "io" "github.com/bigsillybear/livego/av" "github.com/bigsillybear/livego/parser/aac" "github.com/bigsillybear/livego/parser/h264" "github.com/bigsillybear/livego/parser/mp3" ) var ( errNoAudio = fmt.Errorf("demuxer no audio") ) type CodecParser struct { aac *aac.Parser mp3 *...
9c3e75172916a75b0f6a04cf780ba52984d34be2
1a34d836935b3f03e5809ad56ef1824ab386fe9f
pvasant/ocm-sdk-go
/clustersmgmt/v1/network_list_type_json.go
Go
go
2,175
permissive
/* Copyright (c) 2020 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 to in writing, software...
c27062ee0738a01bed025a9225789b511823a608
261fc5461622417101ffcc15882c320f9017646e
Khoulaiz/gotcha
/main.go
Go
go
7,702
permissive
package main import ( "bytes" "crypto/tls" "encoding/base64" fmt "github.com/jhunt/go-ansi" "io" "io/ioutil" "net/http" "net/url" "os" "sort" "strings" "time" "github.com/jhunt/go-cli" ) func timing(step string, f func()) { start := time.Now() f() end := time.Now() took := float64(end.UnixNano()-sta...
ddc32a06162f272addd67ad5d3af3fe1984ff872
27aa74277c1e30362a22596e66f0e37b01091a9a
lukaskellerstein/GolangTrainingProjects
/101_Trainings/02_Mqtt/main.go
Go
go
1,858
no_license
package main import ( "fmt" "os" "os/signal" "github.com/yosssi/gmq/mqtt" "github.com/yosssi/gmq/mqtt/client" ) func main() { // Set up channel on which to send signal notifications. sigc := make(chan os.Signal, 1) signal.Notify(sigc, os.Interrupt, os.Kill) // Create an MQTT Client. cli := client.New(&cli...
9d73d380e4982c96e9a118a47171fcb6a8630f1c
db91d47b44427dc91dbd627ffade06c53edd032d
Han-Ya-Jun/servicecomb-service-center
/datasource/mongo/dependency_query.go
Go
go
15,173
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 ...
916bcc10a7a98f828cf4f40f3c7995a8bd1d2abd
5f1d9fc3da75e1d97e4535b7d0a3b46e85fc90f6
jmcarbo/keda
/pkg/scalers/aws_cloudwatch_scaler.go
Go
go
9,091
permissive
package scalers import ( "context" "fmt" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatch" "k8s.io/api/autoscaling...
0cfddaf974ece196ca965771ba354d5ec64f50e2
2c6a6eeb429a2e5a39d0672a2c7e9366da7b2e64
fzerorubigd/multilock
/multilock.go
Go
go
1,801
permissive
// Package multilock provide A simple method to lock base on a holder package multilock import ( "errors" "sync" ) type refCounter struct { counter int lock sync.RWMutex } type lockMap map[interface{}]*refCounter // MultiLock is the main interface for lock base on holder type MultiLock interface { // Lock ba...
40faf2e1e0e3ef60d6b42da9c600cab5a568ca03
3f2a7952e3f5e91704c24d1d789ecf9b31ce1a92
pu2chyh/titus-executor
/vpc/setup/setup.go
Go
go
5,295
permissive
package setup import ( "errors" "time" "net" "github.com/Netflix/titus-executor/vpc" "github.com/Netflix/titus-executor/vpc/context" "github.com/Netflix/titus-executor/vpc/ec2wrapper" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "gopkg.in/urfave/cli.v1" ) const ( maxSetupTime = ...
f1894c739d16ea87803d5251adbfe26a7207aba7
3e4b9eac9e7b6f1e8d7fd90cdb0330ea14057950
lukedirtwalker/quic-go
/internal/handshake/transport_parameters.go
Go
go
7,413
permissive
package handshake import ( "bytes" "encoding/binary" "errors" "fmt" "time" "github.com/lukedirtwalker/quic-go/internal/protocol" "github.com/lukedirtwalker/quic-go/internal/utils" "github.com/lukedirtwalker/quic-go/qerr" ) // errMalformedTag is returned when the tag value cannot be read var errMalformedTag =...
bbd7803e83d8146ebe406921919424dedb9c2a9f
2520c672f757a2720ef796a38c6f1bb560f8bd53
i-am-the-slime/go-ffi
/purescript-arrays/Data_Array_ST.go
Go
go
1,644
permissive
package purescript_arrays import ( . "github.com/purescript-native/go-runtime" ) func init() { exports := Foreign("Data.Array.ST") exports["new"] = func() Any { return new([]Any) } exports["peekImpl"] = func(just_ Any) Any { return func(nothing Any) Any { return func(i_ Any) Any { return func(xs_ A...