text
stringlengths
10
1.05M
package convert import ( "net" "github.com/ghodss/yaml" v1 "github.com/symcn/meshach/api/v1alpha1" types2 "github.com/symcn/meshach/pkg/adapter/types" "github.com/symcn/meshach/pkg/utils" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog" ) // DubboConverter ... type DubboConverter struct { DefaultN...
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package types import ( "bytes" "encoding/json" "errors" "fmt" "io" "time" "github.com/33cn/chain33/common/address" "github.com/33cn/chain33/common/cryp...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package ldap import ( "fmt" "net" "net/url" "regexp" "strconv" "strings" "github.com/Knetic/govaluate" "github.com/cloudflare/cfssl/log" "github.com/VoneChain-CS/fabric-ca-gm/api" "github.com/VoneChain-CS/fabric-ca-gm/lib/s...
package aws import ( "context" "crypto" "crypto/rsa" "crypto/sha256" "encoding/base64" "encoding/json" "fmt" "math" "os" "regexp" "sort" "strings" "sync" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/...
package fatbrain import ( "errors" "strings" "time" "strconv" "sync" "github.com/Sirupsen/logrus" "github.com/wallnutkraken/fatbot/fatai" "github.com/wallnutkraken/fatbot/fatdata" "github.com/wallnutkraken/fatbot/fatplugin" "github.com/wallnutkraken/telegogo" ) const ( MinChainLength = 1 ...
package rpcsupport import ( "log" "net" "net/rpc" ) func ServeRpc(host string, service interface{}) error { rpc.Register(service) listener, err := net.Listen("tcp", host) if err != nil { return err } for { conn, err := listener.Accept() if err != nil { log.Printf("listener.Accept error:%s", err) c...
//此源码被清华学神尹成大魔王专业翻译分析并修改 //尹成QQ77025077 //尹成微信18510341407 //尹成所在QQ群721929980 //尹成邮箱 yinc13@mails.tsinghua.edu.cn //尹成毕业于清华大学,微软区块链领域全球最有价值专家 //https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 //版权所有(c)2013-2016 BTCSuite开发者 //版权所有(c)2013-2016 Dave Collins //此源代码的使用由ISC控制 //可以在许可文件中找到的许可证。 package btcec import ( ...
package monitorModels import ( "baize/app/common/baize/baizeUnix" "baize/app/common/commonModels" "baize/app/utils/excelDictionaries" "github.com/gogf/gf/util/gconv" ) type LogininforDQL struct { Status string `form:"status" db:"status"` UserName string `form:"userName" db:"user_name"` IpAddr string `form:...
package cmd import ( "fmt" "net/http" "strings" "github.com/spf13/cobra" ) var ( getStatusCmd = &cobra.Command{ Use: fmt.Sprintf("%s [%s]", STATUS, strings.ToUpper(SERVICE)), Short: fmt.Sprintf("Retrieve current %s for a %s", STATUS, SERVICE), Long: fmt.Sprintf("Retrieve the current %s of a %s in Maria...
package stmt_test import ( "fmt" "reflect" "testing" "github.com/sqlabble/sqlabble/internal/diff" "github.com/sqlabble/sqlabble/stmt" ) func TestAnd(t *testing.T) { t.Parallel() for i, c := range []struct { stmt stmt.Statement sql string sqlIndent string values []interface{} }{ // 0 ...
// Copyright 2019-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...
/* 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...
package model import ( "encoding/json" "strings" ) // This is a auto update body Object type ModifyInstanceSecurityGroupReq struct { // 安全组ID,默认值为原安全组ID,可根据需要判断是否修改安全组ID SecurityGroupId string `json:"security_group_id"` } func (o ModifyInstanceSecurityGroupReq) String() string { data, err := json.Marshal(o) ...
//+build !test package appy func newDBDropCommand(config *Config, dbManager *DBManager, logger *Logger) *Command { cmd := &Command{ Use: "db:drop", Short: "Drop all databases for the current environment", Run: func(cmd *Command, args []string) { if config.IsProtectedEnv() { logger.Fatal("You are attem...
package commands_test import ( "bytes" "fmt" "io/ioutil" "os" "testing" "github.com/golang/mock/gomock" "github.com/heroku/color" "github.com/sclevine/spec" "github.com/sclevine/spec/report" "github.com/spf13/cobra" "github.com/buildpacks/pack" "github.com/buildpacks/pack/internal/commands" "github.com/...
package edgedevice import ( "context" "reflect" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/project-flotta/flotta-operator/api/v1alpha1" "github.com/project-flotta/flotta-operator/internal/common/indexer" ) //go:generate mockgen -package=edgede...
// Copyright 2021 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...
package kube import ( "os" "strings" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/jenkins-x/jx-kube-client/v3/pkg/kubeclient" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/dynamic" fakedyn "k8s.io/client-go/dynamic/fake" "k8s.io/client-...
package webplus //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 //distr...
package parser_test import ( "encoding/json" "strings" "testing" "github.com/athaa/godoc2puml/parser" ) func TestParsePackage_io(t *testing.T) { testParsePackage(t, "io") } func TestParsePackage_image(t *testing.T) { testParsePackage(t, "image") } func testParsePackage(t *testing.T, name string) { pkg, err ...
package basic import ( "testing" "github.com/stretchr/testify/assert" ) func newInMemoryRepo() *InMemoryRepository { repo := NewInMemoryRepository() repo.Add(&User{ Username: "test1", Password: "test1", }) repo.Add(&User{ Username: "test2", Password: "test2", }) return repo } func TestAdd(t *test...
// Copyright 2018 Terence Tarvis. All rights reserved. package main import ( "go/ast" ) func init() { register("closeCheck", "this tests if things with .Close() method have .Close() actually called on them", closeCheck, funcDecl) } func opensFile(f *File, x ast.Expr) bool { /* if(f.pkg.info.TypeOf(x) == ...
// Package rules contains all of the functions for hashcat rules package rules //TODO add documentation // https://godoc.org/github.com/coolbry95/passutils/ruleprocessor/rules import ( "unicode" ) // reason for var temp []rune and copy(temp, word) // is slices are passed by value but reference their underlying arra...
/* * Copyright (c) 2021 THL A29 Limited, a Tencent company. All rights reserved * * This source code file is licensed under the MIT License, you may obtain a copy of the License at * * http://opensource.org/licenses/MIT * */ package pkg import ( "github.com/Tencent/bk-ci/src/booster/common" "github.com/Tence...
package api import "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" // RoundResults contains information about how a particular round was executed by the consensus // layer. type RoundResults struct { // Messages are the results of executing emitted runtime messages. Messages []*MessageEvent `json:"...
// +build !ignore_autogenerated /* Copyright 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 l...
// Copyright 2016-2020, Pulumi Corporation. All rights reserved. package main import ( "encoding/base64" "github.com/pulumi/pulumi-azure-native/sdk/go/azure/containerservice" "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources" "github.com/pulumi/pulumi-azuread/sdk/v4/go/azuread" "github.com/pulumi/p...
package main import ( "bufio" "fmt" "os" "strings" ) type MetaCommand string const ( Exit MetaCommand = ".exit\n" Help MetaCommand = ".help\n" ) type QueryType int const ( Insert QueryType = iota Select ) type Statement struct { querytype QueryType } func prepareStatement(input string) (statement Statem...
// +build go1.9 // Copyright 2020 Microsoft 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 appl...
// Copyright (c) 2013-2017 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package btcutil_test import ( "bytes" "encoding/hex" "fmt" "reflect" "strings" "testing" "github.com/fichain/filechain/btcutil" "github.com/fichain/filechain/c...
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "go/ast" "strings" ) func init() { register(go1pkgrenameFix) } var go1pkgrenameFix = fix{ "go1rename", "2011-11-08", go1pkgrenam...
// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/stat/stat_linux_arm64.go -pkgname stat', DO NOT EDIT. package stat import ( "math" "...
package svg import ( "crypto/md5" "encoding/hex" _ "errors" "fmt" geojson_svg "github.com/whosonfirst/go-geojson-svg" "github.com/whosonfirst/go-whosonfirst-geojson-v2" "github.com/whosonfirst/go-whosonfirst-geojson-v2/properties/geometry" "github.com/whosonfirst/go-whosonfirst-spr/util" "io" _ "log" "os" ...
// Copyright (c) 2016 The Decred developers // Copyright (c) 2016-2017 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package blockchain_test import ( "bytes" "fmt" "os" "path/filepath" "testing" "github.com/satindergrewal/btcd/blockch...
// Copyright 2017-2019 Lei Ni (nilei81@gmail.com) and other Dragonboat authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // ...
// Code generated by go-swagger; DO NOT EDIT. package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" "github.com/go-openapi/swag" "github.com...
// Copyright 2014 Google Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. // Package file provides helper functions for using Google Cloud Storage. package file import ( "fmt" "github.com/sunnogo/net/context" "github.com/sunnogo/...
// +build example // // Do not build by default. package main import ( "github.com/Krajiyah/gobot/drivers/gpio" "github.com/Krajiyah/gobot/platforms/beaglebone" ) func main() { // Use Gobot to control BeagleBone's digital pins directly beagleboneAdaptor := beaglebone.NewAdaptor() gpioPin := gpio.NewDirectPinDri...
// Code generated by protoc-gen-twirp v8.0.0, DO NOT EDIT. // source: service.proto /* Package google_protobuf_imports is a generated twirp stub package. This code was generated with github.com/twitchtv/twirp/protoc-gen-twirp v8.0.0. It is generated from these files: service.proto */ package google_protobuf_imports ...
package simtest import ( "strings" "testing" . "github.com/FactomProject/factomd/engine" . "github.com/FactomProject/factomd/testHelper" ) func TestFilterAPIOutput(t *testing.T) { state0 := SetupSim("LLLLLAAF", map[string]string{}, 25, 1, 1, t) RunCmd("1") RunCmd("w") RunCmd("s") apiRegex := "EOM.*5.*min...
// Package files contains functions and structs related to files package files import ( "bufio" "fmt" "net/http" "os" "os/exec" "path/filepath" "regexp" "strings" "github.com/editorconfig/editorconfig-core-go/v2" "github.com/editorconfig-checker/editorconfig-checker/pkg/config" "github.com/editorconfig-ch...
// Copyright 2017 syzkaller project authors. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. package main import ( "fmt" "net/http" "os" "strconv" "strings" "testing" "time" "github.com/google/syzkaller/dashboard/dashapi" "github.com/goo...
package mathg import "math" type Vec4 struct { X float64 Y float64 Z float64 W float64 } func (v *Vec3) ToVec4() *Vec4 { return &Vec4{v.X, v.Y, v.Z, 0} } func (v *Vec4) IsZero() bool { return math.Abs(v.X) < epsilon && math.Abs(v.Y) < epsilon && math.Abs(v.Z) < epsilon && math.Abs(v.W) < epsilon } func (v *V...
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
package ginx import ( "context" "fmt" "github.com/gin-gonic/gin" ) var ( GinContextKey = "_GinCtxKey" ) // GinContextToContext stores gin.Context in c.Request.Context func GinContextToHttpContext(c *gin.Context) { ctx := context.WithValue(c.Request.Context(), GinContextKey, c) c.Request = c.Request.WithContext...
// Copyright © 2016 The Things Network // Use of this source code is governed by the MIT license that can be found in the LICENSE file. package collector import ( "testing" "github.com/TheThingsNetwork/ttn/core/types" . "github.com/smartystreets/assertions" ) func createStorage() AppStorage { storage, err := Co...
package cache import ( "github.com/jmhodges/levigo" osm "github.com/omniscale/go-osm" "github.com/nextgis/imposm3/cache/binary" ) type WaysCache struct { cache } func newWaysCache(path string) (*WaysCache, error) { cache := WaysCache{} cache.options = &globalCacheOptions.Ways err := cache.open(path) if err !...
// Copyright 2018 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...
// Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license...
// Mux Go - Copyright 2019 Mux Inc. // NOTE: This file is auto generated. Do not edit this file manually. package muxgo type UploadResponse struct { Data Upload `json:"data,omitempty"` }
//go:build windows // +build windows package service import ( "golang.org/x/sys/windows/svc" "log" ) type myservice struct { handler func() } func (m *myservice) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32) { const cmdsAccepted = svc.AcceptStop | svc.Ac...
package cmd import ( "github.com/awesomenix/azk/cmd/addons" "github.com/awesomenix/azk/cmd/cluster" "github.com/awesomenix/azk/cmd/controlplane" "github.com/awesomenix/azk/cmd/flow" "github.com/awesomenix/azk/cmd/nodepool" "github.com/spf13/cobra" ) var CreateCmd = &cobra.Command{ Use: "create", } func init()...
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. // +build !windows // Keybase file system package main import ( "flag" "fmt" "os" "bazil.org/fuse" "github.com/keybase/client/go/kbfs/env" "github.com/keybase...
package external import ( "context" "github.com/shopspring/decimal" log "github.com/sirupsen/logrus" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" api "github.com/mxc-foundation/lpwan-app-server/api/extapi" pb "github.com/mxc-foundation/lpwan-app-server/api/m2m-serves-appserver" "github.com...
// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file is largely based on go/analysis/internal/checker/checker.go. package source import ( "context" "fmt" "go/token" "go/types" "log" "reflect" ...
// Copyright 2020 The Prometheus 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...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package mediapackagevod import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" ) type CreatePackagingConfigurationInput struct { _ struct{} `type:"...
// Copyright (c) 2021 Doc.ai and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // // 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/LIC...
package rdb func rdbLoadCheckModuleValue(l *Loader) error { var opcode uint32 var err error for { if opcode, err = l.ReadLength(); err != nil { return err } else if opcode == rdbModuleOpcodeEof { break } switch opcode { case rdbModuleOpcodeSint: fallthrough case rdbModuleOpcodeUint: if _, e...
package certificate import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/openservicemesh/osm/pkg/certificate/pem" "github.com/openservicemesh/osm/pkg/tests/certificates" ) var _ = Describe("Test Tresor Tools", func() { Context("Test EncodeCertDERtoPEM function", func() { cert, err := Enc...
// Copyright 2012 The Gorilla 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 mux import ( "fmt" "net/http" "path" "code.google.com/p/gorilla/context" ) // NewRouter returns a new router instance. func NewRouter() *Rou...
package keeper_test import ( "testing" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/stretchr/testify/suite" "g...
package client import ( "bytes" "fmt" "io/ioutil" "net/http" "reflect" "strings" "testing" "golang.org/x/net/context" "github.com/docker/engine-api/types" "github.com/docker/engine-api/types/container" "github.com/docker/go-units" ) func TestImageBuildError(t *testing.T) { client := &Client{ transport...
// +build go1.9 // Copyright 2020 Microsoft 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 appl...
package _0001 func twoSum(nums []int, target int) []int { aMap := make(map[int]int, len(nums)) for index, value := range nums { y := target - value if v, ok := aMap[y]; ok == true { return []int{v, index} } aMap[value] = index } return []int{} }
// Package types contains functions that return a resource or property type when called. // This code is autogenerated. // Do not edit it by hand. package types import "github.com/awslabs/aws-cloudformation-template-builder/spec/cf" func AWSGlueClassifier_XMLClassifierProperty() cf.PropertyType { return cf.Prop...
package system import ( "github.com/labstack/echo/v4" "github.com/lucky-byte/reactgo/serve/route/admin/system/acl" "github.com/lucky-byte/reactgo/serve/route/admin/system/bulletin" "github.com/lucky-byte/reactgo/serve/route/admin/system/event" "github.com/lucky-byte/reactgo/serve/route/admin/system/history" "gi...
package api_v1_dashboard import ( "context" "net/http" "strings" "github.com/go-chi/chi" "github.com/go-chi/render" "github.com/nais/deploy/pkg/hookd/database" "github.com/nais/deploy/pkg/hookd/middleware" log "github.com/sirupsen/logrus" ) const ( maxRows = 30 ) type DeploymentsResponse struct { Deployme...
// Copyright 2020 Chaos Mesh Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
package network import ( "log" "net" "os" "path/filepath" "reflect" "strings" "github.com/pkg/errors" operv1 "github.com/openshift/api/operator/v1" "github.com/openshift/cluster-network-operator/pkg/bootstrap" "github.com/openshift/cluster-network-operator/pkg/render" uns "k8s.io/apimachinery/pkg/apis/me...
package domain import ( "context" "github.com/opencars/toolkit" ) type VehicleService interface { FindByNumber(ctx context.Context, number string) (*Result, error) FindByVIN(ctx context.Context, vin string) (*Result, error) FindByImage(ctx context.Context, url string) (*Result, error) } type Recognizer interfa...
/* Copyright 2014 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 The Kubernetes Authors. Copyright 2020 Authors of Arktos - file modified. 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...
package daemon import ( "context" "fmt" "github.com/go-kit/kit/log" "github.com/pkg/errors" "github.com/fluxcd/flux/pkg/cluster" "github.com/fluxcd/flux/pkg/policy" "github.com/fluxcd/flux/pkg/resource" "github.com/fluxcd/flux/pkg/update" ) func (d *Daemon) pollForNewAutomatedWorkloadImages(logger log.Logge...
// Code generated by go-swagger; DO NOT EDIT. package staging // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command import ( "net/http" "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" ...
package cli import ( "github.com/spf13/cobra" "github.com/cosmos/osmosis-sdk/client" "github.com/cosmos/osmosis-sdk/client/flags" "github.com/cosmos/osmosis-sdk/client/tx" sdk "github.com/cosmos/osmosis-sdk/types" "github.com/cosmos/osmosis-sdk/x/slashing/types" ) // NewTxCmd returns a root CLI command handler...
// +build !ignore_autogenerated_openshift // This file was autogenerated by deepcopy-gen. Do not edit it manually! package v1 import ( api_v1 "k8s.io/kubernetes/pkg/api/v1" conversion "k8s.io/kubernetes/pkg/conversion" runtime "k8s.io/kubernetes/pkg/runtime" reflect "reflect" ) func init() { SchemeBuilder.Regi...
package main import ( "fmt" ) func main() { //get number of levels in pyramid var levels int fmt.Println("Enter number of levels: ") fmt.Scan(&levels) //allocate pyramid[][] pyramid := make([][]int, levels) for i := range pyramid { pyramid[i] = make([]int, levels) } //get values for pyramid[][] fmt.Pri...
package platformclientv2 import ( "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" ) // Stateventusertopicdatum type Stateventusertopicdatum struct { // Interval Interval *string `json:"interval,omitempty"` // Metrics Metrics *[]Stateventusertopicmetric `json:"metrics,omitempty"` } func ...
package transformer import ( "github.com/rantav/go-archetype/inputs" "github.com/rantav/go-archetype/operations" ) const ( TransformationTypeInclude = "include" TransformationTypeReplace = "replace" TransformationTypeRename = "rename" ) type transformationsSpec struct { Ignore []string `y...
// Copyright 2018 The gVisor Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
package dot_test import ( "fmt" "testing" "github.com/tmc/dot" ) func TestQuotingIfNecessary(t *testing.T) { cases := map[string]string{ "foo": "foo", "\"foo\"": "\"foo\"", "foo bar": "\"foo bar\"", "Allen, C.": "\"Allen, C.\"", } for input, expected := range cases { if dot.QuoteIfNecessar...
package helpers import ( "bytes" "html" "github.com/miekg/mmark" "github.com/russross/blackfriday" "github.com/spf13/viper" ) // Wraps a blackfriday.Renderer, typically a blackfriday.Html // Enabling Hugo to customise the rendering experience type HugoHtmlRenderer struct { blackfriday.Renderer } func (rendere...
package http import ( "fmt" "github.com/gin-gonic/gin" "go-backend-template/internal/auth" "go-backend-template/internal/base/crypto" "go-backend-template/internal/user" ) type Config interface { Address() string } type ServerOpts struct { UserUsecases user.UserUsecases AuthService auth.AuthService Crypt...
/* 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 ...
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package appsender import ( "context" "github.com/ava-labs/avalanchego/api/proto/appsenderproto" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/engine/common" "google.golang.o...
package qingcloud import ( "fmt" "github.com/hashicorp/packer/packer" "github.com/mitchellh/multistep" qc "github.com/yunify/qingcloud-sdk-go/service" "time" ) type stepAttachEIP struct { } func (s *stepAttachEIP) Run(state multistep.StateBag) multistep.StepAction { ui := state.Get("ui").(packer.Ui) c := stat...
package queue import ( "context" "runtime" "sync" "time" "github.com/deciduosity/amboy" "github.com/deciduosity/grip" "github.com/deciduosity/grip/recovery" "github.com/pkg/errors" ) // GroupCache provides a common mechanism for managing collections of // queues, for use in specific group cache situations ty...
// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Lice...
package service import ( "context" "errors" "fmt" "github.com/fleetdm/fleet/v4/server/contexts/ctxerr" "github.com/fleetdm/fleet/v4/server/contexts/logging" "github.com/fleetdm/fleet/v4/server/contexts/viewer" "github.com/fleetdm/fleet/v4/server/fleet" "github.com/fleetdm/fleet/v4/server/ptr" ) /////////////...
package cmd import ( "fmt" "github.com/spf13/cobra" ) var ( countFlagLetters int langFlagLetters string ) //flagOS = flag.String("os", runtime.GOOS, "override default OS") //flagArch = flag.String("arch", runtime.GOARCH, "override default arch") var getbinariesCmd = &cobra.Command{ Use: "getbinaries", ...
package runtime import ( "errors" "time" "github.com/containerd/containerd/specs" ) var ( // ErrContainerExited is returned when access to an exited // container is attempted ErrContainerExited = errors.New("containerd: container has exited") // ErrProcessNotExited is returned when trying to retrieve the exit...
// Copyright (c) Jeevanandam M. (https://github.com/jeevatkm) // Source code and usage is governed by a MIT style // license that can be found in the LICENSE file. package ws import ( "errors" "fmt" "net/http" "net/url" "strings" "aahframe.work/ahttp" "aahframe.work/ainsp" "aahframe.work/config" "aahframe.w...
//go:build linux // +build linux // If on linux then try to increase file limits package cli import ( log "github.com/sirupsen/logrus" "math" "syscall" ) var maxFilesPerRoutine = 5 func convertLimit(limit uint64) int { var out int if limit > math.MaxInt32 { out = math.MaxInt32 } else { out = int(limit) ...
package stack import ( "encoding/json" "errors" "fmt" "io/ioutil" "strings" "testing" "github.com/pulumi/pulumi/pkg/v3/secrets" "github.com/pulumi/pulumi/sdk/v3/go/common/resource" "github.com/pulumi/pulumi/sdk/v3/go/common/resource/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/...
package gateway import ( "fmt" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "google.golang.org/grpc" "github.com/chef/automate/api/external/applications" "github.com/chef/automate/api/external/secrets" "github.com/chef/automate/api/in...
package logger import ( "bufio" "fmt" "io/ioutil" "os" "path" "path/filepath" "regexp" "strconv" "strings" "sync" "time" ) const ( bufferSize = 256 * 1024 ) func getLastCheck(now time.Time) uint64 { return uint64(now.Year())*1000000 + uint64(now.Month())*10000 + uint64(now.Day())*100 + uint64(now.Hour()...
package keeper import ( "testing" "github.com/Electronic-Signatures-Industries/ancon-protocol/x/aguaclara/keeper" "github.com/Electronic-Signatures-Industries/ancon-protocol/x/aguaclara/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sd...
/* Copyright 2014 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 builder_test import ( "context" "testing" "time" remoteexecution "github.com/bazelbuild/remote-apis/build/bazel/remote/execution/v2" "github.com/buildbarn/bb-remote-execution/internal/mock" "github.com/buildbarn/bb-remote-execution/pkg/builder" "github.com/buildbarn/bb-remote-execution/pkg/proto/remote...