text stringlengths 8.57k 38.1k |
|---|
/*
Package webtunnelclient runs the client side of the webtunnel; websocket based VPN.
See examples for client implementation.
*/
package webtunnelclient
import (
"encoding/binary"
"fmt"
"net"
"net/url"
"os"
"os/user"
"sync"
"time"
wc "github.com/deepakkamesh/webtunnel/webtunnelcommon"
"github.com/golang/gl... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: mesh/v1alpha1/mux.proto
package v1alpha1
import (
context "context"
v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
v3 "github.com/envoyproxy/go-control-plane/envoy/service/discover... |
// +build f303xe
// Peripheral: EXTI_Periph External Interrupt/Event Controller.
// Instances:
// EXTI mmap.EXTI_BASE
// Registers:
// 0x00 32 IMR1 Interrupt mask register.
// 0x04 32 EMR1 Event mask register.
// 0x08 32 RTSR1 Rising trigger selection register.
// 0x0C 32 FTSR1 Falling trigger selecti... |
// Copyright 2010 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 math
/*
Floating-point logarithm of the Gamma function.
*/
// The original C code and the long comment below are
// from FreeBSD's /usr/src/lib/msun/... |
package raft
// this is an outline of the API that raft must expose to
// the service (or tester). see comments below for
// each of these functions for more details.
//
// rf = Make(...)
// create a new Raft server.
// rf.Start(command interface{}) (index, term, isleader)
// start agreement on a new log entry
// ... |
package config
import (
"crypto/rand"
"crypto/sha256"
"encoding/json"
"fmt"
"io"
"net"
"os"
"path"
"strings"
"sync"
"time"
tcgclients "github.com/gwos/tcg/clients"
"github.com/gwos/tcg/logzer"
"github.com/gwos/tcg/sdk/clients"
"github.com/gwos/tcg/sdk/logper"
"github.com/gwos/tcg/sdk/transit"
"github... |
// Go support for Protocol Buffers - Google's data interchange format
//
//
//
//
/*
Package proto converts data structures to and from the wire format of
protocol buffers. It works in concert with the Go source code generated
for .proto files by the protocol compiler.
A summary of the properties of the protocol buf... |
package pdu
//go:generate stringer -type AbortReasonType
//go:generate stringer -type PresentationContextResult
//go:generate stringer -type RejectReasonType
//go:generate stringer -type RejectResultType
//go:generate stringer -type SourceType
//go:generate stringer -type Type
// Implements message types defined in P... |
/*
* Copyright 2020 The Dragonfly 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 la... |
// Package smtppool creates a pool of reusable SMTP connections for high
// throughput e-mailing.
//
// This file was forked from:
// https://github.com/jordan-wright/email (MIT License, Copyright (c) 2013 <NAME>).
package smtppool
import (
"bufio"
"bytes"
"crypto/rand"
"encoding/base64"
"errors"
"fmt"
"io"
"m... |
// Copyright (C) 2019 Orange
//
// This software is distributed under the terms and conditions of the 'Apache License 2.0'
// license which can be found in the file 'License.txt' in this package distribution
// or at 'http://www.apache.org/licenses/LICENSE-2.0'.
package loader
import (
"context"
"encoding/csv"
... |
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// Copyright 2016 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
package riscv
// This file lists constants for CSR operations and defines methods on CSRs that
// are implemented as compiler intrinsics.
// CSR constants are used for use in CSR (Control and Status Register) compiler
// intrinsics.
type CSR int16
// Get returns the value of the given CSR.
func (csr CSR) Get() uintp... |
package types
import (
"math/big"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/hdac-io/friday/codec"
)
// create a decimal from a decimal string (ex. "1234.5678")
func mustNewDecFromStr(t *testing.T, str string) (d Dec) {
d, err := NewDecFromStr(str)
requi... |
package porcupine
import (
"encoding/json"
"fmt"
"io"
"os"
"sort"
)
type historyElement struct {
ClientId int
Start int64
End int64
Description string
}
type linearizationStep struct {
Index int
StateDescription string
}
type partialLinearization = []linearizationStep
type pa... |
// +build go1.3
/*
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
// Code generated by transpiler. DO NOT EDIT.
/**
* Go Video Downloader
*
* Copyright 2019 Tenta, 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.or... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: extension_user/extension_user.proto
package extension_user
import (
fmt "fmt"
proto "github.com/toury12/protobuf/proto"
extension_base "github.com/toury12/protobuf/protoc-gen-go/testdata/extension_base"
extension_extra "github.com/toury12/protobuf/protoc... |
package table
import (
"container/list"
"context"
"fmt"
"sync"
"time"
"google.golang.org/grpc"
"github.com/ydb-platform/ydb-go-sdk/v3/internal/cluster"
"github.com/ydb-platform/ydb-go-sdk/v3/internal/deadline"
"github.com/ydb-platform/ydb-go-sdk/v3/internal/errors"
"github.com/ydb-platform/ydb-go-sdk/v3/re... |
// Copyright (c) 2020 rookie-ninja
//
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
// Package rklogger contains couple of utility functions for initializing zap logger.
package rklogger
import (
"encoding/json"
"github.com/pkg/errors"
"go.uber.org/zap"... |
// Copyright 2019 Baidu Inc. All rights reserved
// Use of this source code is governed by a CCE
// license that can be found in the LICENSE file.
/*
modification history
--------------------
2020/07/28 16:26:00, by <EMAIL>, create
*/
/*
CCE V2 版本 GO SDK, Interface 定义
*/
package v2
import (
"fmt"
"time"
"github.c... |
// Package smtpd implements an SMTP server. Hooks are provided to customize
// its behavior.
package smtpd
// TODO:
// -- send 421 to connected clients on graceful server shutdown (s3.8)
//
import (
"bufio"
"bytes"
"crypto/tls"
"errors"
"fmt"
"github.com/Polymail/go-falcon/config"
"github.com/Polymail/go-falc... |
package main
import (
"bufio"
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"math/rand"
"net"
"os"
"os/signal"
"regexp"
log "github.com/Sirupsen/logrus"
"github.com/fiam/gounidecode/unidecode"
"github.com/garyburd/redigo/redis"
"github.com/thoj/go-ircevent"
"reflect"
"runtime"
"sort"
"str... |
// 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 impl
// The device invoker is responsible for managing the state of the device
// manager itself. The implementation expects that the device man... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: netcmn.proto
/*
Package zconfig is a generated protocol buffer package.
It is generated from these files:
netcmn.proto
service.proto
fw.proto
vm.proto
devconfig.proto
devcommon.proto
storage.proto
netinst.proto
appconfig.proto
netconfig.proto
base... |
package activitypub
import (
"errors"
"reflect"
"strings"
"time"
"unsafe"
"github.com/valyala/fastjson"
)
// Activity Types
const (
AcceptType ActivityVocabularyType = "Accept"
AddType ActivityVocabularyType = "Add"
AnnounceType ActivityVocabularyType = "Announce"
ArriveType ... |
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"net"
"time"
log "github.com/sirupsen/logrus"
"github.com/neuvector/neuvector/share"
"github.com/neuvector/neuvector/share/cluster"
"github.com/neuvector/neuvector/share/container"
"github.com/neuvector/neuvector/share/global"
"github.com/neuvec... |
package watcher
import (
"context"
"path"
"runtime/debug"
"strings"
"sync"
"time"
"cloud.google.com/go/storage"
"go.skia.org/infra/go/cleanup"
"go.skia.org/infra/go/common"
"go.skia.org/infra/go/gcs"
"go.skia.org/infra/go/gcs/gcsclient"
"go.skia.org/infra/go/git"
"go.skia.org/infra/go/git/repograph"
"go... |
/*
RpcClient for Go RPC Servers
Copyright (C) ITsysCOM GmbH
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is di... |
package dlna
// Derived from: https://github.com/anacrolix/dms
// Copyright (c) 2012, <NAME> <<EMAIL>>.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code m... |
// Package codegen implements routines for generating assembly code from IR.
package codegen
import (
"fmt"
"io/ioutil"
"log"
"os"
"sort"
"github.com/shivansh/gogo/src/ast"
"github.com/shivansh/gogo/src/tac"
"github.com/shivansh/gogo/src/types"
)
type Addr struct {
// The register value is represented as a... |
package routereflector
import (
"bytes"
"context"
"fmt"
"strings"
"time"
routereflectorv1 "github.com/IBM/route-reflector-operator/pkg/apis/routereflector/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s... |
// Copyright (c) 2017-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... |
package gems
import (
"reflect"
"testing"
)
func Test_ParseGemVersionFromBundle(t *testing.T) {
type args struct {
}
tests := []struct {
name string
gemName string
gemfileLockContent string
wantGemVersion Version
wantErr bool
}{
{
name: "Parse... |
// The original idea for this padding check tool was a very simple tool for checking for POODLE issues in TLS servers.
// See https://www.imperialviolet.org/2014/12/08/poodleagain.html
package main
import (
"bufio"
"crypto/sha1"
"crypto/tls"
"errors"
"flag"
"fmt"
"net"
"os"
"regexp"
"strings"
"sync"
"time... |
/*-
* Copyright (c) 2016-2019, F5 Networks, 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 agr... |
package nes
import (
"fmt"
"image"
"image/color"
"io/ioutil"
"log"
"math/rand"
"os"
"time"
)
const (
paletteSize byte = 0x40
// PPU addresses
patternTblAddr uint16 = 0x0000
patternTblAddrEnd uint16 = 0x1FFF
patternTblSize uint16 = 0x1000 // Single pattern table - size in bytes
nameTblAddr uin... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.14.0
// source: github.com/hashtagchris/twirp-example/rpc/haberdasher/haberdasher.proto
package haberdasher
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.gol... |
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markdown
import (
"bytes"
"fmt"
"io"
"net/url"
"path"
"path/filepath"
"regexp"
"strings"
"code.gitea.io/gitea/modules/base"
"code.gitea.io... |
// +build linux
/*
* Copyright (C) 2019 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
package wlavm
import (
"fmt"
wlsModel "github.com/intel-secl/intel-secl/v4/pkg/model/wls"
"intel/isecl/lib/common/v4/crypt"
"intel/isecl/lib/common/v4/exec"
"intel/isecl/lib/common/v4/log/message"
osutil "in... |
// Copyright 2021 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 codec
import (
"bytes"
"encoding"
"fmt"
"go/format"
"io"
"io/ioutil"
"os"
"path"
"reflect"
"sort"
"strings"
"text/template"
"github.com/j... |
package prototests
//
// Test can be started with
// go test proto/prototests/exec_test.go proto/prototests/graphite_test.go -v
// Will execute the test on a warp 10 instancte started at WARP_TEST_ENDPOINT or "http://127.0.0.1:8090/api/v0/exec"
//
import (
"bytes"
"crypto/sha256"
"flag"
"fmt"
"math"
"os"
"so... |
/*
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... |
/*
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 services
import (
"bytes"
"context"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"os"
"os/signal"
"path/filepath"
"sync"
"syscall"
"time"
"github.com/gwos/tcg/config"
"github.com/gwos/tcg/logzer"
"github.com/gwos/tcg/nats"
"github.com/gwos/tcg/sdk/clients"
tcgerr "github.com/gwos/tcg/sdk/... |
/*
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, ... |
// Copyright 2016-2018, Pulumi 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... |
// Program qftool can read and write the SPI rom of the QuickFeather
// development board.
//
// Caution: this tool can brick your QuickFeather board, so the tool
// comes without warranty. See:
//
// https://forum.quicklogic.com/viewtopic.php?t=29
//
// for ways to recover your board. It probably requires a J-Link t... |
// 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 objfile reads Go object files for the Go linker, cmd/link.
//
// This package is similar to cmd/internal/objfile which also reads
// Go object files.... |
package canopus
import (
"bytes"
"log"
"net"
"strconv"
"strings"
"time"
)
type ServerConfiguration struct {
EnableResourceDiscovery bool
}
func NewServer() CoapServer {
return createServer()
}
func createServer() CoapServer {
return &DefaultCoapServer{
events: NewEvents(),
observations... |
// 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... |
// 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... |
// Copyright 2021 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 (c) 2015-2022 CloudJ Technology Co., Ltd.
package policy
import (
"bufio"
"cloudiac/portal/consts"
"cloudiac/portal/consts/e"
"cloudiac/portal/models"
"cloudiac/utils"
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"git... |
/*
Copyright 2018 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 imgui
// #include "wrapper/Tables.h"
import "C"
// TableFlags for BeginTableV().
type TableFlags int
// Tables
// [BETA API] API may evolve slightly! If you use this, please update to the next version when it comes out!
// - Full-featured replacement for old Columns API.
// - See Demo->Tables for demo code.
... |
package iso9660_test
/*
These tests the exported functions
We want to do full-in tests with files
*/
import (
"fmt"
"io/ioutil"
"os"
"path"
"strings"
"testing"
"github.com/cusspvz/go-diskfs/filesystem"
"github.com/cusspvz/go-diskfs/filesystem/iso9660"
)
func getOpenMode(mode int) string {
modes := make([... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.12.4
// source: config.proto
package config
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
... |
// Copyright 2019 The SQLFlow 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... |
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the cod... |
package fuzz
import (
"bytes"
"encoding/binary"
"fmt"
"os"
"math/rand"
"sync"
"strconv"
"github.com/coinexchain/randsrc"
"github.com/coinexchain/onvakv"
"github.com/coinexchain/onvakv/store"
"github.com/coinexchain/onvakv/store/rabbit"
storetypes "github.com/coinexchain/onvakv/store/types"
)
const (
Fir... |
package origin
import (
"crypto/tls"
"crypto/x509"
"fmt"
"net/http"
"net/url"
"path"
"strings"
"code.google.com/p/go-uuid/uuid"
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
kuser "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/user"
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
"gi... |
package donut
import (
"bytes"
"encoding/binary"
"io"
"github.com/google/uuid"
)
const (
// entropy level
DONUT_ENTROPY_NONE = 1 // don't use any entropy
DONUT_ENTROPY_RANDOM = 2 // use random names
DONUT_ENTROPY_DEFAULT = 3 // use random names + symmetric encryption
DONUT_MAX_PARAM = 8 // maximum nu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1p4beta1/product_search.proto
package vision
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
timestamp "github.com/catper/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
... |
/*
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... |
/*
* gomacro - A Go interpreter with Lisp-like macros
*
* Copyright (C) 2017-2019 <NAME>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* fr... |
// Copyright 2020 <NAME>. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root
// for license information.
package cedict
import (
"bufio"
"compress/gzip"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"sync"
"time"
"unicode"
"github.com/pkg/err... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/resources/mutate_job.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/googleapis/ads/googlead... |
package bucket
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"encoding/xml"
"fmt"
"math/rand"
"reflect"
"strconv"
"strings"
"time"
ibmcloudoperator "github.com/ibm/cloud-operators/pkg/apis/ibmcloud/v1alpha1"
ibmcloudcomm "github.com/ibm/cloud-operators/pkg/controller/binding"
v1 "github.c... |
package kubecost
import (
"errors"
"fmt"
"strconv"
"time"
"github.com/kubecost/cost-model/pkg/log"
"github.com/patrickmn/go-cache"
)
// AllocationTotals represents aggregate costs of all Allocations for
// a given cluster or tuple of (cluster, node) between a given start and end
// time, where the costs are ag... |
package issuance
import (
"bytes"
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"crypto/sha256"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"math/big"
"strconv"
"strings"
"time"
"github.com/cloudflare/cfssl/helper... |
package netlink
import (
"fmt"
"net"
)
// Link represents a link device from netlink. Shared link attributes
// like name may be retrieved using the Attrs() method. Unique data
// can be retrieved by casting the object to the proper type.
type Link interface {
Attrs() *LinkAttrs
Type() string
}
ty... |
package paychmgr
import (
"bytes"
"context"
"fmt"
"sync"
"github.com/ipfs/go-cid"
"golang.org/x/sync/errgroup"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/specs-actors/actors/builtin"
init0 "github.com/fileco... |
// Copyright 2016-2020 Authors of Cilium
//
// 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 release
import (
"archive/tar"
"archive/zip"
"bufio"
"bytes"
"compress/gzip"
"crypto/sha256"
"encoding/hex"
"fmt"
"hash"
"io"
"io/ioutil"
"os"
"path/filepath"
"runtime"
"sort"
"strings"
"sync"
"syscall"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/crypto/openpgp"
"k8s.io/klog"
"k8... |
// Copyright 2010 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 mime
import (
"reflect"
"testing"
)
func TestConsumeToken(t *testing.T) {
tests := [...][3]string{
{"foo bar", "foo", " bar"},
{"bar", "bar", "... |
package websspi
import (
"context"
"encoding/base64"
"encoding/gob"
"errors"
"fmt"
"log"
"net/http"
"os/user"
"reflect"
"strings"
"sync"
"syscall"
"time"
"unsafe"
"github.com/quasoft/websspi/secctx"
)
// The Config object determines the behaviour of the Authenticator.
//
// To resolve group membership... |
package util
// copy from go/src/strconv/ftoaryu.go
import (
"math/bits"
)
// binary to decimal conversion using the Ryū algorithm.
//
// See <NAME>, "Ryū: Fast Float-to-String Conversion" (doi:10.1145/3192366.3192369)
//
// Fixed precision formatting is a variant of the original paper's
// algorithm, where a singl... |
// generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go
package orm
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
"time"
"gorm.io/gorm"
"github.com/tealeg/xlsx/v3"
"github.com/fullstack-lang/gongfly/go/models"
)
// dummy variable to... |
package dcmi
// DO NOT EDIT THIS FILE. GENERATED BY xgen.
import (
"bits"
"mmio"
"unsafe"
"stm32/o/f746xx/mmap"
)
type DCMI_Periph struct {
CR RCR
SR RSR
RISR RRISR
IER RIER
MISR RMISR
ICR RICR
ESCR RESCR
ESUR RESUR
CWSTRTR RCWSTRTR
CWSIZER RCWSIZER
DR RDR
}
func (... |
package input
// WinSize represents the width and height of terminal.
type WinSize struct {
Row int
Col int
}
// key 映射
var keyMap map[uint64]Key
func init() {
if keyMap == nil {
keyMap = make(map[uint64]Key)
}
for _, k := range asciiSequences {
if v, ok := convertUint64(k.ASCIICode); ok {
keyMap[v] = k.... |
package main
import (
"bytes"
"fmt"
"log"
"regexp"
"strconv"
"strings"
)
// Core parses output from Unison, maintains a model of Unison's current state,
// accepts commands from the user, and produces input to drive Unison to the desired state.
// Core does not perform I/O itself. Think "sans I/O" protocol impl... |
// Copyright (c) 2020-2021 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
// A http server providing meta-data information to application instances
// at http://169.254.169.254. The source IP address is used to tell
// which app instance is sending the request
package zedrouter
import (
"context"
"encoding/ba... |
/*
* Copyright 2018- The Pixie 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 costmodel
import (
"fmt"
"os"
"sync"
"time"
"github.com/kubecost/cost-model/pkg/cloud"
"github.com/kubecost/cost-model/pkg/util"
prometheus "github.com/prometheus/client_golang/api"
"k8s.io/klog"
)
const (
queryClusterCores = `sum(
avg(avg_over_time(kube_node_status_capacity_cpu_cores[%s] %s)) by ... |
/*
Copyright 2017 The Perkeep Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... |
package main
import (
"context"
"errors"
"strings"
"time"
"gopkg.in/yaml.v3"
"github.com/gwos/tcg/connectors"
"github.com/gwos/tcg/sdk/milliseconds"
"github.com/gwos/tcg/sdk/transit"
"github.com/rs/zerolog/log"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubern... |
//go:directive to be ignored by gotohugo
/*
Any text before the front matter is ignored.
+++
title = "gotohugo: Converting commented Go files to Markdown with custom Hugo shortcuts"
description = "gotohugo is a converter from .go to .md with some Hugo-specific additions. Comments are converted to Markdown text, code ... |
package layer
import (
"bytes"
"context"
"crypto/ecdsa"
"fmt"
"io"
"net/url"
"strings"
"github.com/nats-io/nats.go"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neofs-s3-gw/api"
"github.com/nspcc-dev/neofs-s3-gw/api/cache"
"github.com/nspcc-dev/neofs-s3-gw/api/data"
"github.com/nsp... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.4
// source: handler.proto
package protodef
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.gol... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: opentelemetry/proto/trace/v1/trace_config.proto
package v1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: internal/webhooks/v1/notifications.proto
package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect... |
// Copyright 2020, Shulhan <<EMAIL>>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package asciidoctor
import (
"bytes"
"strings"
"unicode"
"github.com/shuLhan/share/lib/ascii"
)
const (
macroFTP = "ftp"
macroHTTP = "http"
m... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/monitoring/v3/notification.proto
package monitoring // import "google.golang.org/genproto/googleapis/monitoring/v3"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import wrappers "github.com/golang/protobuf/ptypes/... |
// Copyright 2015 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL.txt and at www.mariadb.com/bsl11.
//
// Change Date: 2022-10-01
//
// On the date above, in accordance with the Business Source License, use
// of this software will be gov... |
//go:build !windows
// +build !windows
// Copyright 2020 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/websecurityscanner/v1alpha/finding.proto
package websecurityscanner // import "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "... |
// documentation:
// https://dev.mysql.com/doc/internals/en/rows-event.html
// https://dev.mysql.com/doc/internals/en/com-query-response.html#packet-Protocol::ColumnType
package mysql
import (
"bytes"
"encoding/binary"
"fmt"
"io"
"strconv"
"time"
"log"
"strings"
)
type RowsEvent struct {
header ... |
/*-
* Copyright (c) 2017,2018, F5 Networks, 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 l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.