text stringlengths 5.51k 28.1k |
|---|
package core
import (
"errors"
"fmt"
log "github.com/Sirupsen/logrus"
"sort"
"simplejsondb/dbio"
)
type RecordBlock interface {
DataBlockID() uint16
FreeSpaceForInsert() uint16
Utilization() uint16
TotalRecords() int
Add(recordID uint32, data []byte) uint16
SetChainedRowID(localID uint16, rowID RowID) err... |
package rpctest
import (
"fmt"
"io/ioutil"
"net"
"os"
"path/filepath"
"strconv"
"sync"
"testing"
"time"
`github.com/p9c/node9/pkg/chain/config/netparams`
chainhash "github.com/p9c/node9/pkg/chain/hash"
"github.com/p9c/node9/pkg/chain/wire"
rpcclient "github.com/p9c/node9/pkg/rpc/client"
"github.com/p9c/... |
// +build ignore
package main
import (
"bytes"
"go/format"
"log"
"os"
"sort"
"strings"
"text/template"
"github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags"
)
const filename = `service_tags_gen.go`
// Representing types such as []*athena.Tag, []*ec2.Tag, ...
var sliceServiceName... |
package main
import (
"fmt"
"reflect"
"strconv"
"strings"
"time"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
corev1informer "k8s.io/client-go/informers/core/v1"
"k8s.io/client-go/informers/internalinterfaces"
"k8s.io/client-go/tools/cache"
"github.com/skupperproject/skupper/a... |
// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors.
package beers
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"image"
"image/png"
"io/ioutil"
"math/rand"
"net/http"
"net/url"
"path"
"regexp"
"strconv"
"strings"
"time"
"github.com/go-chi/chi/v5"
"github.com/google/... |
// Copyright 2019 <NAME>. All rights reserved. Use of this source
// code is governed by the MIT license that can be found in the LICENSE
// file.
// Package terminal provides a widget that functions as a unix terminal. Like urwid, it emulates
// a vt220 (roughly). Mouse support is provided. See the terminal demo for... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: envoy/config/common/key_value/v3/config.proto
package key_valuev3
import (
_ "github.com/cncf/xds/go/udpa/annotations"
_ "github.com/cncf/xds/go/xds/annotations/v3"
v3 "github.com/envoyproxy... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.2
// source: proxy/trojan/simplified/config.proto
package simplified
import (
net "github.com/v2fly/v2ray-core/v5/common/net"
_ "github.com/v2fly/v2ray-core/v5/common/protoext"
protoreflect "google.golan... |
package wallet
import (
"errors"
"reflect"
"time"
"unsafe"
"github.com/iotaledger/goshimmer/client/wallet/packages/address"
"github.com/iotaledger/goshimmer/client/wallet/packages/seed"
"github.com/iotaledger/goshimmer/packages/ledgerstate"
"github.com/iotaledger/hive.go/bitmask"
"github.com/iotaledger/hive.... |
// Copyright 2012-Present Couchbase, Inc.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL-Couchbase.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 Apach... |
package fluxmonitor
import (
"chainlink/core/eth"
"chainlink/core/logger"
"chainlink/core/store"
"chainlink/core/store/models"
"chainlink/core/store/orm"
"chainlink/core/utils"
"context"
"encoding/json"
"fmt"
"math"
"math/big"
"net/url"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethere... |
/*
* Copyright 2018. bigpigeon. All rights reserved.
* Use of this source code is governed by a MIT style
* license that can be found in the LICENSE file.
*/
package main
import (
"encoding/json"
"fmt"
"go/ast"
"go/importer"
"go/parser"
"go/token"
"go/types"
"os"
"sort"
)
type ErrDifferentStruct struct ... |
package cron
//go:generate ragel -G2 -Z parse.rl
import (
"errors"
"fmt"
"math/bits"
"time"
)
const magicDOW2DOM = 0x8102040810204081 // multiplying by this number converts to a dow bitmap to dom bitmap
// ParseUTC parses a cron string in UTC timezone.
func ParseUTC(s string) (Parsed, error) {
return parse(s)
... |
package main
import (
"archive/zip"
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"github.com/blang/semver"
"github.com/flynn/json5"
"github.com/yuin/gopher-lua"
)
var (
allPluginPackages PluginPackages
)
// CorePluginName is a plugin dependency name for the m... |
/*
Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve.
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 ... |
// Copyright 2019 <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 writin... |
// Copyright 2019-2020 Intel Corporation. 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 b... |
/*
Package miniflags implements a command line option parser. It is intended
to be small and simple to use for developers, and to offer ease of use for
for end users.
This package has the following features:
- Arguments and options may be freely interleaved. This saves keystrokes for
end users who are making small ch... |
// Copyright 2017 The TensorFlow 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... |
// Copyright IBM Corp. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
package consensus
import (
"sort"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/golang/protobuf/proto"
algorithm "github.com/SmartBFT-Go/consensus/internal/bft"
bft "github.com/SmartBFT-Go/consensus/pkg/api"
"githu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api/interservice/infra_proxy/response/environments.proto
package response
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.... |
package redhatoval
import (
"encoding/json"
"fmt"
"io"
"log"
"os"
"path/filepath"
"regexp"
"strings"
"github.com/aquasecurity/trivy-db/pkg/utils/ints"
bolt "go.etcd.io/bbolt"
"golang.org/x/xerrors"
"github.com/aquasecurity/trivy-db/pkg/db"
"github.com/aquasecurity/trivy-db/pkg/types"
"github.com/aquas... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/detail_placement_view.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/a... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.6.1
// source: transaction_internal_api_list.proto
package models
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "re... |
package lndclient
import (
"context"
"crypto/rand"
"fmt"
"io"
"time"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd... |
package main
import (
"bytes"
"fmt"
"io"
"io/ioutil"
)
type GraphVertex interface {
fmt.Stringer
}
type SimpleVertex string
func (v SimpleVertex) String() string {
return string(v)
}
type TagVertex Tag
func (v TagVertex) String() string {
return fmt.Sprintf("tag_%d", int(v))
}
type NodeSourceVertex Node
... |
// Copyright 2018 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... |
package main
import (
"embed"
"log"
"net/url"
"os"
"runtime"
"strings"
"time"
e "github.com/julvo/htmlgo"
a "github.com/julvo/htmlgo/attributes"
"github.com/turutcrane/cefingo/capi"
"github.com/turutcrane/cefingo/cef"
"github.com/turutcrane/cefingo/v8api"
"github.com/turutcrane/win32api"
)
//go:embed pa... |
// Package fsevents provides routines for recursively monitoring
// filesystem events on a Linux system using the inotify kernel subsystem.
package fsevents
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path"
"strings"
"sync"
"sync/atomic"
"time"
"unsafe"
"golang.org/x/sys/unix"
)
// WatchDescriptor describes... |
/*
Copyright 2018 Google 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
distri... |
/*
* Copyright © 2015-2018 <NAME> <<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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.14.0
// source: helloworld.proto
package testdata
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "g... |
// Copyright 2012 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 mediaconvert
import (
"context"
"fmt"
"path"
"strings"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/external"
"github.com/aws/aws-sdk-go-v2/service/mediaconvert"
"github.com/cbsinteractive/pkg/timecode"
"github.com/cbsinteractive/transcode-orchestrator/config"
"github.com/cbs... |
package build
import (
amqpClient "cloud-paas/src/amqp"
"cloud-paas/src/jenkins"
"cloud-paas/src/kubernetes"
"cloud-paas/src/middleware"
"cloud-paas/src/pkg/hooks"
"cloud-paas/src/repository"
"cloud-paas/src/repository/types"
"cloud-paas/src/util/paginator"
"context"
"encoding/json"
"errors"
"fmt"
"github... |
// Copyright 2017 The Bazel 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 skylarkstruct defines the Skylark 'struct' type,
// an optional language extension.
package skylarkstruct
// It is tempting to introduce a varian... |
// ,+---+
// +---+´| HASHBOX SOURCE
// | # | | Copyright 2015-2016
// +---+´
// Hashbox core, version 0.1
package core
import (
"github.com/fredli74/bytearray"
"encoding/binary"
"errors"
"fmt"
"net"
"runtime"
"sync"
"sync/atomic"
"time"
)
const DEFAULT_QUEUE_SIZE int64 = 32 * 1024 * 1024 // 32 MiB m... |
package main
import (
"bytes"
"flag"
"fmt"
"go/ast"
"go/build"
"go/format"
"go/parser"
"go/token"
"io/ioutil"
"os"
"path/filepath"
"strings"
)
// blockVisitor walks the AST and extracts the first Block Statement it finds.
// We only use it when we've generated the code ourselves so we know there is only
/... |
package leaves
import (
"bytes"
"sort"
"testing"
"github.com/gogo/protobuf/proto"
"github.com/stretchr/testify/assert"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/hercules.v10/internal/core"
"gopkg.in/src-d/hercules.v10/internal/pb"
items "gopkg.in/src-d/he... |
package proc
import (
"debug/dwarf"
"errors"
"fmt"
"strings"
"github.com/derekparker/delve/pkg/dwarf/frame"
"github.com/derekparker/delve/pkg/dwarf/op"
)
// This code is partly adaped from runtime.gentraceback in
// $GOROOT/src/runtime/traceback.go
// NoReturnAddr is returned when return address
// could not ... |
// 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 main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"math"
"os"
"os/exec"
"os/signal"
"path/filepath"
"regexp"
"runtime"
"strconv"
"str... |
package slt
import (
"bufio"
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
"strconv"
"time"
"github.com/brunetto/goutils/debug"
)
// CreateAllICs will create the ICs for all the JSON config files found in this folder.
// Here I use sync.WaitGroup, another (older?) way is to use (from http://golang-e... |
package internet
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import serial "v2ray.com/core/common/serial"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to en... |
package redisearch
import (
"errors"
"fmt"
"reflect"
"strconv"
"strings"
"log"
"github.com/garyburd/redigo/redis"
)
// Options are flags passed to the the abstract Index call, which receives them as interface{}, allowing
// for implementation specific options
type Options struct {
// If set, we will not sa... |
package universe
import (
"context"
"sort"
"github.com/apache/arrow/go/v7/arrow/memory"
"github.com/influxdata/flux"
"github.com/influxdata/flux/array"
"github.com/influxdata/flux/arrow"
"github.com/influxdata/flux/codes"
"github.com/influxdata/flux/compiler"
"github.com/influxdata/flux/execute"
"github.com... |
package leveldb
import (
"container/list"
"os"
"sort"
"sync"
)
type DB struct {
sync.Mutex
options *Options
name string
mem *MemTable
imm *MemTable
internalComparator *InternalKeyComparator
writers *list.List
writeBatch *WriteBatch
logNumber ui... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/enums/travel_placeholder_field.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v0/enums"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to s... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
// mircat is a package for reviewing Mir state machine recordings.
// It understands the format encoded via github.com/hyperledger-labs/mirbft/eventlog
// and is able to parse and filter these log files. It is also able to
// play the... |
package zgeo
import (
"image"
"math"
)
type Rect struct {
Pos Pos `json:"pos"`
Size Size `json:"size"`
}
func RectMake(x0, y0, x1, y1 float64) Rect {
r := Rect{}
r.Pos.X = x0
r.Pos.Y = y0
r.Size.W = x1 - x0
r.Size.H = y1 - y0
return r
}
func RectFromXYWH(x, y, w, h float64) Rect {
return Rect{Pos{x, y}... |
/*
Copyright Amazon.com, Inc. or 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
Unless required by applicable l... |
package caterpillar
import (
"caterpillar/common"
"caterpillar/model"
"fmt"
"html/template"
"io/ioutil"
"log"
"net/http"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"unicode"
"unicode/utf8"
"github.com/go-martini/martini"
"github.com/knightso/base/errors"
"github.com/knightso/base/gae/ds"
"gol... |
// Copyright (c) 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 appli... |
/*
File Name: DOC 2 Text.go
Copyright: 2018 Kleissner Investments s.r.o.
Author: <NAME>
This code is forked from https://github.com/EndFirstCorp/doc2txt and extracts text from DOC files, the legacy binary Word files.
*/
package fileconversion
import (
"bytes"
"encoding/binary"
"errors"
"io"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: gnmi_ext.proto
/*
Package gnmi_ext is a generated protocol buffer package.
Package gnmi_ext defines a set of extensions messages which can be optionally
included with the request and response messages of gNMI RPCs. A set of
well-known extensions are defined ... |
package iso20022
// Elements characterising a financial instrument.
type FinancialInstrumentAttributes44 struct {
// Market(s) on which the security is listed.
PlaceOfListing *MarketIdentification3Choice `xml:"PlcOfListg,omitempty"`
// Assessment of securities credit and investment risk.
Rating *Rating1 `xml:"Ra... |
package rpc
import (
"bytes"
"encoding/json"
enginetypes "github.com/projecteru2/core/engine/types"
pb "github.com/projecteru2/core/rpc/gen"
"github.com/projecteru2/core/types"
"github.com/projecteru2/core/utils"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
func toRPCCPUMap(m types.CPUMap) m... |
// Copyright 2018 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 (c) 2017-2018 <NAME>
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package main
import (
"encoding/csv"
"encoding/hex"
"flag"
"fmt"
"io"
"math"
"math/big"
"os"
"path/filepath"
"runtime/pprof"
"strconv"
"strings"
"time"
"github.com/decred... |
package leaves
import (
"fmt"
"io"
"sort"
"github.com/gogo/protobuf/proto"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/utils/merkletrie"
"gopkg.in/src-d/hercules.v5/internal/core"
"gopkg.in/src-d/hercules.v5/internal/pb"
items "gopkg.in/src-d/hercules.v5/... |
package main
import (
"encoding/base64"
"crypto/rand"
"flag"
"fmt"
"math/big"
"os"
"strconv"
"strings"
"regexp"
"unicode"
)
// 2^127 - 1.
const PRIME = "170141183460469231731687303715884105727"
// Split large secrets into smaller subsecrets to avoid wrapping around the
// prim... |
package main
import (
"bufio"
"flag"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"os/signal"
"strconv"
"strings"
"sync"
"time"
"unicode/utf8"
color "github.com/fatih/color"
)
//ProcessorFunc type for delegating operations in state to a function that accepts these parameters
type Pr... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: ligato/configurator/statspoller.proto
package configurator
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
vpp "go.ligato.io/vpp-agent/v3/proto/ligato/vpp"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"... |
// Copyright (c) 2017-2018 The qitmeer developers
package blockchain
import (
"bytes"
"fmt"
"github.com/Qitmeer/qitmeer/common/hash"
"github.com/Qitmeer/qitmeer/common/roughtime"
"github.com/Qitmeer/qitmeer/core/blockchain/token"
"github.com/Qitmeer/qitmeer/core/blockdag"
"github.com/Qitmeer/qitmeer/core/dbname... |
/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE.md', which is part of this source code package.
*/
package contentstream
import (
"bytes"
"errors"
"fmt"
"io"
"github.com/pzduniak/unipdf/common"
"github.com/pzduniak/unipdf/core"
"github.com/pzduniak/unipdf/model"
)
// Conte... |
// Package fliptest provides a mechanism for testing internet egress
// in an AWS VPC by creating a VPC Lambda via Cloudformation stack
// to which custom test URLs can be passed.
package fliptest
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"math/rand"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws/s... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.6.1
// source: gateway.proto
package proto
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/... |
package upstream
import (
"context"
"fmt"
"sync"
"time"
"github.com/envoyproxy/xds-relay/internal/app/metrics"
"github.com/envoyproxy/xds-relay/internal/app/transport"
v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
clusterservice "github.com/envoyproxy/go-control-plane/envoy/service/cluster/v3"
en... |
// Package transport provides streaming object-based transport over http for intra-cluster continuous
// intra-cluster communications (see README for details and usage example).
/*
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
*/
package transport
import (
"encoding/binary"
"fmt"
"io"
"math"
"n... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.3
// source: src/blockchain_txn_poc_request_v1.proto
package transaction
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
r... |
package apcompiler
import (
"go/ast"
"github.com/alangpierce/apgo/apast"
"go/token"
"github.com/alangpierce/apgo/apruntime"
"fmt"
"reflect"
"strconv"
"strings"
)
type CompileCtx struct {
NativePackages map[string]*apruntime.NativePackage
ActiveVars map[string]bool
StructDefs map[string]*ast.StructType
}
f... |
// Copyright 2022 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 tars
import (
"context"
"flag"
"fmt"
"net/http"
"os"
"os/exec"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/TarsCloud/TarsGo/tars/protocol/res/adminf"
"github.com/TarsCloud/TarsGo/tars/transport"
"github.com/TarsCloud/TarsGo/tars/util/conf"
"github.com/TarsCloud/Tar... |
package rpm
import (
"bytes"
"compress/gzip"
"crypto/md5"
"crypto/sha1"
"crypto/sha256"
"encoding/binary"
"encoding/hex"
"hash"
"io"
"os"
"path/filepath"
"sort"
"strings"
"time"
"github.com/midbel/packit"
"github.com/midbel/packit/rw"
"github.com/midbel/tape"
"github.com/midbel/tape/cpio"
)
type bu... |
package i2pbrowserproxy
import (
"crypto/tls"
"fmt"
"golang.org/x/time/rate"
"io"
"io/ioutil"
"log"
"net"
"net/http"
"os"
"strconv"
"strings"
"time"
)
import (
"github.com/eyedeekay/goSam"
"github.com/eyedeekay/goSam/compat"
"github.com/eyedeekay/httptunnel/common"
"github.com/eyedeekay/sam-forwarder/... |
package http
import (
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/3scale/3scale-go-client/threescale"
"github.com/3scale/3scale-go-client/threescale/api"
"github.com/3scale/3scale-go-client/threescale/internal"
)
const (
authzEndpoint = "/t... |
package simulation
import (
"fmt"
"math"
"strings"
)
// OctNode represents a cube in 3D space
// organised in a tree.
type OctNode struct {
// Body is struct containing the data about each object
// in space
body Body
// children is a slice of nodes that are contained by
// the node
children []OctNode
// pa... |
package checkmasterha
import (
"testing"
"github.com/mackerelio/checkers"
"github.com/stretchr/testify/assert"
)
func TestMakeReplCommandName(t *testing.T) {
name := replSubcommand.MakeCommandName()
assert.Equal(t, "masterha_check_repl", name)
}
func TestMakeReplCommandArgs(t *testing.T) {
args := replSubcomm... |
// Copyright 2017 Cisco Systems, 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 agree... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package transientstore
import (
"errors"
"github.com/golang/protobuf/proto"
"github.com/chinaso/fabricGM/common/flogging"
"github.com/chinaso/fabricGM/common/ledger/util/leveldbhelper"
"github.com/chinaso/fabricGM/common/util"
... |
package cu
/*
This file deals with the batching of CUDA calls. The design of the batch calls is very much
inspired, and later, copied directly from the golang.org/x/mobile/gl package (it turns out that the
design was much better than what I had originally been inspired with).
There are some differences and modificati... |
// Copyright 2018 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... |
package main
import (
"bufio"
"context"
"encoding/csv"
"flag"
"fmt"
"io"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/mattn/go-colorable"
"github.com/mattn/go-runewidth"
"github.com/mattn/go-tty"
"github.com/nyaosorg/go-readline-ny"
"github.com/nyaosorg/go-windows-mbcs"
)
type _CodeFlag int
... |
// Copyright Lightstep 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... |
/*
Copyright 2017 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 ofa
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/http/cookiejar"
"net/url"
"strconv"
"strings"
"time"
"github.com/manifoldco/promptui"
"github.com/pelletier/go-toml"
log "github.com/sirupsen/logrus"
"github.com/spf13/pflag"
"git... |
/*
Copyright 2021 The KodeRover Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, s... |
package postgres
import (
"encoding/json"
"errors"
"fmt"
"time"
"github.com/google/uuid"
"gorm.io/datatypes"
"gorm.io/gorm"
"github.com/odpf/optimus/models"
)
// Job are inputs from user to create a job
// postgres representation of the job
type Job struct {
ID uuid.UUID `gorm:"primary_key;type:u... |
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:generate stringer -type RoundingMode
package number
import (
"math"
"strconv"
)
// RoundingMode determines how a number is rounded to the desired prec... |
/*
* Copyright 2019-2020 Aletheia Ware 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 agr... |
// Copyright 2018 The LevelDB-Go and Pebble Authors. All rights reserved. Use
// of this source code is governed by a BSD-style license that can be found in
// the LICENSE file.
package pebble
import (
"math/bits"
"runtime"
"sync"
"sync/atomic"
"unsafe"
)
type commitQueueNode struct {
position uint64
value ... |
// Copyright 2020 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package main
import (
"bytes"
"errors"
"fmt"
"io"
"path"
"regexp"
"strconv"
"strings"
"time"
"unicode"
"golang.org/x/net/html"
"golang.org/x/net/html/atom... |
// Copyright 2019 The Hugo 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 applicable ... |
package formats
// Used for codes in the AMADEUS code tables. Code Length is one alphanumeric character.
// pattern = "[0-9A-Z]"
type AMA_EDICodesetType_Length1 string
// Used for codes in the AMADEUS code tables. Code Length is three alphanumeric characters.
// pattern = "[0-9A-Z]{1,3}"
type AMA_EDICodesetType_Lengt... |
package s3
import (
"context"
"fmt"
"hash"
"io"
"io/ioutil"
"net/http"
"os"
"path"
"strings"
"time"
"github.com/restic/restic/internal/backend"
"github.com/restic/restic/internal/backend/sema"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic... |
/*
* 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... |
// Copyright Amazon.com Inc or its affiliates and the project contributors
// Written by <NAME> <<EMAIL>> and the project 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
//
/... |
package gotojs
import (
"log"
"testing"
)
type TestService struct {
param1 int
}
type TestService2 struct {
param2 int
}
type TestAttributeService struct {
Param int
}
var MyTestService = TestService{param1: 0}
var MyTestService2 = TestService2{param2: 0}
var be = NewContainer()
func (t *TestService) SetAndG... |
package main
import (
"errors"
"fmt"
"os"
"strconv"
"strings"
"time"
)
type DockerComposeDriver struct {
ShellService ShellServiceInterface
FileService FileServiceInterface
Logger *Logger
// This channel is closed when the stop action is started
Stopping chan bool
}
func NewDockerComposeDriver(shellSer... |
/**
* Copyright (C) 2015 Red Hat, 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... |
// Package server implements a configurable, general-purpose web server.
// It relies on configurations obtained from the adjacent config package
// and can execute middleware as defined by the adjacent middleware package.
package server
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"net"
"net/http"
"os... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.