text stringlengths 3.08k 10.4k |
|---|
package gui
import (
"fmt"
"log"
"net"
"net/url"
"strconv"
"strings"
"sync"
"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gtk"
"github.com/twstrike/coyim/config"
"github.com/twstrike/coyim/i18n"
"github.com/twstrike/coyim/session"
)
var (
// TODO: shouldn't this be specific to the account ID in ... |
// Copyright 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" file ... |
/*
Copyright 2021 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, ... |
package memory
import (
"github.com/blackchip-org/pac8/pkg/util/bits"
"github.com/blackchip-org/pac8/pkg/util/state"
)
// Memory is a chunk of 8-bit values accessed by a 16-bit address.
type Memory interface {
// Load returns the value from the address at addr.
Load(addr uint16) uint8
// Store puts the value of... |
package main
import (
"strconv"
"strings"
"time"
hirc "github.com/husio/irc"
)
var (
stopIRC = make(map[string](chan string))
ircGlobal irc
ircLoad = make(chan string)
)
func ircIdentityHandler(botName string) (nickname, password string) {
for _, bot := range ircGlobal.Bots {
if bot.BotName == botName {... |
package main
import (
"bufio"
"context"
"fmt"
"io"
"os"
"strings"
"time"
empty "github.com/golang/protobuf/ptypes/empty"
"github.com/huangjunwen/golibs/logr"
"github.com/huangjunwen/golibs/logr/zerologr"
"github.com/nats-io/nats.go"
ot "github.com/opentracing/opentracing-go"
"github.com/rs/zerolog"
jaeg... |
// Copyright (c) 2017 Tigera, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... |
/*
Copyright 2019 The metaGraf 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... |
package config
import (
"fmt"
"os"
"time"
"github.com/go-playground/validator/v10"
"github.com/imdario/mergo"
"github.com/joho/godotenv"
"github.com/kelseyhightower/envconfig"
"github.com/zbiljic/authzy"
"github.com/zbiljic/authzy/pkg/database/jsonmutexdb"
"github.com/zbiljic/authzy/pkg/database/leveldb"
... |
package wal
import (
"fmt"
"github.com/andy722/fluent-forwarder/util"
log "github.com/sirupsen/logrus"
"github.com/tinylib/msgp/msgp"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
)
//
// SegmentID is a WAL segment sequence.
//
// Denotes a single file-based segment of a write-ahead log. File name ... |
package dao
import (
. "checklist/models"
"fmt"
"log"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
//TrackListDAO ...
// dao object
type TrackListDAO struct {
Server string
Database string
}
var db *mgo.Database
// lists of collections
const (
PublicListCollection = "PublicList"
UserCollection =... |
package main
import (
"context"
"flag"
"fmt"
"github.com/golang/glog"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
pb "github.com/pjoc-team/pay-gateway/demo/gateway/proto"
"github.com/pjoc-team/pay-gateway/demo/gateway/stream"
"google.golang.org/grpc"
"net"
"net/http"
)
var (
endpoint = flag.String(... |
package outbound
import (
"bytes"
"context"
"crypto/tls"
"fmt"
"github.com/miekg/dns"
"golang.org/x/net/proxy"
"io/ioutil"
"math/rand"
"net"
"net/http"
"net/url"
"strings"
"time"
)
// Caller 上游DNS请求基类
type Caller interface {
Call(request *dns.Msg) (r *dns.Msg, err error)
}
// DNSCaller UDP/TCP/DOT请求类
t... |
package worker
import (
"context"
"fmt"
"log"
"math/rand"
"os"
"time"
"github.com/pkg/errors"
"github.com/elastic/hey-apm/es"
"github.com/elastic/hey-apm/models"
"github.com/elastic/hey-apm/server"
)
const quiesceTimeout = 5 * time.Minute
// Run executes a load test work with the given input, prints the ... |
package metadata
import (
"bytes"
"errors"
"fmt"
"github.com/incognitochain/incognito-chain/common"
"github.com/incognitochain/incognito-chain/config"
"github.com/incognitochain/incognito-chain/dataaccessobject/statedb"
"github.com/incognitochain/incognito-chain/incognitokey"
"github.com/incognitochain/incogn... |
/*
Author : <NAME>
Copyright (c) 2017 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicabl... |
package caddy_remote_host
// heavily inspired by Caddy's remote_ip matcher (https://github.com/caddyserver/caddy/blob/cbb045a121464527d85cce1b56250480b0515f9a/modules/caddyhttp/matchers.go#L123)
import (
"fmt"
"github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
"github.com/ca... |
package riot
import (
"flag"
"testing"
"time"
"github.com/onsi/ginkgo"
g "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"
riotv1alpha1 "github.com/vrutkovs/synapse-operator/pkg/apis/riot/v1alpha1"
)
var (
// Handle opera... |
package manager
import (
"context"
"fmt"
"net/url"
synv1alpha1 "github.com/projectsyn/lieutenant-operator/api/v1alpha1"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
corev1 "k8s.io/api/core/v1"
"github.com/go-logr/logr"
)
const (
// SecretTokenName is the name of the secret e... |
package main
/**
Copyright (c) 2020 DXC Technology - <NAME>. All rights reserved
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of cond... |
package jobq_test
import (
"errors"
"fmt"
"sync"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/russtone/jobq"
)
var errTest = errors.New("test")
func containsInt(nn []int, n int) bool {
for _, i := range nn {
if i == n {
return true
}
}
retur... |
package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"os/signal"
"syscall"
"time"
"go.uber.org/zap"
"github.com/gebv/ff_tgbot/admin"
"github.com/gebv/ff_tgbot/chats"
"github.com/gebv/ff_tgbot/logger"
"github.com/gebv/ff_tgbot/nodes"
"github.com/gebv/ff_tgbot/tarantool"
"github.com/gebv/ff_tgbot/teleg... |
package pacman
import (
"context"
"errors"
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"strconv"
"time"
)
type Package struct {
name string
installed bool
}
const packagesKey = "packages"
const cascadeOnDeleteKey = "cascade_on_d... |
package ast
import (
"encoding/binary"
"fmt"
"io"
"math"
"minidb-go/parser/token"
"minidb-go/util"
)
type SQLValueType uint8
const (
SQL_INT SQLValueType = iota
SQL_FLOAT
SQL_TEXT
SQL_COLUMN
)
type SQLInt int64
type SQLFloat float64
type SQLText string
type SQLColumn string
type SQLExprValue interface {
... |
package main
// ----- ---- --- -- -
// Copyright 2019 Oneiro NA, Inc. All Rights Reserved.
//
// Licensed under the Apache License 2.0 (the "License"). You may not use
// this file except in compliance with the License. You can obtain a copy
// in the file LICENSE in the source distribution or at
// https://www.apac... |
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use ... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the MIT License.
// This product includes software developed at Guance Cloud (https://www.guance.com/).
// Copyright 2021-present Guance, Inc.
package container
import (
"context"
"strconv"
"time"
"gitlab.jiagouyun.com/cloud... |
// Code generated by go-swagger; DO NOT EDIT.
package search
// 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.com/g... |
package main
import (
"log"
"os"
"time"
"github.com/square/p2/Godeps/_workspace/src/gopkg.in/alecthomas/kingpin.v2"
"github.com/square/p2/pkg/kp"
"github.com/square/p2/pkg/pods"
"github.com/square/p2/pkg/types"
"github.com/square/p2/pkg/util"
"github.com/square/p2/pkg/version"
)
var (
consulManifestPath ... |
package main
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
"sigs.k8s.io/kustomize/kyaml/fn/framework"
"sigs.k8s.io/kustomize/kyaml/yaml"
)
const (
flagPath = "path"
flagOutputPath = "outputPath"
apiVersionConfigKubernetesIO ... |
/*
* Copyright 2019 The Baudtime 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... |
package server
import (
"flag"
"fmt"
"time"
"github.com/funkygao/gafka/ctx"
)
var (
Options struct {
Id string
Zone string
ApiHttpAddr string
ApiHttpsAddr string
Store string
ManagerStore string
PidFile ... |
package physical
import (
"fmt"
"strings"
"time"
"github.com/bettercap/gatt"
"github.com/go-logr/logr"
"github.com/rancher/octopus/adaptors/ble/api/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type BLEController struct {
done chan struct{}
deviceDone chan struct{}
spec v1alpha1.Blu... |
/*
Copyright 2018 Google 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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distrib... |
package cirno
import (
"fmt"
)
// aabb is an axis-aligned bounding box,
// a rectangle which has no orientation
// and whose edges are aligned with X and Y axes.
//
// For inner usage only.
type aabb struct {
min Vector
max Vector
}
// toRectangle returns an oriented rectangle
// based on the given AABB.
func (bb... |
package main
import "fmt"
func max(a, b int) int {
if a > b {
return a
}
return b
}
func SumAndProduct(a, b int) (int, int) {
return a + b, a * b
}
func sum1(nums ...int) {
fmt.Print(nums, " ")
total := 0
for _, num := range nums {
total += num
}
fmt.Println(total)
}
func add1(a int) int ... |
package nativeGit
import (
"fmt"
"io/ioutil"
"os"
"time"
"github.com/gimlet-io/gimlet-cli/cmd/gimletd/config"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/transport/ssh"
"github.com/otiai10/copy"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
type GitopsRepoCache struct {
ca... |
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use ... |
package rules
import (
"encoding/json"
"fmt"
"github.com/haproxytech/client-native/v2/models"
"github.com/haproxytech/kubernetes-ingress/controller/haproxy/api"
"github.com/haproxytech/kubernetes-ingress/controller/utils"
)
type Rule interface {
Create(client api.HAProxyClient, frontend *models.Frontend, ingr... |
package rest
import (
"context"
"github.com/Kong/kuma/pkg/core"
"github.com/Kong/kuma/pkg/core/ca/provided"
"github.com/Kong/kuma/pkg/core/ca/provided/rest/types"
core_mesh "github.com/Kong/kuma/pkg/core/resources/apis/mesh"
"github.com/Kong/kuma/pkg/core/resources/manager"
"github.com/Kong/kuma/pkg/core/resour... |
package cmd
import (
"bytes"
"fmt"
"log"
"path/filepath"
"runtime"
"strconv"
"strings"
"text/template"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
gitlab "github.com/xanzy/go-gitlab"
"github.com/zaquestion/lab/internal/action"
"github.com/zaquestion/lab/internal/git"
lab "github.com/zaquestio... |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package arm
import (
"cmd/compile/internal/gc"
"cmd/compile/internal/ssa"
"cmd/internal/obj"
"cmd/internal/obj/arm"
)
var ssaRegToReg = []int16{
arm.REG_... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
package rpm
import (
"fmt"
"strings"
"microsoft.com/pkggen/internal/file"
"microsoft.com/pkggen/internal/logger"
"microsoft.com/pkggen/internal/shell"
)
const (
// BuildRequiresArgument specifies the build requires argument to be used ... |
/*
* Tencent is pleased to support the open source community by making 蓝鲸 available.
* Copyright (C) 2017-2018 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... |
package main
import (
"context"
"encoding/json"
"flag"
"fmt"
"net"
"net/http"
"os"
"os/signal"
"path/filepath"
"syscall"
"time"
)
type listener struct {
Addr string `json:"addr"`
FD int `json:"fd"`
Filename string `json:"filename"`
}
func importListener(addr string) (net.Listener, error) {... |
package libs
//
import (
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"mime/multipart"
"net/http"
"strings"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.... |
// Copyright © 2018 Heptio
// 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... |
package _type
import (
"github.com/globalsign/mgo/bson"
"github.com/globalsign/mgo"
"time"
"errors"
)
var (
STOR_TYPE_OPENSDS = "opensds-obj"
STOR_TYPE_AWS_S3 = "aws-obj"
STOR_TYPE_AZURE_BLOB = "azure-obj"
STOR_TYPE_HW_OBS = "hw-obj"
)
var (
JOB_STATUS_PENDING = "pending"
JOB_STATUS_RUNNING = "rnning"
JOB... |
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not... |
/*
Copyright 2019 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... |
package api
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"github.com/go-chi/chi/v5"
"golang.binggl.net/monorepo/pkg/config"
"golang.binggl.net/monorepo/pkg/cookies"
pkgerr "golang.binggl.net/monorepo/pkg/errors"
"golang.binggl.net/monorepo/pkg/security"
"golang.binggl.net/monorepo/internal/core/app/c... |
// Copyright (c) 2014 - The Event Horizon 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... |
// Copyright 2020 Layer5, 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... |
package notifier
import (
"errors"
"fmt"
"reflect"
"strings"
"sync"
"github.com/goharbor/harbor/src/common/utils/log"
)
// HandlerIndexer is setup the relationship between the handler type and
// instance.
type HandlerIndexer map[string]NotificationHandler
// Notification wraps the topic and related data valu... |
/*
Copyright 2020 The cert-manager 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 host
import (
"crypto/cipher"
"net"
"time"
"github.com/uplo-tech/errors"
"github.com/uplo-tech/fastrand"
"golang.org/x/crypto/chacha20poly1305"
"github.com/uplo-tech/uplo/build"
"github.com/uplo-tech/uplo/crypto"
"github.com/uplo-tech/uplo/modules"
"github.com/uplo-tech/uplo/types"
"github.com/upl... |
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package transformers
import (
"fmt"
"log"
"sigs.k8s.io/kustomize/v3/pkg/resource"
"sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/v3/pkg/resmap"
"sigs.k8s.io/kustomize/v3/pkg/transformers/config"
)
type nameReferenceTr... |
package portunes
import (
"context"
"crypto/rand"
"crypto/subtle"
"sync/atomic"
pb "go.tmthrgd.dev/portunes/internal/proto"
"golang.org/x/crypto/argon2"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
const (
saltLen = 16
tagLen = 16
)
type params struct {
time... |
package main
import (
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"strings"
"time"
"github.com/PuerkitoBio/goquery"
"github.com/mmcdole/gofeed"
"github.com/sirupsen/logrus"
)
func getFiles() error {
// Iterate over however many pages we want to display.
for i := 1; i <= maxPages; i++ {
if err := downloa... |
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
ba "github.com/CSUNetSec/bgparchive"
api "github.com/CSUNetSec/bgparchive/api"
"log"
"os"
"strconv"
"strings"
"sync"
"time"
)
var (
flag_refresh_minutes int
flag_descpaths descpaths
flag_basepath string
flag_savepath strin... |
/*
Copyright 2016 Padduck, 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 agreed to in writing, software... |
package ast_test
import (
"bytes"
"fmt"
"testing"
"github.com/pingcap/tidb/parser"
"github.com/pingcap/tidb/parser/ast"
"github.com/stretchr/testify/require"
)
func getDefaultCharsetAndCollate() (string, string) {
return "utf8", "utf8_bin"
}
func TestAstFormat(t *testing.T) {
var testcases = []struct {
in... |
package proxy
import (
"fmt"
pb "github.com/linkerd/linkerd2-proxy-api/go/destination"
net "github.com/linkerd/linkerd2-proxy-api/go/net"
"github.com/linkerd/linkerd2/pkg/addr"
pkgK8s "github.com/linkerd/linkerd2/pkg/k8s"
log "github.com/sirupsen/logrus"
coreV1 "k8s.io/api/core/v1"
)
type endpointUpdateListen... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package guardduty
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
// Update Threat Intel Set Request
// Please also see https://docs.aws.am... |
/*
Copyright 2019 The KubeOne 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... |
// Copyright 2022 The go-exactonline AUTHORS. All rights reserved.
//
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
// Code generated by gen-services.go; DO NOT EDIT.
package manufacturing
import (
"context"
"github.com/stack11/go-exactonline/api"
"github.com/sta... |
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
Copyright 2021.
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... |
// 'web.go'.
// <NAME>.
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"strconv"
"time"
)
var version string
const (
defaultport = 7000
defaultdateendpoint = "date"
defaulttimeendpoint = "time"
)
const exitsuccess ... |
package odoo
import (
"fmt"
)
// FetchmailServer represents fetchmail.server model.
type FetchmailServer struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
ActionId *Many2One `xmlrpc:"action_id,omptempty"`
Active *Bool `xmlrpc:"active,omptempty"`
Attach *Bool `xmlr... |
package netdx
import (
"io"
"net"
"reflect"
"sync"
"syscall"
"time"
"unsafe"
)
const (
IP = "ip"
TCP = "tcp"
UDP = "udp"
UNIX = "unix"
)
//go:linkname net.(*conn).Close CloseConn
func CloseConn(c *conn) error {
if !ok(unsafe.Pointer(c)) {
return syscall.EINVAL
}
cInfo := getConnInfo(c)
cInfo.lo... |
// Copyright (c) 2018 CommerceBlock Team
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
package models
import (
_ "errors"
"fmt"
"math"
"github.com/btcsuite/btcd/chaincfg/chainhash"
)
// Util function to print a merkle tree
func printMerkleTree(tree []*chainha... |
/**
* Copyright 2014 <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 t... |
// Code generated by go-swagger; DO NOT EDIT.
package server
// 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.com/g... |
// Package bytesize provides functionality for measuring and formatting byte
// sizes.
//
// You can also perfom mathmatical operation with ByteSize's and the result
// will be a valid ByteSize with the correct size suffix.
package bytesize
import (
"errors"
"fmt"
"strconv"
"strings"
"unicode"
)
// This code wa... |
// readable is a simple logger based loosely on the 12 Factor Logs
// (http://12factor.net/logs).
//
// Examples:
//
// import (
// "github.com/jmervine/readable"
// )
//
// func main() {
// readable.SetPrefix("server")
// readable.Log("listener", ":3000")
// //=> 2015/08/21 20:01:48 server liste... |
// Copyright 2019-present Open Networking Foundation.
//
// 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... |
package kubernetes
import (
"context"
"encoding/base64"
"encoding/json"
"os"
"path/filepath"
"sync"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/kubernetes/typed/core/v1"
"github.com/fluxcd/flux/pkg/ssh"
)
const (
// The priva... |
//go:build windows
// +build windows
// Copyright 2015 flannel 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 r... |
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package connection
import (
"errors"
"fmt"
"net"
"strconv"
"github.com/Allenxuxu/gev/eventloop"
"github.com/Allenxuxu/gev/poller"
"github.com/Allenxuxu/ringbuffer"
"github.com/Allenxuxu/toolkit/sync/atomic"
"golang.org/x/sys/unix"
)
// ReadCallback 数据可读回调函数
type ReadCallback func(c *Connection, buffer *ring... |
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
Copyright 2021 <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 writing, software
distributed... |
package e2e
import (
"fmt"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/openservicemesh/osm/tests/framework"
)
var _ = OSMDescribe("Test access via multiple services matching the same pod",
OSMDescribeInfo{
Tier: 2,
Bucket: 6,
},
func() {
Context("Multiple services matc... |
/*
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, ... |
// Copyright 2015 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... |
// Package stats Provides the StatBenchmark type that is capable of getting statistics
// for a benchmark given number of iterations.
package stats
import (
"fmt"
"time"
bmark "github.com/aaditkapoor/GoBenchmark"
"github.com/fatih/color"
)
// StatType represents a statistical measure.
type StatType string
const... |
package sources
import (
"cloud.google.com/go/bigquery"
"context"
"fmt"
bq "github.com/googleapis/google-cloud-go-testing/bigquery/bqiface"
"github.com/ovotech/bigquery-metrics-extractor/pkg/config"
"github.com/ovotech/bigquery-metrics-extractor/pkg/metrics"
"github.com/rs/zerolog/log"
"google.golang.org/api/i... |
// Copyright 2017 Docker, 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
package aws
import (
"time"
"github.com/aws/aws-sdk-go-v2/service/cloudwatch"
"... |
// Copyright 2017 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 applicable... |
/*
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, ... |
// 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... |
package route53
import (
"net/http/httptest"
"os"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/route53"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gith... |
/*
table.go
@import github.com/KensukeSakakibara/webamp4/infrastructure/persistence/table
@author <NAME>
@since 2019.08.28
@copyright Copyright (c) 2019 <NAME>
@note GORMを利用してテーブルを管理・操作する汎用処理です。
DBのレプリケーションの対応もこちらで行います。
*/
package table
import (
"fmt"
"github.com/KensukeSakakibara/webamp4/infrastructure/config"
"gi... |
/*
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, ... |
package main
import (
"bytes"
"database/sql"
"encoding/csv"
"fmt"
"github.com/GeoNet/fits/dapper/dapperlib"
"github.com/GeoNet/fits/dapper/internal/platform/s3"
"github.com/GeoNet/kit/cfg"
"github.com/GeoNet/kit/metrics"
_ "github.com/lib/pq"
"log"
"os"
"path"
"sync"
"time"
)
const sqlSelectArchive = `S... |
package cmd
import (
"fmt"
"os"
"runtime"
"time"
"github.com/apex/log"
"github.com/caarlos0/ctrlc"
"github.com/fatih/color"
"github.com/goreleaser/goreleaser/internal/middleware"
"github.com/goreleaser/goreleaser/internal/pipeline"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/gorele... |
package main
//go:generate bin/go-bindata -nometadata -prefix assets -o assets.go assets/... README.md
//go:generate bin/go-bindata -nometadata -debug -pkg dassets -prefix assets -o dassets/assets.go assets/... README.md
import (
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"github.com/Mayo-QIN/grunt/dasset... |
package forwarding_test
import (
"context"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/http/httptest"
"net/url"
"os"
"strconv"
"testing"
"time"
qt "github.com/frankban/quicktest"
"golang.org/x/net/context/ctxhttp"
"github.com/cmars/oniongrok/config"
"github.com/cmars/oniongrok/forwarding"
"github.com/cma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.