text
stringlengths
3.08k
10.4k
package twostack import ( mapset "github.com/deckarep/golang-set" "github.com/google/uuid" "github.com/lrita/cmap" ) const ( Bool_t = 0 Int_t = 1 Float_t = 2 String_t = 3 Duration_t = 4 Call_t = 5 None_t = 99 ) const ( GT = 10 GTE = 11 LS = 20 LSE = 21 EQ = 0 NEQ = 1 IDK = 9...
// 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-2019 Datadog, Inc. // +build docker package collectors import ( "testing" "time" "github....
package adb import ( "log" "math/rand" "runtime" "strings" "sync/atomic" "time" "github.com/mgb/goadb/internal/errors" "github.com/mgb/goadb/wire" ) /* DeviceWatcher publishes device status change events. If the server dies while listening for events, it restarts the server. */ type DeviceWatcher struct { *...
package service import ( "fmt" "os" "strconv" "time" "github.com/astaxie/beego/orm" "github.com/xipfs/ipfsadmin/app/entity" ) type taskService struct{} func (this *taskService) table() string { return tableName("task") } // 删除某个资源下的而所有发布任务 func (this *taskService) DeleteByResourceId(resourceId int) error { ...
package models import ( "bytes" "encoding/hex" "fmt" "github.com/pkg/errors" "io/ioutil" "os" "os/exec" "regexp" "strings" "sync" ) var demangleRe = regexp.MustCompile(`^[^(]+`) var demangleCache = make(map[string]string) var demangleLock sync.RWMutex func demangleMiss(name string) string { if strings.Has...
package main import ( "crypto/tls" "crypto/x509" "encoding/json" "fmt" "io/ioutil" "os" "os/signal" "strings" "sync" "sync/atomic" "syscall" "time" "github.com/Shopify/sarama" "github.com/rcrowley/go-metrics" log "github.com/sirupsen/logrus" ) func NewTLSConfig(clientCertFile, clientKeyFile, caCertFil...
/* * Tencent is pleased to support the open source community by making Blueking Container Service available. * Copyright (C) 2019 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 obta...
/* Copyright 2019 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, soft...
/* 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 2019-2022 The Liqo 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 nodb import ( "encoding/binary" "errors" "time" "github.com/lunny/nodb/store" ) var ( errExpMetaKey = errors.New("invalid expire meta key") errExpTimeKey = errors.New("invalid expire time key") ) type retireCallback func(*batch, []byte) int64 type elimination struct { db *DB exp2Tx []*b...
// Copyright 2021-present Open Networking Foundation. // // 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 controller import ( "fmt" "time" "github.com/awslabs/k8s-cloudwatch-adapter/pkg/apis/metrics/v1alpha1" informers "github.com/awslabs/k8s-cloudwatch-adapter/pkg/client/informers/externalversions/metrics/v1alpha1" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-g...
// +build f746xx // Peripheral: LPTIM_Periph LPTIMIMER. // Instances: // LPTIM1 mmap.LPTIM1_BASE // Registers: // 0x00 32 ISR Interrupt and Status register. // 0x04 32 ICR Interrupt Clear register. // 0x08 32 IER Interrupt Enable register. // 0x0C 32 CFGR Configuration register. // 0x10 32 CR Control...
// // Copyright 2021 IBM 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
package v1 import ( "bufio" "context" "fmt" "io" "io/ioutil" "os" "strings" "github.com/influxdata/flux" "github.com/influxdata/flux/execute" "github.com/influxdata/flux/influxql" "github.com/influxdata/flux/plan" "github.com/influxdata/flux/semantic" "github.com/pkg/errors" ) const FromInfluxJSONKind =...
package backend import ( "log" "strconv" "strings" "time" "github.com/hailwind/influx-proxy/config" "github.com/toolkits/concurrent/semaphore" nlist "github.com/toolkits/container/list" nset "github.com/toolkits/container/set" ) const ( DefaultSendQueueMaxSize = 102400 //10.24w DefaultS...
package main import ( "log" "os" "github.com/urfave/cli" ) var ( version = "unknown" ) func main() { app := cli.NewApp() app.Name = "webhook plugin" app.Usage = "webhook plugin" app.Action = run app.Version = version app.Flags = []cli.Flag{ cli.StringFlag{ Name: "method", Usage: "webhook method...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
// Copyright (c) 2016 <NAME> package datasize import ( "errors" "fmt" "strconv" "strings" ) type ByteSize uint64 const ( B ByteSize = 1 KB = B << 10 MB = KB << 10 GB = MB << 10 TB = GB << 10 PB = TB << 10 EB = PB << 10 fnUnmarshalText string = "Unm...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package redshift import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type RestoreTableFromClusterSnapshotInput struct { _ struct{} `type:"structure"` // The identifier of the Amazon Redshif...
package prometheus import ( "context" "fmt" "net/http" "time" "github.com/prometheus/client_golang/api" prom_v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/common/model" "github.com/kiali/kiali/config" "github.com/kiali/kiali/kubernetes" "github.com/kiali/kiali/log" "git...
package aliacr import ( "fmt" "io" "io/ioutil" "net/http" "net/http/httptest" "testing" "time" "github.com/goharbor/harbor/src/common/utils/test" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/...
package sparse_test import ( "fmt" "math" "github.com/dpgarrick/sparse" "gonum.org/v1/gonum/mat" ) func Example() { // Construct a new 3x2 DOK (Dictionary Of Keys) matrix dokMatrix := sparse.NewDOK(3, 2) // Populate it with some non-zero values dokMatrix.Set(0, 0, 5) dokMatrix.Set(2, 1, 7) // Demonstrate...
// Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package models import ( "strconv" "strings" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting"...
package egoscale // InstancePoolState represents the state of an Instance Pool. type InstancePoolState string const ( // InstancePoolCreating creating state. InstancePoolCreating InstancePoolState = "creating" // InstancePoolRunning running state. InstancePoolRunning InstancePoolState = "running" // InstancePool...
package nuke import ( "fmt" "regexp" "strings" "sync" "time" "github.com/go-irc/irc" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "github.com/Luzifer/go_helpers/v2/str" "github.com/Luzifer/twitch-bot/plugins" "github.com/Luzifer/twitch-bot/twitch" ) const ( actorName = "nuke" store...
/* Copyright 2018 The Rook Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to ...
package collector import ( "sync" "github.com/globalsign/mgo" "github.com/globalsign/mgo/bson" "github.com/golang/glog" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/pkg/labels" ) var ( // Map to keep track of what members we have seen. With this we can remove // metrics...
package types import ( "fmt" "github.com/lyraproj/issue/issue" "github.com/lyraproj/puppet-evaluator/eval" "github.com/lyraproj/puppet-evaluator/hash" ) const KEY_GONAME = `go_name` var TYPE_ATTRIBUTE_KIND = NewEnumType([]string{string(CONSTANT), string(DERIVED), string(GIVEN_OR_DERIVED), string(REFERENCE)}, fal...
/* (c) Copyright 2017 Hewlett Packard Enterprise Development LP 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 agre...
/* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
/* Package cgminerapi provides a client for using the cgminer API. Construct a new cgminer client, then use the various services on the client to access different parts of the cgminer RPC API. For example: client := cgminerapi.NewCgminerAPI("localhost", "4028") command := cgminerapi.APICommand{Method: "summary"} ...
package nginx_upstream_check import ( "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "strconv" "time" "github.com/influxdata/telegraf" "github.com/bfg-finsa/telegraf/internal" "github.com/bfg-finsa/telegraf/internal/tls" "github.com/bfg-finsa/telegraf/plugins/inputs" ) const sampleConfig = `...
// 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. package api import ( "errors" "net" "sync/atomic" "time" "github.c...
package orchestrator import ( "sort" "time" "github.com/docker/go-events" "github.com/docker/swarmkit/api" "github.com/docker/swarmkit/manager/state" "github.com/docker/swarmkit/manager/state/store" ) const ( // maxDirty is the size threshold for running a task pruning operation. maxDirty = 1000 // reaperBa...
package agent // build +linux import ( "context" "fmt" "log" "net" "strconv" "strings" "time" emp3r0r_data "github.com/jm33-m0/emp3r0r/core/lib/data" "github.com/jm33-m0/emp3r0r/core/lib/tun" "github.com/jm33-m0/emp3r0r/core/lib/util" ) // ReverseConns record ssh reverse proxy sessions var ReverseConns = ...
// MIT License // Copyright (c) 2018 <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...
package iproute2 import ( "encoding/binary" "errors" "reflect" "unsafe" "golang.org/x/sys/unix" ) // size of some structures. const ( SizeofInetDiagReq = int(unsafe.Sizeof(InetDiagReq{})) SizeofInetDiagMsg = int(unsafe.Sizeof(InetDiagMsg{})) SizeofIfInfoMsg = unix.SizeofIfInfomsg SizeofIfAddrMsg = u...
package tags import ( "net/url" "reflect" "strconv" "strings" "github.com/fatih/structs" "github.com/pkg/errors" ) // Paginator describes a pagination meta data type Paginator struct { // Current page you're on Page int `json:"page"` // Number of results you want per page PerPage int `json:"per_page"` // ...
package libvirt import ( "errors" "fmt" "log" "strings" "time" "github.com/davecgh/go-spew/spew" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" libvirt "github.com/libvirt/libvirt-go" "github.com/libvirt/libvirt-go-xml" ) // deprecated, now defaults to not u...
// Copyright 2013 Martini Authors // Copyright 2014 Unknwon // // 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 a...
/* * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package server import ( "flag" "os" "path" "strings" "time" "github.com/pkg/errors"...
package cluster import ( "context" "encoding/json" "fmt" "io" "os" "path/filepath" "runtime" "time" "github.com/mitchellh/go-homedir" "github.com/pkg/errors" "github.com/tilt-dev/ctlptl/pkg/api" "k8s.io/apimachinery/pkg/util/duration" "k8s.io/apimachinery/pkg/util/wait" klog "k8s.io/klog/v2" ) type Mac...
package lib import ( "fmt" "image" "image/jpeg" "image/png" "net/url" "os" "path" "strings" "github.com/andersfylling/disgord" "github.com/cavaliercoder/grab" "github.com/chai2010/webp" "github.com/fogleman/gg" "github.com/gocolly/colly" "github.com/pazuzu156/atlas" "github.com/pazuzu156/lastfm-go" ) ...
// Copyright 2017 The go-hep 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 job // import "go-hep.org/x/hep/fwk/job" import ( "go-hep.org/x/hep/fwk" ) // C describes the configuration data of a fwk.Component type C struct...
package cloudstore import ( "encoding/json" "errors" "fmt" "io/ioutil" "os" etcd "github.com/coreos/etcd/client" log "github.com/sirupsen/logrus" "golang.org/x/net/context" ) // Endpoint_DEPRECATED is the old-style partner-endpoint, to be replaced // by the Endpoint interface. type Endpoint_DEPRECATED struct...
// +build !js package webrtc import ( "sync" "sync/atomic" "testing" "time" "github.com/pion/interceptor" "github.com/pion/rtcp" "github.com/pion/rtp" "github.com/pion/transport/test" "github.com/pion/webrtc/v3/pkg/media" "github.com/stretchr/testify/assert" ) type testInterceptor struct { t *t...
package main import ( "io" "github.com/tehmoon/errors" ) const ( ReaderMaxPowerSize uint = 24 ReaderMinPowerSize uint = 8 ) func ReadBytesSendMessages(r io.Reader, c chan []byte) (error) { return ReadBytesStep(r, func(payload []byte) (bool) { c <- payload return true }) } // Allocate a buffer and read fr...
package influxql import ( "fmt" "strings" "time" "github.com/influxdata/flux/ast" "github.com/influxdata/flux/execute" "github.com/influxdata/influxql" ) // mapCursor holds the mapping of expressions to specific fields that happens at the end of // the transpilation. // TODO(jsternberg): This abstraction might...
package main import ( log "github.com/cihub/seelog" "bytes" "crypto/rand" "encoding/base64" "io/ioutil" "mime/multipart" "regexp" "strings" "git.gitorious.org/go-pkg/epubgo.git" "git.gitorious.org/trantor/trantor.git/database" "git.gitorious.org/trantor/trantor.git/storage" ) func InitUpload(database *da...
package engine import ( "crypto/rand" "encoding/hex" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "strings" "time" "orbit.sh/engine/docker" ) // Deployment is a store instance of a deployment created from an image or // repository. It could also be referred to as an "App" (and in some cases // througho...
// Copyright 2021 xgfone // // 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 events import ( "encoding/json" "os" "os/signal" "runtime/debug" log "github.com/Sirupsen/logrus" "github.com/nats-io/go-nats-streaming" "github.com/spf13/viper" "github.com/Bnei-Baruch/archive-backend/common" "github.com/Bnei-Baruch/archive-backend/es" "github.com/Bnei-Baruch/archive-backend/utils...
// // (C) Copyright 2021 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // package sysfs import ( "context" "io" "io/ioutil" "os" "path/filepath" "strconv" "strings" "github.com/pkg/errors" "github.com/daos-stack/daos/src/control/common" "github.com/daos-stack/daos/src/control/lib/h...
// Copyright (c) 2020, Conf-Group. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package cluster import ( "context" "errors" "fmt" "net/http" "time" "github.com/Conf-Group/pole/notify" "github.com/Conf-Group/pole/server/sys" "gith...
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V. // // 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...
/* Modifications Copyright 2018 Mailgun Technologies 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...
// Simplest possible Apple II that will possibly boot. ~ (tilde) to quit. package main import ( "flag" "fmt" "io/ioutil" "os" "strings" "github.com/nsf/termbox-go" "github.com/zellyn/goapple2" "github.com/zellyn/goapple2/util" "github.com/zellyn/goapple2/videoscan" ) // Mapping of screen bytes to character ...
package integration_test import ( "context" "fmt" "os" "strconv" "time" . "github.com/ansd/lastpass-go" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" ) var _ = Describe("Integration", func() { It("creates, reads, updates, deletes account", func() { testStart := ...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package ec2 import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Provides an Elastic network interface (ENI) resource....
package internal import ( "fmt" "go/ast" "go/parser" "go/token" "regexp" "strings" graphqlAst "github.com/graphql-go/graphql/language/ast" graphqlParser "github.com/graphql-go/graphql/language/parser" graphqlSource "github.com/graphql-go/graphql/language/source" ) var directiveFormat = regexp.MustCompile("^...
// Copyright 2015 The appc 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 t...
/* Copyright 2021 <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 distribu...
package component import ( "encoding/json" "fmt" "os" "path/filepath" "text/tabwriter" "github.com/golang/glog" "github.com/openshift/odo/pkg/application" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/openshift/odo/pkg/component" "github.com/openshift/odo/pkg/log" appCmd "github.com/opensh...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package appengine import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Allows creation and management of an App Engine...
package backup_restore import ( "fmt" "time" "github.com/influxdata/influx-cli/v2/api" ) type FileCompression int const ( NoCompression FileCompression = iota GzipCompression ) func (c *FileCompression) Set(v string) error { switch v { case "none": *c = NoCompression case "gzip": *c = GzipCompression ...
// Package orderedmap is a Go implementation of Python's OrderedDict class, a map // that preserves the order of insertion, so key:value pairs can be iterated in // the order they where added. // It can also be used as a stack (LIFO) or queue (FIFO). package orderedmap import "fmt" // OrderedMap class type OrderedMap...
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package core import ( "fmt" "sort" "strings" "unicode" ) func NewState() State { return State{ UID: 0, Roots: map[string]string{}, Imports: []string{"fmt"}, Definitions: map[string]Definition{}, } } type Definition struct { Resources []Resource Result string Body string } ...
/* Version 1 */ package main import ( "fmt" "math" "time" ) // Vector // --- type Vector struct { x, y, z float64 } func (a Vector) Add(b Vector) Vector { return Vector{a.x + b.x, a.y + b.y, a.z + b.z} } func (a Vector) Sub(b Vector) Vector { return Vector{a.x - b.x, a.y - b.y, a.z - b.z} } func (a Vector)...
package testing import ( "fmt" "net/http" "testing" "gitlab.com/nxcp/tools/gophercloud" "gitlab.com/nxcp/tools/gophercloud/openstack/identity/v3/endpoints" "gitlab.com/nxcp/tools/gophercloud/pagination" th "gitlab.com/nxcp/tools/gophercloud/testhelper" "gitlab.com/nxcp/tools/gophercloud/testhelper/client" ) ...
package fivetran import ( "context" "encoding/json" "fmt" "time" ) // ConnectorModifyService implements the Connector Management, Modify a Connector API. // Ref. https://fivetran.com/docs/rest-api/connectors#modifyaconnector type ConnectorModifyService struct { c *Client connectorID *strin...
/* 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 writing, software distributed under the Li...
package oas3 import ( "bytes" "fmt" "log" "net/http" "net/textproto" "strings" "github.com/getkin/kin-openapi/openapi3" "github.com/gorilla/mux" ) type response struct { http.ResponseWriter buf *bytes.Buffer statusCode int } func (w *response) WriteHeader(statusCode int) { w.statusCode = statusC...
// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use th...
package discovery import "fmt" type AlarmControlPanel struct { // A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with `availability_topic` // Default: <no value> Availability []Availability `json:"availability,omitempty"` // When `availability` is co...
package main import ( crand "crypto/rand" "encoding/binary" "fmt" mrand "math/rand" "os" "testing" "time" ) var prime1000 = 7919 var result int func TestExample01(t *testing.T) { // START EXAMPLE01 OMIT seed := int64(7) a := mrand.New(mrand.NewSource(seed)) b := mrand.New(mrand.NewSource(seed)) primes :...
package apis import ( "fmt" "strconv" "strings" "bytes" log "github.com/Sirupsen/logrus" "github.com/intuit/katlas/service/db" "github.com/intuit/katlas/service/util" ) //QueryParamKeyword ...param for keyword query const QueryParamKeyword = "keyword" //IQueryService ...define interfaces to query data type I...
// Copyright 2017 the gousb Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
// Code generated by go-swagger; DO NOT EDIT. package work_item_types_behaviors // 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...
// Package tests contains supporting code for running tests. package tests import ( "context" "crypto/rand" "crypto/rsa" "fmt" "testing" "time" "github.com/danielmbirochi/go-sample-service/business/auth" "github.com/danielmbirochi/go-sample-service/business/core/user" "github.com/danielmbirochi/go-sample-ser...
// Copyright 2019 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 udp import ( "context" "net" "sync" "time" "github.com/hi117/arikawa/v3/utils/ws" "github.com/pkg/errors" ) // ErrManagerClosed is returned when a Manager that is already closed is dialed, // written to or read from. var ErrManagerClosed = errors.New("UDP connection manager is closed") // ErrDialWhile...
package proxy import ( "github.com/coyove/goflyway/pkg/logg" "bufio" "crypto/ecdsa" "crypto/rand" "crypto/rsa" "crypto/tls" "crypto/x509" "crypto/x509/pkix" "io" "math/big" "net" "net/http" "net/http/httputil" "net/url" "strings" "time" ) type bufioConn struct { m io.Reader net.Conn } func (c *buf...
package components import ( "github.com/b4tman/caldav-go/icalendar/values" "github.com/b4tman/caldav-go/utils" "time" ) type Event struct { // defines the persistent, globally unique identifier for the calendar component. UID string `ical:",required"` // indicates the date/time that the instance of the iCalen...
package cli import ( "github.com/entigolabs/entigo-k8s-gitops/internal/app/gitops/common" "github.com/urfave/cli/v2" "strconv" ) func cliFlags(cmd common.Command) []cli.Flag { var flags []cli.Flag flags = appendBaseFlags(flags) flags = appendCmdSpecificFlags(flags, cmd) return flags } func appendBaseFlags(fla...
package field import ( "errors" "fmt" "github.com/xichen2020/eventdb/document/field" "github.com/xichen2020/eventdb/filter" "github.com/xichen2020/eventdb/index" "github.com/xichen2020/eventdb/values" "github.com/xichen2020/eventdb/x/refcnt" ) // BoolField contains data in documents for which such field are b...
/* Copyright 2016 <NAME> <www.webx.top> 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 reliability import ( "math" "time" "github.com/evergreen-ci/evergreen/model/stats" "github.com/evergreen-ci/utility" "github.com/mongodb/grip" "github.com/mongodb/grip/message" "github.com/pkg/errors" "gonum.org/v1/gonum/stat/distuv" ) const ( MaxQueryLimit = stats.MaxQueryLimit - 1 // 1000 /...
package k8sv1 import ( "sync" "github.com/kubelens/kubelens/api/auth/rbac" "github.com/kubelens/kubelens/api/errs" klog "github.com/kubelens/kubelens/api/log" appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // DaemonSetOptions contains fields used for filter...
package pgx import ( "bytes" "context" "fmt" "io" "github.com/jackc/pgconn" "github.com/jackc/pgio" errors "golang.org/x/xerrors" ) // CopyFromRows returns a CopyFromSource interface over the provided rows slice // making it usable by *Conn.CopyFrom. func CopyFromRows(rows [][]interface{}) CopyFromSource { r...
/* Copyright 2020 The arhat.dev 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 iotago import ( "encoding/binary" "encoding/hex" "encoding/json" "fmt" "github.com/iotaledger/hive.go/serializer" ) const ( // RefUTXOIndexMin is the minimum index of a referenced UTXO. RefUTXOIndexMin = 0 // RefUTXOIndexMax is the maximum index of a referenced UTXO. RefUTXOIndexMax = 126 // UTXOIn...
package user import ( "strings" "sync" "time" "github.com/pkg/errors" "github.com/rancher/norman/httperror" "github.com/rancher/norman/store/transform" "github.com/rancher/norman/types" v3 "github.com/rancher/types/apis/management.cattle.io/v3" client "github.com/rancher/types/client/management/v3" "github....
package grc import ( "reflect" "strconv" "strings" "time" "github.com/appootb/grc/backend" ) const ( ExceedDeepLevel = "grc: only support two level map/array" ) var ( staticType = reflect.TypeOf((*StaticType)(nil)).Elem() dynamicType = reflect.TypeOf((*DynamicType)(nil)).Elem() ) func isSupportedType(t re...
package application import ( "bytes" "context" "fmt" "io" "io/ioutil" "time" "github.com/gin-gonic/gin" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) // Logger for log middleware type Logger interface { Interceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, hand...
package rpm import ( "bytes" "flag" "io/ioutil" "os" "testing" "github.com/goreleaser/nfpm" "github.com/stretchr/testify/assert" ) var update = flag.Bool("update", false, "update .golden files") func exampleInfo() nfpm.Info { return nfpm.WithDefaults(nfpm.Info{ Name: "foo", Arch: "amd64", Depends: []s...
package proposals import ( "fmt" "io" "github.com/spacemeshos/go-spacemesh/codec" "github.com/spacemeshos/go-spacemesh/common/types" "github.com/spacemeshos/go-spacemesh/database" "github.com/spacemeshos/go-spacemesh/sql" ) // Get gets a proposal by a given ID. func Get(db sql.Executor, id types.ProposalID) (p...
package monitis import ( "encoding/json" "fmt" "io/ioutil" "net/http" "strings" ) // See http://www.monitis.com/docs/apiActions.html#editExternalMonitor type EditExternalMonitorOptions struct { // Name of the test Name *string `param:"name"` // Url to test. Must not contain protocol Url *string `param:"url...