text
stringlengths
3.08k
10.4k
package putio import ( "context" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" ) const ( defaultUserAgent = "go-putio" defaultMediaType = "application/json" defaultBaseURL = "https://api.put.io" defaultUploadURL = "https://upload.put.io" ) type Error string func (e Error) Error() string {...
// 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 2017-2020 Datadog, Inc. // +build kubeapiserver package autoscalers import ( "errors" "fmt" "st...
package repository import ( "techpay-api-graphql/internal/repository/rpc/contracts" "techpay-api-graphql/internal/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ) // NativeTokenAddress returns address of the native token wrapper, if available. func (p *proxy) Nat...
package esl import ( "bufio" "context" "fmt" "net" "strings" "sync" "time" "github.com/cenkalti/backoff/v4" ) // Socket is low level ESL connection. // Socket will generate keep-alive for a connection, to keep it open in order for // a single connection will not be dropped after sending/receiving a payload. ...
package cluster import ( "fmt" "github.com/duanhf2012/origin/log" "github.com/duanhf2012/origin/rpc" "github.com/duanhf2012/origin/service" "strings" "sync" ) var configDir = "./config/" type NodeInfo struct { NodeId int NodeName string Private bool ListenAddr string ServiceList []string } type NodeRpcI...
/* Copyright 2021 The KubeVela 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, so...
package ssl import ( "crypto/tls" "crypto/x509" "fmt" "github.com/TeaWeb/code/teaconfigs" "github.com/TeaWeb/code/teaproxy" "github.com/TeaWeb/code/teautils" "github.com/iwind/TeaGo/actions" "github.com/iwind/TeaGo/lists" "github.com/iwind/TeaGo/maps" "github.com/iwind/TeaGo/utils/time" "strings" ) type In...
// +build dataflow /* Copyright NetFoundry, 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
package fileutil import ( "io" "io/ioutil" "os" "path/filepath" "sort" ) type DirReaderOption int const ( NoRecursive DirReaderOption = iota FailOnError ) type DirReaderOptions []DirReaderOption func (self DirReaderOptions) Has(option DirReaderOption) bool { for _, opt := range self { if opt == option { ...
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package client import ( "context" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "strconv" "github.com/opentracing-contrib/go-stdlib/nethttp" "github.com/opentracing/opentracing-go/ext" "github.com/pkg/errors" "github.com/sourcegraph/sourcegraph/internal/linkheader" "github.com/sourcegraph/s...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package chaincode import ( "io/ioutil" "github.com/golang/protobuf/proto" "github.com/hyperledger/fabric/common/cauthdsl" "github.com/hyperledger/fabric/core/common/ccpackage" "github.com/hyperledger/fabric/internal/pkg/identity...
package main // VERSION v1 import ( "context" "encoding/json" "fmt" "io" "io/ioutil" "log" "net/http" "os" "os/exec" "time" "cloud.google.com/go/storage" ) // change to v2 20210121 const heritabilityVersion = "v2" const datasetName = "data.tsv" const resultName = "result.tsv" const bucketName = "elegansv...
// Copyright 2019 Aporeto 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,...
// Copyright 2014 <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 testing import ( "context" "fmt" "strings" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/format" kexec "k8s.io/utils/exec" fakeexec "k8s.io/utils/exec/testing" ) func init() { // Gomega's default string diff behavior makes it impossible to figure // out what fake com...
package rule import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "strings" "time" "github.com/errata-ai/vale/core" ) var skipped = []string{ // Collides with `Vale.Repetition` "ENGLISH_WORD_REPEAT_RULE", // Don't work well with markup "DT_DT", "WHITESPACE_RULE", // Collides with `V...
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package lookupd import ( "fmt" "github.com/bitly/nsq/util/semver" "sort" "strings" "time" ) type Producer struct { Address string `json:"address"` //TODO: remove for 1.0 Hostname string `json:"hostname"` BroadcastAddress string `json:"broadcast_address"` TcpPort ...
// Copyright (c) 2018, <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "github.com/rcoreilly/goki/gi" "github.com/rcoreilly/goki/gi/oswin" _ "github.com/rcoreilly/goki/gi/oswin/init" "github.com/rcor...
package cli import ( "fmt" "time" "github.com/jwaldrip/odin/cli/values" ) // AliasFlag creates an alias from a flag func (cmd *CLI) AliasFlag(alias rune, flagname string) { flag, ok := cmd.flags[flagname] if !ok { panic(fmt.Sprintf("flag not defined %v", flagname)) } if cmd.aliases == nil { cmd.aliases = ...
package awsutil import ( "reflect" "regexp" "strconv" "strings" "github.com/jmespath/go-jmespath" ) var indexRe = regexp.MustCompile(`(.+)\[(-?\d+)?\]$`) // rValuesAtPath returns a slice of values found in value v. The values // in v are explored recursively so all nested values are collected. f...
// Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package gtimer import ( "github.com/gogf/gf/g/conta...
package svc import ( "bytes" "context" "fmt" "io/ioutil" "net/http" "os" "strings" "github.com/go-chi/chi" "github.com/gorilla/mux" "github.com/owncloud/ocis/idp/pkg/assets" "github.com/owncloud/ocis/idp/pkg/config" logw "github.com/owncloud/ocis/idp/pkg/log" "github.com/owncloud/ocis/idp/pkg/middleware"...
package acme import ( "bytes" "crypto/rand" "crypto/x509" "crypto/x509/pkix" "encoding/pem" "errors" "fmt" "io/ioutil" "net/http" "net/url" "sync" "time" "github.com/cenk/backoff" "github.com/jetstack/kube-lego/pkg/kubelego_const" "golang.org/x/crypto/acme" "golang.org/x/net/context" ) func (a *Acme...
package main import ( "fmt" "sync" "github.com/crowdsecurity/crowdsec/pkg/acquisition" "github.com/crowdsecurity/crowdsec/pkg/csconfig" "github.com/crowdsecurity/crowdsec/pkg/cwhub" "github.com/crowdsecurity/crowdsec/pkg/exprhelpers" leaky "github.com/crowdsecurity/crowdsec/pkg/leakybucket" "github.com/crowds...
// Copyright © 2019 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
// 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...
package membership import ( "errors" "sync" "github.com/docker/swarmkit/api" "github.com/docker/swarmkit/watch" "github.com/gogo/protobuf/proto" "go.etcd.io/etcd/raft/v3/raftpb" ) var ( // ErrIDExists is thrown when a node wants to join the existing cluster but its ID already exists ErrIDExists = errors.New(...
package resource import ( "fmt" "github.com/hashicorp/go-hclog" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" ) // RouteTable is the managed resource type RouteTable struct { VpcId string RouteTableId string SubnetId string Routes []Route Associations ...
// Copyright 2020 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 storage import ( "context" "io" "net/url" "os" "path" "strings" "time" "code.gitea.io/gitea/modules/log" "github.com/minio/minio-go/v7" ...
package grafana_dashboard import ( "crypto/sha1" "fmt" "log" "regexp" "sort" "github.com/grafana-tools/sdk" v1 "github.com/pivotal/monitoring-indicator-protocol/pkg/k8s/apis/indicatordocument/v1" ) var HEIGHT = 10 var WIDTH = 24 type pos struct { H *int `json:"h,omitempty"` W *int `json:"w,omitempty"` X ...
// // DISCLAIMER // // Copyright 2020 ArangoDB GmbH, Cologne, Germany // // 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 require...
// 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...
// Code generated by go-swagger; DO NOT EDIT. package component // 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.co...
package main import ( "context" "flag" "fmt" "log" "net/http" "runtime" "strconv" "sync" "time" "github.com/evanj/concurrentlimit" "github.com/evanj/concurrentlimit/grpclimit" "github.com/evanj/concurrentlimit/sleepymemory" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.o...
package relay import ( "context" "crypto/tls" "fmt" "net/http" "sync" "time" "github.com/eyedeekay/sam3/helper" //binetor "github.com/cretz/bine/tor" "github.com/chris-pikul/go-wormhole-server/config" "github.com/chris-pikul/go-wormhole-server/db" "github.com/chris-pikul/go-wormhole-server/log" "github.c...
package state import ( "context" "encoding/json" "fmt" "github.com/dapr/components-contrib/state" "github.com/dapr/components-contrib/state/utils" "github.com/dapr/dapr/pkg/proto/common/v1" proto "github.com/dapr/dapr/pkg/proto/state/v1" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // see http...
// // Copyright (c) 2019 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // // Unless required by applicable law or agreed to in writing, software distributed under the Lic...
package rosaprovider import ( "context" "fmt" "log" "net" "time" "github.com/Masterminds/semver" cmv1 "github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1" "github.com/openshift/osde2e/pkg/common/config" "github.com/openshift/osde2e/pkg/common/spi" "github.com/openshift/osde2e/pkg/common/util" "github.c...
/* * The Plaid API * * The Plaid REST API. Please see https://plaid.com/docs/api for more details. * * API version: 2020-09-14_1.44.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package plaid import ( "encoding/json" ) // EmploymentDetails An object representing e...
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc (unknown) // source: cosmos/feegrant/v1beta1/query.proto package feegrantv1beta1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.go...
package migrator import ( "bytes" "context" "encoding/json" "io" "sync/atomic" log "github.com/go-pkgz/lgr" "github.com/go-pkgz/syncs" "github.com/pkg/errors" "github.com/umputun/remark/backend/app/store" "github.com/umputun/remark/backend/app/store/service" ) const nativeVersion = 1 const defaultConcurre...
// Package helm contains the epinio-specific core to the helm client libraries. It exposes // the functionality to deploy and remove helm charts/releases. package helm import ( "context" "errors" "fmt" "strings" "github.com/epinio/epinio/helpers/kubernetes" "github.com/epinio/epinio/internal/duration" "github....
package bazel import ( "fmt" "io/ioutil" "os" "path/filepath" "sort" "strings" ppb "github.com/enfabrica/enkit/enkit/proto" "github.com/enfabrica/enkit/lib/goroutine" "github.com/enfabrica/enkit/lib/logger" ) func GetAffectedTargets(start string, end string, config *ppb.PresubmitConfig, log logger.Logger) (...
package services import ( "bytes" "context" "encoding/json" "fmt" "net/http" "net/url" "regexp" texttemplate "text/template" httputil "github.com/argoproj/notifications-engine/pkg/util/http" slackutil "github.com/argoproj/notifications-engine/pkg/util/slack" log "github.com/sirupsen/logrus" "github.com/s...
/* Copyright 2015 - <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 writing, software distribute...
/* Copyright 2020 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 aws import ( "context" "fmt" "github.com/openshift/library-go/pkg/operator/events" "github.com/open-cluster-management/submariner-addon/pkg/cloud/manifestwork" "github.com/open-cluster-management/submariner-addon/pkg/cloud/reporter" "github.com/open-cluster-management/submariner-addon/pkg/helpers" wor...
package google import ( "encoding/json" "fmt" "log" "net/http" "runtime" "strings" "github.com/hashicorp/terraform/helper/logging" "github.com/hashicorp/terraform/helper/pathorcontents" "github.com/hashicorp/terraform/terraform" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "golang.org/x/oauth2/jwt" ...
package schematics import ( "context" "fmt" "io" "log" "time" apiv1 "github.com/johandry/gics/schematics/api/v1" ) const ( activityNameForCreate = "WORKSPACE_CREATE" activityNameForDestroy = "DESTROY" ) const ( listWorkspaceActivitiesTimeout = 50 refreshWorkspaceActivityTimeout = 30 ) // NilActivity is...
// 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 ...
// 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 command import ( "crypto/rand" "io/ioutil" "os" "testing" "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/cli/context/docker" "github.com/docker/cli/cli/context/store" cliflags "github.com/docker/cli/cli/flags" "github.com/docker/go-connections/tlsconfig" "gotest.tools/assert" ...
package main import ( "os" "fmt" "flag" "image" "image/color" "image/png" "errors" "crypto/md5" ) func die(s string, msg ...interface{}) { fmt.Fprintf(os.Stderr, s + "\n" , msg...) os.Exit(1) } var Seed string var Size int64 var Fpath string var BG_COLOR color.RGBA = color.RGBA{240, 240, 240, 255} func i...
// // Copyright 2019-2020 Nestybox, 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
// MIT License // 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, p...
// Copyright © Microsoft <<EMAIL>> // // 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, ...
// Copyright 2015 Sorint.lab // // 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 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
package fastserver /* type DocParam struct { Name string Type string Required string Default string Desc string } type Document struct { Name string Method string Route string Desc string Params []*DocParam Example string RespParams } type ApiGroup struct { apis []*Api docP...
// Copyright (c) 2019 The Jaeger 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...
package blockchain import ( "bytes" "testing" "github.com/btcboost/copernicus/core" "github.com/btcboost/copernicus/crypto" "github.com/btcboost/copernicus/net/msg" "github.com/btcboost/copernicus/utils" "github.com/btcboost/copernicus/utxo" ) type CoinsViewTest struct { hashBestBlock utils.Hash } func newC...
package ingress import ( "context" "encoding/json" "fmt" "github.com/choerodon/choerodon-cluster-agent/pkg/agent/model" controllerutil "github.com/choerodon/choerodon-cluster-agent/pkg/util/controller" "github.com/golang/glog" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/api/error...
package nodejs import ( "encoding/json" "fmt" "io/ioutil" "net/http" "os" "os/exec" "path/filepath" "strings" "syscall" "time" "github.com/crazy-max/nodejs-portable/app/fs" "github.com/crazy-max/nodejs-portable/app/pathu" "github.com/crazy-max/nodejs-portable/app/util" ) const ( distJSON = "https...
package gocelery import ( "encoding/base64" "encoding/json" "log" "reflect" "sync" "time" ) // CeleryMessage is actual message to be sent to Redis type CeleryMessage struct { Body string `json:"body"` Headers map[string]interface{} `json:"headers"` ContentType string ...
// // Copyright 2019 <NAME>.S. // // 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...
// Copyright (C) 2019 Orange // // This software is distributed under the terms and conditions of the 'Apache License 2.0' // license which can be found in the file 'License.txt' in this package distribution // or at 'http://www.apache.org/licenses/LICENSE-2.0'. package dgraph import ( "flag" "log" "optisam-bac...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package issue import ( "encoding/json" "github.com/IBM/mathlib" "github.com/hyperledger-labs/fabric-token-sdk/token/core/zkatdlog/crypto" "github.com/hyperledger-labs/fabric-token-sdk/token/core/zkatdlog/crypto/common" rp "github...
package server import ( "expvar" "net/http" "runtime" "sort" "strings" "sync" "time" "github.com/fynaris/sweb/log" "github.com/paulbellamy/ratecounter" "golang.org/x/net/context" ) type LatencyCounter struct { sync.RWMutex latency []int64 // in nanoseconds size int } type LatencyStat struct { Laten...
package main import ( "errors" "flag" "log" "net" "os" "os/signal" "strings" "syscall" "time" "github.com/salrashid123/run_api_gateway_grpc/echo" gcemeta "cloud.google.com/go/compute/metadata" "golang.org/x/net/context" "google.golang.org/api/idtoken" "google.golang.org/grpc" "google.golang.org/grpc/c...
package callbacks import ( "context" "sync" "github.com/pkg/errors" mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" "github.com/kumahq/kuma/pkg/core" core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" "github.com/kumahq/kuma/pkg/core/resources/manager" "github.com/kumahq/kuma/pkg/core/res...
package key import ( "fmt" "math" "strings" ) // The defaultAlphabetCharacters the string of characters from which // the alphabet will be generated if the user doesn't set a custom one. const defaultAlphabetCharacters = "abcdefghijklmnopqrstuvwxyz0123456789" // New returns a pointer to the Key object as the firs...
/* @Author : Ryan.wuxiaoyong */ package scaleAndBreak import ( "WeiBo/common/rlog" "encoding/json" "fmt" "io/ioutil" "sync" "time" ) //配置文件格式 type configType struct { SvrAddrArr []string `json: "svrAddrArr"` } type configData struct { sync.Mutex SvrArr []string //服务地址列表 } var gConfigData = configData{sync....
package gcputil import ( "context" "crypto/x509" "encoding/base64" "encoding/json" "encoding/pem" "errors" "fmt" "github.com/hashicorp/go-cleanhttp" "github.com/mitchellh/go-homedir" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "golang.org/x/oauth2/jwt" googleoauth2 "google.golang.org/api/oauth2/v2"...
package kubeaudit import ( "fmt" "io" "os" "github.com/gagan1510/kubeaudit/internal/color" "github.com/gagan1510/kubeaudit/pkg/k8s" log "github.com/sirupsen/logrus" ) type Printer struct { writer io.Writer minSeverity SeverityLevel formatter log.Formatter color bool } type PrintOption func(p ...
package pig import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( piglegBirthday = nook.Birthday{ Day: 0, Month: ...
/* Copyright 2021. 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 distributed un...
// Copyright 2016 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 ag...
package gold import ( "crypto/tls" "fmt" "net/mail" "net/smtp" "strconv" "strings" ) type EmailStruct struct { To string ToName string From string FromName string Subject string Body string } // EmailConfig holds configuration values for remote SMTP servers type EmailConfig struct { // ...
package bitsop type BitsArray struct { idx int bit8 [8]byte underlay []byte } func NewBitsArray(ln int) *BitsArray { return &BitsArray{ underlay: make([]byte, 0, ln), } } func (b *BitsArray) push(bit byte) { b.bit8[b.idx] = bit b.idx++ if b.idx == 8 { n := byte(0) for i := 0; i < 8; i++ { ...
package dockerpre012 import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // DockerImage is for earlier versions of the Docker API (pre-012 to be specific). It is also the // version of metadata that the container image registry use...
// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package tftp import ( "bytes" "encoding/json" "fmt" "io" "sync" "testing" ) var validPacketStrings = []string{ "\x00\x01test\x00mail\x00", "\x00\x02test\x00netascii\x00", "\x00\x02test\x00octet\x00blksize\x001024\x00tsize\x000\x00timeout\x0010\x00multicast\x00\x00windowsize\x0016\x00", "\x00\x03\xbb\xaadata...
// SPDX-FileCopyrightText: 2020 <NAME> Erlangen-Nürnberg (FAU) // // SPDX-License-Identifier: Apache-2.0 package model import ( "fmt" "github.com/jinzhu/gorm" _ "github.com/lib/pq" ) // Product represents a software product and its main properties. // It is the root element in the product architecture model. type...
package cli import ( "encoding/json" "fmt" "os" "sort" "strings" "github.com/bitrise-io/bitrise/output" "github.com/bitrise-io/go-utils/colorstring" "github.com/bitrise-io/go-utils/log" "github.com/urfave/cli" ) var workflowListCommand = cli.Command{ Name: "workflows", Usage: "List of available workflows...
package datakitchensink_test import ( "bytes" "context" "encoding/hex" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.skia.org/infra/go/paramtools" "go.skia.org/infra/go/testutils/unittest" "go.skia.org/infra/golden/go/sql" dks "go.skia.org/infra/golden/go/sql/data...
package exp import ( "fmt" "gopkg.in/sensorbee/sensorbee.v0/bql/execution" "gopkg.in/sensorbee/sensorbee.v0/bql/parser" "gopkg.in/sensorbee/sensorbee.v0/bql/udf" "gopkg.in/sensorbee/sensorbee.v0/core" "gopkg.in/sensorbee/sensorbee.v0/data" "sort" ) // Statement is a wrapper of BQL statement structs. type State...
package logger import ( "fmt" "io" "io/ioutil" "os" "runtime" "strings" "github.com/pkg/errors" "github.com/rs/zerolog" ) // Logger holds the zerolog logger and metadata. type Logger struct { zl zerolog.Logger id string err error data Data root Data } // Data is a type alias so that it's much more...
// 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 package cgroups import ( "testing" ...
package rosbag import ( "bytes" "io/ioutil" "path/filepath" "strings" "text/template" "github.com/starship-technologies/gobag/msgpiler" "go.uber.org/zap" ) var ( depth = 2 typemap = map[string]string{ "bool": "boolean", "byte": "smallint", "char": "smallint", "int8": "tinyint", "uint...
/* Copyright 2019 The Tekton 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, softw...
package ldvalue import ( "encoding/json" "fmt" "testing" "gopkg.in/launchdarkly/go-sdk-common.v2/jsonstream" "github.com/stretchr/testify/assert" ) func TestEmptyOptionalBool(t *testing.T) { o := OptionalBool{} assert.False(t, o.IsDefined()) assert.False(t, o.BoolValue()) b, ok := o.Get() assert.False(t,...
package identity import ( "context" "fmt" "log" "net/http" "strings" "time" "github.com/aws/aws-sdk-go/aws/arn" "github.com/databrickslabs/terraform-provider-databricks/common" "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/...
package golinters import ( "strings" "unicode" "golang.org/x/tools/go/analysis" "honnef.co/go/tools/analysis/lint" scconfig "honnef.co/go/tools/config" "github.com/golangci/golangci-lint/pkg/config" "github.com/golangci/golangci-lint/pkg/logutils" ) var debugf = logutils.Debug("megacheck") func getGoVersion...
package catfile import ( "bufio" "bytes" "context" "fmt" "io" "io/ioutil" "strconv" "strings" "gitlab.com/gitlab-org/gitaly/v14/internal/git" "gitlab.com/gitlab-org/gitaly/v14/internal/git/repository" "gitlab.com/gitlab-org/gitaly/v14/internal/git/trailerparser" "gitlab.com/gitlab-org/gitaly/v14/internal/...
package bucket import ( "math" "sync" ) const WindowSize = 1024 const EmptyValue = math.MaxFloat64 type mapFunc func(idx int, b Interface, prev float64) float64 type Window struct { sync.RWMutex head int size int buckets []Interface cumSum float64 last float64 } type Averages struct { EWMA1, EWMA...
package skim import ( "bytes" "errors" "io" ) // ErrLineTooLong means there was a line encountered that exceeded max_line_size // for the space. var ErrLineTooLong = errors.New("line too long") type Stats struct { Bytes int `json:"bytes_read"` Lines int `json:"lines_read"` BlankLines int `json:"bl...
package ghp import ( "bufio" "fmt" "html/template" "os" "os/exec" "path/filepath" "time" "github.com/Code-Hex/ghp/internal/license" "github.com/Code-Hex/ghp/internal/ui" homedir "github.com/mitchellh/go-homedir" "github.com/pkg/errors" "github.com/tcnksm/go-gitconfig" ) const github = "github.com" // GH...
package dice import ( "context" "fmt" "regexp" "strconv" "strings" ) // Regexes for parsing basic dice notation strings. var ( // DiceNotationPattern is the base XdY notation pattern for matching dice // strings. DiceNotationPattern = `(?P<count>\d+)?d(?P<size>\d{1,}|f|F)` // DiceNotationRegex is the compil...