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
51e65506f5cbb701a4d21c74ebc65c9e51e92943
cde0f4177c1dc8c677377d5add2d3fa13c08e898
IFXU/ApprowGo
/Approw/Approw.go
Go
go
939
no_license
package Approw import ( "fmt" "net/http" /* "encoding/json" "io/ioutil" "log" "net/url" *///authing "github.com/authing/authing-go-sdk" //prettyjson "github.com/hokaccha/go-prettyjson" //"github.com/kelvinji2009/graphql" ) type User struct { Email string Password string } type id_token struct { ...
bbe94d8337d49fe22f04017870823358b5b4f03b
92c75b78ff420829cb2cfddea8bb3e465465e058
Leectan/steampipe-plugin-gcp
/gcp/table_gcp_compute_disk.go
Go
go
13,731
permissive
package gcp import ( "context" "strings" "github.com/turbot/go-kit/types" "github.com/turbot/steampipe-plugin-sdk/grpc/proto" "github.com/turbot/steampipe-plugin-sdk/plugin" "github.com/turbot/steampipe-plugin-sdk/plugin/transform" "google.golang.org/api/compute/v1" ) func tableGcpComputeDisk(ctx context.Cont...
633f568cc7030176fe7d2a754fb479422cd50df5
ccc3a2b0f018fc2383d47180648485b846984031
beautytiger/go-playground
/flag/math/cmd/divide.go
Go
go
624
no_license
package cmd import ( "fmt" "github.com/spf13/cobra" "strings" ) var ( dividedByZeroHandling int ) func NewDividedCmd() *cobra.Command { divideCmd := &cobra.Command{ Use: "divide", Short: "divide subcommand divede all parsed args.", Run: func(cmd *cobra.Command, args []string) { values := ConvertArgsToF...
c6fc8ed54868c4eafa62d107db1976bcc801daa2
66534069f406f397cc81ff4953e6545326b0b6f7
mercari/datastore
/aedatastore/example_test.go
Go
go
1,806
permissive
package aedatastore_test import ( "context" "fmt" "net/url" "go.mercari.io/datastore/aedatastore" "google.golang.org/appengine" "google.golang.org/appengine/aetest" "google.golang.org/appengine/taskqueue" ) func appengineContext() (ctx context.Context, cancelFn func() error) { inst, err := aetest.NewInstance...
5e2aef355ccdefee4e7092b8af3853776a2a5b76
65b4f23f4dffb30bcd4ef161740bb1cfa179ca52
hendersonkw/eks-workshop-sample-api-service-go
/main.go
Go
go
970
no_license
package main import ( "encoding/json" "fmt" "io" "net/http" "os" "strings" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { f := fib() res := &response{Message: "Hello SWA"} for _, e := range os.Environ() { pair := strings.Split(e, "=") res.EnvVars = append(res...
8baeba50c6c47c7ca1eced2233ad943e8adba177
b0330da65bc66388e1326f5228cc31b0f77dd905
rberrelleza/spago
/pkg/nlp/charlm/trainer.go
Go
go
3,974
permissive
// Copyright 2020 spaGO 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 charlm import ( "fmt" "github.com/nlpodyssey/spago/pkg/mat/rand" "github.com/nlpodyssey/spago/pkg/ml/ag" "github.com/nlpodyssey/spago/pkg/ml/losses"...
fd629c207d9fe595f5a4d3f4ae46c8fe1225090d
2dcf99eae52751e9f1baa3c6376a992b224b9feb
WarpCloud/walm
/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go
Go
go
51,800
permissive
/* Copyright 2014 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, ...
e8189e6099dbc7358f58734490d0c8829169e65e
739b9e05619d6d9786aeb517b9c26d85437c705a
jimen0/caddy
/modules/caddyhttp/fileserver/matcher.go
Go
go
10,563
permissive
// Copyright 2015 Matthew Holt and The Caddy 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 applicab...
ab9fb99011c1ba17def2a0b8cba832873bc5d52f
b3661f2a34dc752327834c3f4671ea6eb58065fb
wangyanci/loadbalancer-controller
/pkg/proxy/proxies/nginx/config.go
Go
go
2,976
permissive
/* Copyright 2017 Caicloud authors. 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 ...
8550d004073cfe1e5415e76934b7c7cd163a37bf
cd20e8e2333ea52edc4de31bb0d233579bc08243
Veljko97/jukebox_server
/pkg/music/musicHolder.go
Go
go
8,159
no_license
package music import ( "fmt" "github.com/Veljko97/jukebox_server/pkg/utils" "github.com/faiface/beep" "github.com/faiface/beep/effects" "github.com/faiface/beep/mp3" "github.com/faiface/beep/speaker" "log" "math" "math/rand" "os" "path/filepath" "strings" "sync" "time" ) var AllSongs []*Song var TempS...
46b5c3d61ad86e9d2a3585d6fee2c31884e9990b
ceb1a2600654ffe9a5e17711238f9dd067a9e623
quan12yt/graphql-gqlgen-sqlboiler-example
/internal/service/users/service.go
Go
go
538
no_license
package users import ( "context" "github.com/quan12yt/graphql-sqlboiler-example/cmd/graph/model" "github.com/quan12yt/graphql-sqlboiler-example/internal/models" ) type UserService interface { FindUserById(ctx context.Context, ID int64) (*models.User, []*models.Meetup, error) GetUsers(context.Context) ([]*models...
3c134838f682e41f79df85f2d2d65c826806c0a9
9f0521d9e15d75ac69938a175bfbabce5b0ec7d1
jpoffline/goarxivscrape
/arxivlib/scrape.go
Go
go
2,260
no_license
package arxivlib import ( "fmt" "net/http" "regexp" "strings" "github.com/PuerkitoBio/goquery" ) func pullArxivCodes(document *goquery.Document) []ArticleMeta { var arxivs []ArticleMeta document.Find("dl").Find("dt").Each(func(index int, element *goquery.Selection) { eee := strings.Split(element.Text(), " ...
a498007ec9ac4dca3364973bd76974299d61ef7b
4b2689058641db49c883d1dc7d43092b225e3ee1
bartsmykla/protoc-gen-kumadoc
/types/message.go
Go
go
809
permissive
package types import ( doc "github.com/kumahq/protoc-gen-kumadoc/proto" pgs "github.com/lyft/protoc-gen-star" ) type Message struct { Name string Description string Fields []*Field IsHidden bool PolicyPackage string } func ParseMessage(policyPackage string, message pgs.Message) *Message...
f06c8514d21558ae447cd147d090536c9a4575c1
60c6b2076fbf30e9d5473047571f7c4e777935c8
halega/praxis
/byDate/2018-01-04/sw/main.go
Go
go
304
no_license
package main import ( "fmt" "os" "os/signal" "time" ) func main() { block := make(chan os.Signal, 1) signal.Notify(block, os.Interrupt) go func() { c := time.Tick(1 * time.Second) now := time.Now() for { fmt.Printf("\r%v", time.Since(now).Round(time.Second)) <-c } }() <-block }
002a653c16fc67a28ccd64b837450053f225635c
d6a60a3e7694abc71164be95ae437bcd1f77c8ed
hnakamur/usacloud
/define/categories.go
Go
go
1,477
permissive
package define import "github.com/sacloud/usacloud/schema" var CategoryConfig = schema.Category{ Key: "config", DisplayName: "Configuration", Order: 3, } var CategoryAuth = schema.Category{ Key: "auth", DisplayName: "Authentication", Order: 5, } var CategoryComputing = schema.Categor...
888f335ba68e6808ac42b8c850d09142ddb6b6f3
fede34a76878cf3ac5cb4de04d5bbab3ed9ec01a
devopsmi/GoCRMS
/ut/diff.go
Go
go
346
permissive
package ut import ( "github.com/sergi/go-diff/diffmatchpatch" "fmt" ) func Diff(old string, new string) string { dmp := diffmatchpatch.New() diffs := dmp.DiffMain(old, new, false) return dmp.DiffPrettyText(diffs) } func DiffAny(old, new interface{}) string { o := fmt.Sprintf("%v", old) n := fmt.Sprintf("%v", ...
9dca0042a03f61cfff4160ce640c583b06a0ee9d
04fda5dc7677cec02936e4c223104fae478b59b5
mala-yali/newshound
/fetch/fetchd/main.go
Go
go
1,900
permissive
package main import ( "context" "flag" "log" "net/http" "os" "time" "gopkg.in/mgo.v2" "github.com/NYTimes/gizmo/observe" "github.com/NYTimes/gizmo/pubsub" "github.com/NYTimes/gizmo/pubsub/gcp" "github.com/gorilla/mux" "github.com/jprobinson/newshound/fetch" ) func main() { reparse := flag.Bool("r", fal...
1499c866f7303f159bd70126874004f0e55cc055
3f80470197e11754b511e60c97d8b66eedfc2fb8
itsarbit/bloomfilter
/filter.go
Go
go
499
no_license
package bloomfilter // TODO: add logrus // BloomFilter defines the general interface bloom filter needed // ref: http://codekata.com/kata/kata05-bloom-filters/ type BloomFilter interface { // Add add the object to the bloom filter Add(object []byte) (done bool, err error) // Check checks if an object is already in...
f6fb72c5bb31609f535b3fc00ee15e0f1c3ff764
7571625701efc0b4e55e57e897ac1aa05f9ee497
laozhu123/go-vendor
/github.com/ljy2010a/go_alipay/alipay_handle_web.go
Go
go
4,702
no_license
package alipay import ( "fmt" "io" "log" "net/http" "regexp" ) func AlipayWebRequestForm(alipayConfig *AlipayConfig, r *AlipayWebRequest, w io.Writer) error { p := Kvpairs{ Kvpair{`total_fee`, fmt.Sprintf("%.2f", r.TotalFee)}, Kvpair{`subject`, r.Subject}, Kvpair{`body`, r.Body}, Kvpair{`show_url`, r.Sh...
48b698aa71fc40c4c0d286f60aff4fd07865930e
b74a5fa8c71b71bf5774fcc70811555ce48b3bc0
jorgecotillo/crossplane
/pkg/apis/workload/v1alpha1/register.go
Go
go
2,158
permissive
/* Copyright 2018 The Crossplane 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...
9dd2ce9a0cf703f9bc1f03de763e87958e0f96fb
f945be56d7e21ec95b474359c17cc105021f953e
uphy/elastalert-mail-gateway
/pkgs/condition/condition.go
Go
go
1,509
no_license
package condition import ( "reflect" "github.com/uphy/elastalert-mail-gateway/pkgs/jsonutil" ) type ( Condition interface { Eval(scope Scope) (bool, error) } Scope interface { Get(name string) *jsonutil.Value } Conditions struct { Match *Match `json:"match,omitempty"` Constant *Constant ...
d5420a58bb28322b39487a28314039dc6e28bfa7
5dffb1dd4837729ba1d39f2fa231bce6fe2766bc
yut148/sshr
/sshr/config.go
Go
go
851
permissive
package sshr import ( "github.com/BurntSushi/toml" "golang.org/x/crypto/ssh" "io/ioutil" ) type config struct { ListenAddr string `toml:"listen_addr"` RemoteAddr string `toml:"remote_addr"` DestinationPort string `toml:"destination_port"` } func loadConfig(path string) (*config, error) { var c confi...
08b553f52ddc1ce3d81ed193b32340ea06d27e31
e2069a9923ef87b577f182957eb3c5b03dbf56d0
wangfenjin/go-protoparser
/internal/lexer/constant_test.go
Go
go
2,285
permissive
package lexer_test import ( "strings" "testing" "github.com/yoheimuta/go-protoparser/internal/lexer" ) func TestLexer2_ReadConstant(t *testing.T) { tests := []struct { name string input string wantText string wantIsEOF bool wantErr bool }{ { name: "fullIdent", input: "foo....
33fee55c816ce943684dd447d2f9e7a0ad379b38
cda75c27c6176717f368dec6da7580c20f29ef79
phpyandong/opentaobao
/model/wdk/AlibabaWdkMarketingItembuygiftRemoveitemResponse.go
Go
go
871
permissive
package wdk import ( "encoding/xml" "github.com/bububa/opentaobao/model" ) /* 移除买赠活动下的商品。【注意,此接口暂不支持并发!】 APIResponse alibaba.wdk.marketing.itembuygift.removeitem 移除买赠活动下的商品。【注意,此接口暂不支持并发!】 */ type AlibabaWdkMarketingItembuygiftRemoveitemAPIResponse struct { model.CommonResponse AlibabaWdkMarketingI...
a38b97a20be171f4f18ac9c7582f8ad7b075424f
86996ac2ee25d320864a473e1d6e7e8036a01aba
Mattlk13/oci-go-sdk
/optimizer/supported_levels.go
Go
go
1,033
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...
0abc65070576410ccca811573b166d7597586f39
66987a85a84ea32832abc4958d0d160033fad82b
bladehan1/gokeeper
/model/struct.go
Go
go
2,418
permissive
package model import ( "encoding/gob" "path/filepath" "strings" "unicode" "unicode/utf8" "encoding/json" "fmt" "github.com/huajiao-tv/gokeeper/model/parser" ) func init() { gob.Register([]StructData{}) } type StructData struct { Name string `json:"name"` Version int `json...
9f19af17ec756bd1ce2b85dcb337c8a52b417a88
3fe071ba1f47c87a6ed63cedd727a1d71fe5f18b
zettabytekim/HeadFirstGo
/ch08/subscriber/main.go
Go
go
1,211
no_license
package main import "fmt" type subscriber struct { name string rate float64 active bool } type myStruct struct { myField int } func printInfo(s subscriber) { fmt.Println("Name:", s.name) fmt.Println("Monthly Rate:", s.rate) fmt.Println("Active:", s.active) } func defaultSubscriber(name string) subscribe...
0dc8e05e5205b59a6e19d6c9ac7e8ab1bed00862
6ae19569ef8ea648b16b51722b8bd43a62b06e0e
URLooker/web
/vendor/github.com/go-xorm/xorm/sqlite3_driver.go
Go
go
478
permissive
// Copyright 2015 The Xorm 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 xorm import ( "github.com/go-xorm/core" ) // func init() { // core.RegisterDriver("sqlite3", &sqlite3Driver{}) // } type sqlite3Driver struct { }...
428355e5ba74c907b48386dff14253124efaba5b
4991bd1355073f15a6be9bb7beec322e8891480d
liu-xuewen/etcd
/etcdmain/main.go
Go
go
1,548
permissive
// Copyright 2015 The etcd 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 t...
13d87acb793cd335d9119e69988760f8b817cfa0
b6fc1e976d867cfb6a9ec73b5c6e191730f5a97e
raindust/Elastos.ELA2
/core/transaction/balanceTxInput.go
Go
go
563
permissive
package transaction import ( "Elastos.ELA/common" "io" ) type BalanceTxInput struct { AssetID common.Uint256 Value common.Fixed64 ProgramHash common.Uint168 } func (bi *BalanceTxInput) Serialize(w io.Writer) { bi.AssetID.Serialize(w) bi.Value.Serialize(w) bi.ProgramHash.Serialize(w) } func (bi *BalanceTxI...
c6ad3165e8ba42b5ea2409bd067e1dc4e889e97a
a529ee72130b22677306a0a368e10cbcfe680d35
tejal29/skaffold
/pkg/skaffold/output/color_test.go
Go
go
3,175
permissive
/* Copyright 2020 The Skaffold 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...
2a2b8db506d8419a2ce924e901ee7a2945d6df86
3865c61ccf6100e00258170d79d48a5462ced4c7
jdcloud-api/jdcloud-sdk-go
/services/antipro/models/ProtectionRuleSpec.go
Go
go
2,900
permissive
// Copyright 2018 JDCLOUD.COM // // 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 ...
69bd1e6a89fb4143316d1f7f66b50e1aa7f6efd0
7680526b5328919c2e41364c009c939ecb5ec726
matzew/kn-plugin-func
/cmd/config_labels_test.go
Go
go
3,615
permissive
// +build linux package cmd import ( "context" "os" "reflect" "sync" "testing" "time" "github.com/Netflix/go-expect" "github.com/hinshun/vt10x" "github.com/spf13/cobra" fn "knative.dev/kn-plugin-func" ) type mockFunctionLoaderSaver struct { f fn.Function } func (m *mockFunctionLoaderSaver) Load(path str...
86fe522308bafff31ee659d753f87e4bf19a910e
0caf20dbb6e660400d99048b71a31fa1c74467f9
holtover01/goLab
/recursion.go
Go
go
383
no_license
package main import "fmt" //This fact function calls itself until it reaches the base case of fact(0). func fact(n int) int { if n == 0 { return 1 } multiply := fact(n - 1) sum := n * multiply // fmt.Println("original ", n) fmt.Println("multi ", multiply) //fmt.Println("sum", sum) fmt.Println() return...
9de41abc1507c2ddf7365529290634fcb4351982
5c2250ae6a22f069e8b553b8e9c94d094aec3c34
nayotta/metathings
/pkg/component/grpc_module_wrapper.go
Go
go
3,829
permissive
package metathings_component import ( "context" "errors" "reflect" "github.com/golang/protobuf/ptypes/any" log "github.com/sirupsen/logrus" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" pb "github.com/nayotta/metathings/proto/component" ) var ( ErrHandleUnimplemented = errors.New("handle u...
c6cfeb0f3251bbece66689de58addad752e28e80
f16d593b130d7aa9697739865f89cfaff3be54d9
MOON-CLJ/orchestrator
/go/inst/instance_topology_dao.go
Go
go
41,730
permissive
/* Copyright 2015 Shlomi Noach, courtesy Booking.com 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 ...
2c9edbd430b51f0cf7b33cc200b62a18c5fb03ce
3afa8ab807fee7c3441158612f4bcb8657386d6f
mrRubyDev/email-service
/internal/template/cache.go
Go
go
1,081
no_license
package template import ( "io/fs" "os" "path/filepath" "github.com/xn3cr0nx/email-service/pkg/logger" ) type TemplateCache struct { Dir string Cache map[string][]byte } var cache *TemplateCache func NewTemplateCache(templateDir *string) (*TemplateCache, error) { if cache != nil { return cache, nil } c...
c77d6229d15411396c5ec26570616c15030b5367
0c86c386a4074f36d7b4db229a5c2c6ef4976c80
devintegral/go-lachesis
/src/common/errors_test.go
Go
go
1,232
permissive
package common import ( "testing" ) func TestStoreErr(t *testing.T) { E := NewStoreErr("test", KeyNotFound, "0") if E.Error() != "test, 0, Not Found" { t.Errorf("Expected 'test, 0, Not Found' but found '%v'", E.Error()) } E = NewStoreErr("test", TooLate, "0") if E.Error() != "test, 0, Too Late" { t.Errorf(...
05f66b71c71e1705b33cf7d2187d7d471c7d436e
a93e9222ff98fc22cf659ab77e0f17a5adac846c
ttlv/mappers-go
/pkg/ble/config.go
Go
go
1,912
permissive
/* Copyright 2021 The KubeEdge 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...
6a4877c39371d5aa8ab535c852faec7cb7b92dcf
c76112d2884a242d2f3f236dbf0d1efe7acc67da
IsuruBRanapana/go-lang-udemy-practice
/section-2/interfaces.go
Go
go
622
no_license
package main import "fmt" type Car1 interface { Drive() Stop() } type Lambo struct { LamboModel string } type Navara struct { NavaraModel string } //if the lambo not satisfied all methods in interface this one is not compiling func NewModel(arg string) Car1 { return &Lambo{arg} } func (l *Lambo) Drive() { f...
7ed5934f10d1f38b562d49b69faa09981612c50c
64da010068d92c1973719a98745a1c294045e13e
mvibraim/star-wars-planets
/planets_controller_unit_test.go
Go
go
5,314
no_license
package main import ( "encoding/json" "errors" "net/http/httptest" "testing" "github.com/go-playground/validator" "github.com/gofiber/fiber" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" ) func TestGetPlanetsSu...
dc0cb87c989905c6cc2843ef17760508ed06e364
65835a1bbab98ecedfa0530458d56797ff209e05
adlio/pgmb
/release-group_test.go
Go
go
2,237
permissive
package pgmb import ( "testing" uuid "github.com/satori/go.uuid" ) func TestReleaseGroup40OzToFreedom(t *testing.T) { rid, _ := uuid.FromString("8e874f9b-7630-3a4c-baf4-73e0e553b2b4") releaseGroup, err := ReleaseGroups(TESTDB).WithAssociations().Where("gid = ?", rid).One() if err != nil { t.Fatal(err) } if ...
76e9b68289c57038448bcc68bcdf0220d7446acb
24d2086626a9753511cc08d7dd7ad286e88200b6
themalkolm/venom
/cron.go
Go
go
5,098
permissive
package venom import ( "fmt" "net/http" "strings" "sync" "sync/atomic" "time" "github.com/Sirupsen/logrus" "github.com/prometheus/client_golang/prometheus" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" "gopkg.in/robfig/cron.v2" ) type cronConfig struct { Schedule str...
2d591708cbfb0686ac5f5f008d05e72504068e03
d2db26d595ba160d3634e985c774731921b7db60
antihax/mock-esi
/v1/go/model_get_universe_asteroid_belts_asteroid_belt_id_ok.go
Go
go
338
permissive
package esiv1 /* 200 ok object */ type GetUniverseAsteroidBeltsAsteroidBeltIdOk struct { /* name string */ Name string `json:"name,omitempty"` /* */ Position GetUniverseAsteroidBeltsAsteroidBeltIdPosition `json:"position,omitempty"` /* The solar system this asteroid belt is in */ SystemId int32 `json:"system...
05ce6fdbf664cf89748eb7d3492ea5d82f88d9b9
a157be16b068f9a1fabc1d1ad6394f3cb7ee7af3
mrmiguu/dsv
/dsv.go
Go
go
5,999
no_license
package dsv import ( "encoding/csv" "errors" "fmt" "io" "reflect" "regexp" "strconv" "strings" "time" ) const ff = `settlement-id,settlement-start-date,settlement-end-date,deposit-date,total-amount,currency,transaction-type,order-id,merchant-order-id,adjustment-id,shipment-id,marketplace-name,shipment-fee-ty...
121d203055103e69ea2da6164a40f59b3645bfb1
a2402d0c857b43cbf25e3b4d3a9eae0abc27f906
Diggernaut/microxlsx
/xlsx.go
Go
go
15,330
permissive
// Package implements creation of XLSX simple spreadsheet files package xlsx import ( "archive/zip" "bufio" "fmt" "html" "io" "os" "regexp" "strconv" "time" "github.com/diggernaut/cast" ) var linkcheck *regexp.Regexp type CellType uint // Basic spreadsheet cell types const ( CellTypeNumber CellType = i...
fd5e2140e764551de40a4a09a803800fb9472ff0
f585228f5f3ff581c4ec326e1e80dbfa60418d1e
SmallTianTian/dingtalk
/model/oapi_blackboard_crea.go
Go
go
2,971
permissive
package model import ( "github.com/SmallTianTian/dingtalk/model/taobao" ) func NewOapiBlackboardCreateRequest() *OapiBlackboardCreateRequest { return &OapiBlackboardCreateRequest{} } type OapiBlackboardCreateRequest struct { taobao.SimpleTaobaoRequest taobao.SimpleResponse Resp OapiBlackboardCreateRe...
70d4a74494a690d1ade96ddf8554d957f4c69f71
b17f4bb9dfdd450f61540cfd33ac4c848bb6f6a4
andrewhertog/istio
/cni/pkg/install/install.go
Go
go
9,631
permissive
// Copyright 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 in wri...
8ac43843f2f5408cefdc31d8c170cb8e5519bf52
4104070773af7fa44e94b01f50f1fadbc185b7ff
tanmaidonavalli/summon-conjur
/cmd/main.go
Go
go
1,263
permissive
package main import ( "fmt" "os" "github.com/cyberark/conjur-api-go/conjurapi" "github.com/cyberark/summon-conjur/pkg/summon_conjur" "github.com/karrick/golf" log "github.com/sirupsen/logrus" ) func RetrieveSecret(variableName string) { config, err := conjurapi.LoadConfig() if err != nil { log.Errorf("Fail...
8854d6edb80a32a38a739a38f0169182ab6c2588
4cf69789063d0fa61b9321109577b97b5fd949d9
CodeRockets/event-crawler
/util/database_test.go
Go
go
620
no_license
package util import ( "database/sql" c "github.com/event-crawler/config" _ "github.com/lib/pq" "github.com/stvp/go-toml-config" "testing" ) const ( DEV_CONFIG_PATH = "../config/dev.conf" PROD_CONFIG_PATH = "../config/prod.conf" ) func TestEventDatabase(t *testing.T) { err := config.Parse(DEV_CONFIG_PATH) i...
0392689d26c5dde9b873d1672b6fbacbac818289
89c7955f3505e8fb2ecc6c535d49c6d8402d94c2
mattlockyer/harmony
/consensus/quorum/one-node-staked-vote_test.go
Go
go
7,442
permissive
package quorum import ( "math/big" "math/rand" "strconv" "testing" "github.com/ethereum/go-ethereum/common" "github.com/harmony-one/bls/ffi/go/bls" "github.com/harmony-one/harmony/numeric" "github.com/harmony-one/harmony/shard" ) var ( quorumNodes = 100 msg = "Testing" hmy = "Harmony...
bb6594791f81a936a4c997035095bc01cea7639f
7b013f57245145ca7a6c33f289776ca4f9a1ff81
zxdvd/proxy
/http.go
Go
go
2,205
no_license
package main import ( "log" "net" "net/http" "net/http/httputil" "time" ) func (auth BasicAuth) validate(user, password string) bool { if auth.Password == password { if auth.User == "" || auth.User == user { return true } } return false } func (p HttpProxy) Start() { log.Printf("http proxy: %+v\n", p...
579f0d79c947cdd0d61ce8532fd46ae9bee4fd1f
d85fdad11a1b4e97b507bfa1e96355e874a6d56c
djmitche/tagset-experiment
/ident/threadsafe_foundry_test.go
Go
go
463
no_license
package ident import ( "sync" "testing" "github.com/stretchr/testify/require" ) func TestThreadsafeFoundry(t *testing.T) { f := NewThreadsafeFoundry(NewInternFoundry()) var id1, id2 Ident wg := sync.WaitGroup{} wg.Add(2) go func() { id1 = f.Ident([]byte("abc:def")) wg.Done() }() go func() { id2 = f....
032ec10b2a0cd080314fd985302659e2ea196080
2c969d630bd09e144da7e2bc6fb41bd3d3c41506
domenicrosati/oag
/writer/writer.go
Go
go
11,337
permissive
// Package writer writes api Package definitions to files package writer import ( "io" "sort" "github.com/dave/jennifer/jen" "github.com/jbowes/oag/config" "github.com/jbowes/oag/pkg" ) // Write writes the API Package definition p to the provided writer. func Write(w io.Writer, p *pkg.Package, boilerplate *con...
ddc185ae2d3f9a0068e1e3f70a201ef17a7a8e4b
a8a6635079c70fa4edcb4e1b6261878c66e5c3f0
SheriffChen/golang
/Documentation/Basics/More types/map-literals.go
Go
go
227
no_license
package main import "fmt" type Vertex_map_literals struct { Lat, Long float64 } var m_literals = map[string]Vertex_map_literals{ "Chen": { 13, 69, }, "Xiao": { 22, 33, }, } func main() { fmt.Println(m_literals) }
9c7289fb12073bc22a716da819ba8894ea54b2a8
37b12e7e8a1e727753a6a402aa1fb10449a12969
raymondbernard/oci-go-sdk
/ailanguage/detect_language_text_classification_request_response.go
Go
go
3,136
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...
5ba28eeebf722d20a0353b62ba4beb8f009f2982
1108269ebefa9b0d5ef3fc21ee87c19dc7fbbe44
ftl/digimodes
/cw/mod.go
Go
go
3,413
permissive
package cw import ( "errors" "fmt" "unicode" ) type Modulator struct { symbols chan interface{} closed chan struct{} pitchFrequency float64 wpm int dit float64 window float64 symbolStart float64 symbolEnd float64 keyDown bool } func NewModulator(frequency fl...
f3f27c211e7795e38dfcca078af6e04ba0ac31f2
c4ff8184f4a49f9be9f7b29dce80f9dc12f681c2
huaweicloud/huaweicloud-sdk-go-v3
/services/roma/v2/model/model_import_live_data_api_definitions_v2_request_body.go
Go
go
4,847
permissive
package model import ( "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" "encoding/json" "errors" "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/def" "os" "reflect" "strings" ) type ImportLiveDataApiDefinitionsV2RequestBody st...
978466e6a7879f128a9b01e29cfd8db84118801e
f4c9eb98f8019b82843951ec1c1cdab1a34461d5
delta/dalal-street-server
/models/ShortSell.go
Go
go
6,284
no_license
package models import ( "github.com/jinzhu/gorm" "github.com/sirupsen/logrus" ) // Short sell bank is an abstraction of inventory, holds // the number of stocks of stock available for lending (which is further used for shorting by the user) type ShortSellBank struct { StockId uint32 `gorm:"column:stockId;p...
f8e07449e14ae800ea0b7d2d44ab8a13ba596c5b
d26e5943842a05f340a7ca5316b209287f9ce631
microsoftgraph/msgraph-beta-sdk-go
/drives/item_items_item_workbook_functions_bin2_oct_request_builder.go
Go
go
4,897
permissive
package drives import ( "context" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" i20a3050780ee0b0cde0a884a4f35429a20d6...
fdea9f660f514dd857255f8cb7987a25c8ea831d
90cc52c99253c4661de91e18b52e6937f0ef80bf
WarpCloud/walm
/vendor/github.com/docker/docker/plugin/manager_windows.go
Go
go
666
permissive
package plugin // import "github.com/docker/docker/plugin" import ( "fmt" "github.com/docker/docker/plugin/v2" specs "github.com/opencontainers/runtime-spec/specs-go" ) func (pm *Manager) enable(p *v2.Plugin, c *controller, force bool) error { return fmt.Errorf("Not implemented") } func (pm *Manager) initSpec(p...
64dfe19a65e0d19bad7e314929fbaab12bd07c57
9e9fa69a385338a238cd1a0b131290bc571b6af8
goapt/gencode
/ring.go
Go
go
653
permissive
package gencode import ( "time" ) func NewRing(min, max int, wait time.Duration) *Ring { r := &Ring{ ch: make(chan int), Min: min, Max: max, Wait: wait, } r.init() return r } type Ring struct { ch chan int Min int Max int Wait time.Duration } func (r *Ring) init() { m := make(map[int]bool)...
d3c55d81987810867bf102ae7bdc443a91e978ae
3684c657b55d1b0315615511a5e296d21f7c324d
indrasaputra/spenmo
/service/card_deleter.go
Go
go
881
no_license
package service import ( "context" ) // DeleteCard defines the interface to delete user's card. type DeleteCard interface { // Delete deletes an existing user's card. Delete(ctx context.Context, userID, cardID int64) error } // DeleteCardRepository defines interface to delete the card in the storage. type DeleteC...
d1978cafe70411490a12966a15f01f0f781ade65
838d78fc20cb6edaaed9d3c40e7e7984cd6ea6f8
walm/advent-of-code-2017
/day6/main.go
Go
go
1,423
no_license
package main import ( "fmt" "io/ioutil" "strconv" "strings" ) // satoia string array to int array ;) func satoia(s []string) []int { ns := []int{} for _, c := range s { if n, err := strconv.Atoi(strings.Trim(c, "")); err == nil { ns = append(ns, n) } } return ns } func indexAndMax(a []int) (i int, m i...
f366766aaa49dad29bb61ba493af59629b5ca7f9
cead94ca27b0f359beaa7a34d28d76c4a2189904
linuxkit/linuxkit
/src/cmd/linuxkit/vendor/github.com/containerd/fifo/raw.go
Go
go
2,242
permissive
// +build !windows /* Copyright The containerd 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 applica...
969f5a255fe219927c4ea9231b7108bc6c29a987
0eef2fe8a6b08c270b1e9f6775213340f613ddae
GeoNet/delta
/internal/stationxml/v1.1/denominator.go
Go
go
265
permissive
package stationxml /* * WARNING: CODE GENERATED AUTOMATICALLY. * * Use "go generate" to update these files. * * THIS FILE SHOULD NOT BE EDITED BY HAND. * */ type Denominator struct { FloatNoUnitType Number CounterType `xml:"number,attr,omitempty"` }
8f4476ea48e2fd26caf1f006091bdbb6293cdeee
3f1c23de4c9f247a0b4bafe1ba25f77ece30ca65
openshift/kubernetes
/staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/matching/matching_test.go
Go
go
38,825
permissive
/* Copyright 2022 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, ...
7ec77c91c386632fc03d03e97f9a1978751252af
5a2fd9d58bfb645b9f63c65c4aaf73541cf2827a
RTradeLtd/go-ipfs-plugin-i2p-gateway
/vendor/gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding/japanese/all_test.go
Go
go
9,734
permissive
// Copyright 2015 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 japanese import ( "fmt" "strings" "testing" "gx/ipfs/QmVcxhXDbXjNoAdmYBWbY1eU67kQ8eZUHjG4mAYZUtZZu3/go-text/encoding" "gx/ipfs/QmVcxhXDbXjNoAdmYB...
203d8ba80dfd431323a8da564a8b328652e70761
b1f361d8fa3d3d3d61fdf59ee5558638a9f012e9
ymohl-cl/herosbook
/cmd/api-editor/controller/book.go
Go
go
5,564
no_license
package controller import ( "fmt" "github.com/ymohl-cl/herosbook/pkg/model" "github.com/ymohl-cl/herosbook/pkg/postgres" "github.com/ymohl-cl/herosbook/pkg/xerror" "golang.org/x/xerrors" ) // RecordBook in sql database func (c controller) RecordBook(b *model.Book) xerror.Xerror { var err error var querySQL po...
8c85500a5bad2ffa0179928982a7b5cfc34577cb
df1768e1c3a5ad0b149ee4ebfcc3f96c6359bc09
IldarMinaev/grafana
/pkg/middleware/middleware.go
Go
go
6,175
permissive
package middleware import ( "strconv" "strings" "gopkg.in/macaron.v1" "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/components/apikeygen" "github.com/grafana/grafana/pkg/log" "github.com/grafana/grafana/pkg/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana...
42a8e87f7760c910899dc6ce61d88fe59b39a96d
1b22adc7a91e950b167ca1318eefc8bdfbdc261b
anazh/tidb
/executor/insert.go
Go
go
9,185
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...
7a8204f7c7771b26ce76e34c17f65cb0d3c6799b
92e36a697efca9d22d4245224670ff6897b9db51
iverc/ibc-go
/testing/mock/ibc_app.go
Go
go
2,563
permissive
package mock import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" channeltypes "github.com/cosmos/ibc-go/v2/modules/core/04-channel/types" "github.com/cosmos/ibc-go/v2/modules/core/exported" ) type MockIBCApp struct { OnChanOpenInit func( ctx sdk....
4e62467fc39634d6b9ed0ee53678829f2ddd0320
8ccb29c8c3783b19f92b3bece4fe47680ff62cb3
thedoctor276/iu-2
/driver/mac/path.go
Go
go
650
permissive
package mac import ( "os" "path/filepath" "strings" "github.com/maxence-charriere/iu" "github.com/maxence-charriere/iu-log" ) var packaged bool func init() { path, err := filepath.Abs(filepath.Dir(os.Args[0])) if err != nil { iulog.Panic(err) } for _, dir := range strings.Split(path, "/") { if strings...
e9a99b4f974282f428304732a7bc134aba9a2cd9
9d4d9dfcc2de5966e8e4b4214dbb9cb59b638db1
ShowPenZ/GoArea
/pkg/mod/golang.org/x/arch@v0.0.0-20171004143515-077ac972c2e4/x86/x86csv/reader.go
Go
go
1,718
permissive
// Copyright 2017 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 x86csv import ( "encoding/csv" "io" ) // A Reader reads entries from an "x86.csv" file. type Reader struct { csv *csv.Reader } // NewReader retur...
fa320e1ee89331f2df40507b23bdf62c81884020
9f2e08da223749b0b158352ebc76f795cbef2281
FrankReh/go-clang
/clang/templateargumentkind.go
Go
go
1,211
permissive
package clang // #include "go-clang.h" import "C" /* Describes the kind of a template argument. See the definition of llvm::clang::TemplateArgument::ArgKind for full element descriptions. */ type TemplateArgumentKind uint32 const ( TemplateArgumentKind_Null TemplateArgumentKind = C.CXTemplateArgume...
4284ff5e1e831af8937eb8839fdd38894c8804d6
b7a3dd8f918ddf33ca9412d709eb480ec2a5c003
newrelic/newrelic-php-agent
/src/newrelic/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
Go
go
4,765
permissive
/* * * Copyright 2018 gRPC 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 agree...
5db022a2e513e00c84eebf3bfc7c68c9952a3413
f31094a9afa60fad9d0040f447e035c11c9ef093
ahpulug/ahpuojv2
/src/ahpuoj/controller/adminSeriesController.go
Go
go
5,565
no_license
package controller import ( "ahpuoj/model" "ahpuoj/request" "ahpuoj/utils" "net/http" "strconv" "github.com/gin-gonic/gin" ) func IndexSeries(c *gin.Context) { pageStr := c.Query("page") perpageStr := c.Query("perpage") param := c.Query("param") page, _ := strconv.Atoi(pageStr) perpage, _ := strconv.Atoi...
79be575800ba49dea965f92c86a1ab2afd4b3581
a927e3d957e3223d50dca4948fe720cf1125d968
CarlosJordanDev/fuchsia-pine64-pinephone
/tools/testing/testrunner/cmd/tester.go
Go
go
12,402
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 main import ( "context" "fmt" "io" "io/ioutil" "net" "os" "path/filepath" "strings" "time" "go.fuchsia.dev/fuchsia/tools/integration/te...
f8f99ec0eb711d67aefb0ad48fa25d71a903552c
60fb20c976fab56e5e55e0c794aa3ec1d3fbfb56
regen-network/regen-ledger
/x/ecocredit/basket/simulation/msg_update_basket_fees.go
Go
go
3,109
permissive
package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" govtypes "github.com/cosmos/cosmos-sdk/x/g...
8d54b49636fdb1618275bc145fb29e045d848d28
1cf70356b2cd668695a27febce79b5294e8e7a00
e5pecial/github_analytics
/internal/handler_test.go
Go
go
626
permissive
package internal import ( "reflect" "testing" ) func Test_sortByValue(t *testing.T) { type args struct { mapping map[int64]int } tests := []struct { name string args args want []Counter }{ {"correct", args{map[int64]int{1: 1, 2: 0, 3: 2, 4: 4}}, []Counter{{4, 4}, {3, 2}, {1, 1}, {2, 0}}}, {"one", ar...
be72ac9857bcc5a461106dd29d5282141c14cf4b
007c995c3cdc5cb65c4a5e7d2f77a27a23077c5c
larsbratholm/visma_task
/cmd/client/client.go
Go
go
879
no_license
package main import ( "context" "io/ioutil" "log" pb "github.com/larsbratholm/visma_task/proto" "google.golang.org/grpc" ) const ( host = ":50051" ) func main() { conn, err := grpc.Dial(host, grpc.WithInsecure()) if err != nil { log.Fatalf("did not connect: %v", err) } defer conn.Close() client := pb.N...
ff9fd35c0ebe0be91bf06355ae0ff9f401ca5a98
dbf174ed797276a53c990805016eca613d684c40
xornivore/tldrfeed
/api/article.go
Go
go
693
permissive
package api import "time" // Article describes an Article posted to a Feed in the tldrfeed service type Article struct { ID string `json:"id"` Title string `json:"title"` Body string `json:"body"` PublishedTime time.Time `json:"published_at"` } // CreateArticleRequest defines...
e24e5ece74e14a77a97781d67cd975848d157e70
3e18b73130f6b9e177cce8dd17f5c913e095f798
dlpc/algernon
/vendor/github.com/xyproto/kinnian/engine/basic.go
Go
go
11,515
permissive
package engine import ( "bytes" "fmt" "io/ioutil" "net/http" "net/url" "os" "path" "path/filepath" "strings" "time" "github.com/russross/blackfriday" log "github.com/sirupsen/logrus" "github.com/xyproto/kinnian/lua/convert" "github.com/xyproto/kinnian/utils" "github.com/yuin/gopher-lua" ) // FutureSta...
cbf9dc8f1532cc0fd0aca924f98f9429380e937b
c1bd913beee46d8e79a776e9f2c8b1bbabe0ef67
white-black-hong/go-admin
/pkg/logger/setup.go
Go
go
1,668
permissive
package logger import ( "go-admin/tools" "path/filepath" "github.com/go-admin-team/go-admin-core/debug/writer" "github.com/go-admin-team/go-admin-core/logger" "go-admin/common/log" ) //func Setup() (*glog.Logger, *glog.Logger) { // var Logger *glog.Logger // var JobLogger *glog.Logger // var RequestLogger *glo...
0022f33b1444e87af3de1ae15de5eeabb505a5a8
7508c6a2c96add72975791841107a44f2a80f309
ChinX/servicecomb-mesher
/injection/templates/servicecomb/template.go
Go
go
1,927
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...
fd2411d7ccfaa63b57d42ad23d8f62a09fb190a6
d3a28eaac92396f2c5bba67f895e204684aa354d
igbugs/goPractical
/parallel_pipeline/_demo/cmd/httpServer/server.go
Go
go
244
no_license
package httpServer import ( "net/http" "fmt" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "<h1>Hello world %s!</h1>", r.FormValue("name")) }) http.ListenAndServe(":8080", nil) }
2ef2d3d437cdb470865d9e87a4009f7670804432
6f430bbacc790315fb9ffd17b7803cbb2901233b
weirubo/api-service
/dao/user.go
Go
go
349
no_license
package dao import "github.com/weirubo/api-service/internal/model" // 封装数据访问 func (d *Dao) CreateUser(name string, state uint8, passWord string, createdBy string) error { user := model.User{ Name: name, State: state, PassWord: passWord, Model: &model.Model{CreatedBy: createdBy}, } return user.Cr...
7cd91aef9ce99cbf449a65a1e18f838f5c087559
c84437f46f4db34a39e77897d3a586068e124046
qianxiaofeng/node_monitor
/api/configApi.go
Go
go
2,587
no_license
package api import ( "node_monitor/dto" "text/template" "node_monitor/persist" "node_monitor/model" "bytes" "fmt" "net/http" "archive/tar" "github.com/gorilla/mux" ) var tmpl *template.Template func initConfigApi() { tmpl = template.Must(template.New("ConfigIniFile").Parse(dto.ConfigIniFile)) } type confi...
3b35661a4bf6400553603bfd42f2f8f553896e47
68931a2caddee1eb7073e01a83c4aaab0aba9d40
ClaesBas/goacmedns
/goacmedns.go
Go
go
7,471
permissive
package main import ( "context" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/pem" "flag" "fmt" "io/ioutil" "log" "net" "net/url" "os" "strings" "time" "golang.org/x/crypto/acme" ) //"Runtime flags" var debug bool var verbose bool //DNS-server related parameter...
f8ef4d8b35c32acdf0894fa817c46e7a244b874f
4cf98d4b9849103c949fb86f5021e09d47cd080a
sim4life/go_poc
/tree-walk/tree-walk.go
Go
go
1,216
permissive
package main // import "code.google.com/p/go-tour/tree" import ( "fmt" "golang.org/x/tour/tree" // "github.com/golang/tour" ) // Walk walks the tree t sending all values // from the tree to the channel ch. func Walk(t *tree.Tree, ch chan int) { var walker func(t *tree.Tree) walker = func(t *tree.Tree) { if t =...
1691abe5bd0b83d198a11d968e863bf785b5f832
6632a8f41c55164ef184796c1abcc2feed5b346b
IsayIsee/GoScan
/Web/app/dao/internal/util_subdomain_result.go
Go
go
16,029
no_license
// ========================================================================== // This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY. // ========================================================================== package internal import ( "context" "database/sql" "github.com/gogf/gf/database/gdb" ...
a9b82dade868043b2655bb5cef6f9608f2b583ef
fc13b8957ef9843bba49f73f03a18842f62b1ad9
renanferr/aws-sdk-go-v2
/service/internal/integrationtest/redshift/smoke_test.go
Go
go
1,583
permissive
// +build integration package redshift import ( "context" "errors" "testing" "time" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/internal/integrationtest" "github.com/aws/aws-sdk-go-v2/service/redshift" "github.com/aws/smithy-go" ) func TestInteg_00_DescribeClusterVersions(t *tes...
0897ed04e8c351937af25fff22a56332a24d2094
31ed9fef1d0e7755332dae65d56dc04f0c814287
hilalisadev/skia-buildbot
/golden/go/code_review/updater/updater_test.go
Go
go
8,269
permissive
package updater import ( "context" "testing" "time" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "go.skia.org/infra/go/testutils" "go.skia.org/infra/go/testutils/unittest" "go.skia.org/infra/go/vcsinfo" "go.skia.org/infra/golden/go/clstore" mock_clstore "go.skia.org/infra/golden...
7ac13e6fe16202a96cd14b0df79b2424f02b6950
c0d51252962e53ad22d7abf7c8d31901f0b3b1de
philips-software/go-hsdp-api
/connect/mdm/blob_data_contracts_service.go
Go
go
4,514
permissive
package mdm import ( "encoding/json" "fmt" "net/http" "github.com/go-playground/validator/v10" "github.com/philips-software/go-hsdp-api/internal" ) type BlobDataContractsService struct { *Client validate *validator.Validate } var ( blobDataContractPIVersion = "1" ) type BlobDataContract struct { ResourceT...
5758967c506fb0c6129d9e34fd1f46f25229748c
978027be9c6e9c7d24276cfb0529d4d977b82833
kubekit99/operator-ohm
/openstackhelm-operator/pkg/helmif/log.go
Go
go
690
no_license
/* 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, ...
fb5cfe9fc824d661c5d0e7f2bfb590eb4fa420a9
6c2f475c75005b8887029fef8a681becc898c1df
jddunleavy/secrets-store-csi-driver
/pkg/csi-common/utils.go
Go
go
3,091
permissive
/* Copyright 2017 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, ...
c84e549ee835c97ec2a6213ad5f09fb7dc2ceaee
eb270eb79ebea44a4b16160295b2443d1868305c
heping945/gin-demo
/router/base.go
Go
go
285
permissive
package router import ( "gin-demo/api/v1" "github.com/gin-gonic/gin" ) func InitBaseRouter(Router *gin.RouterGroup) { BaseRouter := Router.Group("") { BaseRouter.POST("register", v1.Register) BaseRouter.POST("login", v1.Login) BaseRouter.POST("captcha", v1.Captcha) } }
f9baa9523e8b209b7405a2c5150a20e9d8406fef
da30c8b226dc602c12c6edbbed42c5a8ef0e7664
Global19-atlassian-net/declarative-resource-client-library
/services/google/dataproc/autoscaling_policy_internal.go
Go
go
64,650
permissive
// Copyright 2021 Google LLC. 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...
608f3f85709f356ef629da3b4bf18e0d4d989452
097af7d337995c9e2b44e97a2f9cfff5c19adced
Universal-Health-Chain/aries-framework-go
/pkg/kms/webkms/remotekms_test.go
Go
go
15,542
permissive
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package webkms import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/tls" "crypto/x509" "encoding/base64" "encoding/json" "encoding/pem" "errors" "fmt" "io/ioutil" "net" "net/http" "path/filep...
14f25aaf2ebc9d20f782300102be95511c0c7468
41b8a584c470050eb0372110457e47485fa4cbd6
mimtiaz007/interchange
/x/ibcdex/types/expected_keeper.go
Go
go
649
no_license
// x/ibcdex/types/expected_keeper.go package types import sdk "github.com/cosmos/cosmos-sdk/types" // BankKeeper defines the expected bank keeper type BankKeeper interface { SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error MintCoins(ctx sdk.Context, moduleName string, ...