text stringlengths 5.51k 28.1k |
|---|
// Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-License-Identifier: AGPL-3.0
package worker
import (
"fmt"
"strings"
"sync"
"time"
"git.curoverse.com/arvados.git/lib/cloud"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"git.curoverse.com/arvados.git/sdk/go/stats"
"github.com/sirupsen/l... |
/**
* Copyright 2021 Napptive
*
* 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cilium/api/nphds.proto
package cilium
import (
context "context"
fmt "fmt"
v2 "github.com/cilium/proxy/go/envoy/api/v2"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/google... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: proto/ConsensusSubmitMessage.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "ref... |
package main
import (
"context"
"fmt"
"net"
"os"
"os/signal"
"regexp"
"strings"
"syscall"
"time"
"github.com/qdm12/golibs/command"
"github.com/qdm12/golibs/files"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/golibs/network"
"github.com/qdm12/private-internet-access-docker/internal/alpine"
"githu... |
/**
* Copyright 2017 Comcast Cable Communications Management, 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 requir... |
// Copyright (c) <NAME> <<EMAIL>>. All rights reserved. Use
// of this source code is governed by the MIT license that can be found in
// the LICENSE file.
package girc
// Standard CTCP based constants.
const (
CTCP_ACTION = "ACTION"
CTCP_PING = "PING"
CTCP_PONG = "PONG"
CTCP_VERSION = "VERSION... |
package box2d
/// A convex polygon. It is assumed that the interior of the polygon is to
/// the left of each edge.
/// Polygons have a maximum number of vertices equal to b2_maxPolygonVertices.
/// In most cases you should not need many vertices for a convex polygon.
type B2PolygonShape struct {
B2Shape
M_centroi... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/securitycenter/v1beta1/asset.proto
package securitycenter
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golan... |
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei... |
// Copyright 2014-Present Couchbase, Inc.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
// in that file, in accordance with the Business Source License, use of this
// software will be governed by the Apache Lic... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"regexp"
"strconv"
"strings"
"github.com/andybalholm/cascadia"
"golang.org/x/net/html"
)
const (
startPage = "https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-context... |
package xmaker
import (
"context"
"fmt"
"math"
"sync"
"time"
"github.com/sirupsen/logrus"
"github.com/ycdesu/spreaddog/pkg/bbgo"
"github.com/ycdesu/spreaddog/pkg/exchange/max"
"github.com/ycdesu/spreaddog/pkg/fixedpoint"
"github.com/ycdesu/spreaddog/pkg/service"
"github.com/ycdesu/spreaddog/pkg/types"
)
... |
// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors.
package beers
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"strconv"
"strings"
"time"
"github.com/jmoiron/sqlx"
"github.com/rs/zerolog/log"
"github.com/velour/catbase/bot"
"github.com/velour... |
package core
import (
"fmt"
"io/ioutil"
"math/rand"
gnet "net"
"os"
"path"
"sync"
"testing"
"time"
"google.golang.org/grpc"
"github.com/BurntSushi/toml"
"github.com/benbjohnson/clock"
"github.com/drand/drand/beacon"
"github.com/drand/drand/key"
"github.com/drand/drand/log"
"github.com/drand/drand/net... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.4
// source: ligato/linux/l3/route.proto
package linux_l3
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/pro... |
// Copyright 2016 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... |
// Copyright 2017 The Bazel 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 starlark
// Package starlarkstruct defines the Starlark 'struct' type,
// and was merged with package starlark.
// It is tempting to introduce a va... |
// 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... |
// Copyright 2022 The CubeFS 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 2013-2014 go-diameter authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Diameter server, based on net/http.
package diam
import (
"bufio"
"crypto/tls"
"io"
"log"
"net"
"runtime"
"sync"
"time"
"github.com/pl... |
package cli
// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <htt... |
// Copyright 2021 The Chromium OS 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 repo contains functions for interacting with manifests and the
// repo tool.
package repo
import (
"encoding/xml"
"fmt"
"io/ioutil"
"re... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.6.1
// source: protos/output/languageSpecific/orm.proto
package languageSpecific
import (
helpers "code-analyser/protos/pb/helpers"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "... |
package nat
import "github.com/vzex/dog-tunnel/ikcp"
import "github.com/klauspost/reedsolomon"
import "github.com/cznic/zappy"
import (
"errors"
"flag"
"log"
//"math/rand"
"net"
"time"
)
const (
Ping byte = 1
Data byte = 2
FecData byte = 1
FecOver byte = 2
)
var bDebug = flag.Bool("debug", false, "whethe... |
// Copyright 2021 The jackal 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 service
import (
"bufio"
"context"
"fmt"
"go-common/app/job/bbq/video/dao"
searchv1 "go-common/app/service/bbq/search/api/grpc/v1"
"go-common/library/log"
"io"
"net/url"
"os"
"strconv"
"time"
)
const (
_retryTimes = 3
_selection = 5 //运营精选状态
)
//taskCheckVideoDBVSES 视频全量脚本
func (s *Service) ta... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.6.1
// source: balance.proto
package models
import (
_ "github.com/infobloxopen/protoc-gen-gorm/options"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/... |
package ingress
import (
"context"
"fmt"
iov1 "github.com/openshift/cluster-ingress-operator/pkg/api/v1"
logf "github.com/openshift/cluster-ingress-operator/pkg/log"
"github.com/openshift/cluster-ingress-operator/pkg/manifests"
"github.com/openshift/cluster-ingress-operator/pkg/util/slice"
appsv1 "k8s.io/api/... |
// Copyright 2020 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
package vmsetcontroller
import (
"context"
"fmt"
"math/rand"
"strings"
"time"
"github.com/golang/glog"
hfv1 "github.com/hobbyfarm/gargantua/pkg/apis/hobbyfarm.io/v1"
hfClientset "github.com/hobbyfarm/gargantua/pkg/client/clientset/versioned"
hfInformers "github.com/hobbyfarm/gargantua/pkg/client/informers/ex... |
package cmd
import (
"context"
"fmt"
"net"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"syscall"
"time"
"github.com/cjey/overseer"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
"g... |
package packaging
import "encoding/xml"
// StyleSheet Defines
const (
StyleSheetContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"
StyleSheetRelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"
StyleSheetPath = "xl"
StyleShee... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: flyteidl/admin/workflow.proto
package admin
import (
fmt "fmt"
core "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference impor... |
package client
import (
"fmt"
"github.com/DavidAFox/Chat/clientdata"
"github.com/DavidAFox/Chat/connections"
"github.com/DavidAFox/Chat/message"
"github.com/DavidAFox/Chat/room"
"io"
"log"
"strconv"
"strings"
"time"
)
/*
Codes - will be found in header under "code" if the action fails and indicates the reas... |
package main
import (
"database/sql"
"log"
"os"
_ "github.com/lib/pq"
)
var Database *sql.DB
type table_schema struct {
name string
fields map[string]string // name -> type
}
type db_schema struct {
tables []table_schema
}
var database_schema db_schema
func add_table(tbls table_sc... |
package erouter
/*
基于基数树算法实现一个完整路由器
*/
import (
"net/http"
"regexp"
"strconv"
"strings"
)
const (
fullNodeKindConst uint8 = 1 << iota // 常量
fullNodeKindRegex // 参数正则或函数校验
fullNodeKindParam // 参数
fullNodeKindValid // 通配符正则或函数校验
fullNodeKindWil... |
//
// Go-FTL
//
// Copyright (C) <NAME>, 2014-2018.
//
package DocImageProc
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
logrus "github.com/pschlump/pslog" // "github.com/sirupsen/logrus"
"github.com/pschlump/Go-FTL/server/cfg"
"github.com/pschlump/Go-FTL/server/goftlmux"
"git... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tensorflow/core/framework/node_def.proto
package framework
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 _ = ... |
package main
import (
"fmt"
"reflect"
"strconv"
"strings"
"sync"
"github.com/neovim/go-client/nvim"
)
const (
// New options
OPTION_CURSOR_ANIM = "CursorAnimTime"
OPTION_TRANSPARENCY = "Transparency"
OPTION_TARGET_TPS = "TargetTPS"
OPTION_CONTEXT_MENU = "ContextMenuOn"
OPTION_CONTEXT_BUTTON = ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.10.0
// source: proto/upload_mission_edge.proto
package skysign_proto
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoi... |
package query
import (
"database/sql"
"fmt"
"reflect"
"strconv"
"strings"
"github.com/mathieunls/qw/connector"
)
//SQLQuery represents a SQLQuery struct that offers helper function to safely
//interact with the database in go
type SQLQuery struct {
query
//The name of the db table this model primarily uses... |
package main
import (
"database/sql"
"fmt"
"io"
"os"
"strings"
"text/template"
"github.com/Masterminds/squirrel"
"github.com/codegangsta/cli"
_ "github.com/go-sql-driver/mysql"
_ "github.com/lib/pq"
)
const version = "DEV"
// Usage : exported const Usage
const Usage = `Read a schema and generate Structab... |
package emanage
import (
"fmt"
"path"
"time"
"github.com/elastifile/errors"
"github.com/elastifile/emanage-go/pkg/eurl"
"github.com/elastifile/emanage-go/pkg/rest"
)
var Timeout time.Duration = 10 * time.Minute
var AfterShutdown func()
var BeforeStart func()
var BeforeForceReset func()
const (
systemsUri =... |
// Copyright 2020 The LevelDB-Go and Pebble 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 manifest
import (
"bytes"
"fmt"
"sort"
"strings"
"github.com/cockroachdb/errors"
"github.com/cockroachdb/pebble/internal/base... |
package app_test
import (
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"net/http/httptest"
"net/url"
"os"
"path/filepath"
"strconv"
"sync"
"time"
"code.cloudfoundry.org/tlsconfig"
"google.golang.org/grpc/credentials"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
... |
// +build ignore
package main
import (
"fmt"
"io"
"log"
"math/rand"
"net/http"
"net/url"
"os"
"path/filepath"
"strings"
"time"
"github.com/jinzhu/now"
"github.com/qor/i18n/backends/database"
"github.com/qor/media_library"
"github.com/qor/publish"
"github.com/qor/qor-example/app/models"
"github.com/qo... |
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"math"
"net/http"
"reflect"
)
func main() {
// Uninitialized variables have a default value of 0 or false
var i int
fmt.Printf("Uninitialized numerical var = %v\n", i)
var b bool
fmt.Printf("Uninitialized bool var = %v\n", b)
var s string
fmt.Prin... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: nodeStatus.proto
package protobuf
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
// This ... |
// Package cmd creates a command line interface for gnverifier app.
package cmd
import (
"bufio"
_ "embed"
"fmt"
"io"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/dustin/go-humanize"
"github.com/gnames/gnfmt"
vlib "github.com/gnames/gnlib/ent/verifier"
"github.com/gnames/gnquery"
... |
package hlive
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"io"
"math/rand"
"net/http"
"strconv"
"strings"
"sync"
"github.com/cornelk/hashmap"
"github.com/rs/zerolog"
)
type Page struct {
// HTML renderer
Renderer *Renderer
// DOM differ
Differ *Differ
// Page render... |
// fetchError project main.go
package main
import (
"bufio"
//"errors"
"fmt"
"log"
"os"
"path"
//"path/filepath"
"flag"
"runtime"
"runtime/pprof"
"strings"
"time"
)
const BufSize = 4096 * 2
var TIME_NOW time.Time
var LOCAL_IP string = "127.0.0.1"
var writeIterNum int = 1
//var file_path string = "/home/... |
// Copyright 2020 VMware, Inc.
// SPDX-License-Identifier: Apache-2.0
package app
import (
"fmt"
"sort"
"strings"
"github.com/cppforlife/go-cli-ui/ui"
ctlapp "github.com/k14s/kapp/pkg/kapp/app"
ctlcap "github.com/k14s/kapp/pkg/kapp/clusterapply"
cmdcore "github.com/k14s/kapp/pkg/kapp/cmd/core"
cmdtools "gith... |
// Copyright 2019 The Hugo Authors. All rights reserved.
// Some functions in this file (see comments) is based on the Go source code,
// copyright The Go Authors and governed by a BSD-style license.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance... |
package genetics
import (
"context"
"errors"
"fmt"
"github.com/yaricom/goNEAT/v2/neat"
"io"
"math"
"math/rand"
"sort"
)
// A Species is a group of similar Organisms.
// Reproduction takes place mostly within a single species, so that compatible organisms can mate.
type Species struct {
// The ID
Id int
// ... |
package azure
import (
"context"
"errors"
"os"
"strings"
"time"
"github.com/hortonworks/cloud-haunter/utils"
"sync"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-12-01/compute"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/subscriptions"
"github.com/Azure/go-autores... |
// Copyright 2016 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... |
// Copyright 2016 The etcd-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
package blockchain
import (
"bytes"
"crypto/elliptic"
"crypto/rand"
"fmt"
"math"
"os"
"testing"
"github.com/elastos/Elastos.ELA/config"
"github.com/elastos/Elastos.ELA/core"
"github.com/elastos/Elastos.ELA/log"
"github.com/elastos/Elastos.ELA.Utility/common"
"github.com/elastos/Elastos.ELA.Utility/crypto... |
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... |
/*
Copyright 2015 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 getproviders
import (
"fmt"
"runtime"
"sort"
"strings"
"github.com/apparentlymart/go-versions/versions"
"github.com/apparentlymart/go-versions/versions/constraints"
"github.com/fugue/regula/v2/pkg/terraform/addrs"
)
// Version represents a particular single version of a provider.
type Version = versi... |
// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0.
package task
import (
"context"
"time"
"github.com/opentracing/opentracing-go"
"github.com/pingcap/errors"
"github.com/pingcap/failpoint"
backuppb "github.com/pingcap/kvproto/pkg/backup"
"github.com/pingcap/log"
"github.com/pingcap/tidb/config"
"git... |
package synchronization
import (
"encoding/json"
"fmt"
"github.com/jitsucom/jitsu/server/counters"
"github.com/jitsucom/jitsu/server/destinations"
driversbase "github.com/jitsucom/jitsu/server/drivers/base"
"github.com/jitsucom/jitsu/server/events"
"github.com/jitsucom/jitsu/server/logging"
"github.com/jitsuco... |
package parser
import (
"fmt"
"github.com/fract-lang/fract/oop"
"github.com/fract-lang/fract/pkg/fract"
"github.com/fract-lang/fract/pkg/obj"
)
// Metadata of variable declaration.
type varInfo struct {
constant bool
mut bool
}
// Append variable to source.
func (p *Parser) varadd(defs *oop.DefMap, inf v... |
// Copyright 2014 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... |
// Copyright 2014-2019 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... |
package printer
import (
"bufio"
"bytes"
"fmt"
"github.com/jensneuse/graphql-go-tools/pkg/lookup"
"github.com/jensneuse/graphql-go-tools/pkg/parser"
"github.com/sebdah/goldie"
"io"
"testing"
)
func TestPrinter(t *testing.T) {
run := func(input string) {
inputBytes := []byte(input)
p := parser.NewParse... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common/common.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
// This is a c... |
package main
import (
"bufio"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"net"
"net/url"
"os"
"runtime"
"strconv"
"strings"
"time"
"github.com/ginuerzh/gost"
"github.com/go-log/log"
)
var (
options route
routes []route
)
func init() {
gost.SetLogger(&gost.LogLo... |
package bdsql
import (
"fmt"
"strings"
"github.com/go-sql-driver/mysql"
)
// EsError devuelve el error del paquete y un valor lógico que confirma el tipo.
func EsError(err error) (*errorPaquete, bool) {
ep, ok := err.(*errorPaquete)
return ep, ok
}
type errorPaquete struct {
// origen (causa) ... |
/*
* 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 ... |
// 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/route/v3/scoped_route.proto
package envoy_config_route_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Refe... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.4
// source: ligato/generic/meta.proto
package generic
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protob... |
package itest
import (
"context"
"fmt"
"testing"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/funding"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lntest"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/stretchr/testify/require"
)
// testBasicChannelFundin... |
package in
import (
"net/http"
"net/url"
"regexp"
"strings"
"sync"
"github.com/apundir/wsbalancer/common"
slog "github.com/go-eden/slf4go"
"github.com/gorilla/websocket"
)
const (
fePipeBufferSize = 10
bePipeBufferSize = 10
)
var (
alog = slog.NewLogger("in.adm")
mlog = slog.NewLogger(... |
package rockskip
import (
"context"
"database/sql"
"database/sql/driver"
"fmt"
"strings"
"time"
"github.com/grafana/regexp"
"github.com/grafana/regexp/syntax"
"github.com/inconshreveable/log15"
"github.com/keegancsmith/sqlf"
pg "github.com/lib/pq"
"github.com/segmentio/fasthash/fnv1"
"github.com/sourceg... |
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//go:build !build_with_native_toolchain
// +build !build_with_native_toolchain
package netdevice
import (
"context"
"fmt"
"math"
"math/bits"
"sync"
... |
package engo
import (
"github.com/EngoEngine/engo/math"
)
const (
// Epsilon is some tiny value that determines how precisely equal we want our
// floats to be.
Epsilon float32 = 1e-3
// MinNormal is the smallest normal value possible.
MinNormal = float32(1.1754943508222875e-38) // 1 / 2**(127 - 1)
// RadToDe... |
package node
import (
"context"
"fmt"
"strings"
"time"
"github.com/rancher/wrangler/pkg/condition"
ctlbatchv1 "github.com/rancher/wrangler/pkg/generated/controllers/batch/v1"
ctlcorev1 "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
"github.com/rancher/wrangler/pkg/name"
batchv1 "k8s.io/api/b... |
package experimental
import (
"context"
"errors"
"fmt"
"github.com/influxdata/flux"
"github.com/influxdata/flux/codes"
"github.com/influxdata/flux/execute"
"github.com/influxdata/flux/plan"
"github.com/influxdata/flux/runtime"
"github.com/influxdata/flux/semantic"
"github.com/influxdata/flux/stdlib/experime... |
package pop3
import (
"bytes"
"context"
"crypto/tls"
"errors"
"fmt"
"io"
"log"
"net"
"net/textproto"
"runtime"
"sort"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
)
const (
POP3User = "USER"
POP3Pass = "<PASSWORD>"
POP3StartTLS = "STLS"
POP3Capability = "CAPA"
POP3Status = "S... |
package cluster
import (
"sync"
"time"
"github.com/Shopify/sarama"
"github.com/samuel/go-zookeeper/zk"
"gopkg.in/tomb.v2"
)
// Config contains the consumer configuration options
type Config struct {
// Config contains the standard consumer configuration
*sarama.Config
// IDPrefix allows to force custom pref... |
/*
Package paxos provides paxos components for the strong consistency.
The paxos peers as a whole manage a sequential agreed values. Every paxos peer
should be wrapped in an application instance. All the instances build up a
whole system to keep the data consistency. Notice that the set of peers is
fixed.
The data de... |
// Copyright 2019 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" fil... |
// Code generated by protoc-gen-go.
// source: google/api/http.proto
// DO NOT EDIT!
package google_api
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... |
// Copyright 2018 tsuru 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 testing
import (
"bufio"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
"strings"
"sync"
"sync/atomic"
"tim... |
package master
import (
"bytes"
"context"
"fmt"
"net"
"os/exec"
"strings"
"sync"
"testing"
"time"
"github.com/flipkart-incubator/dkv/internal/opts"
"github.com/flipkart-incubator/dkv/internal/stats"
"github.com/flipkart-incubator/dkv/internal/storage"
"github.com/flipkart-incubator/dkv/internal/storage/b... |
/*
Copyright 2018 The OpenEBS 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, soft... |
/*
Copyright 2019 Cisco Systems
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
d... |
package main
import (
"bufio"
"bytes"
"crypto/rand"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path/filepath"
"regexp"
"strings"
"syscall"
"time"
"github.com/docker/docker/pkg/term"
"github.com/flynn/flynn/controller/client"
ct "github.com/flynn/flynn/controller/types"
"github.com/flynn/flynn... |
package spage
import (
"bytes"
"encoding/json"
"sort"
)
// pageSlot is a single index
// entry for a record (held in
// the *Page as a []*pageSlot)
type pageSlot struct {
itemID uint16
itemStatus uint16
itemOffset uint16
itemLength uint16
}
// itemBounds returns the beginning and ending offset
// position... |
/*
* Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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
*
* ... |
// Copyright 2021 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 j8a
import (
"bufio"
"bytes"
"context"
"crypto/tls"
"fmt"
"github.com/google/uuid"
"io"
"io/ioutil"
"net/http"
"strconv"
"strings"
"time"
"github.com/rs/zerolog/log"
)
var httpUpstreamMaxAttempts int
type TLSType string
const (
TLS12 TLSType = "TLS1.2"
TLS13 TLSType = "TLS1.3"
T... |
package dag
import (
"fmt"
"sort"
"strings"
)
type Option func(*DAG)
func Capacity(n int) Option {
return func(g *DAG) {
g.cap = n
}
}
func Node(nodes ...Key) Option {
return func(g *DAG) {
g.initNodes = nodes
}
}
func Nodes(nodes []Key) Option {
return func(g *DAG) {
g.initNodes = nodes
}
}
type K... |
package main
import (
"errors"
"time"
sj "github.com/bitly/go-simplejson"
"github.com/donnie4w/go-logger/logger"
"job"
)
type Workshop struct {
sub string // 业务的名字,打日志时有用
ctx *sj.Json
sleepWhenNeed bool // 当机器不健康时消极怠工
ctrlChan chan int // [0] unis -> channel -> control
reportChan cha... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.6.1
// source: yandex/cloud/mdb/kafka/v1/common.proto
package kafka
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "... |
// Copyright 2018 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.