text stringlengths 5.51k 28.1k |
|---|
// Copyright 2016 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 implements the encoding of source positions.
package src
import (
"bytes"
"fmt"
"io"
)
// A Pos encodes a source position consisting of a (li... |
// Copyright 2019 The Gitea 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 repository
import (
"context"
"fmt"
"io"
"net/http"
"path"
"strings"
"time"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
... |
/*
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 IBM Corp. 2016 All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
/*
Copyright 2020-2021 The UnDistro 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 main
// stompserver - Implementation of stomp server to consume, process and produce ActiveMQ messages
// The server will consumer message from below three topics:
// 1. XrootD: /topic/xrootd.cms.aaa.ng
// 2. CMSSW popularity: /topic/cms.swpop
// 3. WMArchive: /topic/cms.jobmon.wmarchive
// Process them, then ... |
// Copyright 2016 HenryLee. 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 avro
import (
"fmt"
"log"
"reflect"
"strings"
"time"
"github.com/actgardner/gogen-avro/v10/compiler"
"github.com/actgardner/gogen-avro/v10/schema"
"github.com/actgardner/gogen-avro/v10/vm"
gouuid "github.com/google/uuid"
"github.com/heetch/avro/internal/typeinfo"
)
var (
timeType = reflect.Ty... |
package app
import (
"bytes"
"context"
"encoding/json"
"fmt"
"github.com/alexedwards/scs"
"github.com/alexedwards/scs/stores/memstore"
"github.com/goradd/gengen/pkg/maps"
"github.com/goradd/goradd/pkg/base"
"github.com/goradd/goradd/pkg/config"
"github.com/goradd/goradd/pkg/goradd"
"github.com/goradd/goradd... |
// Copyright 2020 IBM Corp.
// SPDX-License-Identifier: Apache-2.0
package app
import (
"context"
"math"
"reflect"
"strings"
"time"
"fybrik.io/fybrik/manager/controllers"
"fybrik.io/fybrik/manager/controllers/utils"
"fybrik.io/fybrik/pkg/environment"
"sigs.k8s.io/controller-runtime/pkg/controller"
"emperr... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/campaign_criterion_simulation.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/goo... |
package blame
import (
"bytes"
"database/sql"
"encoding/json"
"fmt"
"math"
"strings"
"text/tabwriter"
"time"
"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/jmoiron/sqlx"
"github.com/mergestat/timediff"
"github.com/merge... |
package main
import (
"encoding/json"
"flag"
"fmt"
"log"
"os"
"regexp"
"strconv"
"strings"
"time"
"github.com/DataDog/kafka-kit/v3/kafkametrics"
"github.com/DataDog/kafka-kit/v3/kafkametrics/datadog"
"github.com/DataDog/kafka-kit/v3/kafkazk"
"github.com/jamiealquiza/envy"
)
var (
// This can be set wi... |
// Copyright 2019 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package security
import (
"context"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/shirou/gopsutil/process"
"chromiumos/tast/err... |
package render
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestLegacyDatasetDownloadURI(t *testing.T) {
Convey("should generated expected legacy dataset download URI", t, func() {
So(LegacyDataSetDownloadURI("/legacy/dataset/page", "test.csv"), ShouldEqual, "/file?uri=/legacy/dataset/... |
// Copyright 2018 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" fil... |
package metric
import (
"bufio"
"fmt"
"github.com/emirpasic/gods/sets/hashset"
"github.com/kubernetes-sigs/alibaba-cloud-csi-driver/pkg/utils"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
"io"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: bid.proto
/*
Package sonm is a generated protocol buffer package.
It is generated from these files:
bid.proto
bigint.proto
capabilities.proto
deal.proto
hub.proto
insonmnia.proto
locator.proto
marketplace.proto
miner.proto
node.proto
It has these ... |
// 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 json implements encoding and decoding of JSON objects as defined in
// RFC 4627.
//
// See "JSON and Go" for an introduction to this package:
// htt... |
package processor
import (
"database/sql"
"errors"
"fmt"
"strings"
"sync"
"time"
"github.com/Jeffail/benthos/v3/internal/bloblang/field"
"github.com/Jeffail/benthos/v3/internal/bloblang/mapping"
"github.com/Jeffail/benthos/v3/internal/docs"
"github.com/Jeffail/benthos/v3/internal/interop"
"github.com/Jeffa... |
package v1alpha2
import (
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type SecretSelector struct {
Name string `json:"name"`
Key string `json:"key,omitempty"`
}
type LabelSelector struct {
metav1.LabelSelector `json:",i... |
/*
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 © 2022 Meroxa, 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 ... |
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... |
/*
Copyright 2019 The Vitess 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... |
package tosca_v2_0
import (
"fmt"
"github.com/tliron/kutil/ard"
"github.com/tliron/puccini/tosca"
"github.com/tliron/puccini/tosca/normal"
"github.com/tliron/yamlkeys"
)
//
// Value
//
// [TOSCA-v2.0] @ ?
// [TOSCA-Simple-Profile-YAML-v1.3] @ 3.6.11, 3.6.13
// [TOSCA-Simple-Profile-YAML-v1.2] @ 3.6.10, 3.6.12
/... |
/*
* Copyright 2014 <NAME>.
*
* This file is a modification of code from Logstash Forwarder.
* Copyright 2012-2013 <NAME> and contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licens... |
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/hashicorp/go-plugin"
"github.com/hashicorp/terraform-svchost/disco"
"github.com/hashicorp/terraform/addrs"
"github.com/hashicorp/terraform/command/cliconfig"
"github.com/hashicorp/ter... |
package pjtester
import (
"context"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"testing"
gogithub "github.com/google/go-github/v31/github"
"github.com/kyma-project/test-infra/development/tools/pkg/prtagbuilder/mocks"
"github.com/stretchr/testify/assert"
prowapi "k8s.io/test-infra/prow/apis/prowjobs/v1"... |
// Copyright © 2017-2019 The OpenEBS 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 o... |
// Protected by BSD 3 clause license
// Package implements the core config logic for EZJunosZTP
package cfg
import (
"bufio"
"bytes"
"errors"
"fmt"
"log"
"os"
"os/exec"
"reflect"
"sync"
"time"
"github.com/BurntSushi/toml"
rt "github.com/networkbootstrap/ztpmanagercode/roottypes"
templategen "github.com/... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: orc8r/protos/mconfig.proto
package protos
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal... |
package vmath
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestVec4f_String(t *testing.T) {
assert.Equal(t, "Vec4f[5.000000 x -3.100000 x 9.000000 x 2.400000]", Vec4f{5, -3.1, 9, 2.4}.String())
}
func TestVec4f_Format(t *testing.T) {
assert.Equal(t, "vec 5, -3.2, 7, 0", Vec4f{5, -3.2, 7, 0}.Fo... |
package commission
import (
"encoding/binary"
"fmt"
"github.com/MinterTeam/minter-go-node/coreV2/types"
"github.com/MinterTeam/minter-go-node/helpers"
"github.com/MinterTeam/minter-go-node/rlp"
"github.com/cosmos/iavl"
"math/big"
"sort"
"sync"
"sync/atomic"
)
const mainPrefix = byte('p')
type RCommission i... |
package api
import (
"context"
"fmt"
"time"
beacon "github.com/oasisprotocol/oasis-core/go/beacon/api"
"github.com/oasisprotocol/oasis-core/go/common"
"github.com/oasisprotocol/oasis-core/go/common/crypto/pvss"
"github.com/oasisprotocol/oasis-core/go/common/crypto/signature"
"github.com/oasisprotocol/oasis-co... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
package transports
import (
"encoding/json"
"fmt"
"math/big"
"github.com/gorilla/websocket"
"github.com/openrelayxyz/cardinal-types"
"github.com/openrelayxyz/cardinal-rpc"
"github.com/openrelayxyz/cardinal-rpc/transports"
"github.com/openrelayxyz/cardinal-types/hexutil"
"github.com/openrelayxyz/cardinal-strea... |
package peerv2
import (
"context"
"fmt"
"math/rand"
"sort"
"sync"
"time"
cache "github.com/patrickmn/go-cache"
"github.com/incognitochain/incognito-chain/peerv2/rpcclient"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/p2p/protocol/ping"
"github.com/multiformats/go-multiaddr"
"githu... |
package todolist
import (
"bufio"
"fmt"
"io"
"os"
"os/user"
"strconv"
"strings"
)
type ConfigStore struct {
FileLocation string
Loaded bool
}
type Config struct {
Aliases map[string]string
Reports map[string]map[string]string
Views ... |
// Copyright 2022 Northern.tech AS
//
// 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 gopi
import (
"fmt"
"strings"
"time"
)
/*
This file contains interface defininitons for hardware implementations:
* Information about the underlying hardware platform
* Pixel-based displays
* SPI, I2C and GPIO
* Infrared sending and receiving
*/
//////////////////////////////////////////////////////... |
/*
* 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 ... |
package main
import (
"database/sql"
"flag"
"fmt"
"os"
"os/exec"
"strings"
"time"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
_ "github.com/mattn/go-sqlite3"
)
const version = 149
const USAGE = `
mcldsp
Migrate your c-lightning database from SQLite to Postgres
Usage:
mcldsp -sqlite=<sqlite_file> -p... |
/*
Sniperkit-Bot
- Status: analyzed
*/
/*
* Hyperscan example program 2: pcapscan
*
* This example is a very simple packet scanning benchmark. It scans a given
* PCAP file full of network traffic against a group of regular expressions and
* returns some coarse performance measurements. This example provides a qu... |
package controller
import (
"encoding/json"
"fmt"
"reflect"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/Sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
"... |
package renter
import (
"context"
"fmt"
"os"
"time"
lock "github.com/square/mongo-lock"
"github.com/tus/tusd/pkg/handler"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/SkynetLabs/skyd/build"
"gitlab.com/SkynetLabs/skyd/skymodules"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.m... |
package consensus
import (
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/zarbchain/zarb-go/account"
"github.com/zarbchain/zarb-go/block"
"github.com/zarbchain/zarb-go/consensus/hrs"
"github.com/zarbchain/zarb-go/crypto"
"github.com/zarbchain/za... |
// Package httpcache provides a http.RoundTripper implementation that works as a
// mostly RFC-compliant cache for http responses.
//
// It is only suitable for use as a 'private' cache (i.e. for a web-browser or an API-client
// and not for a shared proxy).
//
package httpcache
import (
"bufio"
"bytes"
"errors"
"... |
// Code generated - DO NOT EDIT.
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
//go:build linux
// +build linux
packag... |
// Copyright 2014 <NAME>.
// Use of this source code is governed by a zlib-style
// license that can be found in the LICENSE file.
package ms
import (
"fmt"
"github.com/kardianos/rdb"
"github.com/kardianos/rdb/semver"
)
type driverType byte
/*
NULLTYPE = %x1F ; Null
INT1TYPE = %x30 ; TinyInt
BITTYPE = %x32 ; Bi... |
//BSD 3-Clause License
//
//Copyright (c) 2018, jadeblaquiere
//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 must retain the above copyright notice, this
//... |
package autodelete
import (
"container/heap"
"fmt"
mrand "math/rand"
"strings"
"sync"
"time"
"github.com/prometheus/client_golang/prometheus"
)
const (
schedulerTimeout = 250 * time.Millisecond
workerTimeout = 5 * time.Second
maxLoadBackoff = 30 * time.Minute
labelQueue = "queue"
queueReap = "reap... |
// Code by <NAME>, <NAME>, <NAME>
package main
import (
// "fmt"
"math"
"math/rand"
//"time"
)
//r is the radius of bacteria, R is the radius of petridish, x is the x coordiante of the center of circle and y is the y coordinate of the center of circle
func InField(x, y, X, Y float64, p *Petri) bool {
total := ... |
// Copyright 2020 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 crackwatch
import (
"encoding/json"
"errors"
"fmt"
"log"
"strconv"
"strings"
"time"
"github.com/gorilla/websocket"
)
const errUnhandledResponse = "We received a response from crackwatch.com we" +
" weren't expecting, and couldn't handle. Sorry about that—perhaps try it" +
" directly from <https://c... |
package helm
import (
"fmt"
"io"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"unsafe"
"github.com/gridworkz/kato/util/commonutil"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/chart/loader"
"helm.sh/helm/v3/pkg/c... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: security/trust_store.proto
package security
import (
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
protoreflect "google.golang.org/protobuf/r... |
package iso8601
import (
"fmt"
"testing"
"time"
)
func TestParse(t *testing.T) {
for _, input := range []string{
// Fast path (20 bytes)
"1987-12-16T23:45:12Z",
"2006-01-02T15:04:05Z",
"2000-02-29T23:59:59Z", // leap year
"2020-02-29T23:59:59Z", // leap year
"0000-01-01T00:00:00Z",
"9999-12-31T23:59... |
// Code generated by protoc-gen-go.
// source: peer/transaction.proto
// DO NOT EDIT!
package peer
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/golang/protobuf/ptypes/timestamp"
import common "github.com/hyperledger/fabric/protos/common"
// Reference import... |
// Copyright 2013 bee 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 ... |
// Code generated by protoc-gen-go.
// source: google/api/metric.proto
// DO NOT EDIT!
package api
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// ... |
// Copyright 2015 CNI 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 ... |
package types
// Standard is the initial map structure for unmarshaling YAML
type Standard map[string]interface{}
// NIST80053Standard is the adjusted map structure based on Standard
type NIST80053Standard map[string]ControlProperties
/*
// NIST80053Standard holds the properties that make up the OpenControl-formatte... |
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
Package atutil provides a higher level Autotest interface than the autotest package.
*/
package atutil
import (
"context"
"encoding/json"
"fmt"
... |
// Code generated by protoc-gen-go.
// source: chaincode.proto
// DO NOT EDIT!
/*
Package shim is a generated protocol buffer package.
It is generated from these files:
chaincode.proto
It has these top-level messages:
ColumnDefinition
Table
Column
Row
*/
package shim
import proto "github.com/golang/protobuf/pr... |
// Copyright (c) 2014 Dataence, LLC. 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 app... |
// 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 writ... |
package parquet
import (
"testing"
)
func TestInt32PlainDecoder(t *testing.T) {
testValuesDecoder(t, &int32PlainDecoder{}, []decoderTestCase{
{
data: []byte{
0x00, 0x00, 0x00, 0x80,
0xFF, 0xFF, 0xFF, 0x7F,
0x00, 0x00, 0x00, 0x00,
0x9C, 0xFF, 0xFF, 0xFF,
0xEA, 0x00, 0x00, 0x00,
},
deco... |
package main
import (
"bufio"
"bytes"
"container/heap"
"encoding/binary"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"github.com/dustin/go-humanize"
)
// Experiment with hprof binary format.
type reader struct {
*bufio.Reader
idSize int
scratch [8]byte
strings map[uint64]string
classByID map[uint6... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.17.1
// source: hostManager.proto
package pb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/pr... |
package fms_parser
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"strconv"
"strings"
"github.com/PuerkitoBio/goquery"
)
type fmsScoreInfo2018 struct {
auto int64
teleop int64
fouls int64
total int64
autoRunPoints int64
autoSwitchSec int64
endgamePoints int64
baseRP int64 // win-loss-tie RP... |
package test_multiassign
func assert(want int, act int, code string)
func println(format ...string)
func strcmp(s1 string, s2 string) int
func multiRet() (int, int, int, int, int, int) {
return 1, 2, 3, 4, 5, 6
}
func multiRetStr() (string, string, string, string, string, string) {
return "abc", "def", "ghi", "jk... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package idemix
import (
"crypto/ecdsa"
"sort"
"github.com/sinochem-tech/fabric-amcl/amcl"
"github.com/sinochem-tech/fabric-amcl/amcl/FP256BN"
"github.com/pkg/errors"
)
// signLabel is the label used in zero-knowledge proof (ZK... |
package html
import (
"fmt"
"html"
"io"
"sort"
"strings"
"github.com/alecthomas/chroma"
)
// Option sets an option of the HTML formatter.
type Option func(f *Formatter)
// Standalone configures the HTML formatter for generating a standalone HTML document.
func Standalone(b bool) Option { return func(f *Format... |
// Copyright (c) 2019, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.
package cli
import (
"encoding/json"
"fmt"
"io"
"io/iou... |
/*
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 app
import (
"encoding/json"
"go/format"
"go/parser"
"go/token"
"regexp"
"strconv"
"strings"
"time"
"honnef.co/go/js/xhr"
"github.com/gopherjs/vecty"
"github.com/gopherjs/vecty/elem"
"github.com/gopherjs/vecty/event"
"github.com/iafan/syntaxhighlight"
"github.com/iafan/goplayspace/client/api"
... |
// Copyright 2018 The gVisor 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... |
// Command govim is a Vim8 channel-based plugin, written in Go, to support the writing of Go code in Vim8
package main
import (
"bufio"
"context"
"flag"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/govim/govim"
"github.com/govim/govim/cmd/go... |
package rtmp
import (
"fmt"
"net"
"net/url"
"reflect"
"strings"
"time"
"github.com/bigsillybear/livego/utils/uid"
"github.com/bigsillybear/livego/av"
"github.com/bigsillybear/livego/configure"
"github.com/bigsillybear/livego/container/flv"
"github.com/bigsillybear/livego/protocol/rtmp/core"
log "github.... |
package dockerclient
import (
"fmt"
"io"
"time"
"github.com/docker/go-units"
)
type ContainerConfig struct {
Hostname string
Domainname string
User string
AttachStdin bool
AttachStdout bool
AttachStderr bool
ExposedPorts map[string]struct{}
Tty bool
OpenSt... |
//go:build !js || !wasm
// +build !js !wasm
package api
import (
"fmt"
"net"
"net/http"
"path"
"sort"
"strconv"
"strings"
"sync"
"syscall"
"time"
"github.com/evanw/esbuild/internal/config"
"github.com/evanw/esbuild/internal/fs"
"github.com/evanw/esbuild/internal/helpers"
"github.com/evanw/esbuild/inter... |
/*
* Copyright (C) 2018-2019 Fusion Foundation Ltd. All rights reserved.
* Copyright (C) 2018-2019 <EMAIL>
*
* This library is free software; you can redistribute it and/or
* modify it under the Apache License, Version 2.0.
*
* This library is distributed in the hope that it will be useful,
* but WITHOU... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package chaincode
import (
"encoding/json"
"fmt"
"io/ioutil"
"strings"
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/common/cauthdsl"
"github.com/hyperledger/fabric/core/chaincode"
"github.com/hyperledger/... |
// This code is available on the terms of the project LICENSE.md file,
// also available online at https://blueoakcouncil.org/license/1.0.0.
package core
import (
"fmt"
"decred.org/dcrdex/client/db"
"decred.org/dcrdex/dex"
"decred.org/dcrdex/dex/msgjson"
)
// Notifications should use the following note type str... |
/*
Copyright 2019 The Machine Controller 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 w... |
// Copyright 2017 <NAME>.
// Licensed under the MIT license which can be found in the LICENSE file.
package knx
import (
"errors"
"fmt"
"sync"
"time"
"github.com/co11ter/knx-go/knx/cemi"
"github.com/co11ter/knx-go/knx/knxnet"
"github.com/co11ter/knx-go/knx/util"
)
// TunnelConfig allows you to configure the ... |
package exporter
import (
"bufio"
"compress/gzip"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"strconv"
"strings"
"sync"
"time"
"github.com/ahas-sigs/kube-ebpf-exporter/config"
"github.com/ahas-sigs/kube-ebpf-exporter/decoder"
"github.com/iovisor/gobpf/bcc"
"github.com/prometheus/client_golang/promethe... |
// Copyright 2019 Dolthub, 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 driver
import (
"context"
"encoding/json"
"io"
"time"
)
// Driver is the interface that must be implemented by a database driver.
type Driver interface {
// NewClient returns a connection handle to the database. The name is in a
// driver-specific format.
NewClient(name string) (Client, error)
}
// Ve... |
// Copyright 2017 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 luddite
import (
"context"
"errors"
"fmt"
"net"
"net/http"
"net/http/pprof"
"os"
"os/signal"
"path"
"runtime"
"strconv"
"strings"
"sync"
"syscall"
"time"
"github.com/dimfeld/httptreemux"
"github.com/prometheus/client_golang/prometheus"
"github.com/rs/cors"
log "github.com/sirupsen/logrus"
... |
package unittests
import (
"github.com/stretchr/testify/assert"
"github.com/zhangsifeng92/geos/chain"
"github.com/zhangsifeng92/geos/chain/abi_serializer"
"github.com/zhangsifeng92/geos/chain/types"
"github.com/zhangsifeng92/geos/common"
"github.com/zhangsifeng92/geos/crypto/ecc"
"github.com/zhangsifeng92/geos/... |
// 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/resources/user_interest.proto
package resources
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "github.com/kritzware/google-ads-go/common"
enums "github.co... |
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2018 The Gitea 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 repo
import (
"fmt"
"strings"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/module... |
// Copyright 2012 The goauth2 Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The jwt package provides support for creating credentials for OAuth2 service
// account requests.
//
// For examples of the package usage please see jwt... |
// Copyright 2019 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.
// Messages in this file are used to test wire encoding order.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: internal/testprotos/order/order.prot... |
package server
import (
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"path/filepath"
goSync "sync"
"syscall"
"time"
"github.com/golang/protobuf/ptypes"
log "github.com/sirupsen/logrus"
"github.com/spf13/afero"
"google.golang.org/grpc"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k... |
package trace
import (
"context"
"crypto/rand"
"encoding/hex"
"go.opentelemetry.io/otel/trace"
"sync"
"time"
"github.com/honeycombio/beeline-go/client"
"github.com/honeycombio/beeline-go/propagation"
"github.com/honeycombio/beeline-go/sample"
libhoney "github.com/honeycombio/libhoney-go"
)
const (
traceID... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.