text
stringlengths
3.08k
10.4k
package api import ( "context" "database/sql" "fmt" "strings" ) //formalizeName tries to return the pretty (capitalized) version of the given name func formalizeName(name string) string { name = strings.Title(strings.ToLower(strings.TrimSpace(name))) //Fix Mc... if strings.HasPrefix(name, "Mc") && len(name) >...
// Copyright 2021 The Cockroach 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 ...
// Code generated by go-swagger; DO NOT EDIT. package bank_accounts // 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 "githu...
// Code generated by go-swagger; DO NOT EDIT. package states // 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/g...
// Copyright 2020 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 ui import ( "context" "time" "chromiumos/tast/errors" "chromiumos/tast/local/chrome" "chromiumos/tast/testing" ) // Event represents a ...
package main // // Copyright (c) 2016 <NAME>. All rights reserved. // Use of this source code is governed by the MIT // license that can be found in the LICENSE file. // import ( "bufio" "fmt" "github.com/joncrlsn/fileutil" "github.com/joncrlsn/misc" "github.com/joncrlsn/pgutil" flag "github.com/ogier/pflag" ...
package main import ( "database/sql" "encoding/json" "fmt" "io/ioutil" "log" "os" "os/signal" "syscall" "github.com/slzatz/vimango/rawmode" "github.com/slzatz/vimango/terminal" "github.com/slzatz/vimango/vim" ) var sess Session var org = Organizer{Session: &sess} var p *Editor //var editors []*Editor va...
// // Copyright (c) 2014-2019 Cesanta Software Limited // 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 // // Un...
/* Copyright 2020 The Kruise Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package foreman import ( "bytes" "context" "encoding/json" "io" "io/ioutil" "net/http" "net/url" "reflect" "github.com/google/go-querystring/query" ) const ( defaultBaseURL = "http://localhost/" ) type Client struct { // HTTP client used to communicate with the API. client *http.Client // Base URL for...
/* Copyright 2019 The Jetstack cert-manager 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...
// package timeoutconn wraps a Wire to provide idle timeouts // based on Set{Read,Write}Deadline. // Additionally, it exports abstractions for vectored I/O. package timeoutconn // NOTE // Readv and Writev are not split-off into a separate package // because we use raw syscalls, bypassing Conn's Read / Write methods. ...
package conversion import ( "encoding/json" "sort" "github.com/chef/automate/components/compliance-service/api/profiles" "github.com/chef/automate/components/compliance-service/inspec" ) func ConvertToPSProfile(profile inspec.Profile, namespace string) (profiles.Profile, error) { var convertedProfile profiles....
/* Copyright 2015 Cesanta Software Ltd. 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 agree...
package websocket import ( "fmt" "github.com/gorilla/websocket" "github.com/ngaut/log" "net/http" "strings" ) type Server struct { ClientMessageChannel chan Message // Used for messages received from clients RegisterChannelChannel chan RegisterChannel // Used to register new available channel...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package appconfig import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" ) type GetEnvironmentInput struct { _ struct{} `type:"structure"` // The...
package workers import ( "sync" "time" "github.com/customerio/gospec" . "github.com/customerio/gospec" "github.com/garyburd/redigo/redis" ) type customMid struct { trace []string Base string mutex sync.Mutex } func (m *customMid) Call(queue string, message *Msg, next func() bool) (result bool) { m.mutex.L...
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package org import ( "strings" log "gopkg.in/clog.v1" "github.com/gogits/gogs/models" "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/p...
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use ...
package kayak func (k *Kayak) receiveSuspect(t Tracer, from KAddress, suspect KSuspect) { t = t.Fork("receiveSuspect") if _, fromServer := k.rkeys[from]; !fromServer { k.traceF(t.Logf("rejected as not from server")) return } if suspect.Epoch != k.epoch+1 { k.traceF(t.Logf("rejected as with incorrect epoch"...
package github import ( "bytes" "context" "encoding/base64" "encoding/binary" "net/http" "net/url" "strconv" "strings" "time" "github.com/google/go-github/github" "github.com/pkg/errors" "github.com/target/goalert/auth" "github.com/target/goalert/config" "github.com/target/goalert/util/log" "golang.org...
package vm import ( "sync" "fmt" "time" "github.com/czerwonk/ovirt_api/api" "github.com/czerwonk/ovirt_exporter/cluster" "github.com/czerwonk/ovirt_exporter/host" "github.com/czerwonk/ovirt_exporter/metric" "github.com/czerwonk/ovirt_exporter/network" "github.com/czerwonk/ovirt_exporter/statistic" "github...
// Copyright 2020 Chaos Mesh 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...
/* Package egts provides functions for parsing and forming EGTS packets. */ package egts import ( "encoding/binary" "fmt" ) const ( prvSignature = 0x01 minEgtsHeaderLen = 11 egtsRecordHeaderLen = 11 egtsSubrecDataLen = 21 egtsSubrecFuelDataLen = 7 // EgtsPtResponse defines EGTS_PT_RESPONS...
// Copyright © 2015 The Things Network // Use of this source code is governed by the MIT license that can be found in the LICENSE file. package broker import ( . "github.com/TheThingsNetwork/ttn/core" "github.com/TheThingsNetwork/ttn/utils/errors" "github.com/TheThingsNetwork/ttn/utils/stats" "github.com/apex/log...
/* * 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...
package kourier import ( "context" "fmt" "os" mfc "github.com/manifestival/controller-runtime-client" mf "github.com/manifestival/manifestival" "github.com/openshift-knative/serverless-operator/knative-operator/pkg/common" appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the Li...
package main import ( "bufio" "bytes" "io" "io/ioutil" "net" "net/http" "strings" "time" "github.com/Sirupsen/logrus" "github.com/jeffizhungry/sherlock/pkg/debug" ) // HTTPPayload encapsulates a HTTP request and response pair type HTTPPayload struct { Request *http.Request Response *http.Response } // ...
/* * N-Queens Problem * * For an NxN chess board, 'safely' place a chess queen in every column and row such that none can attack another. * This solution is based Wirth Pascal solution, although a tad cleaner, thus easier to understand as it uses Go/C * style indexing and naming, and also prints the Queen using a ...
package sshd import ( "context" "encoding/base64" "errors" "fmt" "io/ioutil" "net" "strconv" "time" "sync" "net/http" "github.com/pires/go-proxyproto" "golang.org/x/crypto/ssh" "gitlab.com/gitlab-org/gitlab-shell/internal/config" "gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/authorizedkeys" ...
package main import ( "bufio" "bytes" "io" "net/http" "strconv" "strings" "github.com/bmizerany/lpx" ) const ( // LogplexDefaultHost is the default host from logplex: // https://github.com/heroku/logplex/blob/master/src/logplex_http_drain.erl#L443 logplexDefaultHost = "host" maxHostnameLength = 255 maxA...
package main import ( "bytes" "encoding/binary" "errors" "fmt" "io/ioutil" "log" "log/syslog" "net" "net/http" "strings" "sync" "time" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/google/gopacket/pcap" ) var clientList = make(map[string]string) func init() { ifaces, e...
package template import ( "fmt" "sort" "strings" "github.com/Blesmol/pfscf/pfscf/cfg" "github.com/Blesmol/pfscf/pfscf/utils" "github.com/Blesmol/pfscf/pfscf/yaml" ) // Store stores multiple ChronicleTemplates and provides means // to retrieve them by name. type Store map[string]*Chronicle // Store as ptrs so t...
package command import ( "bufio" "flag" "io" "os" "strings" "github.com/hashicorp/nomad/api" "github.com/mitchellh/cli" "github.com/mitchellh/colorstring" "github.com/posener/complete" "golang.org/x/crypto/ssh/terminal" ) const ( // Constants for CLI identifier length shortId = 8 fullId = 36 ) // Flag...
/* 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...
// Copyright 2015 Prometheus 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 in wri...
package common import ( "github.com/laz/dubbo-go/common/logger" "reflect" "strings" "sync" ) import ( perrors "github.com/pkg/errors" ) const ( METHOD_MAPPER = "MethodMapper" ) // RPCService // rpc service interface type RPCService interface { // Reference: // rpc service id or reference id Reference() stri...
/* * Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file. */ package httpfilehandler import ( "context" "encoding/json" "errors" "fmt" "io" "net/http" "os" "path/filepath" "strings" "sync" "github.com/proje...
// Code generated by go-mockgen 1.1.5; DO NOT EDIT. package discovery import ( "context" "sync" database "github.com/sourcegraph/sourcegraph/internal/database" types "github.com/sourcegraph/sourcegraph/internal/types" ) // MockRepoStore is a mock implementation of the RepoStore interface (from // the package //...
package k8sprometheus import ( "bytes" "context" "fmt" "io" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/prometheus/prometheus/pkg/rulefmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/...
package fileio import ( "os" "fmt" "path" "sync" "time" "strings" "syscall" "strconv" "os/exec" "io/ioutil" "math/rand" "encoding/json" "github.com/Olling/slog" "github.com/Olling/Enrolld/utils" "github.com/Olling/Enrolld/utils/objects" "github.com/Olling/Enroller/dataaccess/config" ) var ( SyncOutpu...
package memberlist import ( _ "embed" "encoding/json" "fmt" "html/template" "net/http" "sort" "strconv" "strings" "time" "github.com/hashicorp/memberlist" ) // HTTPStatusHandler is a http.Handler with status information about memberlist. type HTTPStatusHandler struct { kvs *KVInitService tpl *template.Te...
package spn import ( "context" "errors" "github.com/cosmos/cosmos-sdk/types" genesistypes "github.com/tendermint/spn/x/genesis/types" "github.com/tendermint/starport/starport/pkg/jsondoc" ) // ProposalStatus keeps a proposal's status state. type ProposalStatus string const ( ProposalPending = "pending" Propo...
package cmd import ( "archive/zip" "bytes" "cf-tool/util" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "os" "path/filepath" "regexp" "runtime" "strconv" "time" "github.com/fatih/color" ) func less(a, b string) bool { reg := regexp.MustCompile(`(\d+)\.(\d+)\.(\d+)`) x := reg.FindSubmatch([]byte(...
package ui import ( "fmt" "io" "reflect" ) const ( GroupPrefix = "" FieldPrefix = "" KeySuffix = ":" valuePrefix = "" IndentationPrefix = " " ) type ( KeyValuePairs interface { Render(w io.Writer, rows interface{}) KeyValuePairs Error() error } KeyValuePairsOpt struct { DisplayOpt // map format ...
package pkg import ( "encoding/json" "fmt" "net" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/threefoldtech/zos/pkg/network/types" ) func TestNetworkUnmarshal(t *testing.T) { input := `{ "name": "testnetworkd", "net_id": "net1", "ip_range":...
// Copyright (C) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE-CODE in the project root for license information. package main import ( "context" "flag" "fmt" "os" "os/signal" "sync" "github.com/Azure/Avere/src/go/pkg/azure" "github.com/Azure/Avere/src/go/pkg/cachew...
package noaa_weather_api import ( "encoding/json" "fmt" "io" "mime" "net/http" "net/url" "sync" "time" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/config" "github.com/influxdata/telegraf/plugins/inputs" ) // https://www.weather.gov/documentation/services-web-api#/default/station_obser...
package log import ( "context" "os" "strings" "sync" "time" "github.com/rs/zerolog" "github.com/rs/zerolog/log" ) var default_rlogger *Rlogger var logOnce sync.Once type ctxTraceId string const ( CTX_TRACE_ID ctxTraceId = "TRACE_ID" ) //定义一个Rlogger类型,屏蔽底层实现 type Rlogger struct { logger zerolog.Logger //底...
package psi import ( "crypto/ecdsa" "sync" "github.com/PaddlePaddle/PaddleDTX/xdb/errorx" vl_common "github.com/PaddlePaddle/PaddleDTX/dai/crypto/vl/common" csv "github.com/PaddlePaddle/PaddleDTX/dai/crypto/vl/common/csv" "github.com/PaddlePaddle/PaddleDTX/dai/errcodes" ) // vlPsiByPairs implements VLPSI type...
package services import ( "context" "encoding/json" "fmt" "sync" "github.com/merico-dev/lake/errors" "github.com/merico-dev/lake/logger" "github.com/merico-dev/lake/models" "github.com/merico-dev/lake/plugins/core" "github.com/merico-dev/lake/runner" ) type RunningTaskData struct { Cancel context.C...
// Copyright 2019 Liquidata, 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 2015 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"...
// Code generated by solo-kit. DO NOT EDIT. package v1 import ( "fmt" gloo_solo_io "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" github_com_solo_io_solo_kit_pkg_api_v1_resources_common_kubernetes "github.com/solo-io/solo-kit/pkg/api/v1/resources/common/kubernetes" "github.com/solo-io/go-utils/hashutils" "...
package qln import ( "fmt" "github.com/mit-dci/lit/crypto/koblitz" "github.com/mit-dci/lit/btcutil/chaincfg/chainhash" "github.com/mit-dci/lit/coinparam" "github.com/mit-dci/lit/lnutil" "github.com/mit-dci/lit/portxo" "github.com/mit-dci/lit/uspv" "github.com/mit-dci/lit/wire" ) // The UWallet interface are ...
package main /* GOOS=linux GOARCH=amd64 go build */ import ( "fmt" "log" "net/http" "os" "strconv" "strings" "time" db "./_db" lib "./_lib" ) func init() { lib.LoadConfig(configjson, &c) lib.LoadConfig(weatherjson, &g) lib.LoadConfig(githubjson, &g) if c.App.Mode != "production" { c.App.Port = 3000 ...
/* Copyright 2021 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 2015 <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 isbn import ( "testing" ) type book struct { isbn10 string isbn13 string valid bool } var books = []book{ // Calvin and Hobbes, 1987 {"0836220889", "9...
package pcscommand import ( "container/list" "fmt" "os" "path" "strings" "time" "github.com/iikira/BaiduPCS-Go/baidupcs" "github.com/iikira/BaiduPCS-Go/baidupcs/pcserror" "github.com/iikira/BaiduPCS-Go/pcsutil/converter" "github.com/iikira/BaiduPCS-Go/pcsutil/pcstime" ) type ( etask struct { *ListTask ...
package ticker import ( "errors" "strconv" "sync" "time" "github.com/thrasher-/gocryptotrader/common" "github.com/thrasher-/gocryptotrader/currency/pair" ) // Const values for the ticker package const ( ErrTickerForExchangeNotFound = "Ticker for exchange does not exist." ErrPrimaryCurrencyNotFound = "Error...
// Copyright 2016 DigitalOcean // // 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 2015 Gravitational, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package lexer import ( "../token" ) // Lexer : type Lexer struct { input string // current position in input (points to current char) position int // current reading position in input (after current char) readPosition int // current char under examination char byte } // isLetter : maybe PLUS '?' and '!' as v...
package devutil import ( "bytes" "errors" "fmt" "io" "io/ioutil" "os" "os/exec" "path/filepath" "strings" ) // NOTE: https://webassembly.org/ says "Wasm" not "WASM" or "WAsm", so that's what I went with on the name. // NewWasmCompiler returns a WasmCompiler instance. func NewWasmCompiler() *WasmCompiler { ...
package keypairs import ( "github.com/ActiveState/cli/internal/failures" "github.com/ActiveState/cli/internal/logging" secretsapi "github.com/ActiveState/cli/pkg/platform/api/secrets" "github.com/ActiveState/cli/pkg/platform/api/secrets/secrets_client/keys" secretsModels "github.com/ActiveState/cli/pkg/platform/a...
// *** WARNING: this file was generated by the Kulado Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package devtest import ( "github.com/pkg/errors" "github.com/kulado/kulado/sdk/go/kulado" ) // Manages a Virtual Network within a Dev Test Lab. ...
/* * Copyright (c) 2018 WSO2 Inc. (http:www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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/license...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package cloudhsmv2 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTagsRequest type ListTagsInput struc...
package main import ( "crypto/tls" "crypto/x509" "flag" "fmt" "io/ioutil" "net" "net/http" "net/url" "os" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/log" "gopkg.in/ldap.v2" ) var ( listen = flag.S...
package machine import ( "context" "fmt" "reflect" "sort" "strings" "sync" ) // Implementation contains the implementation of a machine type Implementation struct { mu sync.RWMutex funcs map[string]*iFunc frozen bool stdInj bool } // Func adds a function handler to the implementation func (i *Implemen...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package glue import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Please also see https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/ListDevEndpointsRequest type ListDevEndpointsInput s...
// // Package simpleflag is useful for creating command line Go applications. // // Limitations // // No arguments are managed, only flags. // The App must have subcommands. // // Configuration // // App is the main structure of the cli application. // The App has a list of Commands. // Each command has a list of Flags...
package server import ( "context" "fmt" "strings" "time" "github.com/bmeg/grip/config" "github.com/bmeg/grip/gripper" "github.com/bmeg/grip/gripql" "github.com/bmeg/grip/log" "github.com/bmeg/grip/util/rpc" ) var schemaSuffix = "__schema__" var mappingSuffix = "__mapping__" func isSchema(graphName string) ...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package elasticache import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Represents the input of a DescribeReplicationGroups operation. // Please also see https://docs.aws.amazon.com/goto/We...
// Package index contains data structures to help cope with caches, indices and key filters. package index import ( "bytes" "encoding/binary" "io" "sync" "github.com/emirpasic/gods/sets/treeset" "github.com/emirpasic/gods/trees/redblacktree" "github.com/emirpasic/gods/utils" lru "github.com/hashicorp/golang-l...
package ipsec import ( "github.com/prometheus/common/log" "os/exec" "regexp" "strconv" // "fmt" ) type userstatus struct { up bool status connectionStatus uname string ubytesIn int ubytesOut int upacketsIn int upacketsOut int utsipaddr string // user tunnel source IP addr ...
package app import ( "fmt" "os" "path/filepath" "github.com/spf13/cobra" "github.com/spf13/pflag" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/util/homedir" cliflag "k8s.io/component-base/cli/flag" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" "go-learning/practise/co...
// Code generated by a tool. DO NOT EDIT. // Package strconv provides a mockable wrapper for strconv. package strconv import ( strconv "strconv" ) var _ Interface = &Impl{} var _ = strconv.AppendBool type Interface interface { AppendBool(dst []byte, b bool) []byte AppendFloat(dst []byte, f float64, fmt byte, pre...
package executor import ( "context" "database/sql" "fmt" "go.octolab.org/ecosystem/forma/internal/domain" "go.octolab.org/ecosystem/forma/internal/storage/executor/internal/postgres" "go.octolab.org/ecosystem/forma/internal/storage/query" "go.octolab.org/ecosystem/forma/internal/storage/types" ) const ( post...
package blind import ( "crypto/ecdsa" "crypto/elliptic" "encoding/hex" "io" "math/big" "github.com/fd/eccp" ) // Skalar is a (positive) integer. type Skalar big.Int // Marshal a skalar. func (self *Skalar) Marshal() []byte { return (*big.Int)(self).Bytes() } // UnmarshalSkalar unmarshals a skalar. func Unma...
package server import ( "context" "encoding/json" "fmt" "math/rand" "net/http" "net/http/httptest" "reflect" "strings" "testing" opa "github.com/Azure/kubernetes-policy-controller/pkg/opa" types "github.com/Azure/kubernetes-policy-controller/pkg/policies/types" opatypes "github.com/open-policy-agent/opa/s...
// Copyright 2019 Liquidata, 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 2018 <NAME>. All rights reserved. package util import ( "math/rand" "strconv" "strings" "time" "go.mongodb.org/mongo-driver/bson" ) // FavoritesSchema - type FavoritesSchema struct { ID string `json:"_id" bson:"_id"` FavoriteBook string `json:"favoriteBook" bson:"favoriteBook"` Favo...
// Copyright (c) 2020-2021 Blockwatch Data Inc. // Author: <EMAIL> package tzstats import ( "context" "fmt" "io" "net/http" "strconv" "strings" ) type Filter struct { Mode FilterMode Column string Value interface{} } type FilterList []Filter func (l *FilterList) Add(mode FilterMode, col string, val int...
package save import ( "fmt" "io/ioutil" "os" "strings" ) type Saver struct { Prefix string Format string Compressor string FormatExtension string CompressorExtension string Extension string } func NewSaver(prefix string, format string) *Sav...
package handler import ( "crypto/sha256" "encoding/base64" "encoding/json" "fmt" "io/ioutil" "net" "net/http" "net/url" "os" "pfg/src/repository/filesystem" "pfg/src/server/config" "pfg/src/server/logs" "runtime" "strconv" "strings" ) // ParseParameters extracts GET, POST & Cookie parameters from a req...
package router import ( wt "github.com/zettio/weave/testing" "testing" "time" ) // TODO test gossip unicast and broadcast; atm we only test topology // gossip, which does not employ unicast or broadcast. type mockChannelConnection struct { RemoteConnection dest *Router } // Construct a "passive" Router, i.e. w...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Copyright (c) 2017 Zededa, Inc. // SPDX-License-Identifier: Apache-2.0 package types import ( "time" log "github.com/sirupsen/logrus" ) // The information XenManager needs to boot and halt domains // If the the version (in UUIDandVersion) changes then the domain needs to // halted and booted?? NO, because an A...
package config import ( "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "reflect" "strings" "testing" "github.com/google/go-cmp/cmp" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/test-infra/prow/plugins" ) func compareChanges( t *testing.T, path string, files []string, cmd string, f func(string, strin...
// Copyright © 2019 Prometheus 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 ...
package vault import ( "context" "sort" "sync/atomic" "time" "github.com/hashicorp/errwrap" "github.com/hashicorp/vault/logical" ) const ( requestCounterDatePathFormat = "2006/01" countersPath = systemBarrierPrefix + "counters" requestCountersRelPath = "counters/requests/" ) type coun...
package gotenberg import ( "bytes" "errors" "fmt" "io" "mime/multipart" "net/http" "os" "path/filepath" "runtime" ) const ( webhookURL string = "webhookURL" paperWidth string = "paperWidth" paperHeight string = "paperHeight" marginTop string = "marginTop" marginBottom string = "marginBottom" ma...
package spdx import "strings" // Every licence struct implements this interface. type AnyLicence interface { Value LicenceId() string } // Represents a licence in the SPDX Licence list, a licence reference that // couldn't be changed to it's corresponding ExtractedLicence pointer or // one of the NONE or NOASSERTI...
// Copyright (c) 2004-present Facebook All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package exporter import ( "context" "encoding/json" "fmt" "net/http" "net/url" "strconv" "github.com/360EntSecGroup-Skylar/excelize/v2" "github.c...
package auth import ( "context" "encoding/json" "errors" "fmt" "net/http" "time" "github.com/dgrijalva/jwt-go" "golang.org/x/oauth2" "golang.org/x/oauth2/google" kerr "github.com/krok-o/krok/errors" "github.com/krok-o/krok/pkg/krok/providers" "github.com/krok-o/krok/pkg/models" ) var scopes = []string{ ...
package kwpoll import ( "errors" "fmt" "os" "time" "github.com/davecgh/go-spew/spew" "github.com/lalamove/konfig" "github.com/lalamove/nui/nlogger" ) var ( _ konfig.Watcher = (*PollWatcher)(nil) // ErrNoLoader is the error returned when no Loader is set and Diff is set to true ErrNoLoader = errors.New("You...
package main import ( "net/http" "net/url" "strings" "github.com/gorilla/mux" "github.com/lxc/lxd/lxd/cluster" "github.com/lxc/lxd/lxd/cluster/request" "github.com/lxc/lxd/lxd/db" "github.com/lxc/lxd/lxd/project" lxdRequest "github.com/lxc/lxd/lxd/request" "github.com/lxc/lxd/lxd/response" "github.com/lxc/...
package bitbucket import ( "encoding/json" "fmt" "io" "io/ioutil" "mime" "net/http" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/klog" buildv1 "github.com/openshift/api/build/v1" "github.com/openshift/library-go/pkg/build/buildutil" "github.com/openshift/origin/pkg/build/apise...