text
stringlengths
3.08k
10.4k
// Code generated by protoc-gen-go. DO NOT EDIT. // source: mongo/proto/service.proto package proto import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" math "math" ) // Reference...
package iso20022 // Parameters for contracts which obligate the buyer to receive and the seller to deliver in the future the assets specified at an agreed price or contracts which grant to the holder either the privilege to purchase or the privilege to sell the assets specified at a predetermined price or formula at o...
// Copyright 2019 Yunion // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. package taxonomy import ( "fmt" "strings" "github.com/facebookresearch/clinical-trial-parser/src/common/col/set" "github.com/facebookresearch/clinical-trial-parser/src/common/lsh" "github.com/facebookresearch/clinical-trial-parser/src/comm...
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of Cilium package api import ( "fmt" "regexp" "strings" "github.com/cilium/cilium/pkg/fqdn/dns" "github.com/cilium/cilium/pkg/fqdn/matchpattern" ) var ( // allowedMatchNameChars tests that MatchName contains only valid DNS characters allowedMatchNam...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package ematicagent import ( "fmt" "net/http" "reflect" "testing" ) func TestListClients(t *testing.T) { setup() defer teardown() mux.HandleFunc("/clients.json", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") fmt.Fprint(w, `[{"ClientID": "12ab", "Name": "Alice"}]`) }) clients, e...
package ft //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 //distribute...
// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Lice...
package resource import ( "os" gopath "path" bosherr "github.com/cloudfoundry/bosh-utils/errors" boshcmd "github.com/cloudfoundry/bosh-utils/fileutil" boshsys "github.com/cloudfoundry/bosh-utils/system" bicrypto "github.com/cloudfoundry/bosh-cli/crypto" ) type ArchiveImpl struct { files []File p...
// Copyright 2016 Precisely AB. // Use of this source code is governed by the MIT // license that can be found in the LICENSE file. package hellosign import ( "errors" "fmt" "net/http" ) // TemplateAPI used for manipulating templates. type TemplateAPI struct { *hellosign } // NewTemplateAPI creates a new api cl...
package features import ( "context" "encoding/json" "fmt" "strings" "github.com/grafana/grafana-plugin-sdk-go/backend" "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/services/guardian" ) type actionType string const ( ActionSaved actionType ...
// +build windows package daemon import ( "fmt" "strings" networktypes "github.com/docker/engine-api/types/network" "github.com/docker/docker/container" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daemon/execdriver/windows" "github.com/docker/docker/layer" "github.com/docker/libne...
package oci_test import ( "context" "math/rand" "os" "os/exec" "time" "github.com/cri-o/cri-o/internal/oci" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/pkg/errors" ) const ( shortTimeout int64 = 1 mediumTimeout int64 = 3 longTimeout int64 = 15 ) // The actual test suite var _...
// Copyright 2018-2019 CERN // // 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 wr...
package conf import ( "path" "path/filepath" log "github.com/sirupsen/logrus" "leblox.com/sparks-cli/v2/errx" "leblox.com/sparks-cli/v2/sys" ) // GetDependencies stores the command line flag of go get --dependencies var GetDependencies bool // SourceDirectory points to the directory containing the sources to b...
package main import ( "encoding/json" "errors" "fmt" "os" "os/exec" "regexp" "strings" ) var fileName string var saveFileName string var appName string var option string func init(){ // get file name from args if len(os.Args[1:]) <= 1 { fmt.Println("Error: missing arguments!") os.Exit(...
/* 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...
package export import ( "bytes" "encoding/csv" "errors" "fmt" "github.com/keep94/finance/apps/ledger/common" "github.com/keep94/finance/fin" "github.com/keep94/finance/fin/categories" "github.com/keep94/finance/fin/categories/categoriesdb" "github.com/keep94/finance/fin/findb" "github.com/keep94/goconsume" ...
package budoux import ( "sort" "unicode/utf8" ) // invalidFeature invalid feature string. const invalidFeature = "▔" // Parse returns splitted string slice from input. // It is shorthand for budoux.ParseWithThreshold(model, in, budoux.DefaultThreshold). func Parse(model Model, in string) []string { return ParseWi...
// Copyright 2017-2019 <NAME> (<EMAIL>) and other Dragonboat 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 req...
package horizonclient import ( "bufio" "bytes" "context" "fmt" "io" "net/http" "net/url" "strings" "github.com/manucorporat/sse" "github.com/stellar/go/support/app" "github.com/stellar/go/support/errors" ) func (surl *StreamURL) SetCursor(cursor Cursor) { surl.Cursor = cursor } func (surl *StreamURL) Bu...
package main import ( "bytes" "encoding/json" "net/http" "net/http/httptest" "strings" "testing" log "github.com/sirupsen/logrus" ) func TestIndexHandler(t *testing.T) { log.SetLevel(log.ErrorLevel) Setting.Timeout = 10 rbd := IndexRequest{UserID: 10, RepoPath: "repo2.git", RepoID: "repo2.git"} data, er...
package main import ( "flag" "fmt" "io/ioutil" "log" "math" "sort" "strconv" "strings" ) import "github.com/go-graphite/buckytools/hashing" import "github.com/pborman/uuid" func getConfig(file string) []string { data, err := ioutil.ReadFile(file) if err != nil { log.Fatalf("Error: %s", err) } ret := m...
package disco import ( "math/rand" "net" "time" "github.com/signalfx/golib/errors" "github.com/signalfx/golib/log" "github.com/signalfx/golib/logkey" "github.com/signalfx/thrift/lib/go/thrift" ) // ThriftTransport can be used as the transport layer for thrift, connecting to services discovered // by disco typ...
// Copyright (C) 2015, 2016 <NAME>. All rights reserved. package main import ( "flag" "fmt" "os" "path/filepath" "regexp" "runtime" "strings" "go/build" "github.com/t-yuki/godoc2puml/annotator" "github.com/t-yuki/godoc2puml/ast" "github.com/t-yuki/godoc2puml/parser" "github.com/t-yuki/godoc2puml/printer...
package utils import ( "testing" "time" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/metric" "github.com/stretchr/testify/assert" ) func TestPostgresqlQuote(t *testing.T) { assert.Equal(t, `"foo"`, QuoteIdent("foo")) assert.Equal(t, `"fo'o"`, QuoteIdent("fo'o")) assert.Equal(t, `"fo""o"`,...
package primitive import ( "fmt" "strings" "math" "github.com/fogleman/gg" "github.com/golang/freetype/raster" ) type Polygon struct { Worker *Worker Order int Convex bool MinAngle float64 SizeFactor float64 BoundsFactor int X, Y []float64 } // const m = 0 // const minAngle = 15 func NewRandomPolyg...
package main // // MDMTool helper funcs // import ( "bufio" "fmt" "github.com/dustin/go-humanize" "github.com/rickt/gsuitemdm" "github.com/ttacon/libphonenumber" "log" "os" "strings" "time" ) // Helper function to ask for user confirmation func checkUserConfirmation(s string) bool { reader := bufio.NewRead...
// Copyright 2020 Teserakt AG // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
package util import ( "context" "fmt" "testing" "time" . "github.com/onsi/gomega" capikubevirt "sigs.k8s.io/cluster-api-provider-kubevirt/api/v1alpha1" routev1 "github.com/openshift/api/route/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr"...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package config import ( "encoding/json" "fmt" "sort" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ssm" ) // Environment represents a deploym...
// Copyright 2019 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...
// Code generated by go-swagger; DO NOT EDIT. package item // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-...
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package server import ( "fmt" "log" "net" "net/http" "os" "strings" "time" "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/tylerb/graceful" "gopkg.in/throttled/throttled.v1" throttle...
package queue // Copyright (C) 2022 by RStudio, PBC import ( "context" "errors" "sync" "github.com/rstudio/platform-lib/pkg/rsqueue/permit" ) var ErrDuplicateAddressedPush = errors.New("Duplicate address") type Queue interface { // WithDbTx returns a queue that operates in the context of a database // transa...
// Code generated by protoc-gen-go. // source: google/api/label.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 // V...
// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
package controller import ( "fmt" "reflect" "sort" "strings" "time" "github.com/caicloud/canary-release/pkg/api" "github.com/caicloud/canary-release/pkg/util" releaseapi "github.com/caicloud/clientset/pkg/apis/release/v1alpha1" utilstatus "github.com/caicloud/clientset/util/status" log "github.com/zoumo/log...
// Copyright 2021 Praetorian Security, 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 o...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: stream.proto package stream import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-...
package raft import ( "context" "sync/atomic" "time" "github.com/krithikvaidya/distributed-dns/raft/protos" ) // To send AppendEntry to single replica, and retry if needed (called by LeaderSendAEs defined below). func (node *RaftNode) LeaderSendAE(parent_ctx context.Context, replica_id int32, upper_index int32, ...
// // Copyright 2017 by marmot author: <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 or a...
package metadata import ( "bufio" "encoding/json" "errors" "fmt" "io" "log" ) var ErrNotADump = errors.New("magic bytes not detected, not a dump?") // Metadata represents the metadata about the dump. type Metadata struct { // Magic is the magic byte string. Magic string `json:"magic"` // VMain is the major ...
// Copyright (c) 2018, Open Systems AG. All rights reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. package main import ( "encoding/json" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.c...
package service import ( "context" "fmt" "io" "net/http" "net/url" "github.com/go-ocf/cloud/cloud2cloud-connector/events" oapiStore "github.com/go-ocf/cloud/cloud2cloud-connector/store" "github.com/go-ocf/cloud/cloud2cloud-gateway/store" "github.com/go-ocf/kit/codec/json" kitNetGrpc "github.com/go-ocf/kit/n...
// Copyright 2018 the u-root 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 bmc import ( "encoding/binary" "fmt" "io" "os" "syscall" "unsafe" ) type gpiochip_info struct { name [32]byte label [32]byte lines uint32...
package query import ( "bytes" "context" "fmt" "strings" "unicode" "github.com/mithrandie/csvq/lib/cmd" "github.com/mithrandie/csvq/lib/excmd" "github.com/mithrandie/csvq/lib/parser" "github.com/mithrandie/csvq/lib/value" ) const ( TerminalPrompt string = "csvq > " TerminalContinuousPrompt strin...
package strategy import ( "context" "fmt" "io/ioutil" "sync" "k8s.io/apimachinery/pkg/runtime" "k8s.io/klog/v2" operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" operatorv1alpha1scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" "github.com/openshift/library-go/pkg/image...
package tree // sort borrowed from the standard library // https://code.google.com/p/go/source/browse/src/pkg/sort/sort.go?name=release // // The time complexity of the Fit method is bounded by sorting the features at // each node. Specializing the sort algorithm instead of using the Sort // interface reduces the runn...
package main import ( "flag" "image/color" "log" "math" "github.com/unixpickle/model3d/model2d" "github.com/unixpickle/model3d/render3d" "github.com/unixpickle/model3d/toolbox3d" "github.com/unixpickle/model3d/model3d" ) // InsetSlopeFactor controls how sloped the inscription // is. Lower values mean a shar...
package sub import ( "encoding/json" "github.com/akazwz/hot-search-notify/inital" "io" "io/ioutil" "log" "net/http" "strings" "github.com/akazwz/hot-search-notify/internal/utils" ) type Res struct { Code int64 `json:"code"` Msg string `json:"msg"` Data HotSearch `json:"data"` } type HotSearch str...
// Copyright 2017 Istio Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package ansistyles import ( "strings" "testing" ) func assertEqual(t *testing.T, actual string, expected string) { if expected != actual { t.Errorf("Exepected: %v got: %v", strings.Replace(expected, "\u001B", "\\u001b", -1), strings.Replace(actual, "\u001B", "\\u001b", -1), ) } } func assertEqualUint8(...
package main import ( "errors" "net/http" "net/url" "path" "sort" "strconv" "strings" ) func init() { http.HandleFunc("/msx/torr", func(w http.ResponseWriter, r *http.Request) { if p := r.FormValue("link"); p != "" { torrLink(w, r, p) } else if p = r.FormValue("del"); p != "" { torrDel(w, p, true) ...
// Copyright 2017 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 ...
package main import ( "fmt" "github.com/choerodon/c7nctl/pkg/action" "github.com/choerodon/c7nctl/pkg/config" c7nconsts "github.com/choerodon/c7nctl/pkg/consts" "github.com/choerodon/c7nctl/pkg/resource" c7nutils "github.com/choerodon/c7nctl/pkg/utils" "github.com/pkg/errors" log "github.com/sirupsen/logrus" ...
// Copyright (c) 2021 Terminus, 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 2020 The LUCI Authors. All rights reserved. // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. package plugsupport import ( "io/ioutil" "os" "path/filepath" "google.golang.org/protobuf/encoding/prototext" "go.chromium.org/luci/com...
// 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 ...
// Copyright 2021 FabEdge Team // // 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 2022 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 2019 Yunion // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
package main import ( "errors" "fmt" "net/http" "os" "sort" "strings" "github.com/just-install/just-install-updater-go/jiup/rules" "github.com/spf13/pflag" ) // KnownBroken contains packages known to be broken. // Errors during the check will not count as a failure. var KnownBroken = []string{ "audacity", ...
package storage import ( "bufio" "context" "encoding/json" "fmt" "os" "path/filepath" "strings" "github.com/spf13/cobra" flag "github.com/spf13/pflag" "github.com/spf13/viper" "github.com/oasisprotocol/oasis-core/go/common" cmdCommon "github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common" cmdCons...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto package envoy_extensions_filters_network_dubbo_proxy_router_v3 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" proto "github.com/golang/protobuf/proto" math "math" ) // ...
package pattern import ( "fmt" "unicode" "unicode/utf8" ) const classes = "acdglpsuwx" const escape = '%' const eos = rune(-1) type itemType int const ( itemEnd itemType = iota itemErr itemText itemClass itemStartCapture itemCloseCapture ) var itemTypes = [...]string{ itemEnd: "end of string", ...
// Copyright 2017 <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 writi...
package pg import ( "database/sql" "fmt" "github.com/pkg/errors" "github.com/chef/automate/components/authn-service/constants" ) // migrate tries to execute all the migrations we know of func migrate(c *sql.DB) error { // Acquire advisory lock _, err := c.Exec("SELECT pg_advisory_lock($1);", constants.Advisor...
// Copyright (c) 2022-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. package ws import ( "fmt" "net/http" "sync" "time" "github.com/mattermost/rtcd/service/random" "github.com/gorilla/websocket" "github.com/mattermost/mattermost-server/v6/shared/mlog" ) const ( se...
package elkrem import ( "bytes" "encoding/binary" "fmt" "github.com/Rjected/lit/btcutil/chaincfg/chainhash" ) /* Serialization and Deserialization methods for the Elkrem structs. Senders turn into 41 byte long slices. Receivers are variable length, with 41 bytes for each stored hash, up to a maximum of 48. Rec...
package pay import ( "encoding/json" "fmt" wx "github.com/huangjunwen/WechatDriver/wechat" "time" ) // Common part of Pay parameters. type PayParam struct { AppID string `wx_pay:"appid"` MchID string `wx_pay:"mch_id"` NonceStr string `wx_pay:"nonce_str"` } func (param *PayParam) fillFrom(pay *Pay) { p...
package main import ( "fmt" "log" "math/rand" "net/http" "strconv" "strings" "time" "github.com/mediocregopher/lever" "github.com/mediocregopher/radix/v3" _ "net/http/pprof" ) // Prefix is a Markov chain prefix of one or more words. type Prefix []string // String returns the Prefix as a string (for use a...
// Copyright 2017 Pilosa Corp. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaime...
/* * 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 ...
package main import ( "encoding/json" "fmt" "io" "io/ioutil" "log" "net/http" "os" "strings" "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "google.golang.org/api/drive/v3" ) func listAllFilesCloud(service *drive.Service) []*drive.File { allFiles := make([]*drive.File, 0) ...
// -------------------------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. // -------------------------------------------------------------------------------------------- package main import ( "io/iou...
package v1alpha1 import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ApicurioRegistryList contains a list of ApicurioRegistry // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ApicurioRegistryList struct { metav1.TypeMeta `json:",inline"` metav1.ListMe...
/* Copyright 2018 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
package login import ( "flag" "os" "testing" "time" . "github.com/stretchr/testify/assert" ) func TestConfig_ReadConfigDefaults(t *testing.T) { originalArgs := os.Args defer func() { os.Args = originalArgs }() defaultConfig := DefaultConfig() gotConfig := ReadConfig() defaultConfig.JwtSecret = "random" g...
package log import ( "encoding/json" "fmt" "io" "reflect" "runtime/debug" "strconv" "time" ) type bufferWriter interface { Write(p []byte) (nn int, err error) WriteRune(r rune) (n int, err error) WriteString(s string) (n int, err error) } // JSONFormatter is a fast, efficient JSON formatter optimized for l...
package benchmark import ( "log" "math/rand" "os" "os/signal" "strings" "sync" "text/template" "time" ) // Bencher is the interface a benchmark has to impelement. type Bencher interface { Setup() Cleanup() Benchmarks() []Benchmark Exec(string) } // BenchType determines if the particular benchmark should ...
// Copyright © 2017 NAME HERE <EMAIL ADDRESS> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
package ubot import ( "errors" "fmt" "io/ioutil" "net/http" "net/url" "os" "os/signal" "strings" "syscall" "time" "github.com/1354092549/wsrpc" "github.com/gorilla/websocket" ) type RPCConfigurator func(rpc *wsrpc.WebsocketRPC, rpcConn *wsrpc.WebsocketRPCConn) error type ClientRegistrar func(managerUrl *...
package command import ( "errors" "flag" "fmt" "os" "path/filepath" "strings" "github.com/fyne-io/fyne-cross/internal/volume" ) var flagSet = flag.NewFlagSet("fyne-cross", flag.ExitOnError) // CommonFlags holds the flags shared between all commands type CommonFlags struct { // AppBuild represents the build ...
package web3 import ( "encoding/json" "math/big" "reflect" "testing" "github.com/gochain/gochain/v3/accounts/abi" "github.com/gochain/gochain/v3/common" ) func Test_parseParam(t *testing.T) { const addr = "0xa25b5e2d2d63dad7fa940e239925f29320f5103d" const hash = "0x0123456789012345678901234567890101234567890...
// Copyright 2017 The kubecfg 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 applica...
package ethclient import ( "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/rpc/rpcevents" "github.com/hyperledger/burrow/rpc/web3" ) // These types partially duplicate some of those web3/types.go, the should probably be unified at some point but // the ...
package registry import ( "context" "encoding/json" "fmt" "path/filepath" "github.com/docker/distribution/reference" "github.com/estesp/manifest-tool/pkg/store" "github.com/estesp/manifest-tool/pkg/types" "github.com/estesp/manifest-tool/pkg/util" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "...
package cmd import ( "errors" "fmt" "os" "github.com/signmykeyio/signmykey/api" "github.com/signmykeyio/signmykey/builtin/authenticator" ldapAuth "github.com/signmykeyio/signmykey/builtin/authenticator/ldap" localAuth "github.com/signmykeyio/signmykey/builtin/authenticator/local" oidcropcAuth "github.com/sign...
// This file was generated by data-gen. Do not edit. // CLDR version: 40.0 package locale // Operand represents an operand in a plural rule. type Operand uint8 // Available operands for the plural rules. const ( AbsoluteValue Operand = 0 // n IntegerDigits Operand = 1 // i NumFracDigit Operand ...
// Code generated by goa v2.0.0-wip, DO NOT EDIT. // // users service // // Command: // $ goa gen github.com/andmorefine/buddha/design package users import ( "context" usersviews "github.com/andmorefine/buddha/gen/users/views" ) // users serves user relative information. type Service interface { // List all stor...
// 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. package buildid import ( "bytes" "crypto/sha256" "internal/obscuretestdata" "io/ioutil" "os" "reflect" "testing" ) const ( expectedID = "abcdefghijklm...
/* * Copyright (c) 2020 <NAME>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish...
package service import ( "github.com/Test-for-regression-of-the-site/trots-api/constants" "github.com/Test-for-regression-of-the-site/trots-api/model" "github.com/Test-for-regression-of-the-site/trots-api/provider" docker "github.com/fsouza/go-dockerclient" "io" "io/ioutil" "log" "os" "path/filepath" "time" ...
package scdt import ( "context" "net" "runtime" "sync" "time" "github.com/panjf2000/ants/v2" ) // HandleRecvFunc ... type HandleRecvFunc func(id string, message *Message) ([]byte, bool) type listener struct { ctx context.Context cancel context.CancelFunc listeners map[string]net.Listen...
package redy // ////////////////////////////////////////////////////////////////////////////////// // import ( "bytes" "crypto/tls" "errors" "net" "time" ) // ////////////////////////////////////////////////////////////////////////////////// // type req struct { cmd string args []interface{} } // /////////...
package s3 import ( "fmt" "io" "net/http" "strconv" "strings" "time" ) type inputModel struct { credentials []awsCredentials method string endpoint string region string bucket string key string now time.Time expireTime time.Time expiresIn time.Duration etag string content ...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: model.proto package model import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a com...
package mysql type Order struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 订单索引id Sn string `json:"sn" form:"sn" ` // 订单编号 PaySn string `json:"pay_sn" form:"pay_sn" ` // 支付单...