text stringlengths 5.51k 28.1k |
|---|
// Copyright 2013 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
// Copyright 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... |
// Copyright 2009 The Go9p Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The srv package provides definitions and functions used to implement
// a 9P2000 file server.
package srv
import (
"code.google.com/p/go9p/p"
"net"
"s... |
// Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
/*
Copyright 2021 Oracle 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 applicable law or agreed to in w... |
package main
import (
"fmt"
"io/fs"
"path/filepath"
"strings"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/gtk"
)
func setUpPinnedFlowBox() *gtk.FlowBox {
if pinnedFlowBox != nil {
pinnedFlowBox.Destroy()
}
flowBox, _ := gtk.FlowBoxNew()
if uint(len(pinned)) >= *columnsNumber {
flowBox.SetMaxCh... |
package release
import (
"bytes"
"encoding/json"
"fmt"
"os"
"sort"
"strings"
"sync"
"time"
"github.com/golang/glog"
digest "github.com/opencontainers/go-digest"
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.... |
package bot
//go:generate sqlboiler --no-hooks psql
import (
"errors"
"strconv"
"strings"
"sync"
"time"
"github.com/botlabs-gg/yagpdb/bot/eventsystem"
"github.com/botlabs-gg/yagpdb/bot/shardmemberfetcher"
"github.com/botlabs-gg/yagpdb/common"
"github.com/botlabs-gg/yagpdb/common/config"
"github.com/botlabs... |
// Copyright 2020 The go-zeromq 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 zyre
import (
"bytes"
"context"
"crypto/rand"
"encoding/binary"
"fmt"
"io"
"log"
"net"
"strconv"
"sync"
"time"
zmq "github.com/go-z... |
package loop
import (
"context"
"errors"
"fmt"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/btcsuite/btcutil"
"github.com/lightninglabs/aperture/lsat"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/loop/loopdb"
"github.com/lightninglabs/loop/swap"
"github.com/lightninglabs/loop/sweep... |
//
// SPDX-License-Identifier: BSD-3-Clause
//
package redfish
import (
"encoding/json"
"github.com/ousehg/gofish/common"
)
// EventSeverity is
type EventSeverity string
const (
// OKEventSeverity Informational or operating normally.
OKEventSeverity EventSeverity = "OK"
// WarningEventSeverity A condition re... |
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... |
// bulk_load_influx loads an InfluxDB daemon with data from stdin.
// bulk_load_influx loads an InfluxDB daemon with data from stdin.
//
// The caller is responsible for assuring that the database is empty before
// bulk load.
package main
import (
"bufio"
"bytes"
"encoding/json"
"flag"
"fmt"
"github.com/influxd... |
package world
import (
"testing"
"github.com/stretchr/testify/assert"
)
type areaCase struct {
Input string
Output areaCaseOutput
}
type areaCaseOutput struct {
MinLevel int
MaxLevel int
Author string
Name string
}
func TestLoadArea(t *testing.T) {
cases := []areaCase{
{
Input: `#SHOPS`,
O... |
package astilectron
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"github.com/asticode/go-astikit"
)
// Var
var (
regexpDarwinInfoPList = regexp.MustCompile("<string>Electron")
)
// Provisioner represents an object capable of provisioning Astilectron
type Provisioner in... |
// Copyright 2019+ <NAME>. All rights reserved.
// License information can be found in the LICENSE file.
// Based on work by <NAME>, released under BSD License.
package zstd
import (
"fmt"
"github.com/klauspost/compress"
)
const (
bestLongTableBits = 22 // Bits used in the long match table
b... |
package digest
import (
"crypto/md5"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"encoding/hex"
"hash"
"path"
"strconv"
"strings"
remoteexecution "github.com/bazelbuild/remote-apis/build/bazel/remote/execution/v2"
"github.com/buildbarn/bb-storage/pkg/util"
"github.com/google/uuid"
"google.golang.org/g... |
// 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... |
package conditionalrequest
import (
"flag"
"fmt"
"os"
"path/filepath"
"strings"
"github.com/goadesign/goa/design"
"github.com/goadesign/goa/goagen/codegen"
)
// Generate adds method to support conditional queries
func Generate() ([]string, error) {
var (
ver string
outDir string
)
set := flag.NewFl... |
/*
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
The godoc documentation describes Gomega's API. More comprehensive documentation (with examples!) is available at http://onsi.github.io/gomega/
Gomega on Github: http://github.com/onsi/gomega
Learn more about Ginkgo online: http://onsi... |
package handler_test
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"reflect"
"strconv"
"strings"
"testing"
"github.com/andrewwphillips/eggql"
"github.com/andrewwphillips/eggql/internal/handler"
)
// Note that the schema strings (below) must closely match the structs (further below). (I... |
// Copyright 2017 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.
package runtime
import (
"runtime/internal/atomic"
"unsafe"
)
// A profBuf is a lock-free buffer for profiling events,
// safe for concurrent use by one re... |
package main
import (
"fmt"
"reflect"
"strings"
tidbTools "tisql/utils"
"github.com/pingcap/parser"
"github.com/pingcap/parser/ast"
_ "github.com/pingcap/tidb/types/parser_driver"
driver "github.com/pingcap/tidb/types/parser_driver"
// "reflect"
)
var ops = map[string]string{
"&&": "and",
"||": "or",
"&... |
package test
import (
"bytes"
"context"
"testing"
"unicode/utf8"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
"github.com/filecoin-project/go-state-ty... |
package main
import (
"flag"
"fmt"
"io/ioutil"
"math"
"net/http"
_ "net/http/pprof"
"os"
"strconv"
"strings"
"time"
"github.com/digitalocean/bind_exporter/bind"
"github.com/digitalocean/bind_exporter/bind/auto"
"github.com/digitalocean/bind_exporter/bind/v2"
"github.com/digitalocean/bind_exporter/bind/v... |
package okex
import "encoding/json"
import "github.com/thrasher-/gocryptotrader/currency/symbol"
// ContractPrice holds date and ticker price price for contracts.
type ContractPrice struct {
Date string `json:"date"`
Ticker struct {
Buy float64 `json:"buy"`
ContractID float64 `json:"contract_id"`
Hig... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/matcher/v3/domain.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/pr... |
/*
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 main
import (
"bufio"
"fmt"
"io/ioutil"
"log"
"net"
"strings"
"sync"
"testing"
"time"
)
func init() {
log.SetOutput(ioutil.Discard)
}
// NOTE: this test suite does end-to-end testing of gost. It is not unit
// testing. The upside is that we get thorough test coverage of the system with
// its multi... |
package box2d
import (
"fmt"
)
/// This holds contact filtering data.
type B2Filter struct {
/// The collision category bits. Normally you would just set one bit.
CategoryBits uint16
/// The collision mask bits. This states the categories that this
/// shape would accept for collision.
MaskBits uint16
/// Co... |
// Copyright (c) 2015 Couchbase, 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 ... |
// Package struct2csv creates slices of strings out of struct fields.
// Struct2csv can work with either a struct or a slice of structs, The data
// can be returned as []string, in the case of a single struct, or [][]string,
// in the case of a slice of structs, by using struct2csv's encoder and
// `Marshal`.
//
// Fo... |
// Copyright 2019 The LUCI 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 fuse
import (
"bytes"
"errors"
"syscall"
"github.com/mingforpc/fuse-go/fuse/evloop"
"github.com/mingforpc/fuse-go/fuse/errno"
"github.com/mingforpc/fuse-go/fuse/kernel"
"github.com/mingforpc/fuse-go/fuse/log"
)
// FuseLoop : the loop to read/write '/dev/fuse'
func (se *Session) FuseLoop() {
if !se.... |
package date
import (
"strconv"
"strings"
"time"
"github.com/datasweet/format/date/locales"
"golang.org/x/text/language"
)
// Format the date with a unicode format
// https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
func Format(lang language.Tag, t time.Time, format string) string {
... |
// 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 mempool
import (
"bytes"
"context"
"math"
"os"
"syn... |
package view
import (
"log"
"os"
"os/exec"
"sync"
"time"
"unicode/utf8"
tb "github.com/nsf/termbox-go"
"github.com/smklein/toy-rss/storage"
)
// TODO(smklein): Use default colors
var defaultFeedURLs = [...]string{
"http://feeds.arstechnica.com/arstechnica/index",
"https://news.ycombinator.com/rss",
"https... |
// Package logging provides the logger used in StackRox Go programs.
//
// This package supports runtime configuration via the following
// environment variables:
// * LOGLEVEL supporting the following values (case insensitive), order is indicative of importance:
// * fatal
// * panic
// * error
// * ... |
package pacttesting
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
"sync"
"testing"
"time"
"github.com/avast/retry-go/v3"
"github.com/pact-foundation/pact-go/dsl"
"github.com/pact-foundation/pact-go/types"
"github.com/pact-foundation/pact-go/utils... |
/*
Copyright 2021 The KodeRover 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, s... |
/**
* 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 db implements bridge to persistent storage represented by Mongo database.
package db
import (
"context"
"fantom-api-graphql/internal/types"
"fmt"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/m... |
package gophercloud
import (
"encoding/json"
"fmt"
"regexp"
"strconv"
"strings"
)
//Define Service error information.
const (
//ECS
EcsAuthRequired = "Authentication required"
EcsPoilcyNotAllow = "Policy doesn't allow .*. to be performed"
EcsTokenRoleEmpty = "token role is empty, forbi... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: Trd_GetMaxTrdQtys.proto
/*
Package Trd_GetMaxTrdQtys is a generated protocol buffer package.
It is generated from these files:
Trd_GetMaxTrdQtys.proto
It has these top-level messages:
C2S
S2C
Request
Response
*/
package Trd_GetMaxTrdQtys
import proto ... |
/**
* Copyright (c) 2018 Cisco Systems
* Author: <NAME> <<EMAIL>>
*/
package cisco_telemetry_mdt
import (
"bytes"
"context"
"encoding/binary"
"fmt"
"io"
"log"
"net"
"sync"
"time"
"google.golang.org/grpc/metadata"
"github.com/golang/protobuf/proto"
"github.com/influxdata/telegraf"
"github.com/influxd... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: infra/unifiedfleet/api/v1/proto/rack_lse.proto
package ufspb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
// ... |
package storagesc
import (
"encoding/json"
"strconv"
"strings"
"testing"
"time"
cstate "0chain.net/chaincore/chain/state"
sci "0chain.net/chaincore/smartcontractinterface"
"0chain.net/chaincore/state"
"0chain.net/chaincore/tokenpool"
"0chain.net/chaincore/transaction"
"0chain.net/core/common"
"0chain.net/... |
// Copyright 2018 The LevelDB-Go and Pebble 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 pebble
import (
"fmt"
"sort"
"sync/atomic"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/intern... |
package procfs
import (
"bufio"
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
"strconv"
"strings"
)
// signalNames is a mapping of signal numbers to names. Note that is is based
// on the glibc definitions where SIGRTMIN = 34.
//
// Generated with: kill -l | tr "\t" "\n" | sed 's/) /: "/g' | sed 's/$/",/g'
var sig... |
package main
import (
"bytes"
"crypto/md5"
"encoding/hex"
"encoding/json"
"errors"
"expvar"
"flag"
"fmt"
"github.com/carbonblack/cb-event-forwarder/internal/leef"
"github.com/carbonblack/cb-event-forwarder/internal/sensor_events"
"github.com/cyberdelia/go-metrics-graphite"
"github.com/rcrowley/go-metrics"
... |
package terraform
import (
"fmt"
"log"
"github.com/hashicorp/terraform/addrs"
"github.com/hashicorp/terraform/configs"
"github.com/hashicorp/terraform/configs/configschema"
"github.com/hashicorp/terraform/dag"
"github.com/hashicorp/terraform/lang"
"github.com/hashicorp/terraform/states"
)
// ConcreteResource... |
package resolvers
import (
"context"
"fmt"
"log"
"time"
"github.com/emwalker/digraph/cmd/frontend/loaders"
"github.com/emwalker/digraph/cmd/frontend/models"
"github.com/emwalker/digraph/cmd/frontend/queries"
"github.com/emwalker/digraph/cmd/frontend/queries/parser"
"github.com/emwalker/digraph/cmd/frontend/r... |
// Package tmx implements a parser for the TMX file format used in the
// Tiled Map Editor.
package tmx
import (
"bytes"
"compress/gzip"
"compress/zlib"
"encoding/base64"
"encoding/xml"
"errors"
"fmt"
"io"
"io/ioutil"
"sort"
"strconv"
"strings"
)
// Bitmasks for tile orientation
const (
TileFlippedHorizo... |
package main
import (
"math"
"syscall/js"
"time"
"github.com/biotty/springweb"
)
const (
defaultK = 1.
armKFactor = 1e3
minK = defaultK * .15
maxK = defaultK * 5
defaultMass = 1e-2
minMass = defaultMass * .15
maxMass = defaultMass * 5
ma... |
package main
import (
"bytes"
"fmt"
"image"
"image/color"
_ "image/png"
"log"
"math"
"math/rand"
"os"
"runtime"
"time"
"github.com/golang/freetype/truetype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/vorbis"
"github.com/hajimehoshi/ebiten... |
// Copyright (C) 2021 <NAME>, Inc.
// See LICENSE for copying information.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: pico.proto
package main
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.g... |
// Package config provides facilities to read and write the Git Town configuration.
// Git Town stores its configuration in the Git configuration under the prefix "git-town".
// It supports both the Git configuration for the local repository as well as the global Git configuration in `~/.gitconfig`.
// You can manually... |
package cache
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"time"
"github.com/google/go-github/v32/github"
"github.com/rs/zerolog/log"
"golang.org/x/oauth2"
)
var directCache = map[string]struct{}{
"d... |
// Copyright (c) 2017, <NAME>.
// All rights reserved.
package store
import (
"crypto/rand"
"encoding/binary"
"encoding/hex"
"fmt"
"unsafe"
"github.com/cjpatton/store/pb"
"github.com/golang/protobuf/proto"
)
/*
// The next line gets things going on Mac:
#cgo CPPFLAGS: -I/usr/local/opt/openssl/include
#cgo LD... |
package lexer
import (
"bytes"
"fmt"
"regexp"
"strconv"
"strings"
)
// https://cloudwu.github.io/lua53doc/manual.html#3.1
// Lexer lua lexer
type Lexer struct {
chunk string // source code
chunkName string // source file name
line int // current line no.
nextToken string
nextTokenKind int
... |
package sonarr
import (
"time"
"golift.io/starr"
)
// QualityProfile is the /api/v3/qualityprofile endpoint.
type QualityProfile struct {
ID int64 `json:"id"`
Name string `json:"name"`
Cutoff int64 `json:"cutoff"`
Qualities []*starr.Quality `js... |
package main
import (
"fmt"
"io/ioutil"
"os"
"strconv"
"strings"
"time"
"github.com/vaxx99/iama/bcd"
)
type block []string
var wd, sp string
func main() {
switch len(os.Args) {
case 2:
wd = os.Args[1]
case 3:
wd = os.Args[1]
sp = os.Args[2]
default:
wd = "."
sp = ""
}
os.Chdir(wd)
f, _ := ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.3
// source: src/blockchain_txn_add_gateway_v1.proto
package transaction
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
r... |
// Copyright 2016 <NAME>. All rights reserved.
// Use of this source code is governed by a license that can be found in the LICENSE.txt file.
// implementation notes:
//
// Session expiration is implemented by maintaining a "time-to-live" for each
// session and having database back ends delete expired sessions
// (th... |
package platformclientv2
import (
"time"
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Userme
type Userme struct {
// Id - The globally unique identifier for the object.
Id *string `json:"id,omitempty"`
// Name
Name *string `json:"name,omitempty"`
// Division - The division to ... |
package exchange
import (
"fmt"
"github.com/celskeggs/hailburst/sim/component"
"github.com/celskeggs/hailburst/sim/fakewire/codec"
"github.com/celskeggs/hailburst/sim/fakewire/fwmodel"
"github.com/celskeggs/hailburst/sim/model"
"log"
"time"
)
type ExchangeState uint8
const (
StateInvalid = iota
StateConnect... |
/*
Copyright © 2022 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, ... |
// Copyright 2017 The File 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 file
import (
"bytes"
"encoding/binary"
"fmt"
"io"
"os"
"time"
"unsafe"
"github.com/cznic/internal/buffer"
)
const (
bit63 = -1 << 63
szN... |
package dispatcher
import (
"context"
"fmt"
"runtime"
"sync"
"time"
"github.com/go-sod/sod/internal/alert"
"github.com/go-sod/sod/internal/database"
"github.com/go-sod/sod/internal/logging"
metricDb "github.com/go-sod/sod/internal/metric/database"
"github.com/go-sod/sod/internal/metric/model"
"github.com/g... |
// Copyright © 2019 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: grr/proto/semantic.proto
/*
Package semantic is a generated protocol buffer package.
It is generated from these files:
grr/proto/semantic.proto
It has these top-level messages:
SemanticDescriptor
SemanticMessageDescriptor
*/
package semantic
import prot... |
package bp128
func pack32_1(in uintptr, out *byte, offset int, seed *byte)
func pack32_2(in uintptr, out *byte, offset int, seed *byte)
func pack32_3(in uintptr, out *byte, offset int, seed *byte)
func pack32_4(in uintptr, out *byte, offset int, seed *byte)
func pack32_5(in uintptr, out *byte, offset int, seed *byte)
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/type/matcher/regex.proto
package envoy_type_matcher
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobu... |
package main
import (
"flag"
"fmt"
"github.com/g3n/engine/audio/al"
"github.com/g3n/engine/audio/ov"
"github.com/g3n/engine/audio/vorbis"
"github.com/g3n/engine/camera"
"github.com/g3n/engine/camera/control"
"github.com/g3n/engine/core"
"github.com/g3n/engine/gls"
"github.com/g3n/engine/gui"
"github.com/g3n... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: peer/proposal.proto
package peer
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
// This s... |
package core
import (
"bytes"
"fmt"
"io"
"math/big"
"sync"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethe... |
package main
import (
"flag"
"html/template"
"log"
"net/http"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/gin-contrib/location"
"github.com/gin-contrib/sessions"
"github.com/gin-contrib/sessions/memstore"
"github.com/gin-gonic/gin"
"github.com/microcosm-cc/bluemonday"
nrgin "github.com/newrelic... |
package testutil
// TestServer is a test helper. It uses a fork/exec model to create
// a test Consul server instance in the background and initialize it
// with some data and/or services. The test server can then be used
// to run a unit test, and offers an easy API to tear itself down
// when the test has completed.... |
package cmd
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"regexp"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
)
type CpuUtilization struct {
Name string `json:"name"`
User uint64 `json:"user"`
Nice uint64 `json:"nice"`
System uint64 `json:"system"`
Idle ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/resources/domain_category.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
_ "google.golang.org/genproto/googleapis/api/annotat... |
// Copyright 2009 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.
// Package draw provides basic graphics and drawing primitives,
// in the style of the Plan 9 graphics library
// (see http://plan9.bell-labs.com/magic/man2htm... |
package saver_test
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"math"
"os"
"path/filepath"
"runtime"
"strings"
"testing"
"time"
"github.com/m-lab/go/anonymize"
"github.com/m-lab/tcp-info/eventsocket"
"github.com/m-lab/go/rtx"
"github.com/m-lab/tcp-info/inetdiag"
"github.com/m-lab/tcp... |
// Package kubernetes provides the kubernetes backend.
package kubernetes
import (
"errors"
"fmt"
"log"
"net"
"strings"
"time"
"github.com/coredns/coredns/middleware"
"github.com/coredns/coredns/middleware/etcd/msg"
"github.com/coredns/coredns/middleware/pkg/dnsutil"
dnsstrings "github.com/coredns/coredns/m... |
/*
Copyright 2014 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Copyright (c) 2019 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... |
/*
Copyright 2019 PlanetScale 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, softwar... |
//
// Copyright (C) 2014-2017 Nippon Telegraph and Telephone Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: orc8r/cloud/go/services/configurator/protos/southbound.proto
package protos
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/... |
package aws
import (
"context"
"crypto"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/base64"
"encoding/json"
"encoding/pem"
"fmt"
"math"
"os"
"regexp"
"sort"
"strings"
"sync"
"text/template"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
"github.com/aws/aws-sdk-... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
package report
import (
"archive/tar"
"fmt"
"github.com/lesovsky/pgcenter/internal/align"
"github.com/lesovsky/pgcenter/internal/query"
"github.com/lesovsky/pgcenter/internal/stat"
"github.com/lesovsky/pgcenter/internal/view"
"io"
"os"
"regexp"
"strconv"
"strings"
"sync"
"time"
)
// Config contains appli... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/resources/detail_placement_view.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/googleapis/a... |
package main
import (
"encoding/json"
"flag"
"fmt"
"image"
"log"
"os"
"os/exec"
"strconv"
"strings"
"sync"
"time"
"gocv.io/x/gocv"
)
var (
templates []gocv.Mat
inputFile string
dryRun bool
verbosive bool
debug bool
)
type tplFileArg []string
func (t tplFileArg) String() string {
return str... |
package sql
import (
"testing"
"time"
"github.com/stretchr/testify/require"
"vitess.io/vitess/go/sqltypes"
"vitess.io/vitess/go/vt/proto/query"
)
func TestIsNull(t *testing.T) {
require.True(t, IsNull(nil))
n := numberT{sqltypes.Uint64}
require.Equal(t, sqltypes.NULL, mustSQL(n.SQL(nil)))
require.Equal(t, ... |
// Code generated by protoc-gen-go.
// source: encoding.proto
// DO NOT EDIT!
/*
Package serialize is a generated protocol buffer package.
It is generated from these files:
encoding.proto
It has these top-level messages:
Message
MessageState
ImapData
Encoding
*/
package serialize
import proto "github.com/golan... |
// impl generates method stubs for implementing an interface.
package main
import (
"bytes"
"flag"
"fmt"
"go/ast"
"go/build"
"go/parser"
"go/printer"
"go/token"
"os"
"path/filepath"
"strconv"
"strings"
"text/template"
"golang.org/x/tools/imports"
"go/format"
)
const usage = `kitboiler <iface>
kitboil... |
package main
//go:generate licrep -o licenses.go
import (
"archive/zip"
"flag"
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
"runtime"
"sort"
"strings"
"text/tabwriter"
"time"
"github.com/kopoli/appkit"
)
var (
version = "Undefined"
timestamp = "Undefined"
buildGOOS = "Undefined"
buildGOARCH = ... |
package fmi
import (
"encoding/xml"
"fmt"
"io/ioutil"
"math"
"net/http"
"net/url"
"sort"
"strings"
"time"
)
type simpleFeatureCollection struct {
Timestamp time.Time `xml:"timeStamp,attr"`
Returned int `xml:"numberReturned,attr"`
Matched int `xml:"numberMatched,attr"`
Elements ... |
package main
import (
"bufio"
"bytes"
"context"
"encoding/json"
"fmt"
_ "golang.org/x/image/webp"
"image"
"image/jpeg"
_ "image/png"
"io/ioutil"
"math"
"net/http"
"os"
"path"
"sort"
"strconv"
"strings"
"time"
"github.com/corona10/goimagehash"
"github.com/dghubble/go-twitter/twitter"
"github.com/d... |
// 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 main
import (
"github.com/decred/politeia/decredplugin"
pd "github.com/decred/politeia/politeiad/api/v1"
"github.com/decred/politeia/politeiad/cache"
www "git... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.