text stringlengths 8.57k 38.1k |
|---|
// Copyright (c) 2020 Tailscale Inc & 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 logpolicy manages the creation or reuse of logtail loggers,
// caching collection instance state on disk for use on future runs of
// pro... |
package registry
import (
cryptorand "crypto/rand"
"encoding/base64"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"strconv"
"strings"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/devtools/resultstore/v2/target.proto
package resultstore
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var... |
/*
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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: crossconnect.proto
package crossconnect
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
connection "github.com/networkservicemesh/networkservicemesh/controlplane/api/local/con... |
// Package fetch contains mechanism to fetch Data from remote peers
package fetch
import (
"context"
"errors"
"fmt"
"sync"
"time"
"github.com/spacemeshos/go-spacemesh/common/types"
"github.com/spacemeshos/go-spacemesh/database"
"github.com/spacemeshos/go-spacemesh/log"
p2pconf "github.com/spacemeshos/go-spac... |
// MIT License
//
// Copyright (c) 2020 CADCloud
//
// 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, me... |
package engine
import (
"encoding/json"
"fmt"
"strconv"
"strings"
"time"
"github.com/laincloud/deployd/cluster"
"github.com/laincloud/deployd/network"
"github.com/laincloud/deployd/utils/units"
"github.com/laincloud/deployd/utils/util"
"github.com/mijia/adoc"
"github.com/mijia/go-generics"
"github.com/mij... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/ad_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v2/resources"
_ "google.golang.... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: oauth.proto
package oauth
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.... |
// Code generated by protoc-gen-gogo.
// source: google/protobuf/type.proto
// DO NOT EDIT!
package google_protobuf
import proto "github.com/gogo/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 _ ... |
/*
* Copyright 2017-2018 <NAME>, Inc. and Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.14.0
// source: echo.proto
package echo
import (
context "context"
_ "google.golang.org/genproto/googleapis/api/annotations"
longrunning "google.golang.org/genproto/googleapis/longrunning"
grpc "goog... |
package main
import (
"fmt"
"net"
"os"
"os/exec"
"strconv"
"strings"
"syscall"
"golang.org/x/crypto/ssh/terminal"
"github.com/lxc/lxd/client"
"github.com/lxc/lxd/lxd/util"
"github.com/lxc/lxd/shared"
"github.com/lxc/lxd/shared/api"
"github.com/lxc/lxd/shared/cmd"
"github.com/lxc/lxd/shared/idmap"
"gi... |
package iris
// Minimal management over SSH for your Iris & Q web server
//
// Declaration:
//
// iris.SSH.Host = "0.0.0.0:22"
// iris.SSH.KeyPath = "./iris_rsa" // it's auto-generated if not exists
// iris.SSH.Users = iris.Users{"kataras", []byte("pass")}
//
//
// Usage:
// via interactive command shell:
//
// $ ssh... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc (unknown)
// source: Mysql/Options/Annotations.proto
package pboptions
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.... |
// Copyright 2014 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... |
/*
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 ... |
package model
//IterationResponse response for tapd iteration query
type IterationResponse struct {
Status int `json:"status"`
Data []*IterationWrapper `json:"data"`
Info string `json:"info"`
}
//IterationWrapper sub struct in IterationResponse
type IterationWrapper struct {
Itera... |
package grpc
import (
"context"
"encoding/base64"
"fmt"
"log"
"net"
"rpc-gateway/pkg/core/common"
logging "rpc-gateway/pkg/core/log"
"rpc-gateway/pkg/plugins"
"rpc-gateway/pkg/plugins/vs/kvs"
"strconv"
"strings"
"time"
"github.com/spf13/viper"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"... |
package withings
import (
"context"
"errors"
"fmt"
"net/url"
"strings"
"time"
)
// MeasureService handles communication with the measure related
// methods of the Withings API.
//
// Withings API docs: https://developer.withings.com/api-reference#tag/measure
type MeasureService service
// MeasureGetOptions spe... |
// +build !amd64,!go1.13 forcegeneric
package edwards25519
// Element of the field GF(2^255 - 19) over which the elliptic
// curve Edwards25519 is defined.
type FieldElement [10]int32
var (
feZero FieldElement
feOne = FieldElement{1, 0, 0, 0, 0, 0, 0, 0, 0, 0}
feMinusOne = FieldElement{-1, 0, 0, 0, 0, 0,... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: crossconnect.proto
package crossconnect
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
connection "github.com/networkservicemesh/networkservicemesh/controlplane/pkg/apis/loca... |
// Copyright 2011 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 ssh
import (
"encoding/binary"
"errors"
"fmt"
"io"
"log"
"net"
"sync"
"sync/atomic"
"time"
)
const (
minPacketLength = 9
// channelMaxPacke... |
//https://static.googleusercontent.com/media/www.google.com/en//covid19/exposurenotifications/pdfs/Exposure-Key-File-Format-and-Verification.pdf
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: diagnosis_key_batch.proto
package protocols
imp... |
package core
import (
"fmt"
"strconv"
// "reflect"
)
func showNode(node Node, addr Addr, state GmState) string {
switch node.(type) {
case NNum:
return strconv.Itoa(int(node.(NNum)))
case NGlobal:
gmg := GetGlobals(state)
var name Name
for _, obj := range gmg {
if obj.Addr == addr {
name = obj.Na... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
/*
Copyright IBM Corp. 2016 All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
// Copyright (c) 2020 Tailscale Inc & 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 cli
import (
"context"
"errors"
"flag"
"fmt"
"os"
"reflect"
"runtime"
"sort"
"strings"
"sync"
shellquote "github.com/kballard/g... |
package downsample
import (
"math"
"math/rand"
"os"
"path/filepath"
"time"
"github.com/go-kit/kit/log"
"github.com/improbable-eng/thanos/pkg/block/metadata"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/oklog/ulid"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/value"
"github.c... |
package gaiascheduler
import (
"errors"
"fmt"
"os"
"path/filepath"
"strconv"
"sync"
"sync/atomic"
"time"
"github.com/gaia-pipeline/gaia"
"github.com/gaia-pipeline/gaia/helper/stringhelper"
"github.com/gaia-pipeline/gaia/plugin"
"github.com/gaia-pipeline/gaia/security"
"github.com/gaia-pipeline/gaia/store... |
// Copyright 2015 go-swagger maintainers
//
// 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 agr... |
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package renter
// NOTE: All chunk recovery (which involves high computation and disk syncing)
// is done in the primary download loop thread. At some point this may be a
// significant performance bottleneck.
import (
"bytes"
"errors"
"io"
"os"
"sync"
"sync/atomic"
"time"
"github.com/NebulousLabs/Sia/build"
... |
package openflow13
import (
"fmt"
"strings"
)
const (
// OFPP_IN_PORT is the default number of in_port field in resubmit actions.
OFPP_IN_PORT = 0xfff8
)
// NX_CT_STATES
const (
NX_CT_STATE_NEW_OFS = 0
NX_CT_STATE_EST_OFS = 1
NX_CT_STATE_REL_OFS = 2
NX_CT_STATE_RPL_OFS = 3
NX_CT_STATE_INV_OFS = 4
NX_C... |
package main
import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"embed"
"encoding/json"
"encoding/pem"
"fmt"
"io"
"io/ioutil"
"log"
"math/big"
"net/http"
"net/url"
"os"
"path/filepath"
"regexp"
"strings"
"time"
mxj "github.com/clbanning/mxj/v2"
"github.com... |
package toolkit
import "fmt"
var (
J2W_LANGUAGE_TYPES = map[string]byte{
"i32": 0x7f,
"i64": 0x7e,
"f32": 0x7d,
"f64": 0x7c,
"anyFunc": 0x70,
"func": 0x60,
"block_type": 0x40,
}
J2W_EXTERNAL_KIND = map[string]byte{
"function": 0,
"table": 1,
"memory": ... |
package vm
import (
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
)
// Vm implements VirtualMachine
type Vm struct {
env Environment
err error
// For logging
debug boo... |
// Copyright 2013, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletmanager
// This file handles the binlog players launched on masters for filtered
// replication
import (
"fmt"
"math/rand" // not crypto-safe is ... |
// Copyright (c) 2017-2020 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... |
package psi
import (
"strconv"
"time"
"github.com/vitmod/godvb"
)
// TODO: Reconsider all descriptors decoding/encoding code. Goals:
// 1. Simple and orthogonal implementation.
// 2. Avoid allocations.
type ServiceType byte
const (
ZeroServiceType = ServiceType(0x00)
DigitalTelevisi... |
package goment
import (
"errors"
"regexp"
"strconv"
"strings"
"time"
"github.com/kubax2000/goment/locales"
"github.com/kubax2000/goment/regexps"
)
var yearIdx = 0
var monthIdx = 1
var dateIdx = 2
var hourIdx = 3
var minuteIdx = 4
var secondIdx = 5
var nanosecondIdx = 6
var weekIdx = 7
var weekdayIdx = 8
var ... |
// Copyright © 2017 Microsoft <<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, publ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/v1/image.proto
package image_go_proto
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Th... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: lxd/migrate.proto
/*
Package main is a generated protocol buffer package.
It is generated from these files:
lxd/migrate.proto
It has these top-level messages:
IDMapType
Config
Device
Snapshot
MigrationHeader
MigrationControl
*/
package main
import p... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
package mint
import (
"bytes"
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/hmac"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"fmt"
"math/big"
"time"
// Blank includes to ensure hash support
_ "crypto/sha1"
_ "crypto/sha256"
_ "crypto/sha512"
)
var prng = rand.Rea... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/google_ads_field_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v2/resources"
_ "... |
// Copyright 2020 WHTCORPS INC, 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... |
package logconfig
// Copyright (c) 2018, Arm Limited and affiliates.
// SPDX-License-Identifier: Apache-2.0
//
// 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.or... |
// Copyright (c) 2012-2014 <NAME>, https://menteslibres.net/xiam
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, ... |
package engine
import (
"context"
"fmt"
"path/filepath"
"time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/windmilleng/tilt/internal/dockercompose"
v1 "k8s.io/api/core/v1"
"github.com/windmilleng/tilt/internal/hud"
"github.com/windmilleng/tilt/internal/hud/view"
... |
// The MIB module for monitoring communications and status
// of AAA Server operation
package cisco_aaa_server_mib
import (
"fmt"
"github.com/CiscoDevNet/ydk-go/ydk"
"github.com/CiscoDevNet/ydk-go/ydk/types"
"github.com/CiscoDevNet/ydk-go/ydk/types/yfilter"
"github.com/CiscoDevNet/ydk-go/ydk/models... |
// Copyright 2018 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... |
// Copyright 2015-2018 <NAME>.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
package main
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"os/exec"
"path"
"strconv"
"strings"
"sync"
"time"
"github.com/robodone/robosla-common/pkg/autoupdate"
"github.com/vincent-petithory/dataurl"
)
const (
numSaturationDelays = 20
MDisp... |
package styxproto
import (
"bytes"
"errors"
"fmt"
"io"
"strings"
)
var (
errMaxSize = errors.New("message size larger than max uint32")
errLongString = errors.New("string longer than max uint16")
errMaxCount = errors.New("count larger than max uint32")
)
// This package does not unmarshal messages into ... |
package photoprism
import (
"errors"
"fmt"
"image/color"
"math"
"github.com/lucasb-eyer/go-colorful"
)
type ColorPerception struct {
Colors IndexedColors
MainColor IndexedColor
Luminance LightMap
Chroma Chroma
}
type IndexedColor uint16
type IndexedColors []IndexedColor
type Chroma uint8
type Lumina... |
package oidc
import (
"encoding/json"
"errors"
"fmt"
"log"
"net/http"
"net/url"
"strings"
"sync"
"time"
"github.com/coreos/pkg/timeutil"
"github.com/jonboulle/clockwork"
phttp "github.com/coreos/go-oidc/http"
"github.com/coreos/go-oidc/oauth2"
)
const (
// Subject Identifier types defined by the OIDC ... |
package mgr
import (
"context"
"fmt"
"net"
"path"
"strconv"
"strings"
apitypes "github.com/alibaba/pouch/apis/types"
"github.com/alibaba/pouch/daemon/config"
"github.com/alibaba/pouch/daemon/events"
"github.com/alibaba/pouch/network"
"github.com/alibaba/pouch/network/types"
"github.com/alibaba/pouch/pkg/e... |
// Copyright (c) 2018 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
package virtcontainers
import (
"context"
"encoding/hex"
"errors"
"fmt"
"os"
"strconv"
govmmQemu "github.com/intel/govmm/qemu"
"github.com/kata-containers/runtime/virtcontainers/device/config"
"github.com/kata-containers/r... |
// Copyright 2012 The Walk Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build windows
package walk
import (
"fmt"
"math"
"sync"
"syscall"
"time"
"unsafe"
"github.com/lxn/win"
)
type CloseReason byte
const (
CloseR... |
// Package openapi generates the documentation into OpenAPI format.
// Specification: https://swagger.io/specification/
package openapi
import (
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
log "github.com/sirupsen/logrus"
"github.com/spaceavocado/apidoc/misc"
"github.com/spaceavocado/apidoc/output"
"githu... |
// Copyright 2018 Shift Devices AG
// Copyright 2020 Shift Crypto AG
//
// 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 req... |
package integration_test
import (
"context"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"runtime"
"sort"
"strings"
"sync"
"testing"
"time"
"ashuffle/testashuffle"
"ashuffle/testmpd"
"github.com/google/go-cmp/cmp"
"github.com/joshkunz/fakelib/filesystem"
"github.com/joshkunz/fakelib/library"
"githu... |
package releasecontroller
import (
"bytes"
"fmt"
"time"
imagev1 "github.com/openshift/api/image/v1"
citools "github.com/openshift/ci-tools/pkg/api"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
)
// APITag contains information about a release tag in a stream.
type APITag s... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
//go:build linux_bpf
// +build linux_bpf
package tracer
import (
"erro... |
package build
import (
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"time"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/jsonmessage"
controlapi "github.com/moby... |
// Copyright 2015 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
// Copyright 2015 The Cockroach 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 ag... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: udpa/data/orca/v1/orca_load_report.proto
package udpa_data_orca_v1
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "goog... |
//go:build linux && !no_bpf
// +build linux,!no_bpf
/*
Copyright 2021 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... |
// 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 p9 package go9provides the definitions and functions used to implement
// the 9P2000 protocol.
// TODO.
// All the packet conversion code in this file... |
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package parser
import (
"github.com/lohvht/logi"
"github.com/lohvht/went/lang/ast"
"github.com/lohvht/went/lang/errorutils"
"github.com/lohvht/went/lang/token"
)
const funcArgsLimit = 255
type Parser struct {
Tokeniser *token.Tokeniser
HasError bool
}
func (p *Parser) handleParseErrorPanic() {
if r := recov... |
package eval
import (
lexer2 "github.com/chermehdi/comet/pkg/lexer"
parser2 "github.com/chermehdi/comet/pkg/parser"
std2 "github.com/chermehdi/comet/pkg/std"
"strings"
)
type Evaluator struct {
Scope *Scope
Builtins map[string]*std2.Builtin
Types map[string]*std2.CometStruct
}
// Param is a named parame... |
package persistence
import (
"math/rand"
"reflect"
"time"
cconf "github.com/pip-services3-go/pip-services3-commons-go/config"
cdata "github.com/pip-services3-go/pip-services3-commons-go/data"
cerror "github.com/pip-services3-go/pip-services3-commons-go/errors"
crefer "github.com/pip-services3-go/pip-services3-... |
// Copyright 2017 GRAIL, Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
package local
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/url"
"os"
"path/filepath"
"strings"
"sync"
"time"
"docker.io/go-docker"
"do... |
// 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 © 2021 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 or agreed to in writi... |
// Copyright 2018 ETH Zurich
//
// 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 2021 guonaihong. 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 client is the kcl client, containing global options and
// a kgo.Client builder.
package client
import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"io/ioutil"
"math"
"net"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/BurntSushi/toml"
"github.com/spf13/cobra"
... |
package pool
import (
"context"
"errors"
"fmt"
"math/big"
"math/rand"
"time"
"decred.org/dcrwallet/rpc/walletrpc"
txrules "decred.org/dcrwallet/wallet/txrules"
"decred.org/dcrwallet/wallet/txsizes"
"github.com/decred/dcrd/chaincfg/chainhash"
"github.com/decred/dcrd/chaincfg/v3"
"github.com/decred/dcrd/dcr... |
package response
import (
"fmt"
"net/http"
"github.com/couchbase/eventing/gen/auditevent"
"github.com/couchbase/eventing/util"
"github.com/couchbase/goutils/systemeventlog"
)
type Response interface {
// Adds request made by the user
AddRequestData(key string, value interface{})
// Add the requested event
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/errors/media_file_error.proto
package errors // import "google.golang.org/genproto/googleapis/ads/googleads/v0/errors"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppre... |
// Originally derived from: btcsuite/btcd/server.go
// Copyright (c) 2013-2015 Conformal Systems LLC.
// Copyright (c) 2015 Monetas.
// Copyright 2016 <NAME>.
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package main
import (
"crypto/rand"
"encoding/binary"
"e... |
// Copyright 2020 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 settings provides support for the Linux settings on the Settings app.
package settings
import (
"context"
"regexp"
"strconv"
"strings"
... |
package builtins_qlik
import (
"bytes"
"fmt"
"io/ioutil"
"net/url"
"os"
"os/exec"
"path/filepath"
"reflect"
"regexp"
"runtime"
"strconv"
"strings"
"syscall"
"github.com/cnf/structhash"
version "github.com/hashicorp/go-version"
"github.com/traefik/yaegi/interp"
"github.com/traefik/yaegi/stdlib"
"go.u... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: proto/contract_update.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
wrapperspb "google.... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common/collection.proto
package common
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is... |
// Code generated by protoc-gen-go.
// source: google/logging/v2/log_entry.proto
// DO NOT EDIT!
package google_logging_v2
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gengo/grpc-gateway/third_party/googleapis/google/api"
import google_api3 "go.pedge.io/pb/g... |
package pango
import (
"strings"
"github.com/benoitkugler/textlayout/language"
)
// Gravity represents the orientation of glyphs in a segment
// of text. This is useful when rendering vertical text layouts. In
// those situations, the layout is rotated using a non-identity Matrix,
// and then glyph orientation is... |
package lang
import "strings"
type Lang struct {
Name string
NativeName string
}
func CodeToLang(iso string) *Lang {
if len(iso) < 2 {
return nil
}
iso = strings.ToLower(iso[0:2])
if l, ok := IsoLangs[iso]; ok {
return &l
}
return nil
}
func CodeToLangName(iso string) string {
l := CodeToLang(iso... |
package service
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"os"
"path"
"runtime"
"strconv"
"strings"
"sync"
"time"
"github.com/elvisNg/broccoliv2/pprof"
"github.com/prometheus/client_golang/prometheus/promhttp"
assetfs "github.com/elazarl/go-bindata-assetfs"... |
// Copyright 2015 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
//
// Copyright 2021, <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 w... |
package apply
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"sort"
"strconv"
survey "github.com/AlecAivazis/survey/v2"
"github.com/olekukonko/tablewriter"
"github.com/pquerna/ffjson/ffjson"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.i... |
// Copyright 2016 The Cockroach 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 ag... |
package network
import (
"context"
"errors"
"fmt"
"github.com/0xPolygon/polygon-edge/network/common"
"github.com/0xPolygon/polygon-edge/network/dial"
"github.com/0xPolygon/polygon-edge/network/discovery"
"github.com/libp2p/go-libp2p"
noise "github.com/libp2p/go-libp2p-noise"
rawGrpc "google.golang.org/grpc"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.