text stringlengths 3.08k 10.4k |
|---|
package nq
import (
"context"
"errors"
"fmt"
"math/rand"
"net"
"sync"
"syscall"
"time"
)
// ostream is an output Pub's stream with asynchronous send loop
type ostream struct {
*PubOpts
addr net.Addr
mu sync.Mutex
e encoder
frontBuf *ringBuf // used by callers
backBuf *ringBuf // used by async send ... |
// Copyright 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 of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
// Copyright 2014 Codehack http://codehack.com
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package etag
import (
"crypto/sha1"
"encoding/hex"
"net/http"
"strings"
"time"
"github.com/srfrog/go-relax"
)
// Filter ETag generates an entity-tag header "ET... |
package crimsonred
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"mime/multipart"
"net/http"
"net/url"
"strconv"
"github.com/crimsonred/go/v5/pnerr"
)
var emptyGetChannelMembersResponse *PNGetChannelMembersResponse
const getChannelMembersPathV2 = "/v2/objects/%s/channels/%s/uuids"
const mem... |
// Copyright 2015 <NAME> and The Caddy 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... |
//
// csv2json - is a command line that takes CSV input from stdin and
// writes out JSON expression. It includes support for using the first
// row as field names or default fieldnames (e.g. col0, col1, col2).
// Additionally it can output the resulting JSON data structures as a
// JSON array or individual JSON blobs ... |
package runner
import (
"bufio"
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strings"
"sync"
"time"
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/nuclei/pkg/matchers"
"github.com/projectdiscovery/nuclei/pkg/templates"
retryablehttp "github.com/projectdiscov... |
package pool
import (
"container/list"
"context"
"io"
"sync"
"time"
)
var _ Pool = &List{}
// List .
type List struct {
// New is an application supplied function for creating and configuring a
// item.
//
// The item returned from new must not be in a special state
// (subscribed to pubsub channel, transa... |
package alicloud
import (
"fmt"
"strings"
"time"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
)
func resourceAlicloudCenBandwidthLimit() *schema.Resource {
return &schema.Resource{
Create: resourceAlicloudCenBandwidthLimitCreate,
Read: resourceAlicloudCe... |
// Copyright 2020 Anapaya 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 i... |
package zcnbridge
import (
"flag"
"fmt"
"os"
"path"
"github.com/0chain/gosdk/core/common"
"github.com/0chain/gosdk/core/conf"
"github.com/0chain/gosdk/zcnbridge/chain"
"github.com/0chain/gosdk/zcnbridge/log"
"github.com/0chain/gosdk/zcnbridge/wallet"
ether "github.com/ethereum/go-ethereum/common"
"github.c... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: encrypted_app_ticket.proto
package protobuf
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf... |
package worker
import (
"bufio"
"crypto/tls"
"crypto/x509"
"encoding/pem"
"errors"
"fmt"
log "github.com/sirupsen/logrus"
"github.com/v3io/http_blaster/httpblaster/histogram"
"github.com/v3io/http_blaster/httpblaster/request_generators"
"github.com/valyala/fasthttp"
"io/ioutil"
"net"
"os"
"sync"
"time"
... |
package app
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"testing"
"time"
cfg "github.com/dragonflyoss/Dragonfly/dfget/config"
"github.com/dragonflyoss/Dragonfly/dfget/errors"
"github.com/dragonflyoss/Dragonfly/dfget/util"
"github.com/sirupsen/logrus"
"github.com/stretchr... |
// Copyright 2016 - 2021 The excelize 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 excelize providing a set of functions that allow you to write to
// and read from XLSX / XLSM / XLTM files. Supports reading and writi... |
package main
import (
"errors"
"flag"
"fmt"
"io/ioutil"
"os"
"os/signal"
"syscall"
"time"
grpczerolog "github.com/cheapRoc/grpc-zerolog"
_ "github.com/jnewmano/grpc-json-proxy/codec"
"github.com/jukeizu/cache"
"github.com/jukeizu/weather/api/protobuf-spec/geocodingpb"
"github.com/jukeizu/weather/api/prot... |
/*
Copyright 2019 Splunk 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 wri... |
package main
import (
"fmt"
"net/http"
"net/http/pprof"
"github.com/alecthomas/kong"
"github.com/kyma-project/control-plane/components/metris/internal/edp"
"github.com/kyma-project/control-plane/components/metris/internal/gardener"
"github.com/kyma-project/control-plane/components/metris/internal/log"
"github... |
package azuredx
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"github.com/google/uuid"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/hashicorp/go-hclog"
"golang.org/x/oauth2/clientcredentials"
"golang.org/x/oauth2/microsoft"
)
// QueryModel contains the qu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto
package envoy_config_retry_omit_canary_hosts_v2
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports t... |
// 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/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
// No-op definition for keeping imports.
var (
_ = bin.Buffer{}
_ = ... |
// package main implements a program that generates a compile_commands.json file
// in the current Bazel directory.
package main
import (
"bufio"
_ "embed"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
"sort"
"strings"
)
// These two types are a minimal subset of the types from
// https://github.c... |
package report
import "fmt"
// DiffReport defines the type for a single diffing result where A is the
// old and B is the new value of Element
type DiffReport struct {
Element string
A string
B string
}
func (r DiffReport) String() string {
return fmt.Sprintf("Element: %s, A: %s, B: %s", r.Element, r... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: srv/emailer/proto/emailer/emailer.proto
package srv_emailer
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 _ =... |
// Copyright 2016 The Gosl 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 rnd
import (
"math"
"testing"
"github.com/cpmech/gosl/chk"
"github.com/cpmech/gosl/io"
"github.com/cpmech/gosl/plt"
"github.com/cpmech/gosl/ut... |
// 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... |
// Copyright 2020 Huawei Technologies Co.,Ltd.
//
// 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 Apach... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package elasticloadbalancing
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
// Contains the parameters for CreateLBCookieStickinessPolicy.
// Please also see https://docs.aws.amazon.com/g... |
//
// 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 ... |
package valr_ws
import (
"time"
"github.com/shopspring/decimal"
)
type requestType string
const requestTypePing requestType = "PING"
const requestTypeSubscribe requestType = "SUBSCRIBE"
type request struct {
Type requestType `json:"type"`
Subscriptions []subscription `json:"subscriptions"`
}
type ... |
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 Authors of Cilium
package egressmap
import (
"fmt"
"net"
"unsafe"
"github.com/cilium/cilium/pkg/ebpf"
"github.com/cilium/cilium/pkg/types"
)
const (
// PolicyStaticPrefixBits represents the size in bits of the static
// prefix part of an egress policy ... |
package daemon // import "github.com/docker/docker/daemon"
import (
"sync"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/plugingetter"
"github.com/docker/docker/pkg/plugins"
"github.com/docker/go-metrics"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/s... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ssm
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommandsRequest
type ListCommandsInput stru... |
package cluster
import (
"fmt"
"net"
"sync"
"time"
"github.com/lodastack/store/log"
"github.com/lodastack/store/model"
"github.com/lodastack/store/store"
"github.com/lodastack/store/tcp"
)
const (
connectionTimeout = 10 * time.Second
)
const (
muxRaftHeader = 1 // Raft consensus communications
muxMetaHea... |
// 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 main
import (
"bufio"
"bytes"
"fmt"
"html/template"
"math/rand"
"net"
"net/http"
"net/http/fcgi"
"os"
"os/exec"
"strings"
)
var (
headertpl = `
<!DOCTYPE html>
<html>
<head>
<title>{{ .Hostname }}</title>
<style>
body {
color: #00FF00;
background: #000000;
font-family: Sans-Serif;
}
a:link, a:... |
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2022 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 obta... |
/*
Copyright 2014 The Camlistore 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 utils
import (
"bytes"
"crypto/md5"
"crypto/rand"
"crypto/sha1"
"crypto/sha256"
"encoding/base64"
"encoding/hex"
"fmt"
"errors"
mrand "math/rand"
"strconv"
"time"
"unicode"
"unsafe"
"golang.org/x/text/unicode/norm"
)
// AddSlashes addslashes()
func AddSlashes(str string) string {
var buf byt... |
/*
Copyright 2020 Cortex Labs, 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, softwa... |
package pkg
import (
"context"
"net"
"github.com/threefoldtech/zos/pkg/gridtypes"
"github.com/threefoldtech/zos/pkg/gridtypes/zos"
)
//go:generate mkdir -p stubs
//go:generate zbusc -module network -version 0.0.1 -name network -package stubs github.com/threefoldtech/zos/pkg+Networker stubs/network_stub.go
// Me... |
package nodemaintenance
import (
"context"
"fmt"
"time"
log "github.com/sirupsen/logrus"
coordv1 "k8s.io/api/coordination/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
apitypes "k8s.io/apimachinery/pkg/types"
kubernetes "k8s.io/client-go/... |
package tools
import (
"context"
"io"
"log"
"net/http"
"net/http/httptest"
"sync"
"github.com/centrifugal/centrifugo/v3/internal/proxyproto"
"github.com/centrifugal/centrifuge"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
)
// TestTransport - test transport
type TestTransport struct {
m... |
/*
* 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 ... |
package cmd
import (
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"github.com/elsaland/elsa/core/options"
"github.com/elsaland/elsa/module"
"github.com/elsaland/elsa/util"
"github.com/fatih/color"
"github.com/elsaland/elsa/packager"
"github.com/spf13/cobra"
)
// Elsa functions expected to be passed into ... |
/*
Copyright 2018 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 writing, software
distrib... |
// Package migrations organises required migrations of eirini managed k8s
// objects
package migrations
import (
"context"
"fmt"
"strconv"
"code.cloudfoundry.org/eirini/k8s/shared"
"code.cloudfoundry.org/eirini/k8s/stset"
"code.cloudfoundry.org/lager"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
... |
// 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 applicabl... |
package common
import (
"encoding/json"
"net/http"
"strings"
rhmiv1alpha1 "github.com/integr8ly/integreatly-operator/apis/v1alpha1"
"github.com/integr8ly/integreatly-operator/pkg/resources"
prometheusv1 "github.com/prometheus/client_golang/api/prometheus/v1"
"k8s.io/apiextensions-apiserver/pkg/client/clientset... |
//
// Copyright 2022 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 i... |
package bt
import (
"encoding/binary"
"errors"
"github.com/libsv/go-bk/crypto"
"github.com/libsv/go-bt/v2/sighash"
)
// CalcInputSignatureHash serialised the transaction and returns the hash digest
// to be signed. BitCoin (SV) uses a different signature hashing algorithm
// after the UAHF fork for r... |
package gorm_test
import (
"os"
"reflect"
"testing"
"time"
)
func TestCreate(t *testing.T) {
float := 35.03554004971999
user := User{Name: "CreateUser", Age: 18, Birthday: time.Now(), UserNum: Num(111), PasswordHash: []byte{'f', 'a', 'k', '4'}, Latitude: float}
if !DB.NewRecord(user) || !DB.NewRecord(&user) {... |
// Copyright 2017 <NAME>. All rights reserved.
// Use of this source code is governed by an Apache
// license that can be found in the LICENSE file.
/*Package kmod performs bindings over libkmod to manipulate kernel modules from Golang seemlessly.
libkmod is a well-known library to handle kernel modules and which is ... |
package page
import (
"database/sql/driver"
"fmt"
"regexp"
"time"
"github.com/DATA-DOG/go-sqlmock"
"github.com/factly/dega-server/test"
"github.com/factly/dega-server/test/service/core/category"
"github.com/factly/dega-server/test/service/core/format"
"github.com/factly/dega-server/test/service/core/medium"
... |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package v1alpha1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc pack... |
package main
import (
"context"
"fmt"
"go/types"
"io"
"os"
"os/exec"
"strings"
"text/template"
"time"
"unicode/utf8"
"github.com/rs/zerolog"
"golang.org/x/tools/go/packages"
)
func main() {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
defer cancel()
// TODO: read flag -v f... |
package service
import (
"context"
"crypto/tls"
"github.com/omecodes/libome/logs"
"io"
"sync"
"time"
"github.com/omecodes/common/errors"
"github.com/omecodes/libome"
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/status"
)
type ... |
package kvserver
import (
"fmt"
"github.com/nats-io/gnatsd/server"
"github.com/nats-io/go-nats"
"hash/crc32"
"net"
"os"
"os/signal"
"strings"
"syscall"
"time"
)
const DefaultPrefix = "keystore"
type KvServerOptions struct {
DataDir string
Embed bool
Host string
Port int
MonPort... |
package main
// Generate test data
// 1. call Graylog API by API browser
// 2. copy and paste the response to testdata/***.json
// 3. add type and update data
// 4. run this command and output test data
// 5. copy and paste the test data to testdata/***.go
import (
"encoding/json"
"errors"
"log"
"os"
"github.co... |
package filesystem
import (
"math"
"os"
"path/filepath"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/modules/renter/filesystem/siafile"
"gitlab.com/NebulousLabs/errors"
)
type (
// FileNode is a node which references a SiaFile.
FileNode struct {
node
*siafile.SiaFile
}
)
// Close... |
// 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... |
package utils
import (
"fmt"
"io/ioutil"
"strings"
"github.com/go-yaml/yaml"
)
//LogCfg contain configuration about log set.
type LogCfg struct {
Enabled bool
LogDir string
Level string
LogRotateMaxSize int
}
//HostCfg contain configuration about host.
type HostCfg struct {
//... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
/*
Copyright © 2022 Merbridge Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
// +build kubeapiserver
package store
import (
"fmt"
"sync"
"github... |
package segrepo
import (
"omono/domain/base/basterm"
"omono/domain/segment/segmodel"
"omono/domain/segment/segterm"
"omono/internal/core"
"omono/internal/core/corerr"
"omono/internal/core/corterm"
"omono/internal/core/validator"
"omono/internal/param"
"omono/pkg/helper"
"reflect"
"github.com/syronz/dict"
... |
/*
* Copyright 2018 <NAME> <<EMAIL>>
* and other copyright owners as documented in the project's IP log.
*
* 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/... |
package provider
// CGI RFC: https://datatracker.ietf.org/doc/rfc3875/?include_text=1
import (
"errors"
"fmt"
cgi "github.com/beberlei/fastcgi-serve/fcgiclient"
motan "github.com/Loopring/motan-go/core"
"github.com/Loopring/motan-go/log"
"strconv"
"strings"
"time"
// "github.com/yangchenxing/go-nginx-conf-pa... |
package util
import (
"bytes"
"crypto/x509"
"encoding/json"
"encoding/pem"
"fmt"
"io"
"net"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"syscall"
"time"
log "gopkg.in/inconshreveable/log15.v2"
"github.com/lxc/lxd/shared"
"github.com/lxc/lxd/shared/logger"
)
func WriteJSON(w http.ResponseWriter, b... |
package validation
import (
"bytes"
"fmt"
"io"
"net"
"net/http"
"net/url"
"sync"
"github.com/getkin/kin-openapi/openapi3"
"github.com/getkin/kin-openapi/openapi3filter"
"github.com/avenga/couper/config/request"
"github.com/avenga/couper/eval"
)
var routers sync.Map
type OpenAPI struct {
options *OpenAP... |
// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL.txt and at www.mariadb.com/bsl11.
//
// Change Date: 2022-10-01
//
// On the date above, in accordance with the Business Source License, use
// of this software will be gov... |
// Copyright (c) 2021, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
package main
import (
"github.com/stretchr/testify/assert"
"os"
"testing"
)
// TestRunScan Tests the main scan driver function
// GIVEN a call to runScan
//... |
// A command line tool to generate stub implementation of an interface.
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"text/template"
"golang.org/x/tools/imports"
)
func usage() {
fmt.Fprintln(os.Stderr, `Usage: goimpl [flags] [import1] [import2...] packag... |
package manager
import (
"context"
"encoding/json"
goerrors "errors"
"fmt"
"github.com/CMSgov/bcda-app/bcda/database"
"github.com/CMSgov/bcda-app/bcda/metrics"
"github.com/CMSgov/bcda-app/bcda/models"
"github.com/CMSgov/bcda-app/bcda/utils"
"github.com/CMSgov/bcda-app/bcdaworker/queueing"
"github.com/CMSgov... |
package driver
import (
"bytes"
"crypto/tls"
"errors"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/fclairamb/ftpserver/server"
log "github.com/sirupsen/logrus"
"os"
"time"
)
// S3 Driver
type S3Driver struct {
client *s3.S3
host string
port int
... |
package redis
import (
"fmt"
"gin-web/models"
"gin-web/pkg/global"
"gin-web/pkg/utils"
"github.com/siddontang/go-mysql/canal"
"github.com/siddontang/go-mysql/mysql"
"github.com/siddontang/go-mysql/schema"
)
const (
idName = "id"
deletedAtName = "deletedAt"
)
// mysql数据行发生变化, 同步数据到redis
func RowChange... |
package neighbors
import (
"math"
"runtime"
"sort"
"strings"
"github.com/pa-m/sklearn/base"
"gonum.org/v1/gonum/mat"
)
// NearestNeighbors is the unsupervised alog implementing search of k nearest neighbors
// Algorithm is one of 'auto', 'ball_tree', 'kd_tree', 'brute' defaults to "auto"
//
// Metric = 'cityb... |
package genproccon
import (
"fmt"
"io/ioutil"
"os"
"strings"
common "github.com/doug4j/acdu/pkg/common"
)
//ProcessConnectorGenerating creates an Activiti Cloud Runtime Bundle.
type ProcessConnectorGenerating interface {
GenerateConnector(parms Parms) error
}
//NewProcessConnectorGenerating create a new insta... |
// Copyright © 2020 The Homeport Team
//
// 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, publis... |
package gocd
import (
"context"
"encoding/json"
"fmt"
"github.com/stretchr/testify/assert"
"io/ioutil"
"net/http"
"testing"
)
func TestPipelineTemplate(t *testing.T) {
setup()
defer teardown()
t.Run("List", testListPipelineTemplates)
t.Run("Get", testGetPipelineTemplate)
t.Run("Delete", testDeletePipelin... |
package tokenizer
import (
"fmt"
"testing"
"github.com/go-enry/go-enry/v2/regex"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
const (
testContent = `#!/usr/bin/ruby
#!/usr/bin/env node
aaa
#!/usr/bin/env A=B foo=bar awk -f
#!python
func Tokenize(content []byte) []string {
... |
// SPDX-FileCopyrightText: 2020-present Open Networking Foundation <<EMAIL>>
//
// SPDX-License-Identifier: Apache-2.0
package main
import (
"context"
"flag"
"fmt"
"github.com/onosproject/sdcore-adapter/pkg/gnmiclient"
"io/ioutil"
"net"
"net/http"
"os"
"os/signal"
"time"
"github.com/google/gnxi/utils/cred... |
// Copyright 2012 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.
// On-cloud data structures
package arq
import (
"fmt"
"os"
"time"
)
// plist data structures
type computerInfo struct {
UserName string `plist:"userNa... |
// Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"github.com/keybase/kbfs/kbfsblock"
"github.com/keybase/kbfs/kbfscrypto"
"github.com/keybase/kbfs/tlf"
"golang.org/x/net/context"
)
type b... |
/*
* Copyright 2018 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
package golfer
import (
"fmt"
"github.com/pkg/errors"
)
type ReservationRequest struct {
Reservation Reservation `json:"reservation"`
}
type Reservation struct {
ID int `json:"id,omitempty"`
ClubID int `json:"club_id"`
TeetimeID ... |
// Copyright 2020 Security Scorecard 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 ... |
package woats
import (
"fmt"
"github.com/kercylan98/woats/core/woats/wtype"
"github.com/tealeg/xlsx"
"math"
"sort"
)
type DataView struct {
matrix ThreeDimensionalMatrix
}
// GetClassDayView 获取特定班级特定日视图
func (slf *DataView) GetClassDayView(class string, day int) *DataViewRelation {
var slots []*wtype.TimeSlot... |
package testrail
import "strconv"
// Plan represents a Plan
type Plan struct {
AssignedToID int `json:"assignedto_id"`
BlockedCount int `json:"blocked_count"`
CompletedOn int `json:"completed_on"`
CreatedBy int `json:"created_by"`
CreatedOn int `json:"created_on"`
Description s... |
/*
Copyright 2018 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 mmail
import (
"io"
"time"
"unicode/utf8"
"github.com/pkg/errors"
"github.com/rodcorsi/mattermail/model"
)
const (
maxMattermostAttachments = 5
maxMattermostPostSize = 4000
tryAgainTime = 30
waitMessageTimeout = 60
)
// MatterMail struct with configurations, loggers and Mattemo... |
// Copyright 2014 <<EMAIL>{AT}<EMAIL>>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package image
import (
"bufio"
"image"
"io"
"os"
"strings"
)
// Options are the encoding and decoding parameters.
type Options interface {
Lossles... |
/*
* 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 ... |
// (C) Copyright 2018 Hewlett Packard Enterprise Development LP.
//
// 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, ... |
// Package sys provides methods to read system information
/*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
*/
package sys
// Do not import main 'tutils' package because of circular dependency
// Use t.Logf or t.Errorf instead of tutils.Logf
import (
"math"
"os"
"runtime"
"testing"
"time"
"gi... |
package main
import (
"fmt"
"path/filepath"
"sync"
"time"
"github.com/LK4D4/trylock"
"github.com/sirkon/logcarrier/bufferer"
"github.com/sirkon/logcarrier/logging"
"github.com/sirkon/logcarrier/notify"
)
// Buf access
type Buf struct {
Dir string
Name string
Group string
Key string
Lock *trylock.M... |
package main
import (
"bufio"
"context"
"fmt"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/holiman/uint256"
"github.com/protolambda/zrnt/eth2"
"github.com/protolambda/zrnt/eth2/beacon/common"
"github.com/protolambda/zrnt/eth2/beacon/merge"
"github.com/protol... |
package expr
import (
"errors"
"fmt"
"strings"
"github.com/brimdata/zed"
"github.com/brimdata/zed/field"
"github.com/brimdata/zed/zcode"
)
type Cutter struct {
zctx *zed.Context
builder *zed.ColumnBuilder
fieldRefs field.List
fieldExprs []Evaluator
typeCache []zed.Type
outTypes *zed.Ty... |
package interact
import (
"bytes"
"fmt"
"sort"
"strings"
"github.com/gookit/color"
)
// Select definition
type Select struct {
// Title message for select. e.g "Your city?"
Title string
// Options the options data for select. allow: []int,[]string,map[string]string
Options interface{}
// DefOpt default opt... |
/*
* Copyright 2019, EnMasse authors.
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
*/
package iotconfig
import (
"context"
"k8s.io/apimachinery/pkg/util/intstr"
"github.com/enmasseproject/enmasse/pkg/util/cchange"
"sigs.k8s.io/controller-runtime/pkg/cl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.