text
stringlengths
3.08k
10.4k
package event import ( "context" "fmt" "time" "github.com/fatih/structs" "github.com/go-gorp/gorp" "github.com/ovh/cds/engine/api/cache" "github.com/ovh/cds/engine/api/notification" "github.com/ovh/cds/sdk" "github.com/ovh/cds/sdk/log" ) func publishRunWorkflow(ctx context.Context, payload interface{}, key...
/* * umoci: Umoci Modifies Open Containers' Images * Copyright (C) 2017 SUSE 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 * ...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package builtin import ( "testing" "github.com/hyperledger/fabric-protos-go/common" commonerrors "github.com/jxu86/fabric-gm/common/errors" "github.com/jxu86/fabric-gm/core/committer/txvalidator/plugin" . "github.com/jxu86/fabri...
// Copyright 2018 ETH Zurich, Anapaya Systems // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
package db_test import ( "context" "database/sql" "fmt" "github.com/caiguanhao/furk/db" "github.com/caiguanhao/furk/db/gopg" "github.com/caiguanhao/furk/db/pgx" "github.com/caiguanhao/furk/db/pq" "github.com/caiguanhao/furk/db/standard" "github.com/caiguanhao/furk/logger" _ "github.com/lib/pq" ) type ( P...
package gcp import ( "fmt" "strings" "github.com/pkg/errors" compute "google.golang.org/api/compute/v1" "google.golang.org/api/googleapi" ) // getInstanceNameAndZone extracts an instance and zone name from an instance URL in the form: // https://www.googleapis.com/compute/v1/projects/project-id/zones/us-centra...
// Copyright © 2021 Alibaba Group Holding 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law...
// Copyright ©2017 The Gonum 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 path_test import ( "fmt" "math" "github.com/neoyagami/gonum/graph" "github.com/neoyagami/gonum/graph/path" "github.com/neoyagami/gonum/graph/...
/* Copyright 2020 The Crossplane 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 Project Harbor 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 integration import ( "testing" "github.com/pemaxim/go-octopusdeploy/octopusdeploy" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func AssertEqualRunbooks(t *testing.T, expected *octopusdeploy.Runbook, actual *octopusdeploy.Runbook) { // equality cannot be determined throug...
package rabbit 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 ( rubyBirthday = nook.Birthday{ Day: 25, Month...
package release import ( "os" "path" "github.com/cloudfoundry-incubator/candiedyaml" bosherr "github.com/cloudfoundry/bosh-agent/errors" boshsys "github.com/cloudfoundry/bosh-agent/system" boshcmd "github.com/cloudfoundry/bosh-agent/platform/commands" bmerr "github.com/cloudfoundry/bosh-micro-cli/release/erro...
// Package lightsail implements a DNS provider for solving the DNS-01 challenge using AWS Lightsail DNS. package lightsail import ( "errors" "fmt" "math/rand" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/se...
package cali import ( "fmt" "os" "runtime" "strings" log "github.com/Sirupsen/logrus" "github.com/edupo/cali/docker" "github.com/spf13/cobra" "github.com/spf13/viper" ) const ( exitCodeRuntimeError = 1 exitCodeAPIError = 2 defaultDockerRegistry = "docker.io" workDir = "/tmp/workspace"...
package entities import ( "sort" "strings" "time" "github.com/containers/common/libnetwork/types" "github.com/containers/podman/v3/pkg/ps/define" "github.com/pkg/errors" ) // ListContainer describes a container suitable for listing type ListContainer struct { // AutoRemove AutoRemove bool // Container comma...
package log import ( "encoding/json" "fmt" "os" "runtime" "strings" "time" "github.com/sirupsen/logrus" "github.com/x-cray/logrus-prefixed-formatter" "golang.org/x/crypto/ssh/terminal" ) const ( // DebugLevel stands for debug logging level. DebugLevel = "debug" // InfoLevel stands for info logging level ...
// Package brokertest provides utilities for testing components requiring a live Gazette broker. package brokertest import ( "context" "time" "github.com/LiveRamp/gazette/v2/pkg/allocator" "github.com/LiveRamp/gazette/v2/pkg/broker" "github.com/LiveRamp/gazette/v2/pkg/broker/teststub" pb "github.com/LiveRamp/ga...
package redirect import ( "bytes" "crypto/tls" "io/ioutil" "net/http" "net/http/httptest" "strings" "testing" "github.com/mholt/caddy/middleware" ) func TestRedirect(t *testing.T) { for i, test := range []struct { from string expectedLocation string expectedCode int }{ {"http://loca...
package binary import ( "context" "crypto/sha256" "encoding/base64" "fmt" "io/ioutil" "strings" "github.com/gopasspw/gopass/pkg/action" "github.com/gopasspw/gopass/pkg/fsutil" "github.com/gopasspw/gopass/pkg/store/secret" "github.com/gopasspw/gopass/pkg/store/sub" "github.com/pkg/errors" "github.com/urfa...
package steps import ( "fmt" "github.com/cayleygraph/quad" "github.com/cayleygraph/quad/jsonld" "github.com/cayleygraph/quad/voc" "github.com/cayleygraph/quad/voc/rdf" "github.com/cayleygraph/quad/voc/rdfs" "github.com/epik-protocol/epik-gateway-backend/graph" "github.com/epik-protocol/epik-gateway-backend/qu...
// Copyright 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 in wri...
// Copyright 2020 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 parser import ( "fmt" "strings" "github.com/pingcap/ticat/pkg/cli/core" ) type CmdParser struct { envParser *EnvParser cmdSep string cmdAlterSeps string cmdSpaces string cmdRootNodeName string } func NewCmdParser( envParser *EnvParser, cmdSep string, cmdAlterSeps string, ...
package enmime_test import ( "fmt" "net/smtp" "os" "strings" "github.com/jrse/enmime" ) // ExampleBuilder illustrates how to build and send a MIME encoded message. func ExampleBuilder() { smtpHost := "smtp.relay.host:25" smtpAuth := smtp.PlainAuth("", "user", "pw", "host") // MailBuilder is (mostly) immutab...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package cclifecycle import ( "sync" "github.com/hyperledger/fabric/common/chaincode" "github.com/hyperledger/fabric/common/flogging" "github.com/pkg/errors" ) // Logger is the logging instance for this package. // It's exported ...
// Copyright © 2022 Meroxa, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
package otto import ( "errors" "fmt" "github.com/rickyrich/otto/file" ) type _exception struct { value interface{} } func newException(value interface{}) *_exception { return &_exception{ value: value, } } func (self *_exception) eject() interface{} { value := self.value self.value = nil // Prevent Go fr...
package main import ( "context" "encoding/json" "sort" "strings" "github.com/govim/govim" "github.com/govim/govim/cmd/govim/config" "github.com/govim/govim/cmd/govim/internal/golang_org_x_tools/lsp/protocol" ) // This file contains config that would otherwise be in the // github.com/govim/govim/cmd/govim/conf...
package main import ( "flag" "fmt" "net/http" "os" "os/signal" "syscall" _ "gitlab.com/yakshaving.art/git-pull-mirror/metrics" _ "net/http/pprof" "github.com/onrik/logrus/filename" "github.com/sirupsen/logrus" "gitlab.com/yakshaving.art/git-pull-mirror/config" "gitlab.com/yakshaving.art/git-pull-mirror/...
/* Copyright (c) 2019 the Octant contributors. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package component import ( "encoding/json" "io/ioutil" "path" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func Test_ResourceViewer_Marshal(t *testing.T) { case...
// Copyright 2012 The LevelDB-Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package leveldb import ( "bytes" "code.google.com/p/leveldb-go/leveldb/db" ) // internalKey is a key used for the in-memory and on-disk partial DBs...
package monitors import ( "sync" "time" "github.com/sirupsen/logrus" ) const DefaultInterval = time.Second * 60 const DefaultTimeout = time.Second const HistorySize = 10 type MonitorStatus string const ( MonitorStatusUp = "up" MonitorStatusDown = "down" MonitorStatusNotSaturated = "unsatura...
// Copyright 2019-2020 Intel Corporation. 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 b...
/* Copyright The containerd 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...
package cluster import ( "cke/log" "cke/storage" "errors" "reflect" "strings" "sync" ) //MesosTask Cluster Manager和scheduler之间协作使用的 type MesosTask struct { ClusterName string Info *TaskInfo } /* * 根据集群名称创建ClusterInterface,其实现在各具体集群package中 */ var ( ClusterCreators = make(map[string]func(string, Sche...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package s3 import ( "context" "fmt" "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" "github.com/aws/aws-sdk-go-v2/service/s3/internal/arn" ) type PutObjectLoc...
package golang import ( "bytes" "debug/elf" "debug/macho" "debug/pe" "errors" "fmt" "io" "runtime/debug" "strings" "github.com/anchore/syft/internal/log" "github.com/anchore/syft/syft/pkg" "github.com/anchore/syft/syft/pkg/cataloger/golang/internal/xcoff" "github.com/anchore/syft/syft/source" ) const GO...
/* Copyright 2016 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 cpu import ( "context" "errors" "fmt" "os/exec" "regexp" "runtime" "sort" "strconv" "strings" "github.com/shirou/gopsutil/internal/common" ) var ClocksPerSec = float64(128) func init() { getconf, err := exec.LookPath("getconf") if err != nil { return } out, err := invoke.Command(getconf, "CL...
package gotrix import ( "fmt" "io" "net/http" "strings" "sync" "text/template" ) type Page interface { Page(Context) error Template() *template.Template } func NewPageData(w io.Writer, r *http.Request, app App) *PageData { return &PageData{ w: w, r: r, app: app, data: make(map...
package main import ( "context" "flag" "fmt" "io/ioutil" "log" "os" "os/exec" "path/filepath" "runtime" "strings" "syscall" "github.com/distr1/distri/internal/build" "github.com/distr1/distri/internal/env" cmdfuse "github.com/distr1/distri/internal/fuse" "github.com/jacobsa/fuse" "golang.org/x/sys/uni...
/* 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 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 tracingtest provides an OpenTracing implementation for testing purposes. */ package tracingtest import ( "net/http" "time" tracing "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/log" ) // Tracer is an implementation of opentracing.Tracer for testing. It records // the d...
package main import ( "bufio" "encoding/json" "flag" "fmt" "github.com/julienschmidt/httprouter" "io/ioutil" "log" "net/http" "os" "os/exec" "path/filepath" "strconv" "strings" ) var ( config *Config info *log.Logger pdfparse string metadata Metadata = Metadata{ Name: "pdfparse", Ver...
package main import ( "context" "flag" "fmt" "os" "regexp" "runtime/pprof" "strings" "syscall" "time" "github.com/pkg/errors" "github.com/rs/zerolog" "github.com/vektra/mockery/mockery" "golang.org/x/crypto/ssh/terminal" ) const regexMetadataChars = "\\.+*?()|[]{}^$" type Config struct { fName s...
package proxy import ( "github.com/cnlh/nps/lib/cache" "github.com/cnlh/nps/lib/common" "github.com/cnlh/nps/lib/conn" "github.com/cnlh/nps/lib/crypt" "github.com/cnlh/nps/lib/file" "github.com/cnlh/nps/vender/github.com/astaxie/beego" "github.com/cnlh/nps/vender/github.com/astaxie/beego/logs" "github.com/pkg/...
/* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. */ // Magma microservices framework. // The framework helps to create a microservice easily, and provides // the common...
package ova import ( "fmt" "io/ioutil" "strings" "time" "github.com/vorteil/vorteil/pkg/vcfg" "github.com/vorteil/vorteil/pkg/vio" ) // GenerateOVF A OVF File to be used in the creation of a OVA image. // This OVF will created with the name {imageName}.ovf and will have // one image configured named {imageName...
package pathing import ( "container/heap" "fmt" ) // Pathing represents a navigation mesh type Pathing struct { nodes map[int8]map[int8]*Node } // NewPathing returns a new pathing system func NewPathing() (p *Pathing) { p = &Pathing{ nodes: make(map[int8]map[int8]*Node), } return } // NodeRead returns a nod...
// Package endpointcreds provides support for retrieving credentials from an // arbitrary HTTP endpoint. // // The credentials endpoint Provider can receive both static and refreshable // credentials that will expire. Credentials are static when an "Expiration" // value is not provided in the endpoint's response. // //...
package main import ( "flag" "net" "github.com/jinzhu/gorm" "github.com/sirupsen/logrus" "fmt" "net/http" "time" "database/sql" "github.com/infobloxopen/atlas-app-toolkit/gateway" "github.com/infobloxopen/atlas-app-toolkit/gorm/resource" "github.com/infobloxopen/atlas-app-toolkit/health" "github.com/in...
package godns import ( "bytes" "errors" "html/template" "io/ioutil" "log" "net" "net/http" "strings" "golang.org/x/net/proxy" "gopkg.in/gomail.v2" ) var ( // Logo for GoDNS Logo = ` ██████╗ ██████╗ ██████╗ ███╗ ██╗███████╗ ██╔════╝ ██╔═══██╗██╔══██╗████╗ ██║██╔════╝ ██║ ███╗██║ ██║██║ ██║██╔██╗...
package filtergeoip2 import ( "context" "net" lru "github.com/hashicorp/golang-lru" geoip2 "github.com/oschwald/geoip2-golang" "github.com/tsaikd/gogstash/config" "github.com/tsaikd/gogstash/config/goglog" "github.com/tsaikd/gogstash/config/logevent" ) // ModuleName is the name used in config file const Modul...
package scanner import ( "sync" "time" . "util" ) type NetNeighbor struct { LocalIP string LocalPort []string RemoteIP string RemotePort []string } type NetNeighborScanner struct { NetNodes []*NetNode NetChassisIdChan chan [2]string NetChassisId SafeMap UnValidNeighborChan chan ...
package consumer import ( "bufio" "fmt" "os" "os/exec" "path/filepath" "strconv" "sync/atomic" "syscall" "github.com/couchbase/eventing/logging" "github.com/couchbase/eventing/util" "github.com/couchbase/goutils/systemeventlog" ) func newClient(consumer *Consumer, appName, tcpPort, feedbackTCPPort, worker...
// Copyright 2017 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...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package directconnect import ( "context" "time" "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/directconnect-2012-10-25/CreateInterconnectRequest ...
package asm import ( "errors" "fmt" "strconv" "strings" "github.com/aleferri/casmvm/pkg/opcodes" "github.com/aleferri/casmvm/pkg/operators" ) //MakeAssert create either a SigWarn or a SigErr type MakeAssert func(msg string, ref uint16) opcodes.Opcode //ParseAssertOpcode parse a SigWarn or a SigErr func ParseA...
package rure_bench_rust import ( "bufio" "fmt" "io/ioutil" "os" "testing" "github.com/BurntSushi/rure-go" ) func BenchmarkSherlock(b *testing.B) { bench(b, `Sherlock`, 97) } func BenchmarkHolmes(b *testing.B) { bench(b, `Holmes`, 461) } func BenchmarkSherlockHolmes(b *testing.B) { bench(b, `<NAME>`, 91) }...
package pe // ImageDebugDirectory is a debugging information data directory. type ImageDebugDirectory struct { // Reserved. Characteristics uint32 // The time and date the debugging information was created. TimeDateStamp uint32 // The major version number of the debugging information format. MajorVersion uint16 ...
// // DISCLAIMER // // Copyright 2018 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...
// This is a simple access control system package main import ( "fmt" . "github.com/pspaces/gospace" ) func main() { // Space with the data to be protected space := NewSpace("tcp://localhost:31415/space") space.Put("inbox", "Alice", "Bob", "Hello") space.Put("board", "Alice", "Charlie", "Hello") // Space w...
package filter import ( "fmt" "strings" "gorm.io/gorm" "goyave.dev/goyave/v4" "goyave.dev/goyave/v4/database" "goyave.dev/goyave/v4/util/sliceutil" ) // Settings settings to disable certain features and/or blacklist fields // and relations. type Settings struct { // FieldsSearch allows search for these fields...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: cluster.proto package protos import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a ...
package openstack import ( "fmt" "io/ioutil" "os" "path/filepath" "runtime" "testing" "github.com/opentelekomcloud/gophertelekomcloud/acceptance/tools" th "github.com/opentelekomcloud/gophertelekomcloud/testhelper" ) var ( backupSuffix = ".backup" tmpl = []byte(` clouds: useless_cloud: auth: ...
// // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. // package pci import ( "encoding/json" "fmt" "regexp" "strings" "github.com/jaypipes/pcidb" "github.com/jaypipes/ghw/pkg/context" "github.com/jaypipes/ghw/pkg/marsh...
package vocx_test import ( "fmt" "testing" "github.com/martinrue/vocx" ) func TestTranscribeWithDefaultRules(t *testing.T) { tests := []struct { Input string Expected string }{ {"Saluton", "saluton"}, {"Saluton.", "saluton."}, {"Saluton, kiel vi fartas?", "saluton, kijel wij fartas?"}, {"La oka n...
package random import ( "crypto/rand" "errors" "strings" "sync" "time" ) const ( ModeALL = iota // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ ModeNoLower // ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_ ModeNoUpper // abcdefghijklmnopqrstuvwxyz0123456789-_ M...
package generator import ( "fmt" "io/ioutil" "os" "path/filepath" "strings" "time" "github.com/devspace-cloud/devspace/pkg/util/fsutil" "github.com/devspace-cloud/devspace/pkg/util/git" "github.com/devspace-cloud/devspace/pkg/util/log" "github.com/devspace-cloud/devspace/pkg/util/survey" homedir "github.co...
// // Copyright 2021 The Sigstore 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 ...
// Code generated by mdatagen. DO NOT EDIT. package metadata import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/model/pdata" ) // Type is the component type name. const Type config.Type = "databricksreceiver" // MetricIntf is an interface to generically interact with generated metric. ...
// Copyright 2016 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 muxie import ( "bufio" "errors" "net" "net/http" ) // GetParam returns the path parameter value based on its key, i.e // "/hello/:name", the parameter key is the "name". // For example if a route with pattern of "/hello/:name" is inserted to the `Trie` or handlded by the `Mux` // and the path "/hello/kata...
package verify import ( "bytes" "fmt" "strings" "time" "github.com/jenkins-x/jx/pkg/builds" "github.com/jenkins-x/jx/pkg/cmd/opts/step" "os" "os/exec" "github.com/jenkins-x/jx/pkg/cmd/helper" "github.com/jenkins-x/jx/pkg/kube" "github.com/jenkins-x/jx/pkg/log" "github.com/jenkins-x/jx/pkg/table" "k8s.i...
package main import ( "encoding/json" "flag" "fmt" elasticing "github.com/gomorpheus/morpheus-fling/elasticIng" rabbiting "github.com/gomorpheus/morpheus-fling/rabbitIng" secparse "github.com/gomorpheus/morpheus-fling/secParse" "io/ioutil" "log" "os" "path" "time" encryptText "github.com/gomorpheus/morphe...
// Code generated by the Pulumi SDK Generator DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appmesh import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Resource Type definition for AWS::AppMesh::V...
package kmeaaaaans import ( "fmt" "math" "math/rand" "sort" "gonum.org/v1/gonum/mat" ) type InitAlgorithm int const ( KmeansPlusPlus InitAlgorithm = iota + 1 Random ) func InitAlgorithmFrom(str string) (InitAlgorithm, error) { switch str { case "kmeans++": return KmeansPlusPlus, nil case "random": re...
// Copyright 2021 Zenauth Ltd. // SPDX-License-Identifier: Apache-2.0 package internal import ( "encoding/csv" "errors" "fmt" "strings" "time" "github.com/spf13/pflag" "google.golang.org/protobuf/types/known/timestamppb" requestv1 "github.com/cerbos/cerbos/api/genpb/cerbos/request/v1" "github.com/cerbos/ce...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package kms 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/kms-2014-11-01/ConnectCustomKeyStoreRequest type ConnectCustomKeyStor...
package rpcx import ( "fmt" "strings" pb "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" "github.com/gogo/protobuf/protoc-gen-gogo/generator" ) const ( rpcxServerPkgPath = "github.com/smallnest/rpcx/server" rpcxClientPkgPath = "github.com/smallnest/rpcx/client" rpcxProtocolPkgPath = "github.com/smal...
package main // Module command contains all of the business logic associated // with the Popple bot and its behaviors. // // The routing information for what text commands are wired to // which function are currently represented in the command // dispatch table in job.go import ( "fmt" "log" "strconv" "strings" ...
package config import ( "bytes" "fmt" "os" "path" "strings" "time" "github.com/fsnotify/fsnotify" "github.com/spf13/viper" _ "github.com/spf13/viper/remote" ) var ( // 配置文件的系统环境变量名,例如:MY_CONFIG_FILE,优先级 小于 configFile envFileKey string // 配置名称, 默认是 config ,结合 configType...
package pkg import ( utils "github.com/aklinker1/a1/pkg/utils" graphql "github.com/graphql-go/graphql" ) // TYPES func getGraphqlTypes(types FinalCustomTypeMap) graphql.TypeMap { output := graphql.TypeMap{} for _, customType := range types { if customType.GraphQLType != nil { output[customType.Name] = cust...
package push //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 discord_test import ( "context" "encoding/json" "net/http" "net/http/httptest" "sync" "testing" "time" "github.com/influxdata/flux" "github.com/influxdata/flux/dependencies/dependenciestest" _ "github.com/influxdata/flux/fluxinit/static" "github.com/influxdata/flux/lang" "github.com/influxdata/flu...
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
package ethereum import ( "context" "errors" "math/big" "sync" "time" "github.com/0xProject/0x-mesh/ethereum/wrappers" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" log "github.com/sirupsen/logrus" ) // The most addr...
package core import ( "bytes" "fmt" ) type GeneralRegs [13]uint32 type RegIndex uint8 type SPRegs [2]uint32 type SPType uint8 const ( MSP SPType = 0 PSP SPType = 1 ) type Apsr struct { N bool // Negative Z bool // Zero C bool // Carry V bool // Overflow Q bool // Saturation GE uint8 // Greater ...
package requestlimit import ( "fmt" "io" "github.com/golang/glog" "k8s.io/kubernetes/pkg/admission" kapi "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/serviceaccount" "github.com/openshift/ori...
package sentry import ( "net/http" "time" "github.com/dghubble/sling" ) // Project represents a Sentry project. // https://github.com/getsentry/sentry/blob/9.0.0/src/sentry/api/serializers/models/project.py type Project struct { ID string `json:"id"` Slug string `json:"slug"` Name string `json:"name"` IsPu...
// *** 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 apimanagement import ( "github.com/pkg/errors" "github.com/kulado/kulado/sdk/go/kulado" ) // Manages an Certificate within an API Manage...
/* Copyright 2021 gRPC 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, software d...
package main import ( "fmt" "io/ioutil" "os" "path/filepath" "strings" ) var cmdExport = &Command{ Run: runExport, Usage: "export [dir]", Short: "Export metadata to a local directory", Long: ` Export metadata to a local directory Examples: force export force export org/schema `, } func runExport(cm...
/* Copyright 2013-Present Couchbase, Inc. Use of this software is governed by the Business Source License included in the file licenses/BSL-Couchbase.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, Version ...
package amqp1 import ( "context" "crypto/tls" "fmt" "sync" "time" "github.com/Azure/go-amqp" "github.com/benthosdev/benthos/v4/internal/bundle" "github.com/benthosdev/benthos/v4/internal/component" "github.com/benthosdev/benthos/v4/internal/component/output" "github.com/benthosdev/benthos/v4/internal/docs"...
// Package secureheader adds some HTTP header fields widely // considered to improve safety of HTTP requests. These fields // are documented as follows: // // Strict Transport Security: https://tools.ietf.org/html/rfc6797 // Frame Options: https://tools.ietf.org/html/draft-ietf-websec-x-frame-options-00...
package schemahcl import ( "fmt" "log" "testing" "ariga.io/atlas/schema/schemaspec" "github.com/stretchr/testify/require" ) func TestAttributes(t *testing.T) { f := `i = 1 b = true s = "hello, world" sl = ["hello", "world"] bl = [true, false] ` var test struct { Int int `spec:"i"` Bool ...
package docker_control import "fmt" import "strings" //import "os" //import "os/exec" //import "log" import "github.com/polydawn/gosh" /* Gosh(args ...interface{}) Command { return enclose(bake(Opts{ Launcher: ExecLauncher, Env: getOsEnv(), In: os.Stdin, Out: os.Stdout, Err: ...