text stringlengths 3.08k 10.4k |
|---|
// Package sftp implements the SSH File Transfer Protocol as described in
// https://tools.ietf.org/html/draft-ietf-secsh-filexfer-02
package sftp
import (
"encoding"
"fmt"
"github.com/pkg/errors"
)
// ProtocolVersion is the SFTP version implemented by this library. See the
// [spec](http://tools.ietf.org/html/dr... |
package storage
import (
"context"
"fmt"
"math"
"math/rand"
"reflect"
"testing"
"time"
platform "github.com/influxdata/influxdb"
"github.com/influxdata/influxdb/models"
"github.com/influxdata/influxdb/tsdb"
"github.com/influxdata/influxql"
)
func TestService_expireData(t *testing.T) {
engine := NewTestEn... |
// Copyright 2020 Google LLC. 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 postgres
import (
"context"
"fmt"
"github.com/savannahghi/mycarehub/pkg/mycarehub/application/common/helpers"
"github.com/savannahghi/mycarehub/pkg/mycarehub/application/dto"
"github.com/savannahghi/mycarehub/pkg/mycarehub/domain"
"github.com/savannahghi/mycarehub/pkg/mycarehub/infrastructure/database/p... |
/*
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
distributed under the License i... |
package operations
// OpType represents a Golos operation type, i.e. vote, comment, pow and so on.
type OpType string
// Code returns the operation code associated with the given operation type.
func (kind OpType) Code() uint16 {
return opCodes[kind]
}
const (
TypeVote OpType = "vote"
... |
package jira
import (
"context"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
)
type FieldService struct {
client *Client
Configuration *FieldConfigurationService
Context *FieldContextService
}
type IssueFieldScheme struct {
ID string `json:"id,omitempty"`
... |
package v1beta10
import (
"fmt"
"github.com/loft-sh/devspace/pkg/devspace/config/versions/config"
next "github.com/loft-sh/devspace/pkg/devspace/config/versions/latest"
"github.com/loft-sh/devspace/pkg/devspace/config/versions/util"
"github.com/loft-sh/devspace/pkg/util/log"
"strings"
)
// Upgrade upgrades the ... |
package gst
/*
#include <gst/gst.h>
*/
import "C"
import (
"unsafe"
"github.com/ziutek/glib"
)
type MessageType C.GstMessageType
const (
MESSAGE_UNKNOWN = MessageType(C.GST_MESSAGE_UNKNOWN)
MESSAGE_EOS = MessageType(C.GST_MESSAGE_EOS)
MESSAGE_ERROR = MessageType(C.GST_MESSAGE_E... |
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
"github.com/pkg/errors"
kurlscheme "github.com/replicatedhq/kurl/kurlkinds/client/kurlclientset/scheme"
kurlv1beta1 "github.com/replicatedhq/kurl/kurlkinds/pkg/apis/cluster/v1beta1"
serializer "k8s.io/apimachinery/... |
package cty
import (
"bytes"
"encoding/gob"
"errors"
"fmt"
"math/big"
"github.com/zclconf/go-cty/cty/set"
)
// GobEncode is an implementation of the gob.GobEncoder interface, which
// allows Values to be included in structures encoded with encoding/gob.
//
// Currently it is not possible to represent values of... |
package utils
import (
"context"
"fmt"
"strconv"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
utilrand "k8s.io/apimachinery/pkg/util/rand"
"sigs.k8s.io/controller-runtime/pkg/client"
log "github.com/sirupsen/logrus"
co... |
package utils
import (
"fmt"
"log"
"math"
"sync"
"sync/atomic"
"time"
)
const (
loopForever = -1
)
var (
// timerManager manager for all timers
timerManager = &struct {
incrementID int64 // auto increment id
timers map[int64]*Timer // all timers
muClosingTimer sync.RWMutex
closingTi... |
// define DNS query and storage format
// also define some utils for serialization and deserialization
package dns
import (
"bufio"
"bytes"
"encoding/binary"
"fmt"
"log"
"os"
"strings"
)
type TYPE uint16
type CLASS uint16
const (
// subset of DNS types
TYPE_PADDING TYPE = iota
A
NS
MD
MF
CNAME
SOA
//... |
package models
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/s3"
)
const (
infoTableName = "linke... |
// Copyright (c) 2017-2019 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package commands
import (
"encoding/hex"
"fmt"
"strconv"
"github.com/decred/dcrd/chaincfg/chainhash"
"github.com/decred/dcrwallet/rpc/walletrpc"
"github.com/decred... |
// Package paginator 处理分页逻辑
package paginator
import (
"fmt"
"gohub/pkg/config"
"gohub/pkg/logger"
"math"
"strings"
"github.com/gin-gonic/gin"
"github.com/spf13/cast"
"gorm.io/gorm"
"gorm.io/gorm/clause"
)
// Paging 分页数据
type Paging struct {
CurrentPage int // 当前页
PerPage int // 每页条数
TotalPage ... |
/*
Copyright © 2020 <NAME> @MetalBlueberry
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 command
import (
"context"
"errors"
"fmt"
"strconv"
"time"
"github.com/alphagov/travis-resource/common"
"github.com/alphagov/travis-resource/messager"
"github.com/alphagov/travis-resource/model"
"github.com/shuheiktgw/go-travis"
)
type OutCommand struct {
TravisClient *travis.Client
Request m... |
/*
* Copyright 2018 The microkube 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 ... |
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
"strings"
"testing"
"golang.org/x/oauth2"
"golang.org/x/oauth2/slack"
)
var (
port = "8080"
oauthConfig = &oauth2.Config{
ClientID: "myClient",
ClientSecret: "mySecret",
Scopes: []string{"client"},
... |
/*
Copyright 2020 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 oauth2
import (
"sync"
"github.com/Knetic/govaluate"
"github.com/hellofresh/janus/pkg/jwt"
"github.com/hellofresh/janus/pkg/proxy"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
)
// AccessRequestType is the type for OAuth param `grant_type`
type AccessRequestType string
// AuthorizeReque... |
//
// Copyright 2021 The Sigstore 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 ... |
package server
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/golang/mock/gomock"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/xvello/letsblo... |
package for_game
import (
"encoding/json"
"game_server/easygo"
"game_server/pb/share_message"
)
/*
redis金币变化日志
*/
const (
COIN_CHANGE_EXIST_LOG = "redis_coin_change_log" //新金币变化记录
COIN_CHANGE_EXIST_TIME = 1000 * 600 //redis的key删除时间:毫秒
)
type RedisCoinLogObj struct {
Id string
RedisBase
}
//写入r... |
package main
import (
"context"
"fmt"
"log"
"os"
"regexp"
"runtime"
"sync"
"time"
"github.com/sirupsen/logrus"
"github.com/c9s/gomon/logger"
"github.com/c9s/gomon/notify"
"github.com/fsnotify/fsnotify"
)
const (
name = "gomon"
version = "1.3.0"
revision = "HEAD"
)
var notifier notify.Notifier =... |
package service
import (
"bytes"
"go-deck/app/util"
"gorm.io/gorm"
"text/template"
)
type Generate struct {
DB *gorm.DB
DBName string
TableName string
}
type TplData struct {
StructName string `json:"structName"`
TableName string `json:"tableName"`
PackageName string `json:"... |
package stool
import (
"bytes"
"fmt"
"math"
"math/big"
"math/rand"
"os"
"path"
"sort"
"testing"
"time"
"github.com/aergoio/aergo-lib/db"
"github.com/aergoio/aergo/pkg/trie"
"github.com/aergoio/aergo/types"
"github.com/golang/protobuf/proto"
)
// TestAccountsAnalysis analyses accounts on a simple trie w... |
package app
import (
"flag"
"fmt"
"io"
"os"
"runtime"
"strings"
"github.com/hashicorp/go-version"
"github.com/ktr0731/dept/cmd"
"github.com/ktr0731/dept/deptfile"
"github.com/ktr0731/dept/gocmd"
"github.com/ktr0731/dept/logger"
"github.com/ktr0731/dept/toolcacher"
"github.com/mitchellh/cli"
"github.com/... |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20210201
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type KubeEnvironment struct {
pulumi.Cu... |
package main
import (
"flag"
"os"
"strconv"
"strings"
"time"
"github.com/gorilla/websocket"
rotatelogs "github.com/lestrrat/go-file-rotatelogs"
nats "github.com/nats-io/go-nats"
"github.com/rifflock/lfshook"
moleculer "github.com/roytan883/moleculer-go"
logrus "github.com/sirupsen/logrus"
"github.com/xlab... |
/*
Copyright 2021 Vesoft 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... |
// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Lice... |
// Copyright 2009 The Ninep 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 nullfs
import (
"github.com/lionkov/ninep"
"github.com/lionkov/ninep/srv"
)
const (
Qroot = 'r'
Qnull = 'n'
Qzero = 'z'
Qnoacces... |
package ruleguard
import (
"go/ast"
"github.com/quasilyte/go-ruleguard/internal/mvdan.cc/gogrep"
)
type nodeCategory int
const (
nodeUnknown nodeCategory = iota
nodeArrayType
nodeAssignStmt
nodeBasicLit
nodeBinaryExpr
nodeBlockStmt
nodeBranchStmt
nodeCallExpr
nodeCaseClause
nodeChanType
nodeCommClause... |
package network
import (
"crypto/md5"
"crypto/sha256"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"hash"
"io"
"io/ioutil"
"os"
"path/filepath"
)
type S3Download struct {
AWSRegion string
BucketName string
KeyName ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: dns.proto
package pb
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Er... |
// Copyright (c) 2021 Cloudflare, Inc. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
package migp
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"github.com/cloudflare/circl/oprf"
)
// Client wraps the relevant context needed to generate MIGP requests.
type Client stru... |
// The goapp command implements a simple App Engine app to demonstrate how to
// use the Service Control API v2 for admission control. For more information,
// see https://cloud.google.com/service-infrastructure/docs/admission-control.
package main
import (
"errors"
"fmt"
"log"
"net/http"
"os"
"strings"
"time"
... |
// Copyright (c) 2020 Polyverse Corporation
package main
//TODO: CLEAN UP, REFACTOR
import (
"bufio"
"bytes"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
)
var yakFile string
var lexFile string
const y_check = "zend_language_parser.y"
const l_check = "zend_language_scanner.l"
const zend_dir = "/Zend/"
con... |
// 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 (c) 2013-2017 The btcsuite developers
// Copyright (c) 2015-2021 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package txscript
import (
"bytes"
"encoding/hex"
"errors"
"fmt"
"regexp"
"strconv"
"strings"
)
var (
// tokenR... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ovh
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to retrieve information about a... |
package vaultobjectscale
import (
"context"
"fmt"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/logical"
oslite "github.com/murkyl/go-objectscale-lite"
"time"
)
const (
apiPathCredsDynamic string = "creds/dynamic/"
defaultPathCredsDynamicRandomLength int = 6
... |
package list
import (
"context"
"net/http"
"reflect"
"strings"
"time"
"github.com/cli/cli/internal/ghinstance"
"github.com/cli/cli/pkg/githubsearch"
"github.com/shurcooL/githubv4"
"github.com/shurcooL/graphql"
)
type Repository struct {
NameWithOwner string
Description string
IsFork bool
IsPriv... |
package clickhouse
import (
"fmt"
"reflect"
"strconv"
"strings"
"time"
_ "github.com/germesdev/clickhouse"
"github.com/germesdev/gorm"
)
func init() {
gorm.RegisterDialect("clickhouse", &clickhouse{})
}
type clickhouse struct {
db gorm.SQLCommon
gorm.DefaultForeignKeyNamer
}
func (clickhouse) GetName() s... |
package fs
import (
"context"
"errors"
"fmt"
"os"
"bazil.org/bazil/cas"
"bazil.org/bazil/cas/chunks"
"bazil.org/bazil/db"
"bazil.org/bazil/fs/snap"
wiresnap "bazil.org/bazil/fs/snap/wire"
"bazil.org/bazil/fs/wire"
"bazil.org/bazil/tokens"
"bazil.org/bazil/util/env"
"bazil.org/fuse"
"bazil.org/fuse/fs"
... |
// Copyright (c) 2016 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
// github.com/sthorer/api
package ent
import (
"fmt"
"strings"
"time"
"github.com/facebookincubator/ent/dialect/sql"
"github.com/sthorer/api/ent/user"
)
// User is the model entity for the User schema.
type User struct {
config `json:"-"`
// ID of the ent.
ID int `json:"id,omitempty"`
// Email holds the va... |
package common
import (
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"net"
"net/http"
"sync"
"time"
"code.cloudfoundry.org/gorouter/common/uuid"
"code.cloudfoundry.org/gorouter/route"
"code.cloudfoundry.org/gorouter/test_util"
nats "github.com/nats-io/nats.go"
. "github.com/onsi/gomega"
)
type TestApp st... |
/*
Copyright 2015 <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 writing, software
distrib... |
package basic_test
import (
"e2e-basic/common"
"e2e-basic/common/e2e_config"
"e2e-basic/common/locations"
"os/exec"
"testing"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
logf "sigs.k8s.io/controller-runtime/pkg/log"
)
// Helper for deleting mayastor CRDs
func deleteCRD(crdName string) {
c... |
package agent
import (
"time"
"code.cloudfoundry.org/clock"
boshalert "github.com/cloudfoundry/bosh-agent/agent/alert"
boshas "github.com/cloudfoundry/bosh-agent/agent/applier/applyspec"
boshhandler "github.com/cloudfoundry/bosh-agent/handler"
boshjobsuper "github.com/cloudfoundry/bosh-agent/jobsupervisor"
bo... |
/*
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 fi... |
package breeze
import (
"errors"
)
// breeze type
const (
StringType = 0x3f
DirectStringMinType = 0x00
DirectStringMaxType = 0x3e
Int32Type = 0x7f
DirectInt32MinType = 0x40
DirectInt32MaxType = 0x7e
Int64Type = 0x98
DirectInt64MinType = 0x80
Di... |
/**
* Copyright 2020 IBM Corp.
*
* 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 The Skaffold 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, sof... |
// Copyright (c) 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 rights
// to use, copy, modify, merge... |
package router
import (
"github.com/raythorn/zebra/context"
"github.com/raythorn/zebra/log"
"github.com/raythorn/zebra/oss"
"net/http"
)
type Handler func(*context.Context)
type Midware func(*context.Context) bool
type Router interface {
// Add midware to router, these handler will called before every request ... |
// Code generated by go-swagger; DO NOT EDIT.
package installer
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.co... |
/*
* Copyright 2019 The Sugarkube 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... |
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2020 Intel Corporation
package main
import (
"bytes"
"crypto/tls"
"crypto/x509"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"os"
"time"
"github.com/pkg/errors"
"eaa"
)
// VASInfo describes the video analytics service
type VASInfo struct {
Platfor... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: spotigraph/squad/v1/squad.proto
package squadv1
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = proto.Marshal
_ = fmt.Errorf
_ = math.Inf
)
... |
package flags
import (
"encoding/json"
"regexp"
"strconv"
"strings"
"github.com/Checkmarx/kics/internal/console/helpers"
"github.com/Checkmarx/kics/internal/constants"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
var (
flagsMultiStrReferences = make(map[string]*[]string)
... |
/*
* Copyright (c) 2021 VMware, 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, publish, ... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/url"
"strings"
"sync"
"time"
"github.com/gorilla/websocket"
"github.com/pion/webrtc/v3"
)
var wsWriteM sync.Mutex
func signalingGo() {
c, err := dialWS()
if err != nil {
Logger.Errorf("Failed to dial the signaling server: %q", err)
... |
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option... |
// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq
package mock
import (
"github.com/axelarnetwork/axelar-core/utils"
"github.com/cosmos/cosmos-sdk/codec"
"sync"
)
// Ensure, that KVQueueMock does implement utils.KVQueue.
// If this is not the case, regenerate this file with moq.
var _ utils.KVQueue... |
/*
Copyright 2016, Cossack Labs Limited
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... |
// Copyright (c) The Tellor Authors.
// Licensed under the MIT License.
package transactor
import (
"context"
"math/big"
"strings"
"time"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params"
"github.com/go-kit/kit/log"
"git... |
package git
import (
"bytes"
"context"
"fmt"
"path/filepath"
"strconv"
"strings"
"time"
"gitlab.com/gitlab-org/gitaly/internal/git/repository"
"gitlab.com/gitlab-org/gitaly/internal/helper"
)
// FallbackTimeValue is the value returned by `SafeTimeParse` in case it
// encounters a parse error. It's the maxim... |
package kube
import (
"crypto/md5"
"fmt"
log "github.com/golang/glog"
"net"
"os"
"os/exec"
"strconv"
"github.com/openshift/openshift-sdn/pkg/netutils"
netutils_server "github.com/openshift/openshift-sdn/pkg/netutils/server"
)
type FlowController struct {
}
func NewFlowController() *FlowController {
return... |
package enforcer_test
import (
"database/sql"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
"time"
"github.com/nu7hatch/gouuid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
"github.com/onsi/gomega/gexec"
"quota-enforcer/c... |
package api_v1_status
import (
"encoding/hex"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"github.com/navikt/deployment/hookd/pkg/api/v1"
"github.com/navikt/deployment/hookd/pkg/github"
"github.com/navikt/deployment/hookd/pkg/middleware"
types "github.com/navikt/deployment/common/pkg/deployment"
"gi... |
package host
import (
"context"
"fmt"
"os"
"sort"
"strings"
"sync"
"text/tabwriter"
"time"
"github.com/coreos/etcd/clientv3"
"bytes"
"github.com/openshift/origin/pkg/cmd/server/etcd"
"github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics/log"
"github.com/openshift/origin/pkg/oc/cli/admin... |
package oci
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/iximiuz/conman/pkg/container"
"github.com/iximiuz/conman/pkg/timeutil"
)
// implementes oci.Runtime interface
type runcRuntime struct ... |
// Copyright (c) <NAME>. (https://github.com/jeevatkm)
// go-aah/security source code and usage is governed by a MIT style
// license that can be found in the LICENSE file.
package scheme
import (
"bytes"
"errors"
"net/http"
"strings"
"testing"
"aahframework.org/ahttp.v0"
"aahframework.org/config.v0"
"aahfra... |
package dolphin
import (
"fmt"
"io"
"os"
"strings"
"github.com/DataDrake/waterlog"
"github.com/nxadm/tail"
)
// MinecraftWatcher watches for log lines from a Minecraft server.
type MinecraftWatcher struct {
path string
deathKeywords []string
uuidCache map[string]string
log *waterlog.... |
package main
import (
"encoding/json"
"flag"
"fmt"
"io"
"log"
"net/http"
"os"
"os/user"
"github.com/gogo/protobuf/proto"
"github.com/vladimirvivien/mesos-http/client"
"github.com/vladimirvivien/mesos-http/mesos/mesos"
sched "github.com/vladimirvivien/mesos-http/mesos/sched"
)
// Scheduler represents a Me... |
// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law ... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"math/rand"
"net/http"
"os"
"strconv"
"strings"
"time"
"github.com/kellydunn/go-opc"
"github.com/solarkennedy/fadecandycal/colors"
)
func Now() time.Time {
pst, _ := time.LoadLocation("America/Los_Angeles")
now := time.Now().In(pst)... |
// Copyright 2019 The Gambit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"encoding/binary"
"fmt"
"math/rand"
"time"
"github.com/seiflotfy/cuckoofilter"
)
type Packet struct {
Value uint64
Callba... |
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License for license information.
package main
import (
goexpvar "expvar"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"text/template"
"github.com/pkg/errors"
"github.com/mattermost/mattermost-server/plugin"
)
const (
routeA... |
package git // import "github.com/docker/docker/builder/remotecontext/git"
import (
"io/ioutil"
"net/http"
"net/url"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/docker/docker/pkg/symlink"
"github.com/docker/docker/pkg/urlutil"
"github.com/pkg/errors"
)
type gitRepo struct {
remote string
ref ... |
// Copyright 2020 gorse Project 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 ... |
package main
import (
"fmt"
"math/rand"
"strconv"
rl "github.com/gen2brain/raylib-go/raylib"
"github.com/SolarLune/resolv/resolv"
)
type WorldBounce struct {
Space *resolv.Space
Squares []*Square
}
func (w *WorldBounce) Create() {
var screenCellWidth = screenWidth / cell
var screenCellHeight = screenHe... |
package cmd
import (
"cloud.google.com/go/pubsub"
"context"
"fmt"
"github.com/k-yomo/pubsub_cli/pkg"
"github.com/mitchellh/colorstring"
"github.com/pkg/errors"
"golang.org/x/sync/errgroup"
"io"
"os"
"sort"
"github.com/spf13/cobra"
)
// newConnectCmd returns the command to connect topic
func newConnectCmd(... |
package main
import (
"flag"
"fmt"
"html/template"
"log"
"os"
"strings"
"github.com/thrasher-/gocryptotrader/common"
)
const (
commonPath = "..%s..%scommon%s"
configPath = "..%s..%sconfig%s"
currencyPath = "..%s..%scurrency%s"
currencyPairPath = "..%s..%scurrenc... |
package types
import (
"time"
"github.com/consensys/orchestrate/src/entities"
)
type RegisterChainRequest struct {
Name string `json:"name" validate:"required" example:"mainnet"` // Name of ... |
package cluster
import (
"fmt"
"io/ioutil"
"log"
"strings"
g "github.com/onsi/ginkgo"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kclientset "k8s.io/client-go/kubernetes"
reale2e "k8s.io/kubernetes/test/e2e"
e2e "k8s.io/kubernetes/test/e2e/framework"
exutil "github.com/openshift/op... |
package worker
import (
"context"
"errors"
"fmt"
logger "log"
"os/exec"
"sync"
"syscall"
"github.com/google/uuid"
"github.com/gaurav36/systemd-wrapper/pkg/worker/conf"
"github.com/gaurav36/systemd-wrapper/pkg/worker/log"
)
// Command is a job request with the program name and arguments.
type Command struct... |
package metalcloud
import (
"fmt"
)
//User describes user account specifications.
type User struct {
UserID int `json:"user_id,omitempty"`
UserDisplayName string `json:"user_display_name,omitempty"`
UserEmail string `json:"user_email,omitempty"`
}
type searchResultWrapperForUsers struct {
Dura... |
package client
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/http/httptrace"
"os"
"sync/atomic"
"testing"
"time"
"github.com/sirupsen/logrus"
"github.com/secureworks/taegis-sdk-go/log"
_ "github.com/secureworks/taegis-sdk-go/log/logrus"
"github.com/s... |
/*
Copyright 2019 The logr 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, softwa... |
package cfgresources
import (
"encoding/json"
"os/exec"
"time"
)
// SetupChassis struct holds attributes for one time chassis setup.
type SetupChassis struct {
FlexAddress *flexAddress `yaml:"flexAddress"`
IpmiOverLan *ipmiOverLan `yaml:"ipmiOverLan"`
DynamicPower *dynamicPowe... |
package nginx_load_tests
import (
"crypto/md5"
"encoding/hex"
"encoding/json"
"fmt"
"os"
"os/exec"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
"github.com/rcrowley/go-metrics"
)
var _ = Describe("Nginx load tests", func() {
Context("blobstore nginx", func(... |
package gzip
import (
"bufio"
"compress/gzip"
"fmt"
"io/ioutil"
"net"
"net/http"
"sync"
"github.com/gin-gonic/gin"
)
// These constants are copied from the gzip package
const (
NoCompression = gzip.NoCompression
BestSpeed = gzip.BestSpeed
BestCompression = gzip.BestCompression
DefaultCom... |
package service
import (
"context"
"crypto/tls"
"fmt"
"net/http"
"os"
"os/signal"
"time"
"github.com/CrunchyData/pg_featureserv/internal/api"
"github.com/CrunchyData/pg_featureserv/internal/conf"
"github.com/CrunchyData/pg_featureserv/internal/data"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
... |
package schema
// ProjCapitalizedInterest 项目资本化利息测算
type ProjCapitalizedInterest struct {
RecordID string `json:"record_id" swaggo:"false,记录ID"` // 记录ID
ProjectID string `json:"project_id" binding:"required" swaggo:"false,成本项目ID"` // 成本项目ID
Year ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.