text stringlengths 5.51k 28.1k |
|---|
// Copyright 2014,2015,2016,2017,2018,2019,2020,2021 <NAME> (<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
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by a... |
package types
import (
"fmt"
"reflect"
"sort"
"unicode"
"github.com/gitmann/b9schema-golang/common/enum/generictype"
"github.com/gitmann/b9schema-golang/common/enum/threeflag"
)
// TypeNode holds type information about an element.
// - TypeNode should be cross-platform and only use basic types.
type TypeNode s... |
/*******************************************************************************
* Copyright (c) 2018 - Present VMware, Inc. All Rights Reserved.
* SPDX-License-Identifier: BSD-2
******************************************************************************/
package report
import (
"bytes"
"fmt"
"log"
"os"
"p... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: get_pipeline_v2.proto
package pipeline
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
pipeline "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.6.1
// source: transaction_api_list.proto
package models
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
s... |
// Copyright 2011 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 template
import (
"bytes"
"encoding/json"
"fmt"
"reflect"
"strings"
"unicode/utf8"
)
// nextJSCtx returns the context that determines whether a ... |
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V.
//
// 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
//
// Un... |
// Copyright 2014 Unknwon
// Copyright 2014 <NAME>
package setting
import (
"bytes"
"fmt"
"net/url"
"os"
"path"
"path/filepath"
"regexp"
"runtime"
"strings"
"gopkg.in/ini.v1"
"github.com/go-macaron/session"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/util"
)
type Scheme strin... |
// Copyright Microsoft Corp.
// All rights reserved.
package cni
import (
"encoding/json"
"fmt"
"net"
"strconv"
"strings"
"github.com/Microsoft/hcsshim/hcn"
network "github.com/Microsoft/windows-container-networking/network"
cniSkel "github.com/containernetworking/cni/pkg/skel"
cniTypes "github.com/containe... |
// Copyright 2009 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 scanner provides a scanner and tokenizer for UTF-8-encoded text.
// It takes an io.Reader providing the source, which then can be tokenized
// throug... |
/*
Package csi is CSI driver interface for OSD
Copyright 2017 Portworx
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... |
// Copyright 2021 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 2017-2018 DERO Project. All rights reserved.
// Use of this source code in any form is governed by RESEARCH license.
// license can be found in the LICENSE file.
// GPG: 0F39 E425 8C65 3947 702A 8234 08B2 0360 A03A 9DE8
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" A... |
// this package is used to process GFA formatted graphs and index them for groot
package graph
import (
"bytes"
"encoding/binary"
"encoding/gob"
"fmt"
"os"
"sort"
"strconv"
"sync"
"time"
"github.com/biogo/hts/sam"
"github.com/will-rowe/gfa"
"github.com/will-rowe/groot/src/seqio"
"github.com/will-rowe/gro... |
// Copyright 2014 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 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, ... |
// Go CGO cross compiler
// Copyright (c) 2014 <NAME>. All rights reserved.
//
// Released under the MIT license.
// Wrapper around the GCO cross compiler docker container.
package main // import "src.techknowlogick.com/xgo"
import (
"bytes"
"flag"
"fmt"
"go/build"
"io"
"log"
"net/http"
"os"
"os/exec"
"os/u... |
// Copyright 2015 go-swagger maintainers
//
// 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 agr... |
// Copyright (c) 2017 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 applicable law or a... |
/*
* Copyright (C) 2015 Red Hat, Inc.
*
* 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 Licens... |
// Package ptouchgo is a driver for PT-710BT/PT700/PT750W
package ptouchgo
import (
"bytes"
"encoding/hex"
"fmt"
"image"
"image/png"
"io"
"log"
"github.com/disintegration/imaging"
)
const (
statusOffsetModel = 4
statusOffsetBattery = 6
statusOffsetErrorInfo1 = 8
statusOffsetErrorInfo2 = 9... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
import (
"context"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01... |
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markup
import (
"fmt"
"strconv"
"strings"
"testing"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"github.com/str... |
package jsonapi
import (
"net/http"
"net/url"
"strconv"
"strings"
)
// An Intent represents a valid combination of a request method and a URL pattern.
type Intent int
const (
_ Intent = iota
// ListResources is a variation of the following request:
// GET /posts
ListResources
// FindResource is a variatio... |
/*
Copyright 2021 Gravitational, 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 writing, soft... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: fibonacci.proto
package fibonacci
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.gola... |
package legs
import (
"context"
"errors"
"fmt"
"sync"
"time"
"github.com/filecoin-project/go-legs/dtsync"
"github.com/filecoin-project/go-legs/gpubsub"
"github.com/filecoin-project/go-legs/httpsync"
"github.com/hashicorp/go-multierror"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
logging "githu... |
// Copyright 2021 Gravitational 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... |
package instructions
import (
"fmt"
"github.com/zouzhihao-994/gvm/instructions/base"
"github.com/zouzhihao-994/gvm/instructions/comparisons"
constants "github.com/zouzhihao-994/gvm/instructions/constant"
"github.com/zouzhihao-994/gvm/instructions/control"
"github.com/zouzhihao-994/gvm/instructions/conversions"
... |
/*
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... |
// Copyright 2018 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
package provisioner
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
zabbix "github.com/devopyio/zabbix-alertmanager/zabbixprovisioner/zabbixclient"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
yaml "gopkg.in/yaml.v2"
)
type HostConfig struct {
Name string ... |
// Copyright (c) 2020 Cisco Systems and/or its affiliates.
// Licensed under the Apache License, Version 2.0 (the "License");
// that can be found in the LICENSE file in the root of the source
// tree.
// Package ping offer Echo Request-Response functionality for both ICMPv4/ICMPv6.
// Also it partially supports other... |
// 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.
package test
import (
"bufio"
"cmd/compile/internal/abi"
"cmd/compile/internal/base"
"cmd/compile/internal/ssagen"
"cmd/compile/internal/typecheck"
"cmd/... |
package channels
import (
"context"
"errors"
"time"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
"github.com/ipfs/go-datastore/namespace"
"github.com/ipld/go-ipld-prime"
peer "github.com/libp2p/go-libp2p-core/peer"
cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors"
versioning "githu... |
package valid
import (
"fmt"
"regexp"
"strings"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/logging"
)
const MergeableApplyReq = "mergeable"
const ApprovedApplyReq = "approved"
const UnDivergedApplyReq = "undiverged"
const PoliciesPassedApplyReq = "policies_passed"
const Ap... |
// Package validator implements value validations
//
// Copyright 2014 <NAME> <<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
//
// http://www.apache.org/licenses/LICENSE-2.0... |
package ast
import (
"fmt"
"strconv"
"strings"
"github.com/antlr/antlr4/runtime/Go/antlr"
"github.com/neilotoole/lg"
"github.com/neilotoole/sq/libsq/ast/internal/slq"
)
// parseSLQ processes SLQ input text according to the rules of the SQL grammar,
// and returns a parse tree. It executes both lexer and parse... |
package main
import (
"errors"
stdlog "log"
"os"
"github.com/meltwater/drone-cache/archive"
"github.com/meltwater/drone-cache/internal"
"github.com/meltwater/drone-cache/internal/metadata"
"github.com/meltwater/drone-cache/internal/plugin"
"github.com/meltwater/drone-cache/storage"
"github.com/meltwater/dron... |
package ant
import (
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path/filepath"
"sync"
"time"
"gitlab.com/NebulousLabs/merkletree"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/node/api"
"gitlab.com/NebulousLabs/Sia/node/api/client"
"gitlab.com/NebulousL... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/services/invoice_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
enums "google.golang.org/genproto/googleapis/ads/googleads/v3/enums"
resources "google.go... |
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... |
// Code generated by create_version. DO NOT EDIT.
// Copyright 2018 Envoyproxy 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/LIC... |
// 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 gosip
import (
"context"
"fmt"
"net"
"sync"
"time"
"github.com/ghettovoice/gosip/log"
"github.com/ghettovoice/gosip/sip"
"github.com/ghettovoice/gosip/transaction"
"github.com/ghettovoice/gosip/transport"
"github.com/ghettovoice/gosip/util"
"github.com/tevino/abool"
)
// RequestHandler is a callb... |
package snapshotbackpopulate
import (
"context"
"encoding/json"
"fmt"
provv1 "github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1"
rkev1 "github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1"
cluster2 "github.com/rancher/rancher/pkg/controllers/provisioningv2/cluster"
"github.com/rancher/rancher/pkg/... |
package lib
/**
文件类操作库
包括文件、路径、目录、文件读写创建
*/
import (
"os"
"os/exec"
"path/filepath"
"strings"
"path"
)
/*
* 判断目录或文件是否存在
*/
func IsExists(path string) bool {
_, err := os.Stat(path)
if err == nil {
return true
}
return os.IsExist(err)
}
/*
* 判断文件是否存在
* true 存在 false... |
// 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 2020 Chef Software, Inc.
// Author: <NAME> <<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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requ... |
/*
* Tencent is pleased to support the open source community by making 蓝鲸 available.
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the Li... |
// DO NOT EDIT THIS FILE. GENERATED BY svdxgen.
// +build stm32g471xx
// Package adc1 provides access to the registers of the ADC peripheral.
//
// Instances:
// ADC1 ADC1_BASE AHB2 ADC1_2+ Analog-to-Digital Converter
// ADC2 ADC2_BASE AHB2 ADC1_2+ Analog-to-Digital Converter
// Registers:
// 0x000 32 ISR... |
package s3cp
import (
"context"
"errors"
"fmt"
"log"
"math"
"os"
"os/signal"
"strings"
"sync"
"syscall"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
)... |
package xds
import (
"context"
"errors"
"fmt"
"log"
"sync/atomic"
"time"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2"
envoyauthz "... |
// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ap... |
package discord
import (
"fmt"
"io"
"math/rand"
"strconv"
"strings"
"sync"
"time"
"google.golang.org/api/youtube/v3"
"github.com/andersfylling/disgord"
disgordiface "github.com/aplombomb/boombot/discord/ifaces"
"github.com/jonas747/dca"
)
// PlayingDetails contains video data for fetched youtube songs/vi... |
package parser
import (
"context"
"encoding/hex"
"errors"
"fmt"
"io"
"path"
"strings"
"time"
)
func (self *MFT_ENTRY) EnumerateAttributes(ntfs *NTFSContext) []*NTFS_ATTRIBUTE {
offset := int64(self.Attribute_offset())
result := []*NTFS_ATTRIBUTE{}
for {
// Instantiate the attribute over the fixed up add... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/campaign_extension_setting.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/googlea... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.17.3
// source: exchange_rate.proto
package services
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/ru... |
package cmd
import (
"compress/gzip"
"crypto/sha1"
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"regexp"
"runtime"
"strings"
"github.com/lf-edge/eden/pkg/defaults"
"github.com/lf-edge/eden/pkg/eden"
"github.com/lf-edge/eden/pkg/models"
"github.com/lf-edge/eden/pkg/utils"
log "... |
// Copyright 2014 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 x86asm implements decoding of x86 machine code.
package x86asm
import (
"bytes"
"fmt"
)
// An Inst is a single instruction.
type Inst struct {
... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package tests
import (
"fmt"
"os"
"path"
"path/filepath"
"testing"
"time"
protopeer "github.com/Elegenthus/fabric-protos-go/peer"
"github.com/hyperledger/fabric/common/ledger/testutil"
"github.com/hyperledger/fabric/core/led... |
// Copyright (c) 2018 The MATRIX Authors
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php
package core
import (
"encoding/json"
"fmt"
"math/big"
"github.com/MatrixAINetwork/go-matrix/ca"
"github.com/MatrixAINetwork/go-matrix... |
package gpt
import (
"bytes"
"crypto/rand"
"encoding/binary"
"fmt"
"hash/crc32"
"io"
"unicode/utf16"
)
const standardHeaderSize = 92 // Size of standard GPT-header in bytes
const standardPartitionEntrySize = 128 // Size of standard GPT-partition entry in bytes
type Flags [8]byte
type Guid [16]byte
f... |
// Copyright 2014 Team 254. All Rights Reserved.
// Author: <EMAIL> (<NAME>)
//
// Model and methods for interacting with a team's Driver Station.
package field
import (
"fmt"
"log"
"net"
"regexp"
"strconv"
"time"
"github.com/Team254/cheesy-arena/game"
"github.com/Team254/cheesy-arena/model"
"github.com/Tea... |
package impl
import (
"context"
"encoding/json"
"errors"
"fmt"
"github.com/multiformats/go-multihash"
"net/http"
"sort"
"github.com/filecoin-project/go-fil-markets/stores"
"github.com/filecoin-project/boost/api"
"github.com/filecoin-project/boost/gql"
"github.com/filecoin-project/boost/indexprovider"
"gi... |
// Copyright 2018 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api/proto/v1/configuration_api.proto
package dockerregistryproxyv1
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
... |
// Copyright 2017-2022 Intel Corporation. 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 b... |
//此源码被清华学神尹成大魔王专业翻译分析并修改
//尹成QQ77025077
//尹成微信18510341407
//尹成所在QQ群721929980
//尹成邮箱 <EMAIL>
//尹成毕业于清华大学,微软区块链领域全球最有价值专家
//https://mvp.microsoft.com/zh-cn/PublicProfile/4033620
//版权所有(c)2013-2017 BTCSuite开发者
//此源代码的使用由ISC控制
//可以在许可文件中找到的许可证。
package legacyrpc
import (
"crypto/sha256"
"crypto/subtle"
"encoding/base... |
package generators
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"reflect"
"strings"
"sync"
"github.com/google/uuid"
"github.com/kyokomi/emoji"
"github.com/microsoft/fabrikate/core"
"github.com/microsoft/fabrikate/logger"
"github.com/otiai10/copy"
"github.com/timfpark/yaml"
)
// Hel... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package gcp
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Provides a Spotinst elastigroup GCP resource.
type El... |
package beacon
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
)
// Behavior enumerates the values for behavior.
type Behavi... |
package kafka
/**
* Copyright 2016 Confluent 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 la... |
// Copyright 2009 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 gc
import (
"cmd/internal/obj"
"fmt"
"math"
"math/big"
)
/// uses arithmetic
func mpcmpfixflt(a *Mpfix, b *Mpflt) int {
var c Mpflt
buf := _Bc... |
package app
import (
"crypto/rand"
"encoding/binary"
"fmt"
"github.com/HuKeping/rbtree"
"log"
"sync"
"sync/atomic"
"time"
)
const (
RpcPktRequest = iota // This packet is a request
RpcPktReply = iota // This packet is a reply
)
const (
RpcErrNone = iota // There has been no error
RpcErrTimeout ... |
package eligibility
import (
"bytes"
"crypto/sha256"
"errors"
"fmt"
"github.com/hashicorp/golang-lru"
"github.com/nullstyle/go-xdr/xdr3"
"github.com/spacemeshos/fixed"
"github.com/spacemeshos/go-spacemesh/common/types"
eCfg "github.com/spacemeshos/go-spacemesh/hare/eligibility/config"
"github.com/spacemeshos... |
// 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 ... |
package server
import (
"context"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"path"
"time"
"github.com/crewjam/saml"
logrus "github.com/sirupsen/logrus"
"github.com/pachyderm/pachyderm/src/client/auth"
"github.com/pachyderm/pachyderm/src/server/pkg/backoff"
"github.... |
package di
import (
"fmt"
"reflect"
"sort"
"github.com/ingot-cloud/ingot-go/pkg/framework/container"
"github.com/ingot-cloud/ingot-go/pkg/framework/log"
)
// NewSet 实例化数据集
func NewSet(items ...interface{}) *ProviderSet {
set := &ProviderSet{}
for _, i := range items {
switch v := i.(type) {
case *Provide... |
/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE.md', which is part of this source code package.
*/
package textencoding
import (
"github.com/unidoc/unidoc/common"
"github.com/unidoc/unidoc/pdf/core"
)
// Encoding for Symbol font.
type SymbolEncoder struct {
}
func NewSymbolEnco... |
// Semantic Analyzer to produce IR struct
package main
import "github.com/DQNEO/minigo/util"
var symbolTable *SymbolTable
type SymbolTable struct {
allScopes map[normalizedPackagePath]*Scope
uniquedDTypes []string
}
func makeDynamicTypeLabel(id int) string {
s := Sprintf("DynamicTypeId%d", id)
return s
}
f... |
package raft_test
import (
"encoding/binary"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http/httptest"
"net/url"
"os"
"sync"
"testing"
"time"
"github.com/influxdb/influxdb/raft"
)
// Ensure that opening an already open log returns an error.
func TestLog_Open_ErrOpen(t *testing.T) {
n := NewInitN... |
// Copyright 2019 <NAME>. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
package component
import (
"errors"
"fmt"
"github.com/fsdaiff/logClient"
"time"
)
const (
waitInterval = time.Second
defaultWaitTime = 10
MaxWaitTime = 180
kernelMaxResponseTime = 500 * time.Millisecond //ms
kernelMaxSendChannelTime = 100 * time.Millisecond //ms
)
func N... |
// Copyright 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
package main
import (
"errors"
"fmt"
"path/filepath"
"strconv"
"sync"
"sync/atomic"
"time"
"unsafe"
"github.com/dustin/go-broadcast"
"github.com/steveyen/gkvlite"
)
const (
MAX_VBUCKETS = 1024
BUCKET_DIR_SUFFIX = "-bucket" // Suffix allows non-buckets to be ignored.
DEFAULT_BUCKET_NAME = "defau... |
package main
import (
"errors"
"fmt"
"math"
)
//////https://www.cnblogs.com/abc-begin/p/7953894.html
var (
alli int
allf float32
)
const (
E1 = 0
E2 = 1
)
func sumInt(a int, b int) int {
return a + b
}
func swap(aa, bb string) (string, string) {
return bb, aa
}
func change(aaa *int) {
*aaa += 100
}
fu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.12.1
// source: buildinfo/rpc/rpc.proto
package rpc
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.go... |
package vorbis
import "math"
type imdctLookup struct {
A, B, C []float32
}
func generateIMDCTLookup(blocksize [2]int, lookup *[2]imdctLookup) {
for i := range lookup {
l := &lookup[i]
n := blocksize[i]
lookup[i].A = make([]float32, n/2)
lookup[i].B = make([]float32, n/2)
lookup[i].C = make([]float32, n/4... |
// +build ignore
/**
* Copyright (c) 2018, The Artemis Authors.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "... |
package cache
import (
"encoding/json"
"errors"
"fmt"
"time"
"github.com/spf13/viper"
"github.com/tywin1104/mc-gatekeeper/server/sse"
"github.com/gomodule/redigo/redis"
"github.com/sirupsen/logrus"
"github.com/tywin1104/mc-gatekeeper/db"
"github.com/tywin1104/mc-gatekeeper/types"
"go.mongodb.org/mongo-dri... |
package sucuri
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/kalbasit/go-sucuri/testdata"
)
const key = "api_key"
func TestScan(t *testing.T) {
status := http.StatusOK
// create the test server that will emula... |
package chained_bft
import (
"bytes"
"path/filepath"
"testing"
"time"
_ "github.com/xuperchain/xupercore/bcs/network/p2pv2"
"github.com/xuperchain/xupercore/kernel/common/xconfig"
cCrypto "github.com/xuperchain/xupercore/kernel/consensus/base/driver/chained-bft/crypto"
chainedBftPb "github.com/xuperchain/xupe... |
/*
Copyright 2019 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 law or agreed ... |
// Copyright (c) 2009-2019 Sippy Software, Inc. All rights reserved.
//
// 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 ... |
// Package jsoncolor is a drop-in replacement for encoding/json's
// Marshal and MarshalIndent functions and Encoder type which produce
// colorized output.
package jsoncolor
import (
"bytes"
"encoding/json"
"fmt"
"io"
"strings"
"github.com/fatih/color"
)
// DefaultFormatter is the Formatter used by Marshal, M... |
package lua
import (
"bytes"
"strings"
"unicode"
)
const luaMaxCaptures = 32
const (
capUnfinished = -1
capPosition = -2
)
type matchState struct {
matchDepth int
src *string
p *string
l *State
level int
capture [luaMaxCaptures]struct {
init int
len int
}
}
const... |
package drill
import (
"context"
"database/sql/driver"
"errors"
"fmt"
"math/rand"
"net"
"strconv"
"sync"
"time"
"github.com/factset/go-drill/internal/log"
"github.com/factset/go-drill/internal/rpc/proto/exec"
"github.com/factset/go-drill/internal/rpc/proto/exec/rpc"
"github.com/factset/go-drill/internal/... |
package leago
import (
"context"
"strconv"
)
type (
match struct {
GameId int64 `json:"gameId"`
ParticipantIdentities []participantIdentity `json:"participantIdentities"`
QueueId int `json:"queueId"`
GameType string ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto
package datacatalog
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.