text stringlengths 5.51k 28.1k |
|---|
// Package enforcerproxy :: This is the implementation of the RPC client
// It implements the interface of Trireme Enforcer and forwards these
// requests to the actual remote enforcer instead of implementing locally
package enforcerproxy
import (
"context"
"fmt"
"strconv"
"sync"
"time"
"go.aporeto.io/enforcerd... |
package logbench
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"testing"
"time"
"github.com/juju/testing/checkers"
)
type tester interface {
newLogger(out io.Writer, disabled bool) logTester
}
type logTester interface {
logMsg(msg string)
logFormat(format string, v ...interface{}) bool
withCo... |
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... |
/*
* Copyright (c) 2021 THL A29 Limited, a Tencent company. All rights reserved
*
* This source code file is licensed under the MIT License, you may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
*/
package pbcmd
import (
"fmt"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"t... |
/*
Copyright 2020 Center for Digital Matter HGK FHNW, Basel.
Copyright 2020 info-age GmbH, Basel.
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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: config/service/audit/v1/audit.proto
package auditv1
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
... |
package main
import (
"bytes"
"fmt"
"io"
"path/filepath"
"strings"
"path"
"reflect"
"strconv"
"github.com/golang/glog"
"github.com/golang/protobuf/proto"
desc "github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/grpc-ecosystem/grpc-ga... |
package ess
import (
. "aliyun-openapi-go-sdk/core"
"strconv"
)
type DescribeScalingGroupsRequest struct {
RpcRequest
OwnerId int
ResourceOwnerAccount string
ResourceOwnerId int
PageNumber int
PageSize int
ScalingGroupId_1 string
ScalingGroupId_2 string
Scali... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/model_evaluation.proto
package automl // import "google.golang.org/genproto/googleapis/cloud/automl/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/p... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proxy/destination/destination.proto
/*
Package conduit_proxy_destination is a generated protocol buffer package.
It is generated from these files:
proxy/destination/destination.proto
It has these top-level messages:
Update
AddrSet
WeightedAddrSet
Weigh... |
package nodestore
import (
"context"
"errors"
"fmt"
"strings"
"time"
"github.com/kbase/blobstore/core/values"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"github.com/google/uuid"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
const... |
package css
import (
"fmt"
"github.com/driusan/fonts"
"github.com/golang/freetype/truetype"
"golang.org/x/image/font"
"os"
//"golang.org/x/image/font/basicfont"
"image/color"
//"io/ioutil"
"sort"
"strings"
)
var DefaultFontSize int
type fontStyle struct {
fontFamily FontFamily
fontWeight font.Weight
fon... |
// Copyright 2019 Antrea 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 ... |
package dnd
import (
"imetatroll.com/character.git/lib/base"
"sort"
"strconv"
)
func NewCharacter(userId string) *base.Character {
c := &base.Character{}
c.Top = &CharacterTop{}
c.Bio = &CharacterBio{}
c.Combat = &CharacterCombat{}
c.Items = &CharacterItems{}
c.Spells = &CharacterSpells{}
c.UserID = userI... |
package types
import (
"encoding/json"
"fmt"
"io"
"math"
"math/big"
"sync/atomic"
"github.com/XunleiBlockchain/tc-libs/bal"
"github.com/XunleiBlockchain/tc-libs/common"
"github.com/XunleiBlockchain/tc-libs/common/hexutil"
"github.com/XunleiBlockchain/tc-libs/crypto"
"github.com/XunleiBlockchain/tc-libs/typ... |
package rest
import (
"encoding/json"
"fmt"
"github.com/tidwall/gjson"
"goharvest2/cmd/collectors/rest/plugins/disk"
"goharvest2/cmd/poller/collector"
"goharvest2/cmd/poller/plugin"
"goharvest2/cmd/tools/rest"
"goharvest2/pkg/conf"
"goharvest2/pkg/errors"
"goharvest2/pkg/matrix"
"goharvest2/pkg/tree/node"
... |
package main
import (
"fmt"
"math/rand"
"sort"
"strings"
"github.com/gobridge/gopherbot/handler"
"github.com/gobridge/gopherbot/mparser"
"github.com/gobridge/gopherbot/workqueue"
)
func fmtAliases(s []string) []string {
ss := make([]string, len(s))
for i := range s {
ss[i] = fmt.Sprintf("`%s`", s[i])
}
... |
package terraform
import (
"encoding/json"
"flag"
"fmt"
"regexp"
"strings"
"github.com/zclconf/go-cty/cty"
ctyJson "github.com/zclconf/go-cty/cty/json"
"github.com/infracost/infracost/internal/config"
"github.com/infracost/infracost/internal/hcl"
"github.com/infracost/infracost/internal/schema"
)
type HCL... |
package importer
import (
"bytes"
"fmt"
"io/ioutil"
"net/url"
"path/filepath"
"regexp"
"sort"
"strings"
"github.com/getkin/kin-openapi/openapi3"
"github.com/sirupsen/logrus"
)
const openapiv3DefinitionPrefix = "#/components/schemas/"
func LoadOpenAPIText(args OutputData, text string, logger *logrus.Logger... |
/*
* JuiceFS, Copyright 2021 Juicedata, 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 ... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package acmpca
import (
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
var _ aws.Config
var _ = awsutil.Prettify
// Contains information about the certificate subject. The certificate can be
// one ... |
package openstack
import (
"github.com/hashicorp/terraform/helper/mutexkv"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
)
// This is a global MutexKV for use within this plugin.
var osMutexKV = mutexkv.NewMutexKV()
// Provider returns a schema.Provider for OpenStack.
f... |
// Generated from Funlang.g4 by ANTLR 4.7.
package generated
import (
"fmt"
"unicode"
"github.com/antlr/antlr4/runtime/Go/antlr"
)
// Suppress unused import error
var _ = fmt.Printf
var _ = unicode.IsLetter
var serializedLexerAtn = []uint16{
3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 19, 106... |
/*
* Copyright 2020 Huawei Technologies Co., Ltd.
*
* 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 (c) 2019 DERO Foundation. 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 of conditions and the following... |
package agent
import (
"errors"
"fmt"
"io/ioutil"
"log"
"net/url"
"os"
"path"
"path/filepath"
"runtime"
"strings"
"sync"
"testing"
"time"
"github.com/google/uuid"
"github.com/mitchellh/go-homedir"
"github.com/opentracing/opentracing-go"
"go.undefinedlabs.com/scopeagent/env"
scopeError "go.undefined... |
package wallet
import (
"crypto/sha256"
"crypto/subtle"
"encoding/base64"
js "encoding/json"
"errors"
"io"
"io/ioutil"
"net"
"net/http"
"sync"
"sync/atomic"
"time"
"github.com/p9c/qu"
"github.com/btcsuite/websocket"
"github.com/p9c/matrjoska/pkg/btcjson"
"github.com/p9c/matrjoska/pkg/chainclient"... |
// Copyright 2019 The go-language-server 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 jsonrpc2 is an implementation of the JSON-RPC 2 specification for Go.
package jsonrpc2
import (
"context"
"encoding/json"
"fmt"
... |
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
*/
package ais
import (
"bytes"
"fmt"
"net/http"
"os"
"path/filepath"
"strconv"
"sync"
"time"
"unsafe"
"github.com/NVIDIA/aistore/3rdparty/atomic"
"github.com/... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: dapr/proto/sentry/v1/sentry.proto
package sentry
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
s... |
package protobuf
import (
"bytes"
"fmt"
"strings"
"unicode"
"golang.org/x/text/runes"
"golang.org/x/text/transform"
"golang.org/x/text/unicode/norm"
"github.com/gogo/protobuf/protoc-gen-gogo/generator"
"github.com/TroyWind/proteus/report"
"github.com/TroyWind/proteus/scanner"
)
// Transformer is in charg... |
package snorlax
import (
"context"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/sirupsen/logrus"
)
// Client defines a wrapper around an http.Client making it easier to send
// requests to RESTful APIs.
type Client interface {
// AddHeader appends a header value to the client to b... |
// Copyright (c) 2021 Aiven, Helsinki, Finland. https://aiven.io/
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// OpenSearchSpec defines the desired state of OpenSearch
type OpenSearchSpec struct {
ServiceCommonSpec `json:",inline"`
// +kubebuilder:validation:Format="^[1-9][0-9]*(GiB... |
package aws
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"path/filepath"
"regexp"
"strings"
"sync/atomic"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudwatchlogs... |
package parser
// Package parser implements the parser that takes as input tokens from the
// lexer and produces as output an AST (Abstract Syntax Tree).
import (
"fmt"
"strconv"
"github.com/cedrickchee/hou/ast"
"github.com/cedrickchee/hou/lexer"
"github.com/cedrickchee/hou/token"
)
// Define the precedences o... |
package main
import (
"context"
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"math/rand"
"net"
"sort"
"strings"
"sync"
"time"
"github.com/google/gops/agent"
nodepb "github.com/synerex/synerex_nodeapi"
"google.golang.org/grpc"
"google.golang.org/grpc/peer"
)
//go:generate protoc -I ../node... |
package main
import (
"fmt"
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"regexp"
"strings"
"time"
)
type IngressList struct {
APIVersion string `yaml:"apiVersion"`
Items []struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata struct {
Annotations struct {
AviPro... |
/*
Copyright 2020 The Tekton 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, softw... |
package entities
import (
"math"
"strings"
"github.com/sirupsen/logrus"
"github.com/google/uuid"
)
// Product represents a safety product such as a motorcycle helmet, jacket, etc. It contains the price of the product, certifications, etc.
type Product struct {
ID int `json:"-... |
package loader
import (
"context"
"fmt"
"io/ioutil"
"path/filepath"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
"github.com/wujie1993/waves/pkg/orm"
"github.com/wujie1993/waves/pkg/orm/core"
"github.com/wujie1993/waves/pkg/orm/v1"
"github.com/wujie1993/waves/pkg/setting"
)
const (
PackageConfDir ... |
package parameter
import (
"net/url"
"strconv"
"strings"
"github.com/GoAdminGroup/go-admin/plugins/admin/modules"
"github.com/GoAdminGroup/go-admin/plugins/admin/modules/constant"
"github.com/GoAdminGroup/go-admin/plugins/admin/modules/form"
)
type Parameters struct {
Page string
PageInt int
Page... |
/*
* Copyright 2021 DADi590
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
package client
import (
"crypto/rand"
"encoding/binary"
"errors"
"io"
"log"
"math"
"math/big"
"runtime"
"runtime/debug"
"sort"
"strconv"
"golang.org/x/crypto/nacl/box"
"golang.org/x/net/context"
"google.golang.org/grpc/metadata"
"github.com/kwonalbert/xrd/config"
"github.com/kwonalbert/xrd/mailbox"
... |
// Copyright © 2012-2013, <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can
// be found in the LICENSE.txt file.
package dag
// Fubsy's DAG (directed acyclic graph) of dependencies. In theory,
// nodes in the graph represent abstract resources; in pratice, each
// nod... |
// 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 (
"fmt"
"math/rand"
"regexp"
"strings"
"sync"
"time"
"github.com/JoshuaDoes/go-wolfram"
"github.com/bwmarrin/discordgo"
)
// GuildData holds data specific to a guild
type GuildData struct {
sync.Mutex //This struct gets accessed very repeatedly throughout various goroutines so we need a ... |
// Copyright the Hyperledger Fabric contributors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
package serializer
import (
"encoding/json"
"fmt"
"reflect"
"testing"
"time"
"github.com/go-openapi/spec"
"github.com/RUAN0007/fabric-contract-api-go/internal/types"
"github.com/RUAN0007/fabric-contr... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1/prediction_service.proto
package automl
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
_ "google.golang.org/genproto/googleapis... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: pkg/proto/configuration/cloud/aws/aws.proto
package aws
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
refle... |
// Copyright 2022 <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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
/*
Copyright © 2021 yukiarrr
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, publish, distribute, sublicen... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: enums.proto
package test
import (
fmt "fmt"
_ "github.com/TheThingsIndustries/protoc-gen-go-json/annotations"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
math "math"
strconv "strconv"
)
// Reference imports to suppr... |
package bamprovider_test
import (
"flag"
"fmt"
"io"
"log"
"math"
"math/rand"
"os"
"path/filepath"
"runtime"
"sync"
"testing"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/grailbio/base/file"
"github.com/grailbio/base/file/s3file"
"github.com/grailbio/base/grail"
"github.com/grailbio/bio/biopb"
... |
// For Windows you may run upload service as a Windows service.
// To create a Windows service run:
// New-Service -Name upload -BinaryPathName f:\Zavla_VB\GO\src\upload\cmd\uploadserver\uploadserver.exe -Description "holds your backups" -StartupType Manual -asService
package main
import (
"crypto/md5"
"crypto/tls... |
package main
//go:generate go run github.com/valyala/quicktemplate/qtc
import (
"bufio"
"bytes"
"embed"
_ "embed"
"encoding/json"
"errors"
"flag"
"fmt"
"go/format"
"io"
"io/fs"
"io/ioutil"
"path"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
"github.com/turutcrane/gencefingo/internal/log"
"gith... |
// Copyright 2013 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be found
// at https://github.com/julienschmidt/httprouter/blob/master/LICENSE.
package clevergo
import (
"context"
"errors"
"fmt"
"io"
"net"
"net/http"
"net/url"
"os"
"os/signal"
"strings"
... |
/*
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 e2e
import (
"bytes"
"context"
"encoding/json"
"fmt"
"os"
"path"
"path/filepath"
"strconv"
"strings"
"testing"
"time"
"github.com/cosmos/cosmos-sdk/server"
srvconfig "github.com/cosmos/cosmos-sdk/server/config"
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/b... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cilium/accesslog.proto
/*
Package cilium is a generated protocol buffer package.
It is generated from these files:
cilium/accesslog.proto
cilium/cilium_bpf_metadata.proto
cilium/cilium_l7policy.proto
cilium/npds.proto
cilium/nphds.proto
It has these to... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: list.proto
package strategy
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
easy_flow "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops/model/eas... |
/*
Purpose:
- Printmaps webservice (with JSON API)
Description:
- Webservice to build large printable maps based on OSM data.
Releases:
- v0.1.0 - 2017/05/23 : initial release (beta version)
- v0.1.1 - 2017/05/26 : improvements
- v0.1.2 - 2017/07/04 : problem with upload filename fixed
- v0.2.0 - 2018/04/22 : support... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: create.proto
package metric_group
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
inspection "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops/mo... |
package mptrie
import (
"bytes"
"testing"
)
func TestEncodeBytes(t *testing.T) {
cases := []struct {
bs, buf []byte
}{
{bs: []byte{}, buf: []byte{0x80}},
{bs: nil, buf: []byte{0x80}},
{bs: []byte{0x00}, buf: []byte{0x00}},
{bs: []byte{0x01}, buf: []byte{0x01}},
{bs: []byte{0x02}, buf: []byte{0x02}},
... |
// ** goworkerpool.com **********************************************************************************************
// ** github.com/enriquebris/goworkerpool **
// ** v0.10.0 *******************************************************************************************************
package goworker... |
// +build linux
package kernel_vmstat
import (
"io/ioutil"
"os"
"testing"
"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/assert"
)
func TestFullVmStatProcFile(t *testing.T) {
tmpfile := makeFakeVmStatFile([]byte(vmStatFile_Full))
defer os.Remove(tmpfile)
k := Kern... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/enums/ad_type.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v1/enums"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/google... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: components/automate-gateway/api/gateway/gateway.proto
package gateway
import (
context "context"
fmt "fmt"
_ "github.com/chef/automate/components/automate-grpc/protoc-gen-policy/iam"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/prot... |
package upworklist
import (
"encoding/json"
"fmt"
"gfast/app/model/module/uplisttest"
"gfast/app/service/admin/dict_service"
"io/ioutil"
"net/http"
"github.com/gogf/gf/net/ghttp"
)
var Corpidtest string
var Corpsecret1test string
var Tmvaluetest string
//公共token
var AccessToken0915 string
type AutoGenerated... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"github.com/hashgraph/hedera-sdk-go"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"gopkg.in/alecthomas/kingpin.v2"
"math/rand"
"os"
"sort"
"strings"
"time"
)
var (
version = "v0.2.1"
logger *log.Logger
configFile = kingpin.Flag("config"... |
package main
import (
"bufio"
"bytes"
"encoding/json"
"flag"
"fmt"
"github.com/BurntSushi/toml"
"github.com/ghodss/yaml"
"github.com/kelseyhightower/envconfig"
"github.com/pkg/errors"
"io"
"io/ioutil"
"os"
"os/signal"
"strconv"
"strings"
"syscall"
)
// Config存储接收到的标识
type Config struct {
subject ... |
// Copyright 2021 The Prometheus 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... |
package node
import (
"bufio"
"bytes"
"compress/gzip"
"fmt"
"io"
"regexp"
"sort"
"strconv"
"strings"
"github.com/spf13/cobra"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/selection"
"k8s.io/apimachinery/pkg/... |
// (c) <NAME>. Licensed under the BSD license (see LICENSE).
package us
import (
"testing"
"time"
"github.com/uchti/cal"
)
func d(y, m, d int) time.Time {
return time.Date(y, time.Month(m), d, 0, 0, 0, 0, cal.DefaultLoc)
}
func TestHolidays(t *testing.T) {
tests := []struct {
h *cal.Holiday
y ... |
package main
import (
"github.com/fsouza/go-dockerclient"
"bytes"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strconv"
"strings"
)
type Image struct {
Id string
ParentId string `json:",omitempty"`
RepoTags []string `json:",omitempty"`
VirtualSize int64
Size ... |
package consensus
import (
"encoding/json"
"errors"
"strconv"
"github.com/xuperchain/xupercore/kernel/common/xcontext"
common "github.com/xuperchain/xupercore/kernel/consensus/base/common"
cctx "github.com/xuperchain/xupercore/kernel/consensus/context"
"github.com/xuperchain/xupercore/kernel/consensus/def"
"g... |
/*
Copyright The Voyager 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, software... |
package main
import (
"bufio"
"encoding/json"
"flag"
"fmt"
"github.com/pkg/errors"
"log"
"math/rand"
"net"
"os"
"sort"
"strings"
"time"
)
const road_width = 41
const road_lenght = 20
const car_width = 14
const car_lenght = 7
const result_width = 77
const max_players_in_top = 10
const speed_factor = 10500
... |
// Copyright 2019 Yunion
//
// 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... |
/*
* Copyright 2019-2020 VMware, Inc.
* All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law... |
/*
* Copyright (C) 2015 Red Hat, 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 ofthe License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
package service
import (
"bufio"
"fmt"
"net/http"
"net/http/httptest"
"regexp"
"strconv"
"strings"
"testing"
"github.com/fleetdm/fleet/v4/server/config"
"github.com/fleetdm/fleet/v4/server/mock"
kitlog "github.com/go-kit/kit/log"
"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus"
... |
// SPDX-License-Identifier: Unlicense OR MIT
// +build darwin linux freebsd openbsd
package glimpl
import (
"runtime"
"strings"
"unsafe"
"gioui.org/gpu/gl"
)
/*
#cgo CFLAGS: -Werror
#cgo linux freebsd openbsd LDFLAGS: -lGLESv2
#cgo linux freebsd LDFLAGS: -ldl
#cgo freebsd CFLAGS: -I/usr/local/include
#cgo free... |
// Copyright 2021 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package sts provides access to the Security Token Service API.
//
// For product documentation, see: http://cloud.google.com/iam/docs/workload-i... |
package lmsp
import (
"bytes"
"encoding/json"
"fmt"
"sort"
"github.com/pkg/errors"
)
// Project is the deserialized verion of a scratch.sb3 project.json file.
//
// https://en.scratch-wiki.info/wiki/Scratch_File_Format
//
// TODO - move this to a package for scratch.sb3 types.
type Project struct {
Targets ... |
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package local
import (
"bytes"
"crypto"
"crypto/rand"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/hex"
"encoding/pem"
"errors"
"io"
"math/big"
"net"
"net/http"
"net/mail"
"os"
"github.com/google/certificate-transparency-go"
"github.com/google/certificate-transparency-go/client"
"githu... |
package slice
import (
"testing"
"github.com/duke-git/lancet/v2/internal"
)
func TestContain(t *testing.T) {
assert := internal.NewAssert(t, "TestContain")
assert.Equal(true, Contain([]string{"a", "b", "c"}, "a"))
assert.Equal(false, Contain([]string{"a", "b", "c"}, "d"))
assert.Equal(true, Contain([]string{"... |
/*
Copyright 2020 gRPC 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, software
d... |
package release
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"sort"
"strings"
"time"
coreapi "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-... |
/*
* 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... |
// Copyright (c) 2018 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 app... |
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
/*
Copyright The containerd 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 2017 by the contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... |
package gossip
//go:generate mkdir -p solc
// NOTE: assumed that SFC-repo is in the same dir than lachesis-repo
// 1.0.0 (genesis)
//go:generate bash -c "cd ../../frenchie-sfc && git checkout 1.0.0 && docker run --rm -v $(pwd):/src -v $(pwd)/../go-lachesis/gossip:/dst ethereum/solc:0.5.12 -o /dst/solc/ --optimize --op... |
// Copyright 2014 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ht
import (
"fmt"
"net/http"
"net/http/httptest"
"net/url"
"strings"
"testing"
"time"
)
var sampleHTML = `<!doctype html>
<html>
<link href="/css/base... |
// Code generated for package bindata by go-bindata DO NOT EDIT. (@generated)
// sources:
// deploy/spoke/clusterclaim.crd.yaml
// deploy/spoke/clusterrole.yaml
// deploy/spoke/clusterrole_binding.yaml
// deploy/spoke/deployment.yaml
// deploy/spoke/kustomization.yaml
// deploy/spoke/namespace.yaml
// deploy/spoke/role... |
// Copyright 2017-2018 Authors of Cilium
//
// 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 db includes database functionality for Pixur.
package db // import "pixur.org/pixur/be/schema/db"
import (
"context"
"fmt"
"sort"
"strconv"
"strings"
"pixur.org/pixur/be/status"
)
// Commiter is an interface to commit transactions. It is not threadsafe
type Commiter interface {
// Commit returns n... |
/*
Copyright 2020 Authors of Arktos.
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, softw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.