text
stringlengths
5.51k
28.1k
package telebot import ( "net/http" "os" "strconv" "strings" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) const ( photoID = "AgACAgIAAxkDAAIBV16Ybpg7l2jPgMUiiLJ3WaQOUqTrAAJorjEbh2TBSPSOinaCHfydQO_pki4AAwEAAwIAA3kAA_NQAAIYBA" ) var ( // required to test send...
// Copyright (c) 2018-2020, The Decred developers // Copyright (c) 2017, <NAME> // See LICENSE for details. package mempool import ( "context" "fmt" "sort" "sync" "time" "github.com/decred/dcrd/blockchain/stake/v3" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" "github.com/...
package peer import ( "bufio" "context" "fmt" "io" "strings" "time" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p-core/crypto" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/network" libp2ppeer "github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-cor...
// Copyright 2017 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. package main import ( "fmt" "log" "sort" "strings" "syscall/zx" "syscall/zx/zxwait" "netstack/fidlconv" "netstack/link/eth" "fidl/fuchsia/netst...
package uint128 import ( "math" "math/big" "math/bits" ) // Note, Zero and Max are functions just to make read-only values. // We cannot define constants for structures, and global variables // are unacceptable because it will be possible to change them. // Zero is the lowest possible Uint128 value. func Zero() U...
// // Copyright (C) 2019-2021 vdaas.org vald team <<EMAIL>> // // 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 a...
package provider import ( "fmt" "reflect" "regexp" "strings" "github.com/chr4/pwgen" "github.com/cycloidio/terracognita/errcode" "github.com/cycloidio/terracognita/filter" "github.com/cycloidio/terracognita/tag" "github.com/cycloidio/terracognita/util" "github.com/cycloidio/terracognita/writer" "github.com...
package engoutil import ( "github.com/EngoEngine/ecs" "github.com/EngoEngine/engo" "github.com/EngoEngine/engo/common" "github.com/EngoEngine/engo/math" "github.com/EngoEngine/gl" ) type textShader struct { program *gl.Program indicesRectangles []uint16 indicesRectanglesVBO *gl.Buffer inPosition int i...
// Copyright 2016 The Bazel 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 appl...
package goa import ( "context" "fmt" "io" "log" "net" "net/http" "net/url" "os" "path/filepath" "sort" "strings" "sync" "github.com/dimfeld/httptreemux" ) type ( // Service is the data structure supporting goa services. // It provides methods for configuring a service and running it. // At the basic ...
/* 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...
/* Tencent is pleased to support the open source community by making Blueking Container Service available. Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of...
// Copyright (c) 2020-2021 Blockwatch Data Inc. // Author: <EMAIL> package tzpro import ( "bytes" "context" "encoding/hex" "encoding/json" "fmt" "strconv" "strings" "time" "blockwatch.cc/tzgo/micheline" "blockwatch.cc/tzgo/tezos" ) type Op struct { Id uint64 `json:"id"` Hash ...
// Copyright (c) 2017 Cisco and/or its affiliates. // // 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...
// Code generated by protoc-gen-go. // source: google.golang.org/genproto/googleapis/api/serviceconfig/auth.proto // DO NOT EDIT! package google_api // import "google.golang.org/genproto/googleapis/api/serviceconfig" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imp...
package pdf_test import ( "fmt" "github.com/mawicks/PDFiG/pdf" "strconv" "testing" ) // First define some helper functions func toString(object pdf.Object, file... pdf.File) string { return (&pdf.ObjectStringDecorator{object}).String(file...) } // checkObject() requires that the serialization of object matches...
// Copyright Project Contour Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to...
// Copyright 2021 The Chromium Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
package base import ( "fmt" sgbucket "github.com/couchbase/sg-bucket" pkgerrors "github.com/pkg/errors" "gopkg.in/couchbase/gocb.v1" ) const ( xattrMacroCas = "cas" xattrMacroValueCrc32c = "value_crc32c" ) // SubdocXattrStore interface defines the set of operations Sync Gateway uses to manage and inte...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.6.1 // source: github.com/solo-io/gloo-mesh/api/networking/v1/status.proto package v1 import ( reflect "reflect" sync "sync" proto "github.com/golang/protobuf/proto" v1 "github.com/solo-io/gloo-mesh/pkg/a...
// 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
package appencryption import ( "context" "math/rand" "sort" "strconv" "testing" "time" "github.com/godaddy/asherah/go/securememory" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/godaddy/asherah/go/appencryption/internal" ) const ( RETIRED = "RETIRED" VALID = "VALI...
/* * Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file. */ package v2 import ( "bytes" "context" "encoding/json" "fmt" "sync" "github.com/TIBCOSoftware/labs-graphbuilder-lib/dbservice" "github.com/TIBCOSoft...
// Package s3 brings S3 files handling to afero package s3 import ( "errors" "fmt" "io" "mime" "os" "path" "path/filepath" "time" "github.com/spf13/afero" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3manager" ) // File represents a file i...
// Copyright 2019 <NAME>, OHIR-RIPE. All rights reserved. // Use of this source code is governed by a MIT license that can be // found in the LICENSE file. // Octok is a tokenizer for data in the OCONF (object config) format. // Package Octok exposes minimal API, implements all MUST and SHOULD // elements of the OCONF...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: orderer/configuration.proto package orderer 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 // Th...
// Copyright 2020 Staysail Systems, Inc. // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this // file was obtained (LICENSE.txt). A copy of the license may also be // found online at https://opensource.org/licenses/MIT. // package main...
package exsmount import ( "bufio" "bytes" "encoding/json" "fmt" "io" "log" "math/rand" "net/http" "os" "os/exec" "strings" "time" "github.com/ponahoum/batchit" arg "github.com/alexflint/go-arg" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service...
package core import ( "crypto" "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/base64" "encoding/json" "encoding/pem" "errors" "fmt" "github.com/cxuhua/xweb" "net/url" "reflect" "strconv" "strings" ) //alipay type APKeyConfig struct { PARTNER_ID string //商户id SELLER_EMAIL string //商...
//go:generate mcube enum -m -p // // Code generated by protoc-gen-go-ext. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.17.1 // source: pkg/tag/pb/service.proto package tag import ( protoreflect "google.golang.org/protobuf/reflect/protorefl...
// // (C) Copyright 2018-2021 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.12.4 // source: drpc.proto package drpc import ( protoreflect "google.golang.org/protobuf/reflect/protor...
package main import ( "errors" "fmt" "io" "io/ioutil" "log" "net/http" "net/http/httptest" "net/url" "os" "strconv" "strings" "testing" "github.com/julienschmidt/httprouter" ) const ContentTypeURLEncoded = "application/x-www-form-urlencoded" func shutupLog() func() { log.SetOutput(ioutil.Discard) ret...
// noob project main.go package main import ( "bufio" "io" "strconv" "strings" //"bytes" "fmt" "net" "net/textproto" "os" "runtime" "time" ) type FrameInfo struct { buf []byte delta int } func main() { port := "554" fmt.Printf("cpu %d\n", runtime.NumCPU()) argLen := len(os.Args) if argLen != 2 { ...
// Copyright (c) 2016 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 Software without restriction, including without limitation the rights // to use, copy, modify, merge...
package serving import ( "context" "fmt" "os" "strconv" "strings" "time" "github.com/grupawp/tensorflow-deploy/exterr" tfsApis "github.com/grupawp/tensorflow-deploy/serving/protobuf/tensorflow_serving/apis" tfsConfig "github.com/grupawp/tensorflow-deploy/serving/protobuf/tensorflow_serving/config" "github....
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v1/resources/operating_system_version_constant.proto package resources import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" enums "google.golang.org/genproto/...
// Copyright 2010 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 big import "testing" var setStringTests = []struct { in, out string ok bool }{ {"0", "0", true}, {"-0", "0", true}, {"1", "1", true}, {"-1...
package gemini import ( "context" "crypto/sha256" "crypto/tls" "encoding/base64" "errors" "fmt" "io" "net" "net/url" "reflect" "strings" "time" "github.com/a-h/gemini/log" ) // Handler of Gemini content. type Handler interface { ServeGemini(w ResponseWriter, r *Request) } // HandlerFunc handles a Gemi...
// Copyright 2016 The LUCI Authors. All rights reserved. // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.17.0 // source: go.chromium.org/lu...
package factory import ( "errors" "net/url" "reflect" "testing" "time" "github.com/stretchr/testify/assert" ) type Struct struct { String string Bool bool Int int Int8 int8 Int16 int16 Int32 int32 Int64 int64 Uint uint Uint8 uint8 Uint16 uint16 Ui...
/* 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 DG2D import ( "fmt" "math" "strings" "github.com/notargets/gocfd/types" "github.com/notargets/gocfd/readfiles" graphics2D "github.com/notargets/avs/geometry" "github.com/notargets/gocfd/geometry2D" "github.com/notargets/gocfd/utils" ) type DFR2D struct { N int SolutionElement ...
package udt import ( "errors" "fmt" "net" "syscall" "time" "unsafe" ) // #cgo linux CFLAGS: -DLINUX // #cgo darwin CFLAGS: -DOSX // #cgo freebsd CFLAGS: -DBSD // #cgo windows CXXFLAGS: -DWIN32 -DUDT_EXPORTS // #cgo windows LDFLAGS: -static-libgcc -static -lkernel32 -luser32 -lws2_32 // #cgo i386 CFLAGS: -DIA32 ...
package parser import ( "encoding/json" "fmt" "go/ast" goparser "go/parser" "go/token" "log" "os" "path/filepath" "regexp" "runtime" "strings" ) var vendoringPath string type Parser struct { Listing *ResourceListing TopLevelApis map[string]*ApiDeclaration ...
package redis import ( "errors" "fmt" redigo "github.com/gomodule/redigo/redis" "keywea.com/cloud/pblib/pbconfig" "keywea.com/cloud/pblib/pb/events" "sync" "time" ) const ( REDIS_CMD_SADD = "SADD" REDIS_CMD_SCARD = "SCARD" REDIS_CMD_SISMEMBER = "SISMEMBER" REDIS_CMD_SMEMBERS ...
package wasmer import ( "fmt" "unsafe" ) // InstanceError represents any kind of errors related to a WebAssembly instance. It // is returned by `Instance` functions only. type InstanceError struct { // Error message. message string } // NewInstanceError constructs a new `InstanceError`. func NewInstanceError(mes...
// 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 main import ( "bytes" "encoding/hex" "fmt" "net" "sync" "sync/atomic" "github.com/btcsuite/fastsha256" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lndc" "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwor...
// Copyright (c) 2020 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package types import ( "errors" "fmt" rtypes "github.com/coinbase/rosetta-sdk-go/types" "github.com/decred/dcrd/blockchain/stake/v3" "github.com/decred/dcrd/chaincfg/cha...
/* Copyright 2019 Nextdoor.com, 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 writ...
package proc import ( "encoding/json" "github.com/PuerkitoBio/goquery" "github.com/hu17889/go_spider/core/common/page" "github.com/hu17889/go_spider/core/pipeline" "github.com/hu17889/go_spider/core/spider" "regexp" "strconv" "tesou.io/platform/foot-parent/foot-api/common/base" service2 "tesou.io/platform/foo...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.20.1 // protoc v3.7.1 // source: github.com/freerware/tutor/api/representations/protobuf/gen/tutor.proto package gen import ( proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" p...
package farm import ( "fmt" "math/rand" "strings" "sync" "time" "github.com/soundcloud/roshi/cluster" "github.com/soundcloud/roshi/common" "github.com/tsenart/tb" ) // ReadStrategy generates a core read strategy for a given Farm. Different // core read strategies can provide different QoS guarantees. type Re...
package main import ( "encoding/json" "fmt" "github.com/gorilla/websocket" "github.com/satori/go.uuid" "log" "math" "math/rand" "net/http" "os" "strconv" "time" ) // Settings var gridRows int = 10 var gridCols int = 10 var ships []int = []int{5, 4, 3, 3, 2} // Game Status var inProgress int = 1 var gameOv...
package node import ( "context" "crypto/sha1" "fmt" "sort" "sync" "time" "github.com/mathetake/doogle/crawler" "github.com/mathetake/doogle/grpc" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/crypto/ed25519" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/...
package sippyserver import ( "fmt" "strconv" "strings" "sync" "time" bugsv1 "github.com/openshift/sippy/pkg/apis/bugs/v1" processingv1 "github.com/openshift/sippy/pkg/apis/sippyprocessing/v1" v1 "github.com/openshift/sippy/pkg/apis/testgrid/v1" "github.com/openshift/sippy/pkg/buganalysis" "github.com/opensh...
package gpoint const scalarMul = ` // ScalarMul multiplies a by scalar // algorithm: a special case of Pippenger described by Bootle: // https://jbootle.github.io/Misc/pippenger.pdf func (p *{{.Name}}Jac) ScalarMul(curve *Curve, a *{{.Name}}Jac, scalar fr.Element) *{{.Name}}Jac { // see MultiExp and pippenger documen...
package state import ( "encoding/json" "github.com/AlekSi/pointer" "github.com/make-os/kit/crypto/ed25519" "github.com/make-os/kit/params" "github.com/make-os/kit/util" "github.com/spf13/cast" "github.com/vmihailenco/msgpack" ) type FeeMode int const ( FeeModePusherPays FeeMode = iota FeeModeRepoPays FeeM...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.19.4 // source: server/proto/executor_registry.proto package server import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: github.com/kubernetes-csi/csi-proxy/integrationtests/csiapigen/new_group/api/v1alpha1/api.proto package v1alpha1 import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/co...
package projector import ( "fmt" "sync/atomic" "time" "unsafe" "github.com/couchbase/indexing/secondary/common" "github.com/couchbase/indexing/secondary/dataport" memcached "github.com/couchbase/indexing/secondary/dcp/transport/client" "github.com/couchbase/indexing/secondary/logging" "github.com/couchbase/i...
// // Copyright 2020 The AVFS 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 2016 The Cockroach Authors. // // Licensed under the Cockroach Community Licence (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://github.com/cockroachdb/cockroach/blob/master/pkg/ccl/LICENSE package sqlccl im...
// Copyright (c) 2004-present Facebook All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Code generated by entc, DO NOT EDIT. package ent import ( "encoding/json" "fmt" "strings" "time" "github.com/facebook/ent/dialect/sql" "github....
package main import ( "crypto/tls" "fmt" "log" "net/http" "os" "time" "github.com/jmpsec/osctrl/backend" "github.com/jmpsec/osctrl/cache" "github.com/jmpsec/osctrl/carves" "github.com/jmpsec/osctrl/environments" "github.com/jmpsec/osctrl/logging" "github.com/jmpsec/osctrl/metrics" "github.com/jmpsec/osct...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: nodeattestor.proto package nodeattestor import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import common "github.com/spiffe/spire/proto/common" import plugin "github.com/spiffe/spire/proto/common/plugin" import ( context "g...
// Copyright (c) 2015-2017 <NAME> <<EMAIL>> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // 1. Redistributions of source code must retain the above copyright // notice, this list...
/* Copyright 2020 The arhat.dev 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 2014 The krb5-go 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 a...
package main import ( "context" "database/sql" "fmt" log "github.com/sirupsen/logrus" "google.golang.org/grpc" emptypb "google.golang.org/protobuf/types/known/emptypb" "io" "math/rand" "net" "os" pb "recoverKV/gen/recoverKV" "strings" "sync" "time" ) var ip_addr string var serv_port string var rec_port ...
/* 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 etcdbackup import ( "context" "crypto/tls" "crypto/x509" "fmt" "net" "net/http" "strings" "time" minio "github.com/minio/minio-go" "github.com/minio/minio-go/pkg/credentials" "github.com/rancher/kontainer-engine/drivers/rke" "github.com/rancher/kontainer-engine/service" "github.com/rancher/ranche...
package chain import ( "context" "encoding/binary" "fmt" "testing" "github.com/ipfs/go-cid" cbor "github.com/ipfs/go-ipld-cbor" "github.com/libp2p/go-libp2p-core/peer" "github.com/pkg/errors" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-filecoin/address" "github.com/filecoin-proje...
// Copyright 2020 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. // Code generated by protoc-gen-go. DO NOT EDIT. // source: internal/testprotos/benchmarks/micro/micro.proto package micro import ( protoreflect "google.gola...
package ollie import ( "bytes" "encoding/binary" "fmt" "sync" "time" "github.com/eyelight/gobot" "github.com/eyelight/gobot/platforms/ble" "github.com/eyelight/gobot/platforms/sphero" ) // Driver is the Gobot driver for the Sphero Ollie robot type Driver struct { name string connection ...
// Copyright (c) 2017 <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 w...
// Copyright (c) 2017 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 Software without restriction, including without limitation the rights // to use, copy, modify, merge...
/* Copyright © 2020 NAME HERE <EMAIL ADDRESS> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writi...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 // source: chaos/experimentation/v1/experiment_run_details.proto package experimentationv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/r...
package exchange import ( "encoding/json" "fmt" "github.com/open-horizon/anax/cli/cliutils" "github.com/open-horizon/anax/exchange" "github.com/open-horizon/rsapss-tool/sign" "github.com/open-horizon/rsapss-tool/verify" "net/http" "os" "path/filepath" "reflect" "strings" ) //todo: only using these instead ...
package httpgrpc import ( "bytes" "crypto/tls" "encoding/base64" "fmt" "io" "io/ioutil" "net/http" "net/textproto" "net/url" "path" "runtime" "strconv" "strings" "sync" "time" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/any" "golang.org/x/net/context" spb "google.golang.or...
// +build linux package quota import ( "fmt" "io/ioutil" "os" "strconv" "strings" "sync" "github.com/alibaba/pouch/pkg/bytefmt" "github.com/alibaba/pouch/pkg/exec" "github.com/alibaba/pouch/pkg/system" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) var ( grpQuotaType = "grpquota" ) // GrpQuota...
package graphqlbackend import ( "context" "crypto/sha256" "encoding/hex" "fmt" "html/template" "io" "strconv" "strings" "sync" "github.com/sourcegraph/go-diff/diff" "github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/graphqlutil" "github.com/sourcegraph/sourcegraph/internal/api" "github.com/s...
/* 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 gateway import ( "context" "errors" "fmt" "strconv" "strings" "sync" "github.com/nautilus/graphql" "github.com/vektah/gqlparser/v2/ast" ) // Executor is responsible for executing a query plan against the remote // schemas and returning the result type Executor interface { Execute(ctx *ExecutionConte...
package config import ( "bytes" "fmt" "io/ioutil" "net" "net/url" "os" "regexp" "strings" "time" toml "github.com/pelletier/go-toml" "go.uber.org/zap" "github.com/lomik/graphite-clickhouse/helper/rollup" "github.com/lomik/zapwriter" ) // Common config type Common struct { // MetricPrefix string `...
package pool import ( "bufio" "crypto/tls" "errors" "io" "log" "mime/multipart" "net" "os" "sync" "sync/atomic" "time" "github.com/tsingson/fastpool/iplimit" "github.com/tsingson/fastpool/logger" "github.com/tsingson/fastpool/workerpool" ) var errNoCertOrKeyProvided = errors.New("Cert or key has not pr...
package client import ( "fmt" "math" "math/rand" "strings" "testing" "github.com/splitio/go-client/splitio/conf" "github.com/splitio/go-client/splitio/service/dtos" "github.com/splitio/go-client/splitio/storage/mutexmap" "github.com/splitio/go-client/splitio/storage/mutexqueue" "github.com/splitio/go-toolki...
package main import ( "bufio" "encoding/json" "flag" "fmt" "github.com/quag/mcobj/commandline" "github.com/quag/mcobj/mcworld" "github.com/quag/mcobj/nbt" "io" "io/ioutil" "math" "os" "path/filepath" "runtime" "strconv" "strings" ) var ( out *bufio.Writer yMin int blockFaces bool hideB...
package storage import ( "fmt" "runtime" "time" "github.com/golang/glog" "github.com/spf13/cobra" "golang.org/x/time/rate" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io...
package kubernetes import ( "bytes" "crypto/sha1" "crypto/sha256" "encoding/base64" "encoding/hex" "fmt" "io" "os/exec" "sort" "strings" "time" "github.com/go-kit/kit/log" "github.com/imdario/mergo" "github.com/pkg/errors" "gopkg.in/yaml.v2" apierrors "k8s.io/apimachinery/pkg/api/errors" meta_v1 "k8s...
package main import ( "context" "crypto/tls" "fmt" "os/exec" "os/signal" "strconv" "strings" "syscall" "golang.org/x/crypto/acme" "golang.org/x/crypto/acme/autocert" "net" "net/http" "net/url" "os" "time" "github.com/labstack/echo/v4" echoDatadog "gopkg.in/DataDog/dd-trace-go.v1/contrib/labstack/e...
package sweetiebot import ( "errors" "math/rand" "os" "path/filepath" "regexp" "strconv" "strings" "syscall" "time" "github.com/bwmarrin/discordgo" ) // ErrRoleNoMatch is thrown when a role name doesn't exist on the server var ErrRoleNoMatch = errors.New("role doesn't exist on this server") // Pluralize c...
package main import ( "errors" "fmt" "strings" "github.com/asticode/go-astiencoder" astilibav "github.com/asticode/go-astiencoder/libav" "github.com/asticode/go-astikit" "github.com/asticode/goav/avcodec" "github.com/asticode/goav/avformat" "github.com/asticode/goav/avutil" ) func addWorkflow(name string, j...
package main import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "os" "sort" "strconv" "strings" "github.com/influxdata/flux" "github.com/influxdata/flux/csv" "github.com/influxdata/flux/values" ihttp "github.com/influxdata/influxdb/v2/http" "github.com/spf13/cobra" ) var que...
package pki import ( "crypto/x509" "fmt" "strings" "time" "github.com/hashicorp/vault/helper/parseutil" "github.com/hashicorp/vault/logical" "github.com/hashicorp/vault/logical/framework" ) func pathListRoles(b *backend) *framework.Path { return &framework.Path{ Pattern: "roles/?$", Callbacks: map[logic...
package main import ( "fmt" "math" "time" "unsafe" ) func pointerfun() { // 自动推导 // i := 42 // p := &i var i int = 42 var p *int = &i fmt.Println(p, &i, *p) } func max(a, b int) int { if a > b { return a } return b } func min(a, b int) int { if a > b { return b } return a } func sig(a int) int...
// Copyright (c) 2020, The GoKi 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 gi3d import ( "fmt" "log" "math" "github.com/chewxy/math32" "github.com/goki/gi/gist" "github.com/goki/ki/ki" "github.com/goki/ki/kit" ...
// Package resource is a Concourse resource to update the GitHub status. // // See the README file for additional information. package resource import ( "errors" "fmt" "io/ioutil" "net/url" "path" "path/filepath" "strings" "github.com/Pix4D/cogito/github" "github.com/sasbury/mini" oc "github.com/cloudboss/...
// See License.txt in main repository directory // dbMssql is the plugin for Microsoft SQL and contains the // data and functions specific for Microsoft SQL to generate // table and field data for html forms, handlers and // table sql i/o for a specific database. // https://github.com/denisenkom/go-mssqldb <== Driv...