text stringlengths 3.08k 10.4k |
|---|
package main
import (
"encoding/json"
"fmt"
"io"
"log"
"os"
"os/exec"
"os/signal"
"os/user"
"path/filepath"
"strings"
"time"
"github.com/GeertJohan/go.linenoise"
"github.com/firba1/complete"
)
const escapeCharacter = '!'
const configDirName = ".tpol"
const logsDirName = "logs"
const historyDirName = "hi... |
// Copyright 2020 yehaotian. 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 (
"encoding/json"
"fmt"
"github.com/jeanphorn/log4go"
"io"
"loginAuth/config"
"loginAuth/grpc"
"loginAuth/ipaddress"
"loginAuth/messageb... |
// Package crypto implements generic crypto utility functions.
package crypto
import (
"crypto/aes"
"crypto/cipher"
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"fmt"
"hash"
"strconv"
"golang.org/x/crypto/scrypt"
)
// Key is a cryptographic key suitable for encryption.
type Key []byte
// NewScryptKey derive... |
package builtin
import (
"fmt"
"math"
"reflect"
"strconv"
"github.com/spy16/slurp/core"
)
var (
_ core.Any = Nil{}
_ core.Any = Int64(0)
_ core.Any = Float64(1.123123)
_ core.Any = Bool(true)
_ core.Any = Char('∂')
_ core.Any = String("specimen")
_ core.Any = Symbol("specimen")
_ core.Any = Keyword("spe... |
// Copyright 2020 Google 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... |
package bitwarden
import (
"crypto/aes"
"crypto/cipher"
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"errors"
"fmt"
"io"
"strconv"
"strings"
"github.com/andreburgaud/crypt2go/padding"
"golang.org/x/crypto/pbkdf2"
)
type CipherString struct {
encryptedString string
encryptionType ... |
package signatures
import (
"crypto/md5"
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/gorilla/mux"
"github.com/kiteco/kiteco/kite-go/client/component"
"github.com/kiteco/kiteco/kite-go/client/internal/kitelocal/driver"
pythonsig "github.com/kiteco/kiteco/kite-go/client/internal/kitelocal/internal/sign... |
package main
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/saferwall/saferwall/pkg/crypto"
)
const (
bucket = "saferwall-sa... |
package main
import (
"context"
"fmt"
"os"
"github.com/juju/ansiterm"
"github.com/rhymond/go-money"
"github.com/urfave/cli"
"github.com/manifoldco/manifold-cli/api"
"github.com/manifoldco/manifold-cli/clients"
"github.com/manifoldco/manifold-cli/color"
"github.com/manifoldco/manifold-cli/data/catalog"
"gi... |
/*
Copyright 2018 ForgeRock AS.
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 2018 Pressinfra SRL
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 gow
import (
"net/http"
"strconv"
"net/url"
"strings"
"path"
)
type (
Context interface {
Base() string
Header(key string, value ...string) string
Host() string
Ip() string
Url() string
Uri() string
Ext() string
Method() string
UserAgent() string
Referer() string
IsSSL() bool
IsA... |
/*
Copyright © 2020 <NAME> <<EMAIL>>
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, ... |
package icp
import (
"errors"
"math"
"time"
"github.com/seqsense/pcgol/mat"
"github.com/seqsense/pcgol/pc"
"github.com/seqsense/pcgol/pc/storage"
"github.com/seqsense/pcgol/internal/gnuplot"
)
var (
ErrNotEnoughPairs = errors.New("not enough correspondence pairs")
)
type EvaluateWeightFn func(distSq float3... |
/*
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, ... |
//go:generate additional-properties
package health
import (
"fmt"
"io"
"net/http"
"strings"
"time"
log "github.com/sirupsen/logrus"
)
//
// Health - https://inadarei.github.io/rfc-healthcheck/#api-health-response
//
type Health struct {
Status Status `json:"status"`
Version string ... |
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"os/exec"
"regexp"
"strconv"
"strings"
"time"
"github.com/concourse/concourse/atc"
"github.com/concourse/concourse/fly/rc"
"github.com/concourse/concourse/go-concourse/concourse"
"golang.org/x/oauth2"
kingpin "gopkg.in/a... |
// Copyright 2019-2020 Kosc Telecom.
//
// 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... |
// 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 jindo
import (
"context"
"fmt"
"github.com/fluid-cloudnative/fluid/pkg/utils"
"github.com/fluid-cloudnative/fluid/pkg/utils/helm"
"github.com/fluid-cloudnative/fluid/pkg/utils/kubeclient"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
"sigs.k8s.io/controller-runtime/pkg/client"
)
// shu... |
package server
import (
"context"
"crypto/tls"
"errors"
"fmt"
"io"
"net"
"net/http"
"net/http/httptest"
"sync"
"sync/atomic"
"testing"
"time"
"github.com/fortytw2/leaktest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/libs/log"
rpctypes... |
/*
Copyright 2017 Google 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, software
dis... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: errorcode.proto
package akmessage
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sy... |
/*
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, ... |
// Copyright (c) 2013-2016 The essentiaone developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package peer
import (
"crypto/rand"
"fmt"
"testing"
"github.com/essentiaone/divid/chaincfg/chainhash"
"github.com/essentiaone/divid/wire"
)
// TestMruInventor... |
/*
Copyright 2020 The Rook 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 applicable law or agreed to ... |
package get_test
import (
"bytes"
"context"
"fmt"
"path/filepath"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
"github.com/spf13/cobra"
"github.com/kumahq/kuma/app/kumactl/cmd"
kumactl_cmd "github.com/kumahq/kuma/app/kumactl/pkg/cmd"
"github.com... |
// Copyright (c) 2018 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 fingerprint
import (
"fmt"
"net/http"
"net/http/httptest"
"strings"
"testing"
"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/stretchr/testify/assert"
)
func TestConsulFingerprint(t *testing.T) {
fp := NewConsulFingerprint(testLogger())
node := &str... |
// 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... |
// Package config contains the model and loader of the goreleaser configuration
// file.
package config
import (
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"github.com/apex/log"
yaml "gopkg.in/yaml.v2"
)
// Repo represents any kind of repo (github, gitlab, etc)
type Repo struct {
Owner string `yaml:",omitempty"`
... |
package npm
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPrepareConfigData(t *testing.T) {
currentDir, err := os.Getwd()
assert.NoError(t, err)
testdataPath := filepath.Join(currentDir, "artifactory", "commands", "testdata")
testdataPath, err... |
package api
import (
"github.com/journeymidnight/yig/api/datatype/policy"
. "github.com/journeymidnight/yig/error"
"github.com/journeymidnight/yig/helper"
"github.com/journeymidnight/yig/iam/common"
"github.com/journeymidnight/yig/signature"
"net"
"net/http"
"regexp"
"strings"
)
// Check request auth type ve... |
/*
* Copyright 2019 The Knative 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 a... |
package kubernetes
import (
"fmt"
"sort"
"strings"
"github.com/containous/traefik/provider/label"
"gopkg.in/yaml.v2"
corev1 "k8s.io/api/core/v1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
)
type weightAllocator interface {
getWeight(host, path, serviceName string) int
}
var _ weightAllocator = &defau... |
package ecs
//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
//distribut... |
package graphite
import (
"fmt"
"strings"
"time"
"github.com/FernandoMorais/influxdb/models"
"github.com/FernandoMorais/influxdb/toml"
)
const (
// DefaultBindAddress is the default binding interface if none is specified.
DefaultBindAddress = ":2003"
// DefaultDatabase is the default database if none is spe... |
package lncfg
import (
"crypto/tls"
"fmt"
"net"
"strconv"
"strings"
"time"
"github.com/lightningnetwork/lnd/tor"
)
var (
loopBackAddrs = []string{"localhost", "127.0.0.1", "[::1]"}
)
type tcpResolver = func(network, addr string) (*net.TCPAddr, error)
// NormalizeAddresses returns a new slice with all the p... |
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package p2p
import (
"container/list"
"fmt"
"io"
"sync"
"sync/atomic"
pb "github.com/33cn/chain33/types"
"golang.org/x/net/context"
"google.golang.org/g... |
package handlers
import (
"net/http"
"path"
"github.com/artifacthub/hub/cmd/hub/handlers/chartrepo"
"github.com/artifacthub/hub/cmd/hub/handlers/org"
"github.com/artifacthub/hub/cmd/hub/handlers/pkg"
"github.com/artifacthub/hub/cmd/hub/handlers/static"
"github.com/artifacthub/hub/cmd/hub/handlers/user"
"githu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: testresponse.proto
package test
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync... |
// Copyright The OpenTelemetry 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 agre... |
// Copyright Aeraki 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 wr... |
package nl
import (
"github.com/blugelabs/bluge/analysis"
)
// this content was obtained from:
// lucene-4.7.2/analysis/common/src/resources/org/apache/lucene/analysis/snowball/
// ` was changed to ' to allow for literal string
var StopWordsBytes = []byte(` | From svn.tartarus.org/snowball/trunk/website/algorithms/... |
/*
*
* 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 agree... |
package postgres
import (
"errors"
"fmt"
"time"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/postgres"
"github.com/saromanov/mystery/config"
"github.com/saromanov/mystery/internal/backend"
"github.com/saromanov/mystery/internal/crypto"
)
// Postgres defines backend for postgres
type Postgres s... |
// Package pipeline implements learnogl env mapping stuff
package pipeline
import (
"github.com/stdiopt/gorge/m32"
"github.com/stdiopt/gorge/systems/render"
"github.com/stdiopt/gorge/systems/render/gl"
"github.com/stdiopt/gorge/systems/render/renderpl"
"github.com/stdiopt/gorge/systems/resource"
)
type (
Render... |
// +build example
package main
import (
"fmt"
"os"
"sort"
"sync"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
)
func exit(msg ...interface{}) {
fmt.Fprintln(os.Stderr, msg...)
os.Exit(1)
}
// Lists all encrypted objects owned by an ... |
package topkapi
import (
"context"
"os"
"os/signal"
"strings"
"sync"
"syscall"
"time"
"github.com/Shopify/sarama"
)
// Consume is a blocking function that reads message from a topic
// todo add consumeOnce function or flag to prevent infinite loop
func (c *Client) Consume(messageHandler MessageHandler, topic... |
package fit
import (
"bytes"
"encoding/binary"
"fmt"
"io"
"github.com/tormoder/fit/dyncrc16"
)
// Header represents a FIT file header.
type Header struct {
Size byte
ProtocolVersion byte
ProfileVersion uint16
DataSize uint32
DataType [4]byte
CRC uint16
}
var (
errNo... |
// Copyright 2018 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... |
// Package fluentd provides the log driver for forwarding server logs
// to fluentd endpoints.
package fluentd
import (
"fmt"
"math"
"net"
"strconv"
"strings"
"time"
"github.com/Sirupsen/logrus"
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/logger/loggerutils"
"github.com/docker/... |
package structs
import (
"encoding/json"
"fmt"
"time"
)
// CompiledDiscoveryChain is the result from taking a set of related config
// entries for a single service's discovery chain and restructuring them into a
// form that is more usable for actual service discovery.
type CompiledDiscoveryChain struct {
Service... |
package main_test
import (
"bufio"
"context"
"crypto/ed25519"
"encoding/pem"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"testing"
"github.com/mikesmitty/edkey"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/ssh"
)
var (
sshdP... |
/*
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 to in ... |
// Copyright 2019 <NAME>. All rights reserved.
package analytics
import (
"time"
"go.mongodb.org/mongo-driver/bson"
)
// DocumentDoc contains db.serverStatus().document
type DocumentDoc struct {
Deleted int `json:"deleted" bson:"deleted"`
Inserted int `json:"inserted" bson:"inserted"`
Returned int `json:"retu... |
package netgo
import (
//"bytes"
//"flag"
//"fmt"
//stdlog "log"
"html/template"
//"io"
//"io/ioutil"
//"os"
//"regexp"
//"time"
//"net/http"
"bytes"
//"net/url"
//"strings"
//"encoding/xml"
//"encoding/json"
//"strconv"
"github.com/op/go-logging"
)
var log = logging.MustGetLogger("netgo")
var (
//... |
package main
import (
"context"
"fmt"
nethttp "net/http"
_ "net/http/pprof"
"os"
"os/signal"
"runtime"
"syscall"
"time"
"go.uber.org/zap"
influxlogger "github.com/influxdata/influxdb/logger"
"github.com/influxdata/platform"
"github.com/influxdata/platform/bolt"
"github.com/influxdata/platform/chronogra... |
package api
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"strconv"
"sync"
"time"
"github.com/gorilla/websocket"
)
const (
// heartbeatInterval is the amount of time to wait between sending heartbeats
// during an exec streaming operation
heartbeatInterval = 10 * time.Second
)
type execSession ... |
package main
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"os/signal"
"strings"
"syscall"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/jamiealquiza/envy"
parser "github.com/novln/docker-parser"
"github.com/sirupsen/logrus"
"gith... |
package io_soak
import (
"e2e-basic/common"
"e2e-basic/common/e2e_config"
"sigs.k8s.io/controller-runtime/pkg/log"
"fmt"
"time"
. "github.com/onsi/gomega"
coreV1 "k8s.io/api/core/v1"
logf "sigs.k8s.io/controller-runtime/pkg/log"
)
var disruptorJobs []FioDisruptorJob
var disruptorScNames []string
// IO soa... |
package command
import (
"bytes"
"context"
"fmt"
"path/filepath"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/rest/client"
restModel "github.com/evergreen-ci/evergreen/rest/model"
"github.com/evergreen-ci/evergreen/util"
"github.com/mitchellh/mapstructure"
"github.com/mongodb... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: message.proto
package proto
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-... |
package libvirt
import (
"encoding/json"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"strings"
libvirt "github.com/libvirt/libvirt-go"
"github.com/mitchellh/packer/common/uuid"
)
type defIgnition struct {
Name string
PoolName string
Content string
}
// Creates a new cloudinit with the default... |
package main
import (
"context"
"encoding/json"
"flag"
"fmt"
"log"
"os"
"os/signal"
"runtime"
"syscall"
"time"
client "github.com/pzy2000/healthreport/httpclient"
"github.com/pzy2000/healthreport/serve"
"github.com/pzy2000/healthreport/utils/config"
"github.com/pzy2000/healthreport/utils/email"
"github... |
package collector
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"time"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/prometheus/client_golang/prometheus"
)
// SDResponseNumericalMetrics defines struct for numeric metrics
type StatsDeviceResponseNumericalMetrics struct {
Typ... |
/*
Copyright (c) 2021 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 or agreed t... |
package process
import (
"bytes"
"fmt"
"io/fs"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
"go.seankhliao.com/w/v16/render"
)
type Options struct {
GTMID string
Canonical string
Raw bool
Compact bool
}
func Dir(o Options, dst, src string) error {
var pis []pageInfo
err := filepath.Walk... |
package whale
import (
"io"
)
type (
// Pair defines a key/value string pair
Pair struct {
Name string `json:"name"`
Value string `json:"value"`
}
// CLIFlags represents the available flags on the CLI.
CLIFlags struct {
Addr *string
Assets *string
Data *string
... |
/*
This file is part of rclgo
Copyright © 2021 Technology Innovation Institute, United Arab Emirates
Licensed under the Apache License, Version 2.0 (the "License");
http://www.apache.org/licenses/LICENSE-2.0
*/
// Code generated by rclgo-gen. DO NOT EDIT.
package builtin_interfaces_msg
import (
"unsafe"
"github... |
// +build kubeall helm
// **NOTE**: we have build tags to differentiate kubernetes tests from non-kubernetes tests, and further differentiate helm
// tests. This is done because minikube is heavy and can interfere with docker related tests in terratest. Similarly, helm
// can overload the minikube system and thus inte... |
// Copyright 2019 The Hugo 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 applicable ... |
package sensu
import (
"encoding/json"
"fmt"
"io/ioutil"
"math"
"net/http"
"net/http/httptest"
"testing"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/internal/choice"
"github.com/influxdata/telegraf/testutil"
corev2 "github.com/sensu/sensu-go/api/core/v2"
"github.com/stretchr/testify/r... |
// Code generated by gotdgen, DO NOT EDIT.
package tg
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
// No-op definition for keeping imports.
var (
_ = bin.Buffer{}
_ = context.Background()
_ = fmt... |
/*
Copyright 2019 Google LLC
Copyright 2019 <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 ... |
package ui
import (
"fmt"
"github.com/inkyblackness/imgui-go/v4"
"github.com/jpeizer/Vectorworks-Utility-Refresh/internal/packages"
"github.com/jpeizer/Vectorworks-Utility-Refresh/internal/utils"
"strings"
)
var (
toggleSerialDetails bool
)
// RenderSoftware shows serials of found supported packages
func Rende... |
package ecs
//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
//distribut... |
// The MIT License (MIT)
//
// Copyright (c) 2017-2020 Uber Technologies Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the right... |
// 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 a... |
package controllers_test
import (
"context"
"sync"
"time"
"k8s.io/apimachinery/pkg/runtime"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
rbac "k8s.io/api/rbac/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controlle... |
/*
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 nomad
import (
"container/heap"
"fmt"
"sync"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/nomad/nomad/structs"
)
var (
// planQueueFlushed is the error used for all pending plans
// when the queue is flushed or disabled
planQueueFlushed = fmt.Errorf("plan queue flushed")
)
// PlanFutu... |
/**
* Copyright (c) 2019, 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 "AS IS" AND THE AUT... |
package main
import (
"fmt"
"github.com/sashamerkulev/rssservice/config"
"github.com/sashamerkulev/rssservice/controllers"
"github.com/sashamerkulev/rssservice/domain"
"github.com/sashamerkulev/rssservice/logger"
"github.com/sashamerkulev/rssservice/models"
"github.com/sashamerkulev/rssservice/mysql"
"net/http... |
// Copyright 2020 the u-root Authors. All rights reserved
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// SPDX-License-Identifier: BSD-3-Clause
//
package boot
import (
"encoding/binary"
"fmt"
)
type EfiDppMsgSubType EfiDevPathProtoSubType
const (
Dpp... |
// Copyright 2019 Drone IO, Inc.
// //Fix links to examples
// 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
///* Release 1.1. Requires Anti Brute Fo... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.7.1
// source: md.proto
package nppbmd
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimp... |
// Copyright 2017 Delving 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
//
// Unless required by applicable law or agreed to i... |
// 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 (c) 2020 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 appli... |
package cli
import (
"encoding/json"
"errors"
"fmt"
"path"
log "github.com/Sirupsen/logrus"
"github.com/bitrise-io/go-utils/colorstring"
"github.com/bitrise-io/go-utils/command"
"github.com/bitrise-io/go-utils/fileutil"
"github.com/bitrise-io/go-utils/pathutil"
"github.com/bitrise-io/stepman/stepman"
"gith... |
/*
Copyright © 2020-2022 The k3d Author(s)
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, distri... |
package md
// xgo/md/linkSpan.go
import (
"fmt"
"strings"
)
var _ = fmt.Print
type LinkSpan struct {
linkText []rune
uri []rune
title []rune
}
func NewLinkSpan(linkText, uri, title []rune) (t *LinkSpan) {
link := make([]rune, len(linkText))
copy(link, linkText)
where := make([]rune, len(uri))
co... |
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
package skia
/*
#cgo LDFLAGS: -L${SRCDIR}/../../out/Shared
#cgo LDFLAGS: -Wl,-rpath,${SRCDIR}/../../out/Shared
#cgo LDFLAGS: -lskia
#cgo CFLAGS: -I../../include/c
#cgo CFLAGS:... |
// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0
package bench
import (
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"fmt"
"log"
"net"
"strings"
"sync"
"time"
mqtt "github.com/eclipse/paho.mqtt.golang"
)
// Set default ping timeout to large value, so that ping
// won't fail in the case of broke... |
package world
import (
"compress/gzip"
"compress/zlib"
"fmt"
"io"
"time"
"github.com/tsatke/nbt"
"github.com/tsatke/mcserver/game/block"
"github.com/tsatke/mcserver/game/entity"
"github.com/tsatke/mcserver/game/id"
"github.com/tsatke/mcserver/game/voxel"
)
//go:generate stringer -linecomment -type=Compres... |
package matstack
import (
"errors"
"fmt"
"github.com/go-gl/mathgl/mgl32"
)
// TransformStack is a linear fully-persistent data structure of matrix
// multiplications Each push to a TransformStack multiplies the current top of
// the stack with thew new matrix and appends it to the top. Each pop undoes the
// prev... |
package circuitbreaker
import (
"container/list"
"fmt"
"os"
"time"
"github.com/huaweicloud/telescope/agent/core/logs"
"github.com/huaweicloud/telescope/agent/core/utils"
"github.com/shirou/gopsutil/process"
)
// CircuitBreaker
type CircuitBreaker struct {
//consecutiveFailures uint
StateList *list.List
}
/... |
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"sync"
"time"
"github.com/lucas-clemente/quic-go/http3"
)
// 使用锁机制避免多 go 程出现争用现象
var createClientLock sync.Mutex
const logFilePath = "output.log"
// 单 go 程下载方法
// func download(targetURL string, rangeStart int, rangeEnd int, wg *sync.WaitGroup) ... |
package midievent
type Control byte
const (
BankSelectMSB Control = 0x00
ModulationWheelMSB Control = 0x01
BreathControlMSB Control = 0x02
UndefinedMSB Control = 0x03
FootControllerMSB Control = 0x04
PortamentoTimeMSB Control = 0x05
DataEntryMSB Control = 0x06
ChannelVolumeMSB Control = 0x07
B... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.