text stringlengths 8.57k 38.1k |
|---|
package ws
import (
"bufio"
"bytes"
"fmt"
"io"
"net"
"net/http"
"strings"
"time"
"github.com/gobwas/httphead"
"github.com/gobwas/pool/pbufio"
)
// Constants used by ConnUpgrader.
const (
DefaultServerReadBufferSize = 4096
DefaultServerWriteBufferSize = 512
)
// Errors used by both client and server whe... |
package main
import (
"bufio"
"bytes"
"context"
"encoding/base64"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path/filepath"
"regexp"
"runtime"
"sort"
"strings"
"github.com/flynn/json5"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/encoding/prototext"
"go.skia.org/infra... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/services/billing_setup_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v1/resources"
_ "goo... |
package gdalprocess
// #include "gdal.h"
// #include "gdal_alg.h"
// #include "ogr_api.h"
// #include "ogr_srs_api.h"
// #include "cpl_string.h"
// #cgo pkg-config: gdal
import "C"
import (
"fmt"
"log"
"math"
"sort"
"syscall"
"unsafe"
"encoding/json"
geo "github.com/nci/geometry"
pb "github.com/nci/gsky/wo... |
// 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 gitlab
import (
// nolint:gosec
"crypto/md5"
"encoding/json"
"fmt"
"io"
... |
package bcbp
import (
"encoding/json"
"strconv"
"strings"
"time"
"unicode"
"unicode/utf8"
"unsafe"
)
// BCBP is a structured representation of an IATA 792 Bar Coded Boarding Pass.
type BCBP struct {
// FormatCode is the format of the BCBP. M for multiple.
FormatCode string `json:"format_code"`
// NumberOfL... |
package chidleystein
import (
"encoding/xml"
)
type PubmedArticleSet_Type struct {
PubmedArticle []PubmedArticle_Type `xml:"PubmedArticle,omitempty" json:",omitempty"`
PubmedBookArticle []PubmedBookArticle_Type `xml:"PubmedBookArticle,omitempty" json:",omitempty"`
XMLName xml.Name ... |
package main
import (
"flag"
"fmt"
"golang.org/x/sys/unix"
"io/ioutil"
"os"
"path/filepath"
"strings"
"syscall"
"time"
"unicode/utf8"
)
// Key Definitions
const (
DummyKey = -1
ControlA = 1
ControlB = 2
ControlC = 3
ControlE = 5
ControlF = 6
ControlH = 8
Tab = 9
Enter = 13... |
package money
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"math"
"math/big"
"strconv"
"strings"
"unicode"
"golang.org/x/text/number"
)
// TODO: Replace with https://github.com/cockroachdb/apd
// TODO: Use currency to define the precision
// TODO: Do not require to define a precision
// divisionPreci... |
/*
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 server
import (
"encoding/xml"
"fmt"
"strconv"
"strings"
"time"
"github.com/Bearcatter/bearcatter/wavparse"
)
type SDSKeyType string
type SDSKeyModeType string
type GltXmlType int
const (
DefaultGoProcMultiplier = 5
DefaultGoProcDelay = 30 // milliseconds
LF = 1 << 0
NL = 1 << 1
VALID_KEY_... |
//*
// 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 wam implements an interpreter for a Warren Abstract Machine.
//
// The WAM is a specification to implement a register-based Prolog machine,
// that enjoys good performance and ease of translation to machine code.
//
// The literal specification expects a huge area of contiguous memory to
// contain the machi... |
/*
References:
https://oai.github.io/Documentation/
https://spec.openapis.org/oas/v3.1.0
https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00
https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00
*/
package oas
import (
"fmt"
"net/http"
"path"
r "reflect"
)
const (
/... |
/*
Copyright 2017 Bitnami.
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
distri... |
/*
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 client
import (
"archive/tar"
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"strings"
"github.com/docker/engine-api/types"
"github.com/docker/go-units"
"github.com/hyperhq/hypercli/api"
"github.com/hyperhq/hypercli/builder/dockerignore"
Cli "github.c... |
package portainer
import (
"context"
"io"
"time"
v1 "k8s.io/api/core/v1"
clientV1 "k8s.io/client-go/tools/clientcmd/api/v1"
)
type (
// AccessPolicy represent a policy that can be associated to a user or team
AccessPolicy struct {
// Role identifier. Reference the role that will be associated to this access... |
package commands
import (
"context"
"encoding/binary"
"encoding/hex"
"errors"
"flag"
"fmt"
"io/ioutil"
"math/rand"
"os"
"testing"
"time"
"github.com/33cn/chain33/blockchain"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/common/limits"
"github... |
/**
* @file
* @copyright defined in aergo/LICENSE.txt
*/
package mempool
import (
"bufio"
"bytes"
"encoding/binary"
"io"
"math/big"
"os"
"sync"
"sync/atomic"
"time"
"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo-actor/router"
"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/tasks/v2/task.proto
package tasks
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/g... |
// Copyright 2018 The Chubao Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
// Copyright 2020 CUE 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 ... |
// Copyright 2016 The G3N 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 gls
import (
"math"
"unsafe"
"github.com/thommil/tge-g3n/math32"
gl "github.com/thommil/tge-gl"
)
// GLS encapsulates the state of an OpenGL con... |
// 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 translator
import (
"fmt"
"strings"
"github.com/solo-io/gloo/projects/gloo/pkg/api/v1/options/transformation"
"github.com/golang/protobuf/ptypes/wrappers"
"k8s.io/apimachinery/pkg/util/sets"
"github.com/golang/protobuf/proto"
errors "github.com/rotisserie/eris"
gatewayv1 "github.com/solo-io/gloo/pro... |
package app
import (
"context"
"database/sql"
"fmt"
"io/ioutil"
"net/url"
"os"
"os/signal"
"runtime"
"strings"
"time"
"github.com/jackc/pgx/v4/stdlib"
toml "github.com/pelletier/go-toml"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/target/goalert/auth/basic"
"... |
// Code generated by protoc-gen-go.
// source: resource_desc.proto
// DO NOT EDIT!
package firmament
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.Errorf
var _ = math.Inf
t... |
// Copyright 2013 Ooyala, Inc.
/*
Package statsd provides a Go dogstatsd client. Dogstatsd extends the popular statsd,
adding tags and histograms and pushing upstream to Datadog.
Refer to http://docs.datadoghq.com/guides/dogstatsd/ for information about DogStatsD.
Example Usage:
// Create the client
c, err ... |
package tracker
import (
"errors"
"fmt"
"runtime"
"time"
"github.com/funktionslust/gobulk"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
)
const (
// trackOperationsChunkSize is the max amount of track container operations performed at a time.
trackOperationsChunkSize = 5000
)
// GORMTracker... |
package tuple
import (
"fmt"
"golang.org/x/exp/constraints"
)
// T9 is a tuple type holding 9 generic values.
type T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 any] struct {
V1 Ty1
V2 Ty2
V3 Ty3
V4 Ty4
V5 Ty5
V6 Ty6
V7 Ty7
V8 Ty8
V9 Ty9
}
// Len returns the number of values held by the tuple.
func (t T9... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: github.com/google/cloudprober/targets/proto/targets.proto
/*
Package proto is a generated protocol buffer package.
It is generated from these files:
github.com/google/cloudprober/targets/proto/targets.proto
It has these top-level messages:
TargetsDef
Dum... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: clients/proto/analyzers/threshold_analyzer.proto
package mako_analyzers_threshold_analyzer
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
mako_go_proto "github.com/google/mako/spec/proto/mako_go_proto"
math "math"
)
// Reference imports to ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.11.2
// source: proto/clarifai/auth/util/extension.proto
package util
import (
scope "github.com/Clarifai/clarifai-go-grpc/proto/clarifai/auth/scope"
types "github.com/Clarifai/clarifai-go-grpc/proto/clarifa... |
package binance
import (
"encoding/json"
"github.com/thrasher-/gocryptotrader/currency/symbol"
)
// Response holds basic binance api response data
type Response struct {
Code int `json:"code"`
Msg string `json:"msg"`
}
// ExchangeInfo holds the full exchange information type
type ExchangeInfo struct {
Code... |
package actions
import (
"fmt"
"github.com/inkyblackness/res/data/interpreters"
)
func forType(typeID int) func(*interpreters.Instance) bool {
return func(inst *interpreters.Instance) bool {
return inst.Get("Type") == uint32(typeID)
}
}
var transportHackerDetails = interpreters.New().
With("TargetX", 0, 4).A... |
package pkg
import (
"bufio"
"context"
"encoding/hex"
"io"
"os"
"strings"
"sync"
"time"
"eth2-monitor/cmd/opts"
"eth2-monitor/prysmgrpc"
"eth2-monitor/spec"
"github.com/pkg/errors"
bitfield "github.com/prysmaticlabs/go-bitfield"
eth2types "github.com/prysmaticlabs/eth2-types"
ethpb "github.com/prysma... |
package parser
import (
"fmt"
"strconv"
"github.com/yourfavoritedev/golang-interpreter/ast"
"github.com/yourfavoritedev/golang-interpreter/lexer"
"github.com/yourfavoritedev/golang-interpreter/token"
)
// Define precedences. Using iota to give constants incrementing numbers as values.
// The higher the value, t... |
/*************************************************************************
* Copyright 2018 Gravwell, Inc. All rights reserved.
* Contact: <<EMAIL>>
*
* This software may be modified and distributed under the terms of the
* BSD 2-clause license. See the LICENSE file for details.
**********************************... |
// Modified for Tendermint
// Originally Copyright (c) 2013-2014 Conformal Systems LLC.
// https://github.com/conformal/btcd/blob/master/LICENSE
package peer
import (
crand "crypto/rand" // for seeding
"encoding/binary"
"encoding/json"
"fmt"
"io"
"math"
"math/rand"
"net"
"os"
"sync"
"sync/atomic"
"time"
... |
// Copyright (c) 2013-2014 The btcsuite developers
// Copyright (c) 2015-2020 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package secp256k1
import (
"bytes"
"crypto/ecdsa"
"crypto/sha256"
"errors"
"fmt"
"hash"
"math/big"
)
// Errors ... |
//go:build linux
// +build linux
/*
Copyright 2022 github.com/uc3d (<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 appli... |
// Copyright 2020 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: peer/proposal.proto
package peer // import "github.com/hyperledger/fabric/protos/peer"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import token "github.com/hyperledger/fabric/protos/token"
// Reference imports to supp... |
// Copyright 2018 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 main
import (
"bytes"
"io/ioutil"
"path/filepath"
"regexp"
"strings"
"sync"
"testing"
"golang.org/x/arch/x86/xeddata"
)
func newTestContext(t... |
// Copyright 2021 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
/*
Package parser generates PlantUml http://plantuml.com/ Class diagrams for your golang projects
The main structure is the ClassParser which you can generate by calling the NewClassDiagram(dir)
function.
Pass the directory where the .go files are and the parser will analyze the code and build a structure
containing t... |
// Copyright 2020 CUE 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 ... |
// Copyright 2014 The gocui 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 kubexp
import (
"bytes"
"fmt"
"io"
"os"
"os/exec"
"strconv"
"strings"
"syscall"
"text/template"
"github.com/alitari/gocui"
)
const inlin... |
// Copyright 2021 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
package renter
import (
"bytes"
"fmt"
"io"
"net"
"runtime"
"strings"
"sync"
"sync/atomic"
"time"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/... |
package main
import (
"bufio"
"bytes"
"flag"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"runtime/pprof"
"strconv"
"strings"
"unicode/utf8"
termutil "github.com/japanoise/termbox-util"
"github.com/mitchellh/go-homedir"
"github.com/nsf/termbox-go"
glisp "github.com/zhemao/glisp/interpreter"
"github.... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/image.proto
package automl
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imp... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/bigquery/v2/standard_sql.proto
package bigquery
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are not oth... |
/*
APIClient.go
version 1.0
A library for communicating with Check Point's management server using Golang
written by: Check Point software technologies inc.
June 2019
tested with Check Point R81.20
-----------------------------------------------------------------------------
This is the main module, it contains all ... |
package main
import (
"fmt"
"html/template"
"log"
"net/http"
"reflect"
"sort"
"strings"
"time"
humanize "github.com/dustin/go-humanize"
assetfs "github.com/elazarl/go-bindata-assetfs"
"github.com/gorilla/mux"
"github.com/kiteco/kiteco/kite-go/lang/python/pythoncode"
"github.com/kiteco/kiteco/kite-go/lang... |
package core
import "C"
import (
"crypto/tls"
"fmt"
"github.com/PuerkitoBio/goquery"
"io"
"io/ioutil"
"log"
"net"
"net/http"
"net/url"
"os"
"regexp"
"strconv"
"strings"
"sync"
"time"
jsoniter "github.com/json-iterator/go"
"github.com/gocolly/colly/v2"
"github.com/gocolly/colly/v2/extensions"
"gith... |
package harfbuzz
import (
"unicode"
"github.com/benoitkugler/textlayout/unicodedata"
)
// uni exposes some lookup functions for Unicode properties.
var uni = unicodeFuncs{}
// generalCategory is an enum value to allow compact storage (see generalCategories)
type generalCategory uint8
const (
control generalCate... |
package main
import (
"encoding/json"
"errors"
)
type ColorGamutType string
const (
ColorGamutLivingColors ColorGamutType = "A"
ColorGamutGeneration1 ColorGamutType = "B"
ColorGamutFull ColorGamutType = "C"
ColorGamutOther ColorGamutType = "other"
)
func (c ColorGamutType) String() string { re... |
/*
The block authority handles task related to validating blocks and the blockchain. It is the ultimate instance
that watches over the blockchain up to the frozen edge.
In archive mode, the block authority will start the bootstrap from disk, in other modes, it will react to
bootstrap info received from the node manage... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/api/v2/endpoint/endpoint.proto
package endpoint
import (
fmt "fmt"
core "github.com/cilium/proxy/go/envoy/api/v2/core"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrap... |
//*
// Localization
//
// Translate your pass contents into multiple languages. Multi-language support.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.4
// source: io/common/localization.proto
package io
import (
protoreflect "google.golang.org/protob... |
// Copyright 2016 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
// +build !race
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
package rkgrpc
import (
"context"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/json"
"encoding/pem"
"errors"
"fmt"
gwrunt... |
/*
Go Language Raspberry Pi Interface
(c) Copyright <NAME> 2016-2019
All Rights Reserved
Documentation http://djthorpe.github.io/gopi/
For Licensing and Usage information, please see LICENSE.md
*/
package egl
import (
"strings"
"unsafe"
"github.com/djthorpe/gopi"
)
////////////////////////////////////... |
package command
import (
"bufio"
"flag"
"fmt"
"log"
"net"
"os"
"sort"
"strings"
"time"
"github.com/Shopify/sarama"
"github.com/funkygao/columnize"
"github.com/funkygao/gafka/ctx"
"github.com/funkygao/gafka/sla"
"github.com/funkygao/gafka/zk"
"github.com/funkygao/gocli"
"github.com/funkygao/golib/color... |
// Copyright 2020 The Atlas 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 app... |
package lib_gc_idx
import (
CACHE "github.com/pineda89/go-misc/com.theskyinflames.go.misc/lib_gc_cache"
EVENT "github.com/pineda89/go-misc/com.theskyinflames.go.misc/lib_gc_event"
EVENT_PUBLISHER "github.com/pineda89/go-misc/com.theskyinflames.go.misc/lib_gc_event_publisher"
IDX_VALUE "github.com/pineda89/go-misc/... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: IdentityMetadata.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync ... |
package aml
import (
"bytes"
"gopheros/kernel/kfmt"
"io"
)
const (
// InvalidIndex is a sentinel value used by ObjectTree to indicate that
// a returned object index is not valid.
InvalidIndex uint32 = (1 << 32) - 1
// The size of AML name identifiers in bytes.
amlNameLen = 4
)
// fieldElement groups togeth... |
/**
* @file: log.go
* @package: main
* @author: heiyeluren
* @desc: Log operate file
* @date: 2013/6/24
* @history:
* 2013/6/24 created file
* 2013/7/1 add logid function
* 2013/7/2 update code structure
* 2013/7/4 refactor all code
* 2013/7/10 add log_level operate
*/
package utilit... |
// Copyright (c) 2017-2018 Uber Technologies, 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 applicabl... |
package types
import (
"bytes"
"context"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"sort"
"strings"
"time"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/merkle"
"github.com/tendermint/tendermint/crypto/tmhash"
"github.com/tendermint/tendermint/internal... |
package pika
import (
"bytes"
"encoding/binary"
)
// valid values of BAEpochMessage.Type
const (
viable = iota // Viable means that we know the value is viable. This is sent for our initial estimation, or when we
// received F+1 Viables.
agreement // Agreement means that we know that all nodes will eventually kn... |
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"golang.org/x/sys/unix"
log "gopkg.in/inconshreveable/log15.v2"
"github.com/lxc/lxd/lxd/cluster"
"github.com/lxc... |
package pass
import (
"crypto/sha512"
"encoding/base64"
"encoding/json"
"errors"
"flag"
"fmt"
"html/template"
"io"
"log"
"net"
"net/http"
"os"
"path/filepath"
"runtime"
"runtime/debug"
"strings"
"time"
"github.com/advania/pass/helpers"
"github.com/lib/pq"
)
type passConfiguration struct {
Addons... |
package device
import (
"fmt"
"os"
"strconv"
"encoding/json"
"strings"
"sync"
"time"
"github.com/sirupsen/logrus"
"github.com/toni-moreno/snmpcollector/pkg/agent/bus"
"github.com/toni-moreno/snmpcollector/pkg/agent/output"
"github.com/toni-moreno/snmpcollector/pkg/agent/selfmon"
"github.com/toni-moreno/s... |
package veneur
import (
"errors"
"fmt"
"net/http"
"net/http/pprof"
"net/url"
"os"
"reflect"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"syscall"
"time"
"golang.org/x/net/context"
"github.com/DataDog/datadog-go/statsd"
raven "github.com/getsentry/raven-go"
"github.com/hashicorp/consul/api"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.16.0
// source: envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto
package envoy_extensions_filters_network_mongo_proxy_v3
import (
_ "github.com/cncf/xds/go/udpa/annotations"
v3 "github.com/e... |
package schemalex_test
import (
"bytes"
"flag"
"io/ioutil"
"os"
"testing"
"github.com/hu-mou/schemalex"
"github.com/hu-mou/schemalex/format"
"github.com/pmezard/go-difflib/difflib"
"github.com/stretchr/testify/assert"
)
var testFile = ""
func init() {
flag.StringVar(&testFile, "test-file", testFile, "path... |
package strutil
import (
"math"
"net"
"strings"
"unicode"
// "github.com/spkaeros/rscgo/pkg/log"
)
//MaxBase37 Max base37 string hash for 12-rune usernames. (999999999999)
const MaxBase37 = 6582952005840035281
// this shit is whack.
// Not even positive I'm using it in any active codepath really,
// seems to al... |
package docker
import (
"context"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"os"
"path/filepath"
"strconv"
"sync"
"time"
"github.com/blang/semver"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/connhelper"
cliflags "github.com/docker/cli/cli/flags"
"gi... |
/*
* Copyright 2017-2019 Kopano and its licensors
*
* 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... |
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/bigtable/admin/table/v1/bigtable_table_data.proto
// DO NOT EDIT!
/*
Package google_bigtable_admin_table_v1 is a generated protocol buffer package.
It is generated from these files:
google.golang.org/genproto/googleapis/bigtable/adm... |
package grpc
import (
"context"
"crypto/tls"
"fmt"
"net"
"time"
"github.com/gofrs/uuid"
"github.com/golang/protobuf/proto"
"github.com/jhump/protoreflect/grpcreflect"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.gol... |
// Copyright 2020 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go
package orm
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
"time"
"gorm.io/gorm"
"github.com/tealeg/xlsx/v3"
"github.com/fullstack-lang/gongsvg/go/models"
)
// dummy variable to... |
package pinhole
import (
"fmt"
"image"
"image/color"
"image/png"
"io"
"io/ioutil"
"math"
"os"
"sort"
"strconv"
"strings"
"golang.org/x/image/font/gofont/goregular"
"github.com/fogleman/gg"
"github.com/golang/freetype/truetype"
"github.com/google/btree"
)
const circleSteps = 45
var gof = func() *true... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc (unknown)
// source: aggregates/spotexchangerate/v1/spotexchangerate.proto
package spotexchangeratev1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobu... |
/*
Copyright 2019 Intel Corporation.
SPDX-License-Identifier: Apache-2.0
*/
package operator
import (
"context"
"fmt"
"os"
"strings"
"time"
api "github.com/intel/pmem-csi/pkg/apis/pmemcsi/v1alpha1"
"github.com/intel/pmem-csi/pkg/k8sutil"
"github.com/intel/pmem-csi/pkg/pmem-csi-operator/controller/deployment... |
/*
Author:
Works with MySQL only
script for bombarding specific tables of the database
prepare phase: This phase copies data from the specified table and creates a temporary table out of it.
run phase: the run phase bombards the temporary table with the data
The TEMP_TABLE_SIZE_RATIO environment variable dictates the ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.12.3
// source: fds/protobuf/stach/v2/table/TableData.proto
package table
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: moc_common_computecommon.proto
package common
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
// ... |
// Copyright (c) 2017, <NAME> <<EMAIL>>
// See LICENSE for licensing information
// Package check implements the unparam linter. Note that its API is not
// stable.
package check
import (
"bytes"
"fmt"
"go/ast"
"go/constant"
"go/parser"
"go/printer"
"go/token"
"go/types"
"io"
"os"
"path/filepath"
"regexp"... |
// Copyright Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
package ingester
import (
"flag"
"fmt"
"net/http"
"sync"
"time"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/storage/local/chunk"
"github.c... |
package detector
import (
"fmt"
"math"
"math/bits"
"github.com/makiuchi-d/gozxing"
"github.com/makiuchi-d/gozxing/common"
"github.com/makiuchi-d/gozxing/common/detector"
"github.com/makiuchi-d/gozxing/common/reedsolomon"
"github.com/makiuchi-d/gozxing/common/util"
)
var (
EXPECTED_CORNER_BITS = []int{
0xe... |
package main
import (
"bytes"
"context"
"crypto/tls"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strings"
"github.com/sensu-community/sensu-plugin-sdk/sensu"
v2 "github.com/sensu/sensu-go/api/core/v2"
"github.com/sensu/sensu-go/types"
"gopkg.in/yaml.v2"
metav1 "k8s.io/apima... |
package agent
import (
"bytes"
"context"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"sync"
"sync/atomic"
"time"
runner "github.com/fnproject/fn/api/agent/grpc"
"github.com/fnproject/fn/api/models"
"github.com/fnproject/fn/fnext"
"github.com/go-openapi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.