text stringlengths 5.51k 28.1k |
|---|
package auth
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/url"
"strings"
"sync"
"time"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
glob "github.com/ryanuber/go-glob"
"github.com/tidwall/gjson"
"golang.org/x/oauth2"
"github.com/kinvolk/nebraska/ba... |
package bundle
import (
"context"
"fmt"
"net"
"net/http"
"os"
"time"
"github.com/fission/fission-workflows/pkg/api"
"github.com/fission/fission-workflows/pkg/apiserver"
"github.com/fission/fission-workflows/pkg/controller"
"github.com/fission/fission-workflows/pkg/controller/expr"
wfictr "github.com/fissio... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/errors/resource_count_limit_exceeded_error.proto
package errors
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress... |
// Package generators used to create bson encoded random data.
//
// Relevant documentation:
//
// http://bsonspec.org/#/specification
//
//
// It was created as part of mgodatagen, but may be used on its own.
package generators
import (
"crypto/md5"
"os"
"strconv"
"sync/atomic"
"time"
"github.com/MichaelTJ... |
// Code generated from Bitflow.g4 by ANTLR 4.7.1. DO NOT EDIT.
package parser
import (
"fmt"
"unicode"
"github.com/antlr/antlr4/runtime/Go/antlr"
)
// Suppress unused import error
var _ = fmt.Printf
var _ = unicode.IsLetter
var serializedLexerAtn = []uint16{
3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, ... |
// Copyright 2017 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 (C) 2019-2022 vdaas.org vald team <<EMAIL>>
//
// 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 a... |
package main
// Игра с цветами
import (
"fmt"
"github.com/veandco/go-sdl2/sdl"
"runtime"
"sync"
"time"
)
const (
windowWidth = 800
windowHeight = 600
)
func lerp(b1, b2 byte, pct float32) byte {
return byte(float32(b1) + pct * (float32(b2) - float32(b1)))
}
func colorLerp(c1, c2 color, pct float32) color {
... |
// Copyright 2015 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 The Azul3D 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 chippy
import (
"azul3d.org/v1/chippy/wrappers/win32"
"errors"
"fmt"
"runtime"
)
type W32GLContext struct {
valid bool
destroyed bool
h... |
// +build !windows
// Copyright (c) 2021 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
//
// Unle... |
// Copyright 2017 PingCAP, 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 i... |
// Copyright 2017 The Cockroach Authors.
//
// Licensed as a CockroachDB Enterprise file under the Cockroach Community
// License (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// https://github.com/cockroachdb/cockroach/blob/master/li... |
package types
// constants.go contains the Sia constants. Depending on which build tags are
// used, the constants will be initialized to different values.
//
// CONTRIBUTE: We don't have way to check that the non-test constants are all
// sane, plus we have no coverage for them.
import (
"errors"
"math/big"
"git... |
// Copyright Istio 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 wri... |
// Copyright 2020 The Moov Authors
// Use of this source code is governed by an Apache License
// license that can be found in the LICENSE file.
package imagecashletter
import (
"encoding/json"
"fmt"
"strings"
"time"
"unicode/utf8"
)
// Errors specific to a ImageViewDetail Record
// ImageViewDetail Record
type... |
// Subset of https://github.com/rjeczalik/notify extracted and modified to
// expose watcher functionality directly. Originally extracted from the
// following revision:
// https://github.com/rjeczalik/notify/tree/e2a77dcc14cf6732bfa4c361554f27dc696d5d79
//
// The original code license:
//
// The MIT License (MIT)
//
/... |
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.
// Giorgis (<EMAIL>)
// Corbatto (<EMAIL>)
//Package avformat provides some generic global options, which can be set on all the muxers and demuxers.
//In addition each muxer or demuxer may support so-called private options, ... |
package main
import (
"context"
"crypto/tls"
"flag"
"fmt"
"net/http"
"os"
"path/filepath"
"time"
"golang.org/x/crypto/acme/autocert"
"github.com/alexedwards/scs"
"github.com/alexedwards/scs/stores/boltstore"
"github.com/alexedwards/scs/stores/memstore"
"github.com/boltdb/bolt"
"github.com/go-chi/chi"
... |
/*
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 binance
import (
"encoding/json"
"errors"
"fmt"
"time"
"github.com/adshao/go-binance/v2"
"github.com/valyala/fastjson"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
)
/*
executionReport
{
"e": "executionReport", // Event type
"E": 1... |
// Copyright 2020 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 cache
import (
"context"
"fmt"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"golang.org/x/mod/modfile"
"github.com/jhump/golang-x-tools/inter... |
package uspv
import (
"fmt"
"os"
"github.com/mit-dci/lit/logging"
"github.com/mit-dci/lit/btcutil/bloom"
"github.com/mit-dci/lit/btcutil/chaincfg/chainhash"
"github.com/mit-dci/lit/lnutil"
"github.com/mit-dci/lit/wire"
)
const (
// keyFileName and headerFileName are not referred in this file? -- takaya
key... |
package spec
//OAS as specified by OAS version 3.1.0 https://spec.openapis.org/oas/v3.1.0
//This is the top level item in the project items
type OAS struct {
//Openapi version
OpenAPI string `json:"openapi" yaml:"openapi"` // Required
Info Info `json:"info" yaml:"info"` // Required
//The default value... |
package resource
import (
"fmt"
"reflect"
"time"
"github.com/go-logr/logr"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
kyvernov1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1"
kyvernoclient "github.com/kyverno/kyverno/pkg/client/clientset/versioned"
kyvernov1beta1listers "github.com/kyverno/k... |
/*
* Copyright 2021, Offchain Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
// Copyright 2017 The WPT Dashboard Project. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//go:generate mockgen -destination sharedtest/run_diff_mock.go -package sharedtest github.com/web-platform-tests/wpt.fyi/shared DiffAPI
package shar... |
package mustgather
import (
"context"
"fmt"
"io/ioutil"
"os"
"reflect"
"text/template"
"github.com/go-logr/logr"
configv1 "github.com/openshift/api/config/v1"
mustgatherv1alpha1 "github.com/openshift/must-gather-operator/pkg/apis/mustgather/v1alpha1"
"github.com/openshift/must-gather-operator/pkg/localmetri... |
package beacon
import (
"context"
"encoding/hex"
"errors"
"fmt"
"math/rand"
"sort"
"strings"
"sync"
"time"
//"github.com/benbjohnson/clock"
"github.com/drand/drand/log"
proto "github.com/drand/drand/protobuf/drand"
"github.com/drand/kyber/share"
clock "github.com/jonboulle/clockwork"
"google.golang.or... |
package cmd
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/url"
"os"
"os/exec"
"os/signal"
"os/user"
"path"
"sort"
"strings"
"syscall"
"time"
"github.com/olekukonko/tablewriter"
"github.com/clindet/bget/spider"
"github.com/clindet/bget/urlpool"
vers "github.com/clindet/bget/versions"
"gith... |
package bls12381
type pair struct {
g1 *PointG1
g2 *PointG2
}
func newPair(g1 *PointG1, g2 *PointG2) pair {
return pair{g1, g2}
}
// Engine is BLS12-381 elliptic curve pairing engine
type Engine struct {
G1 *G1
G2 *G2
fp12 *fp12
fp2 *fp2
pairingEngineTemp
pairs []pair
}
// NewEngine creates new pairin... |
package context
import (
"context"
"fmt"
"net"
"net/http"
"sync"
"sync/atomic"
"github.com/google/uuid"
"github.com/free5gc/nas/nasConvert"
"github.com/free5gc/nas/nasMessage"
"github.com/free5gc/openapi"
"github.com/free5gc/openapi/Namf_Communication"
"github.com/free5gc/openapi/Nnrf_NFDiscovery"
"gith... |
// 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.
// This file contains the infrastructure to create an
// (identifier) index for a set of Go files.
//
// Basic indexing algorithm:
// - traverse all .go files o... |
package bootstrap
import (
"fmt"
"strings"
"testing"
"github.com/mna/pigeon/ast"
)
var scanValidCases = []string{
"",
"a",
"ab",
"abc",
"_",
"_0",
"abc_012",
`=`,
`<-`,
"\u2190",
"\u27f5",
"' '",
"'*'",
"'a'",
"'a'i",
"'a'b",
`'\n'`,
`'\t'`,
`'\''`,
`'\\'`,
`'\xab'`,
`'\x1F'`,
`'\u1234'`,
... |
package box2d
import (
"fmt"
"math"
)
/// Weld joint definition. You need to specify local anchor points
/// where they are attached and the relative body angle. The position
/// of the anchor points is important for computing the reaction torque.
type B2WeldJointDef struct {
B2JointDef
/// The local anchor poin... |
// Copyright © 2022 Cisco Systems, Inc. and its affiliates.
// 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
//... |
// Package pow provides Proof-of-Work implementations.
// Consider using Proof-of-Work implementations prefixed with "Sync" to ensure
// that concurrent calls are synchronized (running at most one Proof-of-Work task at a time).
// The provided Proof-of-Work implementations allow the caller to supply a parallelism optio... |
package badger
import (
"bytes"
"context"
"encoding/base32"
"encoding/binary"
"encoding/json"
"io"
"io/ioutil"
"time"
"github.com/cespare/xxhash/v2"
"github.com/dgraph-io/badger"
"github.com/profefe/profefe/pkg/log"
"github.com/profefe/profefe/pkg/profile"
"github.com/profefe/profefe/pkg/storage"
"githu... |
package eval
/*
eval provides a single function, Eval, that "evaluates" its argument. See documentation for Eval for more details
author: <NAME> (<EMAIL>)
*/
import (
"fmt"
"io"
"os"
"os/exec"
"path"
"regexp"
"strings"
)
var (
builtinPkgs map[string]string
)
func init() {
builtinPkgs = make(map[string]st... |
package mesh
import (
"fmt"
"net"
"strconv"
"sync"
"time"
)
type Connection interface {
Local() *Peer
Remote() *Peer
RemoteTCPAddr() string
Outbound() bool
Established() bool
BreakTie(Connection) ConnectionTieBreak
Shutdown(error)
Log(args ...interface{})
}
type ConnectionTieBreak int
const (
TieBreak... |
package bas
import (
"bytes"
"encoding/binary"
"fmt"
"math"
"os"
"reflect"
"strconv"
"time"
"unicode/utf8"
"unsafe"
"github.com/coyove/nj/internal"
"github.com/coyove/nj/typ"
)
var (
baseMarker = func() []byte {
// Ensures baseMarker is at least 256 bytes long and its memory aligns with 256 bytes
b ... |
// 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... |
// Copyright 2017 VMware, 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... |
/**
* MIT License
*
* Copyright (c) 2021-2022 <NAME> AG
*
* 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, ... |
package replication_test
import (
"fmt"
"io/ioutil"
"math"
"os"
"path"
"sync"
"testing"
"github.com/golang/protobuf/proto"
"github.com/hyperledger-labs/orion-server/config"
"github.com/hyperledger-labs/orion-server/internal/comm"
"github.com/hyperledger-labs/orion-server/internal/queue"
"github.com/hyperl... |
package physical
import (
"context"
"encoding/base64"
"fmt"
"net/url"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
metrics "github.com/armon/go-metrics"
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/pkg/transport"
log "github.com/mgutz/logxi/v1"
)
const (
// Ideally, this prefix wo... |
package main
import (
"encoding/json"
"flag"
"fmt"
"image"
"image/color"
"image/draw"
"image/jpeg"
"log"
"math"
"os"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/google/uuid"
"github.com/sarjsheff/hiklib"
ffmpeg "github.com/u2takey/ffmpeg-go"
tb "gopkg.in/tucnak/telebot.v2"
)
var ipParam ... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: pkg/apis/microservice/v1alpha1/envoy_plugin.proto
package v1alpha1
import (
fmt "fmt"
math "math"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = proto.Marshal
_ = fmt.Errorf... |
package ast
import (
"bufio"
"fmt"
"io"
"strings"
"text/tabwriter"
"mibk.io/php/token"
"mibk.io/phpdoc"
)
// Fprint "pretty-prints" an AST node to w.
func Fprint(w io.Writer, node interface{}) error {
w = &trimmer{output: w}
tw := tabwriter.NewWriter(w, 0, 8, 1, '\t', tabwriter.StripEscape)
buf := bufio.Ne... |
// Lute - 一款对中文语境优化的 Markdown 引擎,支持 Go 和 JavaScript
// Copyright (c) 2019-present, b3log.org
//
// Lute is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
//... |
/*
Copyright 2013 CoreOS Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/services/feed_placeholder_view_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/v3/resources"... |
package main
import (
"context"
"flag"
"fmt"
"io"
"log"
"os"
"os/exec"
"os/signal"
"path/filepath"
"strconv"
"syscall"
"time"
)
// Build and version are injected with the correct values at compile time. See
// LDFLAGS in the Makefile
var (
Build string
Version string
)
func main() {
config := parseC... |
/*
* Bulldozer Framework
* Copyright (C) DesertBit
*/
// This template extends the golang template with a custom parse method.
// Some methods are copied from the original golang template to ensure compatibility.
package template
import (
htmlTemplate "html/template"
"github.com/desertbit/bulldozer/log"
"gi... |
package channeldb
import (
"bytes"
"errors"
"io"
"math"
"github.com/btcsuite/btcd/btcutil"
"github.com/lightningnetwork/lnd/kvdb"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/tlv"
)
// OutputIndexEmpty is used when the output index doesn't exist.
const OutputIndexEmpty = math.Ma... |
// Copyright (c) 2017 Intel 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 required by applicable law or ag... |
package main
import (
"bufio"
"flag"
"fmt"
"log"
"mapreduce"
"net"
"net/http"
"net/rpc"
"os"
"path/filepath"
"strconv"
"strings"
"time"
"unicode"
)
const (
defaultHost = "localhost"
defaultPort = "3410"
)
type Master struct {
Address string
TaskList *Task
M, R, MS, RS int ... |
// This file provides all options of GoSlice.
package data
import (
"errors"
"fmt"
"log"
"os"
"strconv"
"strings"
flag "github.com/spf13/pflag"
)
// implement the Value interface for all types which can occur in the options
func (m Micrometer) String() string {
return strconv.FormatInt(int64(m), 10)
}
fun... |
package peco
import (
"fmt"
"sync"
"time"
"unicode/utf8"
"github.com/mattn/go-runewidth"
"github.com/nsf/termbox-go"
)
// LayoutType describes the types of layout that peco can take
type LayoutType string
const (
// LayoutTypeTopDown is the default. All the items read from top to bottom
LayoutTypeTopDown = ... |
/*
Copyright 2021 The Dapr 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, software
d... |
package handler
import (
"fmt"
"math"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/eaok/ashe/config"
"github.com/lonelyevil/khl"
)
var TextTradePublish = `
[
{
"type": "card",
"theme": "secondary",
"size": "lg",
"modules": [
{
"type": "header",
"text": {
... |
// Copyright 2020 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, ... |
package p
import (
"context"
"encoding/json"
"log"
"math"
"net/http"
"os"
"strings"
"sync"
"time"
"cloud.google.com/go/bigtable"
"cloud.google.com/go/pubsub"
"github.com/certusone/wormhole/node/pkg/vaa"
)
// shared code for the various functions, primarily response formatting.
// client is a global Bigt... |
// Copyright 2015 The Vanadium 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 internal_test
import (
"errors"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"testing"
v23 "v.io/v23"
"v.io/v23/context"
"v.io/v23/naming... |
package gtpv2
import (
"encoding/binary"
"fmt"
)
// MessageType represents possible GTPv2 message type values
type MessageType uint8
// GTPv2 MessageTypes
const (
EchoRequest MessageType = 1
EchoResponse MessageType = 2
CreateSessionRequest ... |
package datautils
import (
"fmt"
"image/color"
"math"
"gonum.org/v1/gonum/floats"
"gonum.org/v1/plot"
"gonum.org/v1/plot/plotter"
)
func reverse(numbers []int) {
for i, j := 0, len(numbers)-1; i < j; i, j = i+1, j-1 {
numbers[i], numbers[j] = numbers[j], numbers[i]
}
}
// RankingEvaluation type for evalua... |
package draw
import (
"math"
pdfcontent "github.com/pzduniak/unipdf/contentstream"
pdfcore "github.com/pzduniak/unipdf/core"
pdf "github.com/pzduniak/unipdf/model"
)
// Circle represents a circle shape with fill and border properties that can be drawn to a PDF content stream.
type Circle struct {
X ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: service.proto
package test_user
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.g... |
package param
import (
"errors"
"fmt"
"io"
"os"
"path"
"sort"
"strings"
"github.com/nickwells/errutil.mod/errutil"
"github.com/nickwells/location.mod/location"
"github.com/nickwells/pager.mod/pager"
)
// DfltTerminalParam is the default value of the parameter that will stop
// command-line parameters from ... |
// Copyright 2019 The Cloud Robotics 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 channeltrack
import (
"context"
"fmt"
"strings"
"github.com/google/uuid"
"github.com/sirupsen/logrus"
seabird "github.com/belak/go-seabird"
"github.com/belak/go-seabird-plugins/core/isupport"
"github.com/belak/go-seabird-plugins/internal"
)
func init() {
seabird.RegisterPlugin("channel_track", newC... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/service/tap/v3alpha/tap.proto
package envoy_service_tap_v3alpha
import (
context "context"
fmt "fmt"
core "github.com/envoyproxy/go-control-plane/envoy/api/v3alpha/core"
v3alpha "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3alpha"
_ "gi... |
// Copyright (c) 2017 Intel 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 required by applicable law or ag... |
package router
import (
"bytes"
"fmt"
"net/http"
"path"
"strings"
"gopkg.in/go-on/method.v1"
"gopkg.in/go-on/router.v2/route"
"gopkg.in/go-on/wrap.v2"
"gopkg.in/go-on/wrap-contrib.v2/wraps"
)
// Router is a mountable router routing paths to routes.
//
// Concurrently adding and serving routes is not support... |
package policy
import (
"bytes"
"errors"
"fmt"
"regexp"
"github.com/dave/jennifer/jen"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/golang/protobuf/protoc-gen-go/generator"
pgs "github.com/lyft/protoc-gen-star"
pgsgo "github.com/lyft/protoc-gen-star/la... |
// Copyright 2020 Istio Authors. 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 applicab... |
/*
Copyright 2020 Intel Corporation.
SPDX-License-Identifier: Apache-2.0
*/
/* Version skew testing ensures that APIs and state is compatible
across up- and downgrades. The driver for older releases is installed
by checking out the deployment YAML files from an older release.
The operator is not covered yet.
*/
pack... |
package proc
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"reflect"
"strconv"
"strings"
"unicode"
)
/*
the pid info are maintained and updated in three files in /proc/pid :
stat ,status and
*/
/*
* Fields from https://www.kernel.org/doc/Documentation/filesystems/proc.txt
*/
type Stat_t struct {
// fiel... |
/*
Copyright 2018 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
//nolint:funlen,gocritic,gocognit,gocyclo // All of this is copied from github.com/labstack/echo
package turbostreams
// Node
type kind uint8
const (
staticKind kind = iota
paramKind
anyKind
paramLabel = byte(':')
anyLabel = byte('*')
)
type node struct {
kind kind
label byte
prefix ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/securitycenter/v1beta1/organization_settings.proto
package securitycenter
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
// Reference imports to suppress e... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.2
// source: baseproto.proto
package config
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/proto... |
// Package tty provides a virtual terminal. Based on
// https://github.com/kilobyte/termrec
package vt
import (
"bytes"
"fmt"
"os"
"strconv"
"github.com/greensnark/go-footv/cset"
"github.com/greensnark/go-footv/unicode"
)
type Attribute uint32
type AttrChar struct {
Attr Attribute
Ch rune
}
// Tty repres... |
package saml
import (
"bytes"
"compress/flate"
"crypto/tls"
"encoding/base64"
"encoding/xml"
"fmt"
"net/url"
"strings"
"github.com/beevik/etree"
"github.com/pkg/errors"
"github.com/pressly/saml/xmlsec"
dsig "github.com/russellhaering/goxmldsig"
)
// SAMLRequest creates a new AuthnRequest object to be sen... |
package main
import (
"errors"
"flag"
"html/template"
"log"
"net/http"
"time"
"encoding/json"
"fmt"
"github.com/gorilla/websocket"
)
// JSONMessageCode json message code
type JSONMessageCode int
const (
// OnlineMessageCode 上线消息code
OnlineMessageCode JSONMessageCode = iota
// OfflineMessageCode 下线消息co... |
package main
import (
"encoding/json"
"fmt"
"go/format"
"io/ioutil"
"log"
"os"
"path"
"sort"
"strconv"
"strings"
"text/template"
"github.com/danielgtaylor/openapi-cli-generator/shorthand"
"github.com/getkin/kin-openapi/openapi3"
"github.com/spf13/cobra"
yaml "gopkg.in/yaml.v2"
"net/http"
"crypto/tl... |
// Copyright 2016 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... |
package zenodb
import (
"context"
"fmt"
"math"
"os"
"path/filepath"
"strings"
"sync"
"time"
"github.com/getlantern/bytemap"
"github.com/getlantern/errors"
"github.com/getlantern/goexpr"
"github.com/getlantern/golog"
"github.com/getlantern/wal"
"github.com/getlantern/zenodb/common"
"github.com/getlanter... |
/*
Copyright 2020 The Kruise Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// Copyright 2010 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 (
"bytes"
"log"
"strconv"
"strings"
"unsafe"
"github.com/lxn/win"
)
const splitterWindowClass = `\o/ Walk_Spli... |
// Copyright 2021 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... |
package mark
import (
"regexp"
"strings"
"unicode/utf8"
)
// type position
type Pos int
// itemType identifies the type of lex items.
type itemType int
// Item represent a token or text string returned from the scanner
type item struct {
typ itemType // The type of this item.
pos Pos // The starting posit... |
// Copyright 2017 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, ... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package route53domains
type ContactType string
// Enum values for ContactType
const (
ContactTypePerson ContactType = "PERSON"
ContactTypeCompany ContactType = "COMPANY"
ContactTypeAssociation ContactType = "ASSOCIATION"
ContactTypePub... |
// Copyright 2013 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 ssa
// Helpers for emitting SSA instructions.
import (
"fmt"
"go/ast"
"go/token"
"golang.org/x/tools/go/types"
)
// emitNew emits to f a new (he... |
// Copyright 2019 The Vearch 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 agree... |
/*
Copyright 2015 Gravitational, 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, soft... |
package configuration
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"reflect"
"strings"
"time"
)
// Configuration is a versioned registry configuration, intended to be provided by a yaml file, and
// optionally modified by environment variables.
//
// Note that yaml field names should never include _ characters, ... |
/*
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, ... |
/*
Copyright 2017 The Nuclio Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.