text stringlengths 3.08k 10.4k |
|---|
package analytics
import (
"bytes"
"math"
"net/http"
"net/http/httputil"
"net/url"
"runtime"
"strconv"
"sync/atomic"
"time"
"github.com/getlantern/eventual"
"github.com/getlantern/flashlight/geolookup"
"github.com/getlantern/flashlight/logging"
"github.com/getlantern/flashlight/proxied"
"github.com/getl... |
package clusterconfig
import (
"context"
"fmt"
"strings"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dynamic"
"github.com/openshift/insights-operator/pkg/record"
"github.com/openshift/insights-operator/pkg/uti... |
// Copyright (c) 2021 Terminus, 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 agree... |
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package amplify
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The AWS::Amplify::Domain resource allows you... |
package cointop
import (
"fmt"
"math"
"strconv"
"strings"
"time"
"github.com/miguelmota/cointop/pkg/color"
"github.com/miguelmota/cointop/pkg/humanize"
"github.com/miguelmota/cointop/pkg/pad"
"github.com/miguelmota/cointop/pkg/table"
)
func (ct *Cointop) refreshTable() error {
maxX := ct.width()
ct.table ... |
// Copyright 2021 Opstrace, 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... |
//
// Copyright 2018-present Sonatype 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 ... |
package main
import (
"image/color"
"log"
"os"
"strconv"
"gioui.org/app" // app contains Window handling.
"gioui.org/font/gofont" // gofont is used for loading the default font.
"gioui.org/io/key" // key is used for keyboard events.
"gioui.org/io/system" // system is used for sy... |
// Copyright 2020 The LUCI 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 (C) 2019 SAP SE or an SAP affiliate company. All rights reserved.
// This file is licensed under the Apache Software License, v. 2 except as
// noted otherwise in the LICENSE file.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with t... |
// Package ginXushy
// Time : 2021/5/26 7:59 下午
// Author : xushiyin
// contact : <EMAIL>
package main
import (
"fmt"
_ "github.com/Achillesxu/ginXushy/docs"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/go-playground/validator/v10"
swaggerFiles "github.com/swaggo/files"
ginSwagg... |
package main
import (
"encoding/json"
"fmt"
"os"
"strconv"
"strings"
"github.com/ccsexyz/shadowsocks-go/shadowsocks"
)
// Config for client
type Config struct {
LocalAddr string `json:"localaddr"`
RemoteAddr string `json:"remoteaddr"`
Key string `json:"key"`
Crypt string `json:... |
/*
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, ... |
package main
import (
"context"
"crypto/sha1"
"fmt"
"os"
"github.com/darksidergod/githubfs-test"
"github.com/google/go-github/github"
"github.com/hyperledger/fabric-chaincode-go/pkg/cid"
"github.com/hyperledger/fabric-chaincode-go/shim"
"github.com/hyperledger/fabric-protos-go/peer"
"github.com/spf13/afero"... |
package bitfinex
import (
"fmt"
"math"
"github.com/gogo/protobuf/types"
"github.com/gorilla/websocket"
"github.com/tidwall/gjson"
"encoding/json"
"github.com/crypto-bank/proto/currency"
"github.com/crypto-bank/proto/order"
"github.com/crypto-bank/proto/orderbook"
)
// Stream - Bitfinex stream.
type Stream... |
package static_sources
import (
"encoding/json"
"fmt"
"net/http"
"os"
"path"
"time"
"github.com/hschimke/WorldOfWarcraft_CraftingProfitCalculator-go/internal/environment_variables"
)
const (
bonuses_cache_fn string = "bonuses.json"
rank_mappings_cache_fn string = "rank-mappings.j... |
package main
import (
"fmt"
"io"
"os"
"sort"
"strings"
"text/tabwriter"
"time"
"github.com/remind101/empire/pkg/heroku"
)
var cmdApps = &Command{
Run: runApps,
Usage: "apps [<name>...]",
Category: "app",
Short: "list apps",
Long: `
Lists apps. Shows the app name, owner, and last release time ... |
package logger
import (
"fmt"
"github.com/jrick/logrotate/rotator"
"github.com/pkg/errors"
"io"
"os"
"path/filepath"
"runtime/debug"
"strings"
"sync"
"sync/atomic"
)
const normalLogSize = 512
// defaultFlags specifies changes to the default logger behavior. It is set
// during package init and configured u... |
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 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 obta... |
package localrepo
import (
"bufio"
"bytes"
"context"
"errors"
"fmt"
"io/ioutil"
"strings"
"gitlab.com/gitlab-org/gitaly/internal/command"
"gitlab.com/gitlab-org/gitaly/internal/git"
)
// HasRevision checks if a revision in the repository exists. This will not
// verify whether the target object exists. To d... |
/*
:beti on
*/
package beti
import (
"fmt"
"strings"
"strconv"
)
var Version string
var Copyright string
/// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// ///
// Output document to stdout using hard-coded template.
//
//
func Ou... |
package monitor
import (
"io"
"os"
"strings"
"time"
"github.com/go-cmd/cmd"
"github.com/shirou/gopsutil/process"
log "github.com/sirupsen/logrus"
)
type state string
const (
maxRetries = 10
neverStarted state = "never"
started state = "started"
stopping state = "stopping"
stopped s... |
package util
import (
"fmt"
"os"
"path/filepath"
"runtime"
"strconv"
"strings"
"time"
"unicode/utf8"
)
// Prompt user to input data
func Prompt(msg string) string {
fmt.Printf(msg)
var str string
fmt.Scanln(&str)
return str
}
// Returns true if file/directory exists
func FileExists(path string) bool {
_... |
package git
import (
"bufio"
"fmt"
"io"
"strings"
)
// A BitSetter denotes an option for a flag which sets or unsets
// a bit. It determines both whether the bit should be set, and
// the value it should be set to.
type BitSetter struct {
// If true, the bit should be modified
Modify bool
// Value to set the ... |
package main
import (
"context"
"io"
"io/ioutil"
"net/http"
"os"
"os/signal"
"path/filepath"
"strings"
"syscall"
"time"
"github.com/negz/kuberos"
"github.com/negz/kuberos/extractor"
"github.com/rakyll/statik/fs"
_ "github.com/negz/kuberos/statik"
oidc "github.com/coreos/go-oidc"
"github.com/juliensc... |
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package kendra
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A Kendra FAQ resource
type Faq struct {
pulu... |
package main
import (
"fmt"
"github.com/Shopify/sarama"
"github.com/bdkiran/nolan/log"
)
type check struct {
partition int32
offset int64
message string
}
const (
topic = "test_topic"
messageCount = 15
clientID = "test_client"
numPartitions = int32(8)
)
func main() {
config := sarama.... |
// Copyright 2017 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 metrics
import (
"context"
"encoding/json"
"reflect"
"time"
"github.com/web-platform-tests/wpt.fyi/shared"
)
// SubTest models a sing... |
/*
* Copyright (c) 2018 <NAME>
*
* Use of this work is governed by an MIT License.
* You may find a license copy in project root.
*/
package main
import (
"bytes"
"context"
"fmt"
"image"
"io"
"net/http"
"os"
"os/signal"
"sync/atomic"
"syscall"
"time"
"github.com/pkg/errors"
_ "image/gif"
_ "image... |
// Package s3 provides types and methods for consuming an s3 message
// archive
package s3
import (
"io"
"s3-kinesis-replay/replay"
"s3-kinesis-replay/validate"
"sync"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3iface"
"github.com/aws/aws-sdk-... |
package main
import (
"adventofcode/utils"
"fmt"
"math"
"os"
"regexp"
"strconv"
"strings"
)
func GetOrder(input string) []int {
raw := strings.Split(input, ",")
order := make([]int, len(raw))
for i := 0; i < len(raw); i++ {
num, _ := strconv.Atoi(raw[i])
order[i] = num
}
return order
}
func GetBoard(... |
package getter
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"strings"
"time"
"github.com/betas-in/logger"
"github.com/betas-in/rediscache"
"github.com/betas-in/utils"
)
var (
defaultTimeout = 10 * time.Second
fakeUserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) A... |
package xml
import (
"encoding/xml"
"io"
"time"
"github.com/mbrt/gmailctl/internal/engine/config/v1alpha3"
"github.com/mbrt/gmailctl/internal/engine/filter"
)
// DefaultExporter returns a default XML exporter.
func DefaultExporter() Exporter {
return Exporter{now: defaultNow}
}
// NewWithTime returns a new ex... |
/*
Sniperkit-Bot
- Status: analyzed
*/
package csjwt
import (
"crypto/ecdsa"
"crypto/rsa"
"fmt"
"testing"
"github.com/corestoreio/errors"
"github.com/sniperkit/snk.fork.corestoreio-pkg/util/assert"
)
var _ fmt.GoStringer = (*Key)(nil)
var _ fmt.Stringer = (*Key)(nil)
func TestNewKeyFunc(t *testing.T) {
te... |
package google
import (
"encoding/base64"
"fmt"
"github.com/crosstalkio/log"
"github.com/crosstalkio/pubsub"
"github.com/go-redis/redis/v7"
)
type backbone struct {
log.Sugar
client *redis.Client
pubsub *redis.PubSub
prefix string
subs map[string][]*subscription
msgCh chan *redis.Message
subCh ... |
package awsapi
import (
"bytes"
"log"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3iface"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/aws/aws-sdk-go/service/s3/s3manager/s3manageriface"
"github.com/xinnige/asteraceae... |
package folder
import (
"context"
"fmt"
"github.com/pthethanh/robusta/internal/app/auth"
"github.com/pthethanh/robusta/internal/app/types"
"github.com/pthethanh/robusta/internal/pkg/config/envconfig"
"github.com/pthethanh/robusta/internal/pkg/log"
"github.com/pthethanh/robusta/internal/pkg/validator"
)
type (... |
package mtproto
import (
"context"
"io"
"sync"
"time"
"github.com/go-faster/errors"
"go.uber.org/atomic"
"go.uber.org/zap"
"github.com/gotd/td/bin"
"github.com/gotd/td/clock"
"github.com/gotd/td/internal/crypto"
"github.com/gotd/td/internal/exchange"
"github.com/gotd/td/internal/mtproto/salts"
"github.c... |
package iamexample
import (
"context"
"fmt"
"net"
"testing"
"cloud.google.com/go/spanner"
"go.einride.tech/aip/resourcename"
"go.einride.tech/iam/iamauthz"
"go.einride.tech/iam/iamcaller"
"go.einride.tech/iam/iamspanner"
"go.einride.tech/iam/iamtest"
iamexamplev1 "go.einride.tech/iam/proto/gen/einride/iam/... |
// Copyright (c) LINAGORA
//
// 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 writ... |
package walker
import (
"os"
"path/filepath"
"strings"
"github.com/go-enry/go-enry/v2"
"github.com/huichen/kunlun/internal/common_types"
"github.com/huichen/kunlun/pkg/types"
)
type walkerInfo struct {
path string
// 如果为内存读取的远端代码仓库,输入下面的值
isGitRemoteRepo bool
content []byte
repoRemoteURL strin... |
package tracetools
import (
"errors"
"testing"
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/log"
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
)
// TestOpenTracingSpan is a simple o... |
package jenkinssecretsengine
import (
"context"
"errors"
"fmt"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/logical"
)
const (
configPrefix = "config"
)
// jenkinsConfig includes the minimum configuration
// required to instantiate a new jenkins client.
type jenkinsConfig struct ... |
// Package machine provides a number of utility functions encapsulating often-used sequences.
// I.e. create/delete applications/services, bind/unbind services, etc.
// This is done in the hope of enhancing the readability of various before/after blocks.
package machine
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net... |
package errors
import (
"fmt"
)
// Severity of the error
type Severity uint8
const (
// ERROR level
ERROR Severity = iota
// WARNING level
WARNING
// INFO level
INFO
// DEBUG level
DEBUG
)
// CLIError wraps an error encountered
type CLIError struct {
severity Severity
code int
desc string
messa... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: proto.proto
package importdedup
import (
fmt "fmt"
_ "github.com/tron-us/protobuf/gogoproto"
proto "github.com/tron-us/protobuf/proto"
github_com_tron_us_protobuf_test_importdedup_subpkg "github.com/tron-us/protobuf/test/importdedup/subpkg"
subpkg "gi... |
package functions
import (
"bytes"
"encoding/base64"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
"os/user"
"path"
"strings"
"golang.org/x/crypto/ssh"
)
func CheckIPAddress(ip string) error {
if net.ParseIP(ip) == nil {
fmt.Printf("IP Address: %s - Invalid\n", ip)
return errors.New("invalid ip ... |
package schema
import (
"database/sql"
"fmt"
"io/ioutil"
"log"
"os"
"testing"
"github.com/ory/dockertest"
"github.com/ory/dockertest/docker"
)
// TestDB represents a specific database instance against which we would like
// to run database migration tests.
//
type TestDB struct {
Dialect Dialect
Driver ... |
//usr/bin/env go run "$0" "$@"; exit "$?"
package main
import (
"crypto/tls"
"metasploit/module"
"msmail"
"net/http"
"sort"
"strconv"
"sync"
"time"
)
func main() {
metadata := &module.Metadata{
Name: "On premise user enumeration",
Description: "On premise enumeration of valid exchange users",
A... |
package models
import (
"strconv"
"github.com/ciscoecosystem/aci-go-client/container"
)
const MaintUpgJobClassName = "maintUpgJob"
type UpgJob struct {
BaseAttributes
UpgJobAttributes
}
type UpgJobAttributes struct {
CreationDate string `json:",omitempty"`
DesiredVersion string `json:",omi... |
package ddtracer
import (
"context"
"fmt"
stdlog "log"
"math/rand"
"os"
"time"
"github.com/DataDog/dd-trace-go/tracer"
opentracing "github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
"github.com/opentracing/opentracing-go/log"
)
func init() {
rand.Seed(time.Now().UnixNano()... |
package main
import (
"context"
"flag"
"fmt"
"io"
"os"
"regexp"
"strings"
"github.com/google/go-github/v32/github"
"github.com/pmatseykanets/gh-tools/auth"
gh "github.com/pmatseykanets/gh-tools/github"
"github.com/pmatseykanets/gh-tools/terminal"
"github.com/pmatseykanets/gh-tools/version"
"golang.org/x/... |
package main
import (
"bytes"
"context"
"fmt"
"log"
"net/http"
"time"
"github.com/fernandokm/transparencia-de-dominios/mapclient"
ds "github.com/fernandokm/transparencia-de-dominios/server"
"github.com/fernandokm/transparencia-de-dominios/util"
ct "github.com/google/certificate-transparency-go"
"github.com... |
package aliyun
import (
"context"
"fmt"
"sync"
"github.com/AliyunContainerService/terway/pkg/aliyun/client"
"github.com/AliyunContainerService/terway/pkg/aliyun/metadata"
"github.com/AliyunContainerService/terway/pkg/logger"
"github.com/AliyunContainerService/terway/pkg/utils"
)
var defaultIns *Instance
var o... |
/*
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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.3
// source: objectID.proto
package protos
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/p... |
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"path"
"runtime"
"strings"
"sync"
util "github.com/blinkspark/go-blink-util"
)
var (
configPath string
outPath string
x265Params string
tune string
shutdown bool
newConfig bool
paramsPreset ... |
package config
import (
"testing"
"github.com/ejoffe/spr/git/mockgit"
"github.com/shurcooL/githubv4"
"github.com/stretchr/testify/assert"
)
func TestGetRepoDetailsFromRemote(t *testing.T) {
type testCase struct {
remote string
githubHost string
repoOwner string
repoName string
match bool
... |
package javascript_es6
import (
"bytes"
"fmt"
. "github.com/francoishill/golang-web-dry/errors/checkerror"
"net/url"
"strings"
"text/template"
"github.com/zero-boilerplate/dto-layer-generator/helpers"
"github.com/zero-boilerplate/dto-layer-generator/plugins"
"github.com/zero-boilerplate/dto-layer-generator/s... |
/*
Copyright 2022.
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 un... |
// Package policy provides functionlity to create a POST policy for uploading a
// file directly from a browser to S3.
package policy
import (
"encoding/json"
"strconv"
"time"
)
// AWSV4SignatureAlgorithm is the value typically used for the x-amz-algorithm
// condition key.
const AWSV4SignatureAlgorithm = "AWS4-HM... |
package service
import (
"flag"
"fmt"
"strings"
"time"
logrus "github.com/sirupsen/logrus"
)
type Options struct {
ApiPort int
ApiInterface string
PidPath string
Port int
Interface string
Log string
LogSeverity SeverityFlag
LogFormatter logrus.Formatter
EtcdApiVersion int
Etcd... |
// The AlternatorNodes class defined here can be used to easily change any
// application using aws-sdk-go from using Amazon DynamoDB to use Alternator:
// While DynamoDB only has one "endpoint", this class helps us balance the
// requests between all the nodes in the Alternator cluster.
//
// Sending the requests to a... |
// Copyright 2017 Baliance. All rights reserved.
//
// Use of this source code is governed by the terms of the Affero GNU General
// Public License version 3.0 as published by the Free Software Foundation and
// appearing in the file LICENSE included in the packaging of this file. A
// commercial license can be purchas... |
package binary
import (
"testing"
"github.com/google/go-cmp/cmp"
)
type ints []int
// Compare implement Comparable interface
func (c ints) Compare(v interface{}, i int) int {
a := v.(int)
if a > c[i] {
return 1
} else if a < c[i] {
return -1
} else {
return 0
}
}
func TestBinarySearch(t *testing.T) {
... |
package msgdao
var instance MsgDao
func init() {
instance = impl{
GroupMsgDao: GroupMsgDaoImpl,
ChatMsgDao: ChatMsgDaoImpl,
CacheDao: cacheDao{},
CommonDao: commonDao{},
}
}
type GroupMsgDao interface {
GetGroupMsgSeq(gid int64) (int64, error)
UpdateGroupMsgSeq(gid int64, seq int64) error
CreateGr... |
// Copyright 2019 <NAME>. 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... |
// Code generated by go-swagger; DO NOT EDIT.
package incidents
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.co... |
package models
import (
"strings"
"time"
)
// IntellectualObject in the format that Pharos accepts for
// POST/create.
type IntellectualObjectForPharos struct {
Identifier string `json:"identifier"`
BagName string `json:"bag_name"`
BagGroupIdentifier string `json:"bag_group_identif... |
package packets
import (
"errors"
"fmt"
"io"
)
//Below are the constants assigned to each of the MQTT packet types
const (
ConnectType = 1
ConnackType = 2
PublishType = 3
PubackType = 4
PubrecType = 5
PubrelType = 6
PubcompType = 7
SubscribeType = 8
SubackType = 9
Un... |
/*
@Time : 2021/1/11 14:48
@Author : lai
@Description :
@File : client
*/
package rclient
import (
"bufio"
"bytes"
"errors"
"fmt"
"net"
"strconv"
)
var (
// ErrNotExistObject 返回空对象
ErrNotExistObject = errors.New("client: not exist object")
// ErrProtocolFromat protocol 格式错误
ErrProtocolFromat = errors.New("c... |
// Copyright (c) 2015, <NAME> <<EMAIL>>
// See LICENSE for licensing information
package main
import (
"log"
"os"
"strconv"
"strings"
"text/template"
"unicode"
)
const path = "unicode.go"
var tmpl = template.Must(template.New("tlds").Parse(`// Generated by unicodegen
package xurls
const allowedUcsChar ... |
package gitlab
import (
"fmt"
"github.com/bclicn/color"
g "github.com/xanzy/go-gitlab"
"log"
"math"
"net/http"
"os"
"sort"
"strings"
"time"
)
// Client is exported
type Client struct {
gitlabClient *g.Client
}
// NewClient is exported
func NewClient(httpClient *http.Client) *Client {
token := os.Getenv("... |
package server
import (
"context"
"crypto/sha256"
"crypto/subtle"
"crypto/tls"
"github.com/goph/emperror"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
dcert "github.com/je4/utils/v2/pkg/cert"
"github.com/op/go-logging"
"io"
"io/fs"
"net"
"net/http"
"net/url"
"time"
)
type SubServer interface ... |
package validation
import (
"fmt"
"net/url"
apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
"k8s.io/apimachinery/pkg/util/sets"
kubevalidation "k8s.io/apimachinery/pkg/util/validation"
"k8s.io/apimachinery/pkg/util/validation/field"
api "github.com/karmada-io/karmada/pkg/apis/cluster"
"github... |
package main
import (
"context"
"encoding/json"
"fmt"
"net"
"net/http"
"net/url"
"os"
"strings"
"time"
"github.com/Masterminds/semver"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"github.com/kelseyhightower/envconfig"
"github.com/shellhub-io/shellhub/agent/pkg/keygen"
"github.com/shellhub-i... |
// Copyright 2020 The LUCI 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... |
package coolq
import (
"bytes"
"encoding/gob"
"encoding/json"
"fmt"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/go-cqhttp/global"
log "github.com/sirupsen/logrus"
"github.com/xujiajun/nutsdb"
"hash/crc32"
"path"
"sync"
)
type CQ... |
package crawler
import (
"fmt"
"os"
"strconv"
"strings"
"time"
"github.com/jinzhu/now"
"github.com/tebeka/selenium"
"github.com/topics/common"
"github.com/topics/database"
"github.com/topics/logging"
"github.com/topics/models"
)
var DailyTradingModel = new(models.DailyTrading)
func (c *Crawler) DailyTrad... |
package storage
import (
"context"
"encoding/json"
"strings"
"sync"
"time"
"github.com/Shopify/sarama"
"github.com/pkg/errors"
"golang.org/x/sync/errgroup"
)
// SchemaStorer stores the schema locally
type SchemaStorer interface {
store(schema *Schema) error
}
type kafka struct {
client sarama.Clie... |
package owm
// Package owm provides a client for openweathermap.org's "one call" API
// See https://openweathermap.org/api for details.
import (
"encoding/json"
"fmt"
"net/url"
"strings"
"time"
"github.com/solutionroute/wxo"
"github.com/solutionroute/wxo/internal"
)
const baseURL = "https://api.openweatherma... |
package plumbing
import (
"time"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/hercules.v10/internal/core"
)
// TicksSinceStart provides relative tick information for every commit.
// It is a PipelineItem.
type TicksSinceStart struct {
... |
/*
* @file
* @copyright defined in aergo/LICENSE.txt
*/
package p2p
import (
"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/config"
"github.com/aergoio/aergo/message"
"github.com/aergoio/aergo/p2p/p2pkey"
"github.com/aergoio/aergo/pkg/component"
"github.com/aergoio/aergo/types"
"testing"
)
c... |
package twothy
import (
"crypto/hmac"
"crypto/sha1"
"encoding/base32"
"encoding/binary"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
)
const (
// DefaultStepTime as per RFC 6238 is 30 seconds
DefaultStepTime = 30
// DefaultT0 as per RFC 6238 is 0
DefaultT0 = 0
// DefaultDigits as ... |
// Copyright 2018 The Cockroach 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 datatunnel
import (
"context"
"net"
"sync"
"time"
"github.com/sirupsen/logrus"
)
type TunnelServer struct {
clientListener *net.TCPListener
// userListener *net.TCPListener
clientAdd chan *clientConnection
clientGet chan net.Conn
clientMap sync.Map
logger *logr... |
package main
import (
"flag"
"fmt"
"go/types"
"os"
"time"
"github.com/google/pprof/profile"
"golang.org/x/tools/go/callgraph"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/go/pointer"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/ssa/ssautil"
)
const Usage = `sprof: static profiling
Usage:
... |
package interestcal_test
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"strings"
"testing"
"github.com/rsachdeva/illuminatingdeposits-rest/interestcal/interestvalue"
"github.com/rsachdeva/illuminatingdeposits-rest/testserver"
"github.com/rsachdeva/illuminatingdeposits-rest/userauthn/userauthnvalue"
... |
package selfcheck
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"log"
netUrl "net/url"
"github.com/imroc/req"
)
var (
ErrInfoNotFound = errors.New("Cannot Find Data")
)
const (
AREA_SEOUL = 1 + iota
AREA_BUSAN
AREA_DAEGU
AREA_INCHEON
AREA_GWANGJU
... |
package main
import (
"database/sql"
"encoding/csv"
"fmt"
"log"
"os"
// Register hdb driver.
_ "github.com/SAP/go-hdb/driver"
// ini config
"github.com/go-ini/ini"
// internal
"github.com/morxs/go-hana/utils"
"github.com/urfave/cli"
)
/*
type argT struct {
cli.Helper
ArgConfig string `cli:"c" usage:"Cu... |
package token
import (
"fmt"
"strconv"
"testing"
"time"
"github.com/jrapoport/gothic/models/user"
"github.com/jrapoport/gothic/store"
"github.com/jrapoport/gothic/store/migration"
"github.com/jrapoport/gothic/test/tconn"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
var (
te... |
package iterators_test
//go:generate mockgen -destination SQLRows_mocks_test.go -source SQLRows.go -package iterators_test
import (
"context"
"database/sql"
"errors"
"testing"
"github.com/adamluzsi/frameless/iterators"
"github.com/adamluzsi/testcase"
"github.com/golang/mock/gomock"
"github.com/stretchr/testi... |
package model
import (
"time"
)
//作业表
type VCron struct {
Id uint `gorm:"primary_key;AUTO_INCREMENT" json:"id"`
Jobid int64 `gorm:"type:int(50);comment:'作业ID';not null;index:IX_jobid" json:"jobid"`
JobName string `gorm:"type:varchar(550);comment:'作业名字';not null" json:"job_name"`
Cm... |
package main
import (
"context"
"fmt"
"io"
"mime"
"net"
"net/http"
"os"
"strings"
"github.com/golang/glog"
swag "github.com/nre-learning/syringe/api/exp/swagger"
config "github.com/nre-learning/syringe/config"
"github.com/nre-learning/syringe/pkg/ui/data/swagger"
ghandlers "github.com/gorilla/handlers"... |
package search
import (
"fmt"
"math/rand"
"net"
"github.com/drausin/libri/libri/common/ecid"
"github.com/drausin/libri/libri/common/errors"
"github.com/drausin/libri/libri/common/id"
"github.com/drausin/libri/libri/librarian/api"
"github.com/drausin/libri/libri/librarian/client"
"github.com/drausin/libri/lib... |
package main
import (
"sort"
"strings"
)
type RDSOSMetrics struct {
CpuUtilization CpuUtilization `json:"cpuUtilization"`
DiskIO []DiskIO `json:"diskIO"`
PhysicalDeviceIO []PhysicalDeviceIO `json:"physicalDeviceIO"`
Engine string `json:"engine"`
FileSys ... |
package ethgas
import (
"context"
"net/http"
"sync"
"time"
"github.com/0xsequence/ethgas-app/config"
"github.com/0xsequence/ethgas-app/rpc"
"github.com/0xsequence/ethgas-app/tracker"
"github.com/0xsequence/ethkit/ethgas"
"github.com/0xsequence/ethkit/ethmonitor"
"github.com/0xsequence/ethkit/ethrpc"
"githu... |
package handlers
import (
"context"
"encoding/json"
"fmt"
"cs.utexas.edu/zjia/faas-retwis/utils"
"cs.utexas.edu/zjia/faas/slib/statestore"
"cs.utexas.edu/zjia/faas/types"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
type PostListInput... |
// Copyright 2020 The searKing Author. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package modload
import (
"bufio"
"fmt"
"os"
"path/filepath"
"strings"
)
// ImportPackage finds the package and returns
// its source directory (an e... |
package cli
import (
"context"
"errors"
"fmt"
"os"
"strings"
"github.com/spf13/cobra"
cliutils "inspr.dev/inspr/pkg/cmd/utils"
"inspr.dev/inspr/pkg/meta"
metautils "inspr.dev/inspr/pkg/meta/utils"
"inspr.dev/inspr/pkg/utils"
)
var completionCmd = &cobra.Command{
Use: "completion [bash|zsh|fish|powershel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.