text stringlengths 3.08k 10.4k |
|---|
package command
import (
"fmt"
"sort"
"strings"
"github.com/MakeNowJust/heredoc"
"github.com/cli/cli/utils"
"github.com/google/shlex"
"github.com/spf13/cobra"
)
func init() {
RootCmd.AddCommand(aliasCmd)
aliasCmd.AddCommand(aliasSetCmd)
aliasCmd.AddCommand(aliasListCmd)
aliasCmd.AddCommand(aliasDeleteCmd)... |
// +build ignore
/*
* Copyright 2018-2021, CS Systemes d'Information, http://csgroup.eu
*
* 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-... |
// Copyright 2017 by <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin linux freebsd netbsd openbsd android solaris
package fslock
import (
"fmt"
"golang.org/x/sys/unix"
"os"
"sync"
"syscall"
)
var globalPosixLo... |
package metadata
import (
"bufio"
"bytes"
"context"
"encoding/json"
"fmt"
"net"
"net/http"
"sync"
"time"
"github.com/yandex-cloud/ydb-go-sdk/v2/timeutil"
)
var (
DefaultAddr = "localhost:6770"
DefaultPath = "/latest/meta-data/iam/security-credentials/default"
)
const (
codeSuccess = "Success"
)
type C... |
package plugins
import (
"fmt"
"github.com/alexandre-normand/figlet4go"
"github.com/alexandre-normand/slackscot"
"github.com/alexandre-normand/slackscot/config"
"github.com/pkg/errors"
"io/ioutil"
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"regexp"
"strings"
"unicode"
)
const (
figletFontURLKey =... |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package btckeys
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 packag... |
package logmanager
import (
"errors"
"fmt"
"math/rand"
"net"
"os"
"sync"
"sync/atomic"
"time"
)
const rfc5424 = "2006-01-02T15:04:05.000Z07:00"
var utf8bom = []byte{0xef, 0xbb, 0xbf}
// Most of this code imitates the golang syslog implementation
// but as a lot of that is hard-coded to use specific (poor) f... |
// Copyright 2016-2021 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.
//go:build linux
// +build linux
package main
import "fmt"
type seg struct {
off int64
dat []byte
}
const (
// TableSize is the size of the LB Ta... |
package mutate
import (
"encoding/json"
"github.com/ghodss/yaml"
"github.com/major1201/goutils"
"github.com/major1201/kubemutator/internal/config"
"github.com/major1201/kubemutator/pkg/log"
"github.com/major1201/kubemutator/pkg/tmpl"
"github.com/pkg/errors"
"go.uber.org/zap"
"k8s.io/api/admission/v1beta1"
co... |
package jsm
import (
"context"
"encoding/json"
"fmt"
"os"
"sync"
"time"
"github.com/nats-io/nats.go"
"github.com/nats-io/jsm.go/api"
)
type StreamPager struct {
mgr *Manager
sub *nats.Subscription
consumer *Consumer
q chan *nats.Msg
stream string
startSeq int
startD... |
package store
import (
"encoding/json"
"io/ioutil"
"path"
"reflect"
"strings"
"sync"
cst "thy/constants"
"thy/errors"
ch "thy/store/credential-helpers"
"thy/utils"
"github.com/mitchellh/go-homedir"
"github.com/spf13/viper"
)
var (
store Store
storeType StoreType
once sync.Once
)
// StoreType... |
package main
import (
"fmt"
"net/http"
"os"
"os/exec"
"path"
"strings"
"github.com/ariary/AravisFS/pkg/adret"
prompt "github.com/c-bata/go-prompt"
)
type UrlUbac struct {
hostname string
port string
url string
}
type FSContext struct {
path string
urlUbac UrlUbac
key string
}
var ctx *... |
// Copyright 2020 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 required ... |
package server
import (
"net/http"
"net/url"
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestLoad_DefaultValues(t *testing.T) {
cfg, err := LoadConfig()
assert.NoError(t, err)
assert.Equal(t, "info", cfg.Level)
assert.Equal(t, "file:///etc/rklotz/posts"... |
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... |
package steam
import (
"errors"
"os"
"regexp"
"strings"
"syscall"
"time"
"unicode/utf16"
"unsafe"
"github.com/mitchellh/go-ps"
"github.com/ungerik/go-dry"
"golang.org/x/sys/windows/registry"
)
const (
// GamePath is the path that is added to a steam path or library
GamePath = "steamapps/common/team fort... |
package mysql
import (
"database/sql"
"fmt"
"reflect"
"sort"
"strings"
"regexp"
)
type (
Column struct {
TableCatalog string
TableSchema string
TableName string
ColumnName string
OrdinalPosition int32
ColumnDefault JsonNullString
Nulla... |
package contentful
import (
"bytes"
"encoding/json"
"net/http"
"regexp"
)
// CollectionOptions holds init options
type CollectionOptions struct {
Limit uint16
}
// Includes model
type Includes struct {
Entry map[string]interface{} `json:"Entry"`
Asset map[string]interface{} `json:"Asset"`
}
// Collection mod... |
/* Copyright © 2019 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: BSD-2-Clause */
package security
import (
"crypto"
"crypto/rsa"
"encoding/base64"
"github.com/vmware/vsphere-automation-sdk-go/runtime/l10n"
"github.com/vmware/vsphere-automation-sdk-go/runtime/log"
)
var algorithmMap = map[string... |
package telegram_api
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
"time"
"github.com/t4ke0/telegram_bridge/pkg/db"
)
var botURL string = os.Getenv("BOT_URL")
// Updates
type Updates struct {
Result []struct {
UpdateID int `json:"update_id"`
Message struct {
ID ... |
package peerexchange
import (
"context"
"encoding/json"
"fmt"
"os"
"time"
"github.com/libp2p/go-libp2p-core/peer"
ma "github.com/multiformats/go-multiaddr"
"github.com/spacemeshos/go-spacemesh/log"
)
const (
peersFileName = "peers.json"
persistInterval = 10 * time.Minute
)
type serializedAddrManager st... |
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
/*
Copyright 2021 The Crossplane 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 2019 The Chromium 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 cmd
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
"github.com/maruel/subcommands"
"go.chromium.org/luci/common/errors... |
package cmd
import (
"encoding/base64"
"errors"
"fmt"
"net"
"os"
"time"
homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var cfgFile string
// Variables to hold flag values
var target string
var port int
var limit int
var timeoutMs int
type ConnStatus int
cons... |
package main
import (
"errors"
"fmt"
"strconv"
)
// console text color codes
const redColor = "\033[31;1m"
const grayColor = "\033[38;5;239m"
const resetColor = "\033[0m"
const reverseColor = "\033[7m"
// different lines to check for wins (expressed in square numbers)
var lines = [8][3]int{
{1, 2, 3},
{4, 5, 6}... |
package tester_utils
import (
"bytes"
"errors"
"io/ioutil"
"time"
"io"
"os/exec"
"syscall"
"github.com/codecrafters-io/tester-utils/linewriter"
)
// Executable represents a program that can be executed
type Executable struct {
path string
timeoutInSecs int
loggerFunc func(string)
// Working... |
// Copyright (c) 2020-2021 Blockwatch Data Inc.
// Author: <EMAIL>
package cache
import (
"context"
"sync/atomic"
"blockwatch.cc/packdb/cache/lru"
"blockwatch.cc/packdb/pack"
"blockwatch.cc/tzgo/micheline"
"blockwatch.cc/tzgo/tezos"
"blockwatch.cc/tzindex/etl/model"
)
var BigmapHistoryMaxCacheSize = 32 // e... |
package main
import (
"fmt"
cloudflare "github.com/cloudflare/cloudflare-go"
"github.com/rs/zerolog/log"
)
// CloudflareAPIClient handles communications with the Cloudflare API
type CloudflareAPIClient interface {
GetOrCreateLoadBalancerMonitor(string, string, string) (cloudflare.LoadBalancerMonitor, error)
Get... |
package main
import (
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/pprof"
"os"
"path/filepath"
"github.com/gorilla/context"
"github.com/gorilla/mux"
)
func main() {
flag.Parse()
if len(*folder) == 0 {
log.Println("must specify folder")
os.Exit(1)
}
isThere, err := exists(*folder)
... |
package godevicedetect
import (
"encoding/json"
"fmt"
"hash/crc32"
"log"
"net/http"
"strings"
"github.com/Shaked/godevicedetect/platform"
"github.com/Shaked/user-agents/packages/go/gouseragents"
"github.com/gorilla/context"
)
const (
UnknownOs = "UnknownOs"
UnknownVersion = "UnknownVersion"
)
type P... |
package primefield
import (
"math/bits"
"math/rand"
"regexp"
"strconv"
"github.com/ReneBoedker/algobra/errors"
"github.com/ReneBoedker/algobra/finitefield/ff"
)
// Ensure that Element implements the ff.Element interface
var _ ff.Element = &Element{}
// Element is the implementation of a finite field element.
... |
// Copyright 2016 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
// Copyright 2014 <NAME>. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
/*
* 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 ... |
// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq
package fake
import (
"context"
"github.com/keptn/keptn/shipyard-controller/common"
"github.com/keptn/keptn/shipyard-controller/models"
"sync"
)
// ISequenceDispatcherMock is a mock implementation of handler.ISequenceDispatcher.
//
// func TestSom... |
package addressparser
import (
"fmt"
"sort"
"strings"
)
const (
DefaultHyphens = '-'
ProbablyDelimiters = ' '
)
func splitProbablyDelimiters(s string) []string {
return strings.FieldsFunc(s, func(r rune) bool {
switch r {
case ProbablyDelimiters:
return true
default:
return false
}
})
}
fun... |
package postgres
import (
"bytes"
"context"
"database/sql"
"encoding/json"
"net"
"time"
"github.com/golang/glog"
"github.com/prebid/prebid-server/config"
"github.com/prebid/prebid-server/pbsmetrics"
"github.com/prebid/prebid-server/stored_requests/events"
"github.com/prebid/prebid-server/util/timeutil"
)
... |
// Copyright 2015, Truveris Inc. All Rights Reserved.
package turret
import (
"errors"
"fmt"
"time"
"github.com/truveris/gousb/usb"
)
// Device types
const (
DeviceTypeThunder = iota
DeviceTypeClassic = iota
)
var (
errNoLight = errors.New("device has no light")
)
// Turret is a wrapper around a USB Device... |
package daemon
import (
"encoding/json"
"errors"
"fmt"
"net"
"net/http"
"net/http/pprof"
"os"
"github.com/go-logr/logr"
"github.com/gorilla/mux"
"github.com/containers/selinuxd/pkg/datastore"
)
const (
DefaultUnixSockAddr = "/var/run/selinuxd.sock"
unixSockMode = 0660
)
type StatusServerConfig s... |
package model
import (
"fmt"
"testing"
"time"
"github.com/reecerussell/open-social/cmd/posts/dao"
"github.com/stretchr/testify/assert"
)
func TestNewPost(t *testing.T) {
testMediaID := 321
p, err := NewPost(123, &testMediaID, "My first post ")
assert.NoError(t, err)
assert.Equal(t, 123, p.userID)
assert.E... |
package resultlog
import (
"fmt"
"strings"
"testing"
"bou.ke/monkey"
"github.com/gojek/turing/engines/router/missionctl/config"
tu "github.com/gojek/turing/engines/router/missionctl/internal/testutils"
"github.com/gojek/turing/engines/router/missionctl/turingctx"
"github.com/stretchr/testify/assert"
"github.... |
package godmt
import (
"fmt"
"go/ast"
"go/token"
"reflect"
)
// BasicTypeLiteralParser will try to extract the type of a basic literal type,
// whether const or var.
func BasicTypeLiteralParser(d *ast.Ident, item *ast.BasicLit) ScannedType {
itemType := fmt.Sprintf("%T", item.Value)
if item.Kind == token.INT {... |
package main
import (
"image/color"
"math/rand"
"time"
oak "github.com/oakmound/oak/v3"
"github.com/oakmound/oak/v3/alg/floatgeom"
"github.com/oakmound/oak/v3/collision"
"github.com/oakmound/oak/v3/collision/ray"
"github.com/oakmound/oak/v3/entities"
"github.com/oakmound/oak/v3/event"
"github.com/oakmound/o... |
package stack
import (
"context"
"encoding/json"
"errors"
"koding/kites/kloud/credential"
"koding/kites/kloud/utils/object"
"github.com/koding/kite"
)
// CredentialDescribeRequest represents a request
// value for "credential.describe" kloud method.
type CredentialDescribeRequest struct {
Provider string `js... |
package txmgr
import (
"bytes"
"fmt"
"sync"
"github.com/syndtr/goleveldb/leveldb/util"
"github.com/lianxiangcloud/linkchain/libs/common"
cmn "github.com/lianxiangcloud/linkchain/libs/common"
dbm "github.com/lianxiangcloud/linkchain/libs/db"
"github.com/lianxiangcloud/linkchain/libs/log"
"github.com/lianxian... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the MIT License.
// This product includes software developed at Guance Cloud (https://www.guance.com/).
// Copyright 2021-present Guance, Inc.
package container
import (
"context"
"fmt"
"time"
"gitlab.jiagouyun.com/cloudcare... |
package extension
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"os"
"strconv"
cfauth "code.cloudfoundry.org/diego-ssh/authenticators"
"code.cloudfoundry.org/diego-ssh/proxy"
"code.cloudfoundry.org/lager"
"github.com/pkg/errors"
"golang.org/x/crypto/ssh"
v1 "k8s.io/api/core/v1"
"k8s.io/apima... |
package main
import (
"net/url"
"strconv"
"net/http"
"log"
"github.com/PuerkitoBio/goquery"
"io/ioutil"
"bytes"
"fmt"
"strings"
"github.com/xen0n/go-workwx"
"context"
"time"
)
type InRegistrationHouse struct {
Name string // 区域
Area string // 项目名称
No string // 预... |
/*
* Flow CLI
*
* Copyright 2019-2021 <NAME>, 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 applicabl... |
package consumer
import (
"context"
"errors"
"sync"
"time"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
"github.com/LiveRamp/gazette/pkg/journal"
"github.com/LiveRamp/gazette/pkg/keepalive"
)
// Client interacts with a Gazette Consumer to maintain an updated pool
// of GRPC client connections t... |
package plugins
import (
"errors"
"fmt"
"io"
"regexp"
"strconv"
"strings"
)
// OptionType is the type of a plugin option.
type OptionType int
const (
// OptionTypeEnum represents an option which has a list of possible values.
OptionTypeEnum OptionType = iota
// OptionTypeBool represents a boolean option.
O... |
package uuencode
import (
"bytes"
"fmt"
"io"
"os"
"strconv"
)
const (
readBegin = iota
readLineLength
readLine
readEnd
readDone
)
var (
tokMagic = []byte("begin ")
tokReadEnd = []byte("end")
tokReadEmptyLine = []byte("`")
)
type Reader struct {
inner io.Reader
state int
file str... |
package util
import (
"archive/tar"
"bytes"
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/spf13/afero"
)
// Sleep stores time.Sleep so we can mock it out for unit tests.
var Sleep = time.Sleep
func httpRequest(url string) (string, error) ... |
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT License was not distributed with this
// file, you can obtain one at https://opensource.org/licenses/MIT.
//
// Copyright (c) DUSK NETWORK. All rights reserved.
package server
import (
"context"
"crypto/ed25519"
"encoding/... |
package vault
import (
"encoding/json"
"errors"
"fmt"
"net/url"
"time"
"code.cloudfoundry.org/lager"
"github.com/concourse/concourse/atc/creds"
vaultapi "github.com/hashicorp/vault/api"
)
type VaultManager struct {
URL string `long:"url" description:"Vault server address used to access secrets."`
PathPre... |
package txbuilder
import (
"errors"
"fmt"
"github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/address"
"github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/balance"
valuetransaction "github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/transaction"
"github.com/iotaledger/wasp/packag... |
// SPDX-FileCopyrightText: 2020 SAP SE
// SPDX-FileCopyrightText: 2021 SAP SE
//
// SPDX-License-Identifier: Apache-2.0
package ase
import (
"context"
"database/sql/driver"
"fmt"
"sync"
"github.com/SAP/go-dblib/asetypes"
"github.com/SAP/go-dblib/tds"
)
// Interface satisfaction checks
var (
_ driver.Conn ... |
package indexer
import (
"context"
"math"
"sync"
"github.com/streamingfast/eth-go/rpc"
pbbstream "github.com/streamingfast/pbgo/dfuse/bstream/v1"
"github.com/streamingfast/shutter"
"github.com/streamingfast/sparkle/blocks"
"github.com/streamingfast/sparkle/entity"
"github.com/streamingfast/sparkle/metrics"
... |
package storage
type SourceFileAndDealFileInfo struct {
ID int64 `json:"id"`
WalletAddress string `json:"wallet_address"`
FileName string `json:"file_name"`
FileSize string `json:"file_size"`
CreateAt string `json:"create_at"`
MinerFid string `json:"miner_f... |
// tokucore
//
// Copyright 2019 by KeyFuse Labs
// BSD License
package schnorr
import (
"errors"
"math/big"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/sha256"
"github.com/keyfuse/tokucore/xcrypto/secp256k1"
)
// Sign -- signature with Schnorr, returning a 64 byte signature.
// https://github.com/sipa/bips/blo... |
package imap
// https://www.ietf.org/rfc/rfc3501.txt
import (
"crypto/tls"
"fmt"
"io"
"log"
"net"
"strings"
"sync"
"github.com/dtcap/backends/auth"
"github.com/dtcap/imap"
)
// Session represents a SMTP session using net.TCPConn
type Session struct {
server *Server
conn io.ReadWriteCloser
prot... |
package xlog
import (
"fmt"
"os"
"runtime"
"testing"
"time"
"github.com/rs/xid"
)
type sharedAction struct {
name string
do func() bool
}
type sharedActionCaller chan sharedAction
func (c sharedActionCaller) Listen() {
for action := range c {
if !action.do() {
fmt.Printf("@ shared action '%s' faile... |
// Copyright 2019 The Chromium OS 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 input
import (
"context"
"math/big"
"os"
"chromiumos/tast/errors"
)
// Axis contains information about a gamepad axis.
type Axis struct ... |
package exe
// STATUS: 1%
import (
"os"
"github.com/martinlindhe/formats/parse"
)
// N64ROM parses the Nintendo 64 ROM image format
func N64ROM(c *parse.Checker) (*parse.ParsedLayout, error) {
if !isN64ROM(c.Header) {
return nil, nil
}
return parseN64ROM(c.File, c.ParsedLayout)
}
func isN64ROM(b []byte) bo... |
package spin
import (
"context"
"fmt"
"io"
"io/ioutil"
"strconv"
"strings"
"time"
"github.com/phayes/freeport"
"github.com/docker/go-connections/nat"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/pkg/errors"
)
// Spi... |
package main
import (
"sort"
"strconv"
"github.com/pauloqueiroga/godraw"
)
const (
hSpacing = 80
vSpacing = 40
)
var (
stageColors map[string]map[string]string = make(map[string]map[string]string)
stageOffsets map[string]int = make(map[string]int)
)
func getColorStyle(index... |
/**
* Copyright 2018 gd Author. All Rights Reserved.
* Author: Chuck1024
*/
package discovery
import (
"encoding/json"
"errors"
"fmt"
"github.com/gdp-org/gd/dlog"
"github.com/gdp-org/gd/service"
"github.com/samuel/go-zookeeper/zk"
"gopkg.in/ini.v1"
"strings"
"sync"
"time"
)
type ZkNode struct {
key ... |
package context
import (
"fmt"
"os"
"regexp"
"strconv"
"sync"
"free5gc/lib/openapi/models"
"free5gc/src/ausf/factory"
"free5gc/src/ausf/logger"
"github.com/google/uuid"
)
type AUSFContext struct {
suciSupiMap sync.Map
UePool sync.Map
NfId string
GroupID string
SBIPort int
Reg... |
package github
import (
"bytes"
"context"
"text/template"
"github.com/shurcooL/githubv4"
"github.com/sirupsen/logrus"
)
// PULLREQUESTBODY is the pull request template used as pull request description
// Please note that triple backticks are concatenated with the literals, as they cannot be escaped
const PULLRE... |
package oidc
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"fmt"
"strings"
"testing"
"time"
"github.com/dgrijalva/jwt-go"
)
func TestFetchPubKeys(t *testing.T) {
cases := []struct {
url string
valid bool
out error
}{
{"https://accounts.google.com/.well-known/openid-configuration", tr... |
package tritonhttp
// approximate contribution: 127 in server.go
import (
"bufio"
"errors"
"fmt"
"io"
"log"
"net"
"os"
"path"
"path/filepath"
"strconv"
"strings"
"time"
)
type Server struct {
// Addr specifies the TCP address for the server to listen on,
// in the form "host:port". It shall be passed to... |
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package chaincode
import (
"fmt"
"strconv"
"sync"
"time"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
"github.com/pkg/errors"
"github.com/blockchain/fabric-sdk-go/fabcli/fabric-cli/cmd/fabr... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package devicefarm
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
// Represents the request to list the offering transaction history.
// Please also see https://docs.aws.amazon.com/goto/W... |
package vreplication
import (
"context"
"fmt"
"io/ioutil"
"net/http"
"regexp"
"strconv"
"strings"
"testing"
"vitess.io/vitess/go/test/endtoend/cluster"
"github.com/PuerkitoBio/goquery"
"github.com/stretchr/testify/assert"
"vitess.io/vitess/go/mysql"
"vitess.io/vitess/go/sqltypes"
)
func execMultipleQue... |
package chainlink
import (
"errors"
"fmt"
"net/http"
"time"
"github.com/smartcontractkit/chainlink-relay/ops/utils"
"github.com/smartcontractkit/integrations-framework/client"
)
// Node implements the node parameters
type Node struct {
Name string
P2P client.P2PData
Config client.ChainlinkConfig
Call ... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package privacyenabledstate
import (
"fmt"
"github.com/mcc-github/blockchain/core/ledger/cceventmgmt"
"github.com/mcc-github/blockchain/core/ledger/kvledger/txmgmt/statedb"
"github.com/mcc-github/blockchain/core/ledger/kvledger/t... |
package driver
import (
"fmt"
"log"
"net/url"
"strings"
"github.com/stardustapp/dustgo/lib/base"
"github.com/stardustapp/dustgo/lib/extras"
"github.com/stardustapp/dustgo/lib/inmem"
"github.com/stardustapp/dustgo/lib/skylink"
"github.com/stardustapp/dustgo/lib/toolbox"
)
var sessionCache map[string]*Session... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: example.proto
/*
Package main is a generated protocol buffer package.
It is generated from these files:
example.proto
It has these top-level messages:
EchoRequest
EchoResponse
*/
package main
import proto "github.com/golang/protobuf/proto"
import fmt "f... |
package ovmgmt
import (
"errors"
"fmt"
"strconv"
"strings"
)
// CLIENT notification types:
//
// (1) Notify new client connection ("CONNECT") or existing client TLS session
// renegotiation ("REAUTH"). Information about the client is provided
// by a list of environmental variables which are documented i... |
package main
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"github.com/inconshreveable/log15"
prompt "github.com/segmentio/go-prompt"
cli "gopkg.in/urfave/cli.v1"
)
func main() {
app := cli.NewApp()
app.Name = "platform-starter"
app.Usage = "Initialize platform projects with common configurat... |
// Copyright © 2019 <NAME> – This file is part of GoatCounter and
// published under the terms of a slightly modified EUPL v1.2 license, which can
// be found in the LICENSE file or at https://license.goatcounter.com
package main
import (
"flag"
"fmt"
"os"
"runtime"
"strings"
_ "time/tzdata"
_ "github.com/lib... |
// Copyright (c) 2020, <NAME> <<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 serv
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/http/httputil"
"net/url"
"os"
"path"
"path/filepath"
"sort"
"strings"
"tim... |
package tiltfile
import (
"context"
"fmt"
"os"
"path/filepath"
"strconv"
"github.com/pkg/errors"
"go.starlark.net/resolve"
"go.starlark.net/starlark"
"github.com/windmilleng/wmclient/pkg/analytics"
"github.com/windmilleng/tilt/internal/dockercompose"
"github.com/windmilleng/tilt/internal/k8s"
"github.co... |
// Copyright Splunk, Inc.
// 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 requir... |
package rbac
import (
"fmt"
"strings"
"github.com/pkg/errors"
)
// model represents the whole access control model.
type model map[string]assertionMap
// assertionMap is the collection of assertions, can be "r", "p", "g", "e", "m".
type assertionMap map[string]*Assertion
// Assertion represents an expression in... |
// Package ocidir implements the OCI Image Layout scheme with a directory (not packed in a tar)
package ocidir
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"path"
"sync"
ociSpecs "github.com/opencontainers/image-spec/specs-go"
ociv1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/regclient/... |
// Copyright 2017. LAAS-CNRS, Vertics. All rights reserved.
// Use of this source code is governed by the CeCILL-B license
// that can be found in the LICENSE file.
package pnml
import (
"bytes"
"encoding/xml"
"errors"
"fmt"
)
func parseExprMult(d *xml.Decoder, acc []Expression) ([]Expression, error) {
res, err... |
// Copyright (C) 2020 WuPeng <<EMAIL>>.
// Use of this source code is governed by an MIT-style.
// 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 limitati... |
package main
import (
"fmt"
"io/ioutil"
"os"
"github.com/davecgh/go-spew/spew"
"github.com/pennyscissors/image-exporter/pkg/charts"
"github.com/pennyscissors/image-exporter/pkg/export"
"github.com/pennyscissors/image-exporter/pkg/systemcharts"
"github.com/pennyscissors/image-exporter/pkg/types"
"github.com/s... |
// Package iothub allows to connect to the Azure IotHub REST API
package iothub
import (
"bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/base64"
"fmt"
"html/template"
"io"
"io/ioutil"
"log"
"net/http"
"net/url"
"strconv"
"strings"
"time"
)
const (
maxIdleConnections int = 100
requestTimeout int... |
package guibuilder
import (
"fmt"
"image/color"
"reflect"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
)
var current fyne.CanvasObject
type jsonResource struct {
fyne.Resource `json:"-"`
}
func (r *jsonResource) MarshalJSON() ([]by... |
package openshift
import (
"fmt"
"path"
"regexp"
"strings"
"github.com/ViaQ/logerr/v2/kverrors"
"github.com/imdario/mergo"
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
)
const (
// tenantApplication is the ... |
// Copyright 2022 The go-exactonline AUTHORS. All rights reserved.
//
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
// Code generated by gen-services.go; DO NOT EDIT.
package purchaseorder
import (
"context"
"encoding/json"
"github.com/stack11/go-exactonline/api"... |
/*
* Copyright 2018 It-chain
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... |
package discover
import (
"context"
"errors"
"reflect"
"sync"
"time"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"
"github.com/gridworkz/kato/cmd/node/option"... |
package pangu
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
"regexp"
"text/template"
)
const VERSION = "3.0.0"
// CJK is short for Chinese, Japanese and Korean.
//
// The constant cjk contains following Unicode blocks:
// \u2e80-\u2eff CJK Radicals Supplement
// \u2f00-\u2fdf Kangxi Radicals
// \u3040-\u309f Hi... |
// Copyright 2020 The ZKits 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 o... |
package main // import "honnef.co/go/implements"
import (
"flag"
"fmt"
"go/types"
"os"
"strings"
"golang.org/x/tools/go/loader"
"github.com/kisielk/gotool"
)
var (
interfacesFrom string
typesFrom string
reverse bool
printHelp bool
)
func init() {
flag.StringVar(&interfacesFrom, "interf... |
package main
import (
"crypto/tls"
"crypto/x509"
"errors"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strings"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack"
"github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/keypairs"
"github.com/gophe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.