text
stringlengths
3.08k
10.4k
package api import ( "context" "net/http" "time" sq "github.com/Masterminds/squirrel" jwt "github.com/appleboy/gin-jwt/v2" "github.com/multitheftauto/community/internal/config" "gocloud.dev/blob" "github.com/gin-contrib/cors" "github.com/gin-gonic/gin" "github.com/jmoiron/sqlx" "github.com/sirupsen/logrus...
// pmm-agent // Copyright 2019 Percona LLC // // 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 agr...
package v2 import ( "context" "fmt" "net/http" "sort" "time" "github.com/ViBiOh/httputils/v4/pkg/logger" ) // Group description type Group struct { GroupedLights map[string]GroupedLight ID string Name string Lights []*Light Bridge bool Plug bool } // AnyOn chec...
package main import ( "bytes" "encoding/binary" "errors" "fmt" "image" "image/color" "image/draw" "image/png" "io" "log" "os" "runtime" "github.com/schollz/progressbar/v3" "github.com/murkland/bnrom/paletted" "github.com/murkland/bnrom/sprites" "github.com/murkland/gbarom" "github.com/murkland/pngchu...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.13.0 // source: service.proto package pb import ( context "context" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/gr...
// Copyright 2019 <NAME>. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. // Package styled provides a colored styled widget. package styled import ( "fmt" "github.com/gcla/gowid" ) //========================================================...
package wolf import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( kyleBirthday = nook.Birthday{ Day: 6, Month: t...
package accounting import ( "encoding/json" "io" "os" "path/filepath" "time" "gitlab.com/NebulousLabs/errors" "go.sia.tech/siad/build" "go.sia.tech/siad/modules" "go.sia.tech/siad/persist" "go.sia.tech/siad/types" ) const ( // logFile is the name of the log file for the Accounting module. logFile string ...
// Copyright 2014 The Serviced Authors. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
/* Copyright 2021 KubeCube 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...
package scanner import ( "encoding/json" "fmt" "net/http" "sync" . "util" ) /* * 一个自定义链表,用于频繁的操作删除 */ type NodeList struct { El *NetNeighbor Prev *NodeList Next *NodeList } func NodeListInit() (head *NodeList) { head = &NodeList{ El: nil, Prev: nil, Next: nil, } head.Prev = head head.Next = he...
package message import ( "github.com/icloudland/starchain/crypto" "github.com/icloudland/starchain/net/protocol" "github.com/icloudland/starchain/common/config" "time" "github.com/icloudland/starchain/core/ledger" "bytes" "encoding/binary" "crypto/sha256" "errors" "fmt" "github.com/icloudland/starchain/comm...
package gvabe import ( "bytes" "crypto/rsa" "encoding/json" "errors" "fmt" "io" "io/ioutil" "log" "net/http" "reflect" "time" "github.com/btnguyen2k/consu/reddo" "github.com/btnguyen2k/consu/semita" "main/src/goapi" userv2 "main/src/gvabe/bov2/user" "main/src/utils" ) var ( exterClient *ExterCli...
package renter import ( "strings" "sync/atomic" "testing" "time" "unsafe" "github.com/turtledex/TurtleDexCore/modules" "github.com/turtledex/TurtleDexCore/types" "github.com/turtledex/errors" ) // TestUpdatePriceTableHostHeightLeeway verifies the worker will verify the // HostHeight when updating the price t...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the Li...
// Copyright Project Contour 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...
package ma import ( "context" "github.com/bzimmer/smugmug" "github.com/bzimmer/smugmug/uploadable/filesystem" "github.com/rs/zerolog/log" "github.com/spf13/afero" "github.com/urfave/cli/v2" "golang.org/x/sync/errgroup" ) func visit(c *cli.Context) filesystem.PreFunc { return func(fs afero.Fs, filename string...
package resource import ( "context" "encoding/json" "fmt" "os" "time" "github.com/brancz/locutus/trigger" "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachi...
// Copyright 2016 AlexStocks(https://github.com/AlexStocks). // All rights reserved. Use of this source code is // governed by a BSD-style license. // Package gxkafka encapsulates some kafka functions based on github.com/Shopify/sarama. // MOD : 2016-06-01 05:57 package gxkafka import ( "fmt" "sync" ) import ( "...
package dockerservicemanager import ( "bytes" "context" "fmt" "log" "os" "regexp" "strconv" "time" types "github.com/docker/docker/api/types" container "github.com/docker/docker/api/types/container" mount "github.com/docker/docker/api/types/mount" swarm "github.com/docker/docker/api/types/swarm" client "...
package jaguar import ( "bytes" "encoding/binary" "errors" "fmt" "math" "reflect" ) type ReqHandle interface { //Read byte stream data ReadStream(...interface{}) error //Read string data, need to specify length ReadStreamByString(int, *string) error //Write byte stream data WriteStream(...interface{}) //...
package delta import ( "fmt" "sort" "github.com/tsalright-technologies/governance" ) func Diff(config *governance.Config, discord Discord) ([]Delta, error) { var deltas []Delta members, err := discord.Members() if err != nil { return nil, fmt.Errorf("get members: %w", err) } userIDToName := map[string]st...
package manifest import ( "github.com/tetratom/cftool/pkg/cftool" "io/ioutil" "strings" "text/template" ) const SupportedVersion = "1.1" type Global struct { Constants map[string]string Tags map[string]string Default *Defaults } type Tenant struct { Label string Default *Defaults Constants ma...
// Package server allows rpc/server implementations // to be deployed to AWS Lambda. /* This package has a default *rpc.Server. Services may be registered with the Register and RegisterName functions, as with the net/rpc package. The package's *rpc.Server may also be set with the RPCServer function. Invocations are ha...
package pages //go:generate mockgen -source=page.go -destination ./age_mock.go -package pages import "github.com/zhukovaskychina/xmysql-server/util" type FileHeader struct { FilePageSpaceOrCheckSum []byte //4校验,表示该页面的校验和 FilePageOffset []byte //页号 4 不能简单翻译为页号 FilePagePrev []byte //上一个页号 Fil...
package maps import ( "fmt" "io/ioutil" "log" "net/http" "strconv" "strings" "testing" "time" "github.com/francoispqt/lists" "github.com/francoispqt/lists/slices" "github.com/stretchr/testify/assert" ) func makeMap() MapStringString { myMap := make(map[string]string, 500) for i := 0; i <= 499; i++ { i...
package socket import ( "context" "io" "sync" "time" "github.com/pkg/errors" "github.com/rsocket/rsocket-go/internal/transport" "github.com/rsocket/rsocket-go/logger" "github.com/rsocket/rsocket-go/payload" "github.com/rsocket/rsocket-go/rx" "github.com/rsocket/rsocket-go/rx/flux" "github.com/rsocket/rsock...
package v1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" const ( // NodeConfigurationLabel defines the label which can used to find out to which node configuration crd a node belongs // by external tools NodeConfigurationLabel = "apate-name" // NodeConfigurationLabelNamespace defines the namespace of the a...
package main import ( "bytes" "io" "io/ioutil" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/techdroplabs/rdscheck/checks" ) type mockDefaultChecks struct { checks.DefaultChecks ...
// Copyright 2020 - See NOTICE file for copyright holders. // // 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 ap...
package cmd import ( "flag" "fmt" "io/ioutil" "os" "path/filepath" yaml "gopkg.in/yaml.v2" "github.com/kelveny/mockcompose/pkg/gofile" "github.com/kelveny/mockcompose/pkg/logger" ) var SemVer = "v0.0.0-devel" func GetSemverInfo() string { return SemVer } func usage() { logger.Log(logger.PROMPT, `Usage: ...
// Copyright 2020 Amazon.com, Inc. or its affiliates. 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. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license"...
// Copyright 2021 <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // go-portable checks if a package is compatible with other platforms. // // Internally, it invokes `go vet` on all the officially supported ports, as // reported by `g...
package k8s import ( "k8s.io/client-go/kubernetes" "github.com/astaxie/beego/logs" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "strings" "sort" "encoding/json" "cloud/util" ) // 获取某个集群的服务信息 func GetServices(clientset kubernetes.Clientset, namespace string) ([]v1.Service, error) { opt :...
package jsonrpc_sdk import ( . "github.com/projectriri/bot-gateway/adapters/jsonrpc-server-any/jsonrpc-any" "github.com/projectriri/bot-gateway/router" "github.com/projectriri/bot-gateway/types" log "github.com/sirupsen/logrus" "net" "net/rpc" "net/rpc/jsonrpc" "sync" "time" ) type Client struct { UUID ...
package httpu import ( "crypto/tls" "net/http" "strconv" "time" "github.com/unapu-go/tlsgen" "golang.org/x/net/http2" ) type Http2Config struct { Disabled bool Config *http2.Server } type TlsConfig struct { Generate *tlsgen.Config `mapstructure:"generate" yaml:"generate"` CertFile string ...
package main import ( "fmt" "net/http" "reflect" "strconv" "time" "github.com/hdpool/hdminer/liboo" ) var ( g_chanmgr *oo.ChannelManager g_cache_nonce []SubmitInfo g_miner_status MinerParaStatus g_submit_ts int64 http_handler http.Handler ) type H5ServerIntr struct { last_ms int64 isrun boo...
package provider import ( "bytes" "context" "errors" "fmt" "io/ioutil" "net/url" "os" "path/filepath" "regexp" "strings" "github.com/PuerkitoBio/goquery" ) type fileReader interface { fileExists(string) (os.FileInfo, bool) readFile(string) ([]byte, error) } type fileParser interface { Do(payload []byt...
package main import ( "context" "fmt" "log" "os" "strconv" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/sqs" ) // SQSMessageReplayer type type SQSMessageReplayer struct { sess *session.Session cfg SQSMessageReplayConfig } // SQSMess...
/** Romming's Geometric Hashing Retrieval Algorithm *** :ref http://ismir2007.ismir.net/proceedings/ISMIR2007_p457_romming.pdf *** *** Base40 Pitch Representation *** :ref http://wiki.ccarh.org/wiki/Base_40 *** :ref http://www.ccarh.org/publications/reprints/base40/ **/ package main import ( "fmt" //log "github.co...
package main import ( "bytes" "encoding/json" "fmt" "golang.org/x/net/context" "google.golang.org/appengine" "google.golang.org/appengine/log" "google.golang.org/appengine/urlfetch" "io/ioutil" "net/http" ) // Facebook Callback Handler func FacebookCallbackHandler(w http.ResponseWriter, r *htt...
package cmd import ( "fmt" "github.com/diamondburned/arikawa/v3/api" "github.com/diamondburned/arikawa/v3/discord" "strings" ) const ( // nameMinLength, nameMaxLength are the minimum and maximum lengths a command, subcommand or parameter name can be. nameMinLength = 1 nameMaxLength = 32 // descMinLength, desc...
package ui import ( "fmt" "github.com/chen-keinan/kube-knark/pkg/model" ui "github.com/gizak/termui/v3" "github.com/gizak/termui/v3/widgets" "sort" ) //KubeKnarkUI return UI object type KubeKnarkUI struct { NetEvtChan chan model.K8sAPICallEvent FsEvtChan chan model.K8sConfigFileChangeEvent fsTable *Table ...
package exchange import ( "fmt" "regexp" "strconv" "strings" "sync" "time" "github.com/KyberNetwork/reserve-data/common" "github.com/KyberNetwork/reserve-data/common/bcnetwork" commonv3 "github.com/KyberNetwork/reserve-data/reservesetting/common" "github.com/shopspring/decimal" "go.uber.org/zap" ) //Binan...
package main import ( "crypto/tls" "encoding/hex" "encoding/json" "flag" "fmt" "log" "os" "os/user" "path/filepath" "strconv" "strings" "time" "github.com/go-ldap/ldap/v3" ) const ( unixepoch int64 = 116444736000000000 ) var ( config configSettings writeconfig bool configfile ...
// Copyright 2015 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. package debugger import ( "fmt" "log" "net/http" "net/http/httputil" "net/url" "os" "strings" "golang.org/x/oauth2" ) var ( // HueOauthConfig specifi...
/**************************************************************************** * Copyright 2020, Optimizely, Inc. and contributors * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you m...
package cloudformationdeploy import ( "context" "fmt" "os" "strings" "time" "github.com/alexeyco/simpletable" cfn "github.com/aws/aws-sdk-go-v2/service/cloudformation" "github.com/awslabs/goformation/v4/cloudformation" tm "github.com/buger/goterm" ) // StatusCreateComplete CloudFormation Status const Status...
package main import ( "bytes" "encoding/json" "strconv" "strings" "time" "unicode/utf8" ) // use encoding/json to format log func JsonFormat1(event *FileEvent) string { logEvent := map[string]string{} if len(event.FieldNames) == 0 { logEvent["message"] = *event.Text } else { splited := event.DelimiterRe...
package okta import ( "bytes" "context" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "reflect" "github.com/google/go-querystring/query" ) const ( baseURL = "https://%s.okta.com/" ) type service struct { client *Client } // A Client interacts with Okta. type Client struct { client *http....
package http import ( "bytes" "context" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net/http" "net/http/httptest" "os" "testing" cabby "github.com/pladdy/cabby2" "github.com/pladdy/cabby2/tester" log "github.com/sirupsen/logrus" ) func TestHandleUndefinedRequest(t *testing.T) { status, body := ha...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: jointoken.proto package types import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compil...
package structmatcher /* * This file contains test structs and functions used in unit tests via dependency injection. */ import ( "fmt" "reflect" "strings" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/types" ) /* * If fields are to be filtered in or out, set shouldFilter to...
package exec import ( "amp/back-go/common" "amp/back-go/protocol" "bytes" "github.com/yddeng/dnet/drpc" "io/ioutil" "log" "os" "os/exec" "path" "syscall" ) func (er *Executor) onCmdExec(replier *drpc.Replier, req interface{}) { msg := req.(*protocol.CmdExecReq) log.Printf("onCmdExec %v", msg) ecmd := ex...
package slack // package github.com/justanotherorganization/justanotherbotkit/transpot/slack import ( "context" "errors" "fmt" bkPb "github.com/justanotherorganization/justanotherbotkit/proto" "github.com/justanotherorganization/justanotherbotkit/transport" "github.com/justanotherorganization/justanotherbotkit/...
/** * 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...
package execution import ( "archive/tar" "bytes" "context" "encoding/json" "log" "time" "github.com/dgryski/go-spooky" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" lru "github.com/hashicorp/gola...
package awsv1shim import ( // nosemgrep: no-sdkv2-imports-in-awsv1shim "context" "fmt" "log" "os" awsv2 "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" awsbase "github...
// Copyright 2018 Jira Operator 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 agr...
// Copyright (c) 2013 Couchbase, 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 w...
package inject import "github.com/facebookgo/inject" import "github.com/jrivets/gorivets" import "errors" import "bytes" import "strconv" import "fmt" // Use the Injector to provide dependency injection (DI) design pattern. The // Injector can construct and populate Components (a structs which fields // are tagged by...
/* Copyright 2022 The KubeSphere 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 writin...
/* * Copyright 2018- The Pixie 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 ag...
package main import ( "archive/tar" "compress/flate" "compress/gzip" "encoding/json" "fmt" "github.com/mitchellh/packer/packer" "io" "log" "os" "os/exec" "path/filepath" "strings" ) // Copies a file by copying the contents of the file to another place. func CopyContents(dst, src string) error { srcF, err...
// (c) 2018 by <NAME> (<EMAIL>). See LICENSE.txt. package main import ( "github.com/Kingsford-Group/biblint/bib" "flag" "fmt" "log" "os" "sort" "strings" ) const version = "v0.4" // Represents a function that handles a subcommand type subcommandFunc func(*subcommand) bool type subcommand struct { name stri...
package main import ( "fmt" "os" "os/signal" "strconv" "strings" "github.com/eko/monday/internal/runtime" "github.com/eko/monday/pkg/build" "github.com/eko/monday/pkg/config" "github.com/eko/monday/pkg/forward" "github.com/eko/monday/pkg/hostfile" "github.com/eko/monday/pkg/proxy" "github.com/eko/monday/p...
package app import ( "fmt" "io/ioutil" "path" "k8s.io/klog" "github.com/spf13/cobra" "github.com/spf13/pflag" utilfeature "k8s.io/apiserver/pkg/util/feature" cliflag "k8s.io/component-base/cli/flag" "k8s.io/kubernetes/cmd/kubelet/app/options" kubeletconfigvalidation "k8s.io/kubernetes/pkg/kubelet/apis/con...
package paunch import ( gl "github.com/chsc/gogl/gl21" ) // Shape is an object that represents a vector shape, such as a triangle or // other polygon, that can be drawn on screen. type Shape struct { mode gl.Enum size int vertexBuffer gl.Uint verticies []float32 scaleX float64 scaleY ...
package ratetest import ( "context" "fmt" "math" "net/http" "os" "strings" "sync" "time" "crawshaw.io/sqlite/sqlitex" "github.com/itchio/butler/butlerd" "github.com/itchio/butler/comm" "github.com/itchio/butler/database/models" "github.com/itchio/butler/mansion" "github.com/itchio/go-itchio" "github.co...
//go:generate go install -v github.com/kevinburke/go-bindata/go-bindata //go:generate go-bindata -prefix res/ -pkg assets -o assets/assets.go res/Slack.lnk //go:generate go install -v github.com/josephspurrier/goversioninfo/cmd/goversioninfo //go:generate goversioninfo -icon=res/papp.ico -manifest=res/papp.manifest pac...
package main import ( "context" "encoding/json" "flag" "fmt" "io/ioutil" "log" "net/http" "os" "os/signal" "strconv" "sync" "sync/atomic" "time" ) type key int const ( requestIDKey key = 0 host string = "0.0.0.0" port string = ":15000" ) var ( listenAddr string = host + port hea...
// Copyright 2015-2016 <NAME> // // 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 ...
package wolf import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( skyeBirthday = nook.Birthday{ Day: 24, Month: ...
package digitalocean import ( "fmt" "os" "strings" "github.com/Sirupsen/logrus" api "github.com/digitalocean/godo" "golang.org/x/oauth2" "github.com/juju/ratelimit" "github.com/rancher/external-dns/providers" "github.com/rancher/external-dns/utils" "github.com/rancher/external-dns/config" ) type DigitalOc...
package dedup import ( "crypto/sha1" "sync" ) // filter is the interface implemented by types that evaluate a list of file // paths looking for files with duplicate checksums. // // Uniq, Dup, and Err will be closed once all files have been evaluated, or if // Cancel is called. type filter interface { Start() Uni...
package main import ( "bytes" "flag" "fmt" "go/format" "io/ioutil" "os" "path/filepath" "text/template" "github.com/signalfx/signalfx-agent/internal/monitors" log "github.com/sirupsen/logrus" ) const genMetadata = "genmetadata.go" var tmpl = `// Code generated by monitor-code-gen. DO NOT EDIT. package {{...
// Copyright 2021 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package nuget import ( "archive/zip" "encoding/xml" "errors" "io" "path/filepath" "regexp" "strings" "code.gitea.io/gitea/modules/validation" "gi...
/* Copyright © 2020 NAME HERE <EMAIL ADDRESS> 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...
package privacy import ( "errors" "runtime" "sync" "time" "github.com/bluele/gcache" "go.uber.org/atomic" "go.uber.org/zap" "github.com/qlcchain/go-qlc/common" "github.com/qlcchain/go-qlc/config" "github.com/qlcchain/go-qlc/log" ) const ( ptmNodeUnknown = iota ptmNodeRunning ptmNodeOffline ) type PTM ...
package main import ( "fmt" "strconv" "github.com/gdamore/tcell/v2" "github.com/rivo/tview" ) type View struct { viewModel *ViewModel app *tview.Application table *tview.Table filterField *tview.InputField pathField *tview.InputField statusBar *tview.InputField modal *tview.TextVi...
package image import ( "archive/tar" "bytes" "io" "io/ioutil" "os" "path/filepath" "sort" "testing" "github.com/docker/cli/cli/command" "github.com/docker/cli/internal/test" "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/archive" "github.com/gotestyourself/gotestyourself/assert" is "...
package connpool import ( "context" "fmt" "sync" "time" ) var ( ErrPoolClosed = fmt.Errorf("pool closed") ErrPoolFull = fmt.Errorf("pool is full. put without get ?") ) type Config struct { // initial connections count Initial int // max connections count Max int // max idle connections count MaxIdle in...
package waveparser import ( "bytes" "encoding/binary" "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "reflect" "strings" "testing" ) type wavExpectedHeader struct { RIFFHeader struct { Ident string ChunkSize uint32 FileType string } RIFFChunkFmt RiffChunkFmt FirstSamplePos uint32 D...
//sign.go - defines the AWS S3 signature functionility package radosgw import ( "bytes" "crypto/hmac" "crypto/sha256" "encoding/hex" "fmt" "io/ioutil" "net/http" "sort" "strings" "time" ) const ( signAlgorithm = "AWS4-HMAC-SHA256" signRegion = "us-east-1" signService = "s3" signRequest = "aws4_r...
package approve import ( "fmt" "net/url" "regexp" "strings" "time" sdk "gitee.com/openeuler/go-gitee/gitee" "github.com/sirupsen/logrus" prowConfig "k8s.io/test-infra/prow/config" plugins "k8s.io/test-infra/prow/gitee-plugins" "k8s.io/test-infra/prow/github" "k8s.io/test-infra/prow/pluginhelp" originp "k8...
// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum 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...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package kubernetes import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Reads the Role of an Kubernetes from a Vault ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: broker/v1/config/service_plan.proto package istio_broker_v1_config import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt....
package grpcservice import ( "context" "fmt" "net" "time" "github.com/dynamicgo/go-config" "github.com/dynamicgo/slf4go" "github.com/dynamicgo/xerrors" "github.com/gomeshnetwork/gomesh" "github.com/gomeshnetwork/localservice" "google.golang.org/grpc" ) // Provider . type Provider interface { gomesh.Servic...
package service import ( "context" "net/http" "github.com/ONSdigital/dp-interactives-importer/config" "github.com/ONSdigital/dp-interactives-importer/importer" kafka "github.com/ONSdigital/dp-kafka/v3" "github.com/ONSdigital/log.go/v2/log" "github.com/gorilla/mux" "github.com/pkg/errors" ) // Service contain...
package types import ( "math/big" "time" "github.com/ydb-platform/ydb-go-sdk/v3/internal/cmp" "github.com/ydb-platform/ydb-go-sdk/v3/internal/decimal" "github.com/ydb-platform/ydb-go-sdk/v3/internal/timeutil" "github.com/ydb-platform/ydb-go-sdk/v3/internal/value" ) type Value interface { value.V } func BoolV...
package main import ( "errors" "fmt" "io" "math" "os" "time" "go.soon.build/sslcheck/internal/config" "go.soon.build/sslcheck/internal/slack" "go.soon.build/sslcheck/internal/ssl" "go.soon.build/sslcheck/internal/version" "github.com/rs/zerolog" "github.com/spf13/cobra" configkit "go.soon.build/kit/con...
package fbp import ( "errors" "fmt" "strconv" ) type Graph interface { AddVertex(vertex Vertex) int64 HasVertex(id int64) bool GetVertex(id int64) (Vertex, error) GetVerticesIDs() []int64 RemoveVertex(id int64) HasEdge(idVertex1 int64, idVertex2 int64) bool GetEdge(idVertex1 int64, idVertex2 int64) (Edge, e...
package dkplus import ( "net/http" "net/url" "github.com/omniboost/go-dkplus/utils" ) func (c *Client) NewCompanyGetRequest() CompanyGetRequest { r := CompanyGetRequest{ client: c, method: http.MethodGet, headers: http.Header{}, } r.queryParams = r.NewQueryParams() r.pathParams = r.NewPathParams() r...
package logging import ( "context" "fmt" "io" "os" "time" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) type Formatter string const ( FormatterText Formatter = "text" FormatterJSON Formatter = "json" ) type Fields map[string]interface{} type Level int func (l Level) String() string { return lo...
// Copyright 2017 Istio Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package visitors type PairContext interface { // Returns a new PairContext in which the paths are appended to indicate a // traversal into the given fields of the given structs. EnterStructs(leftStruct interface{}, leftFieldName string, rightStruct interface{}, rightFieldName string) PairContext // Returns a new ...
package sse import ( "bufio" "context" "fmt" "strconv" "strings" "sync" "time" "github.com/isucon/isucon6-final/bench/http" ) type Listener func(data string) type ErrListener func(err error) type EndListener func() type BadContentType struct { ContentType string } func (err *BadContentType) Error() stri...
package meter import ( "sync" "sync/atomic" ) // Counter counts events labeled by values type Counter struct { Count int64 `json:"n"` Values []string `json:"v,omitempty"` } // Snapshot is a slice of counters type Snapshot []Counter // UnsafeCounters is an index of counters not safe for concurrent use type U...
// Copyright 2022 The Casdoor 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 ...