text
stringlengths
3.08k
10.4k
package server import ( "net/http" "os" "github.com/rancher/apiserver/pkg/builtin" "github.com/rancher/apiserver/pkg/handlers" "github.com/rancher/apiserver/pkg/parse" "github.com/rancher/apiserver/pkg/subscribe" "github.com/rancher/apiserver/pkg/types" "github.com/rancher/apiserver/pkg/writer" "github.com/r...
package main import ( "github.com/jinzhu/gorm" "io/ioutil" "strconv" "strings" ) import "fmt" import "net/http" const maxUploadSize = 256 * 1024 // 256 KiB func initHttp() { http.HandleFunc("/", httpRoot) http.HandleFunc("/register", httpRegister) http.HandleFunc("/login", httpLogin) http.HandleFunc("/logout...
// Copyright 2022 TiKV Project 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 agr...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package sagemakera2iruntime 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 StartHumanLoopInput struct { _ struct{} `type:"structure"...
package servers import ( "time" "github.com/chnsz/golangsdk" "github.com/chnsz/golangsdk/pagination" ) type commonResult struct { golangsdk.Result } type ServerPage struct { pagination.LinkedPageBase } // IsEmpty returns true if a page contains no Server results. func (r ServerPage) IsEmpty() (bool, error) { ...
package fastcgi import ( "net" "net/http" "net/http/fcgi" "net/http/httptest" "net/url" "strconv" "testing" ) func TestServeHTTP(t *testing.T) { body := "This is some test body content" bodyLenStr := strconv.Itoa(len(body)) listener, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { t.Fatalf("Unab...
package explorers import ( "errors" "fmt" "net/http" netURL "net/url" "quatermain/url" "regexp" "github.com/PuerkitoBio/goquery" ) // ErrorCode ... const ErrorCode = 1 // NoFollowCode ... const NoFollowCode = 2 // NoIndexCode ... const NoIndexCode = 3 // PageVisited ... const PageVisited = 4 // BlockedByR...
// Copyright 2014 mqant Author. 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 applica...
// Copyright 2012-2019 The NATS 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 structs import ( "fmt" "reflect" "time" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/types" ) type CheckTypes []*CheckType // CheckType is used to create either the CheckMonitor or the CheckTTL. // The following types are supported: Script, HTTP, TCP, Docker, TTL, GRPC, Alias. Script,...
package pkcs11test // A test of using several pkcs11 sessions in parallel for signing across // multiple goroutines. Access to the PKCS11 module is thread-safe because of // the C.CKF_OS_LOCKING_OK param and nil mutex functions that the pkcs11 // package passes to C.Initialize, which indicate that the module should us...
package main import ( "bufio" "bytes" "fmt" "os" ) func main() { reader := bufio.NewReader(os.Stdin) tc := readNum(reader) var buf bytes.Buffer for tc > 0 { tc-- n, m := readTwoNums(reader) E := make([][]int, m) for i := 0; i < m; i++ { E[i] = readNNums(reader, 2) } res := solve(n, E) buf.W...
package uriroute import ( "context" "encoding/json" "fmt" "github.com/liangdas/mqant/gate" "github.com/liangdas/mqant/log" "github.com/liangdas/mqant/module" "github.com/liangdas/mqant/rpc/util" "github.com/pkg/errors" "net/url" "time" ) // FSelector 服务节点选择函数,可以自定义服务筛选规则 // 如不指定,默认使用 Scheme作为moduleType,Host...
package cli import ( "fmt" "os" "path/filepath" "strings" "github.com/tus/tusd/pkg/azurestore" "github.com/tus/tusd/pkg/filelocker" "github.com/tus/tusd/pkg/filestore" "github.com/tus/tusd/pkg/gcsstore" "github.com/tus/tusd/pkg/handler" "github.com/tus/tusd/pkg/memorylocker" "github.com/tus/tusd/pkg/s3stor...
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
/* * 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 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...
package policy import ( "context" "encoding/json" "fmt" "os" "path/filepath" "time" "github.com/aquasecurity/trivy/pkg/oci" "github.com/open-policy-agent/opa/bundle" "golang.org/x/xerrors" "k8s.io/utils/clock" "github.com/aquasecurity/trivy/pkg/log" ) const ( bundleVersion = 1 bundleRepository = "g...
// +build integration package rtc import ( "encoding/json" "fmt" "io/ioutil" "net/http" "os" "strings" "testing" "time" "github.com/qiniu/go-sdk/v7/auth" ) var manager *Manager func init() { accessKey := os.Getenv("accessKey") secretKey := os.Getenv("secretKey") mac := auth.New(accessKey, secretKey) ...
// 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 agreed t...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package kinesis 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" "github.com/aws/aws-sdk-go-v2/private/protocol/jsonrpc" ) // Represents the ...
package str import ( "encoding/json" "fmt" "reflect" "strconv" "strings" "unicode" ) // Length returns number of characters func Length(s string) int { return len([]rune(s)) } // Before returns the string before the first occurrence of the substr string func Before(s, substr string) string { if substr == "" ...
package getproviders import ( "fmt" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terraform/addrs" ) // ErrHostNoProviders is an error type used to indicate that a hostname given // in a provider address does not support the provider registry protocol. type ErrHostNoProviders struct { Ho...
package jwttool import ( "crypto/rsa" "errors" "github.com/golang-jwt/jwt/v4" "io/ioutil" "strings" "time" ) var ( // ErrNoPubKeyFile indicates that the given public key is unreadable ErrNoPubKeyFile = errors.New("public key file unreadable") // ErrNoPrivKeyFile indicates that the given private key is unread...
package runtime import ( "fmt" "strings" "github.com/automationbroker/bundle-lib/clients" log "github.com/sirupsen/logrus" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) const ( // BundleContainerName - name of the container in the pod defintion // Used for the default runtime. BundleC...
// +build linux package cgmgr import ( "fmt" "io/ioutil" "os" "path/filepath" "strconv" "strings" "github.com/cri-o/cri-o/internal/config/node" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) const ( crioPrefix = "crio" // minMemoryLimit is the minimum memory that must be set for a container. // ...
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package main import ( "flag" "fmt" "os" "os/signal" "strings" "syscall" "github.com/coreos/go-systemd/daemon" log "github.com/sirupsen/logrus" "github.com/sirupsen/logrus/hooks/writer" "github.com/crowdsecurity/cs-firewall-bouncer/pkg/version" csbouncer "github.com/crowdsecurity/go-cs-bouncer" "gopkg.in/...
package identity import ( "context" "encoding/base64" "encoding/json" "fmt" "net/http" "net/url" oidc "github.com/coreos/go-oidc" "golang.org/x/oauth2" "golang.org/x/oauth2/google" admin "google.golang.org/api/admin/directory/v1" "github.com/pomerium/pomerium/internal/httputil" "github.com/pomerium/pomer...
// // Modified BSD 3-Clause Clear License // // Copyright (c) 2019 Insolar Technologies GmbH // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted (subject to the limitations in the disclaimer below) provided that // the following conditions a...
// Copyright (c) 2022 Uber Technologies, Inc. // // 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...
package main import ( "context" "crypto/tls" "crypto/x509" "encoding/json" "errors" "fmt" "io/ioutil" "log" "net/http" "os" "os/signal" "strconv" "syscall" "time" "github.com/postfinance/kubenurse/pkg/checker" "github.com/postfinance/kubenurse/pkg/kubediscovery" "github.com/prometheus/client_golang/p...
package processor import ( "errors" "fmt" "regexp" "time" "github.com/elastic/beats/filebeat/config" ) // MultiLine processor combining multiple line events into one multi-line event. // // Lines to be combined are matched by some configurable predicate using // regular expression. // // The maximum number of b...
// nolintlint provides a linter for ensure that all //nolint directives are followed by explanations package nolintlint import ( "fmt" "go/ast" "go/token" "regexp" "strings" "unicode" "github.com/pkg/errors" ) type BaseIssue struct { fullDirective string directiveWithOptionalLeadingSpace...
package main import ( "bytes" "encoding/base64" "errors" "io" "io/ioutil" "mime" "mime/multipart" "net/mail" "net/textproto" "os" "strings" "unicode" "github.com/emersion/go-smtp" "github.com/google/uuid" sendgrid "github.com/sendgrid/sendgrid-go" sgmail "github.com/sendgrid/sendgrid-go/helpers/mail" ...
package jsonrpc2_test import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/http/httptest" "net/rpc" "reflect" "strings" "testing" "github.com/powerman/rpc-codec/jsonrpc2" ) // Svc is an RPC service for testing. type Svc struct{} func (*Svc) Sum(vals [2]int, res *int) error { *res = v...
package sap_api_output_formatter type MaintenancePlan struct { ConnectionKey string `json:"connection_key"` Result bool `json:"result"` RedisKey string `json:"redis_key"` Filepath string `json:"filepath"` APISchema string `json:"api_schema"` MaintenancePlan stri...
// Copyright 2020 <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // A tool to run yack dialogs on the console. // // The scripting language used for code statements and code conditions is not // Squirrel, but JavaScript. However, Squ...
// +build windows,amd64 package winapi import ( "syscall" "unsafe" so "github.com/tera-insights/go-win64api/shared" ) // Windows API functions var ( modWtsapi32 = syscall.NewLazyDLL("wtsapi32.dll") procWTSFreeMemory = modWtsapi32.NewProc("WTSFreeMemory") procWTSFreeMemoryExW =...
// Package neldermead is an implementation of the Nelder-Mead optimization method. // Based on work by <NAME>: http://www.mikehutt.com/neldermead.html package neldermead import "math" const ( defaultMaxIterations = 1000 // reflection coefficient defaultAlpha = 1.0 // contraction coefficient defaultBeta = 0.5 //...
package health import ( "context" "encoding/json" "fmt" "github.com/christianhujer/assert" "net/http" "net/http/httptest" "regexp" "testing" ) var variables map[string]string var handler http.HandlerFunc type sampleCheck struct{} func (s *sampleCheck) HealthChecks() map[string][]Checks { return map[string]...
/* * Copyright 2015 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 applicabl...
package integration import ( "io" "net/url" "os" "testing" "time" kapi "k8s.io/kubernetes/pkg/api" kclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/probe" httpprobe "k8s.io/kubernetes/pkg/probe/http" "k8s.io/kubernetes/pkg/watch" configapi "github.com/...
// Copyright 2016-2017 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 "lic...
package deploymentconfig import ( "fmt" "strconv" "github.com/golang/glog" kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" "github.com/GoogleCloudPlatform/kubernetes/pkg/client/record" deployapi "github.com/openshift/origin/pkg/deploy/api" ...
//go:build !windows && !openbsd && !freebsd // +build !windows,!openbsd,!freebsd // Package fusemount implements FUSE filesystem nodes for mounting contents of filesystem stored in repository. // // The FUSE implementation used is from github.com/hanwen/go-fuse/v2 package fusemount import ( "io" "os" "sync" "sysc...
package inspect import ( "fmt" "os" "path" "sync" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/errors" "k8s.io/cli-runtime/pkg/resource" "k8s.io/klog/v2" configv1 "g...
package servicemon import ( "fmt" "github.com/SyntropyNet/syntropy-agent/agent/peeradata" "github.com/SyntropyNet/syntropy-agent/agent/routestatus" "github.com/SyntropyNet/syntropy-agent/internal/logger" "github.com/SyntropyNet/syntropy-agent/pkg/netcfg" ) func (sm *ServiceMonitor) Apply() ([]*routestatus.Conne...
package odoo import ( "fmt" ) // MailMail represents mail.mail model. type MailMail struct { LastUpdate *Time `xmlrpc:"__last_update,omptempty"` AttachmentIds *Relation `xmlrpc:"attachment_ids,omptempty"` AuthorAvatar *String `xmlrpc:"author_avatar,omptempty"` AuthorId ...
//go:generate bash -c "go-bindata $BINDATAFLAGS -pkg rendered -o bindata.go templates/..." package rendered import ( "bytes" "encoding/json" "fmt" "html/template" "strings" assetfs "github.com/elazarl/go-bindata-assetfs" "github.com/kiteco/kiteco/kite-golib/templateset" "github.com/kiteco/kiteco/kite-go/lan...
/* Copyright 2017 Caicloud 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 ...
package fetch import ( "bytes" "context" "encoding/json" "errors" "io/ioutil" "net/http" "net/url" "strings" "github.com/go-kit/kit/endpoint" httptransport "github.com/go-kit/kit/transport/http" "github.com/slotix/dataflowkit/splash" ) // NewHTTPClient returns an Fetch Service backed by an HTTP server liv...
// 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 ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // CreateClientDe...
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. package utils import ( "html" "regexp" "strings" "github.com/yuin/goldmark" "github.com/yuin/goldmark/ast" "github.com/yuin/goldmark/extension" astExt "github.com/yuin/goldmark/extension/ast" "gith...
package memberlist import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/rand" "fmt" "io" ) /* Encrypted messages are prefixed with an encryptionVersion byte that is used for us to be able to properly encode/decode. We currently support the following versions: 0 - AES-GCM 128, using PKCS7 padding 1 - AES-GC...
package main import ( "bufio" "flag" "fmt" "os" "strconv" ) var ( inputFile = flag.String("input", "inputs/day08.txt", "Input file") partB = flag.Bool("partB", false, "Perform part B?") debug = flag.Bool("debug", false, "Debug?") debug2 = flag.Bool("debug2", false, "more debugging?") debug3 = ...
package context import ( "errors" "fmt" "path" "sort" "github.com/cli/cli/api" "github.com/cli/cli/git" "github.com/cli/cli/internal/ghrepo" "github.com/mitchellh/go-homedir" ) // Context represents the interface for querying information about the current environment type Context interface { AuthToken() (st...
/* * deprecation.go * * This source file is part of the FoundationDB open source project * * Copyright 2021 Apple Inc. and the FoundationDB project 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 c...
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Copyright 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" file acc...
/* * Copyright (c) 2017, MegaEase * 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...
package scaffolder import ( "fmt" "go/ast" "go/parser" "go/token" "os" "path/filepath" "strings" "github.com/gobuffalo/genny" "github.com/tendermint/starport/starport/pkg/placeholder" modulecreate "github.com/tendermint/starport/starport/templates/module/create" ) const ( componentType = "type" compon...
// <NAME>. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will...
package broker import ( "github.com/sirupsen/logrus" "io/ioutil" "os" path2 "path" "path/filepath" "strings" "sync" "time" ) type Broker struct { update chan Update accessId string secret string exchangesFolder string stagingFolder string retries int exchanges m...
// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
package auth import ( "crypto/ecdsa" "crypto/elliptic" "encoding/json" "fmt" "math/big" "strconv" "strings" "time" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto/secp256k1" "github.com/decentraland/auth-go/internal/utils" "github.com/dgrijalva/jwt-go" ) const th...
package api import ( "fmt" "strings" "github.com/koltyakov/gosip/csom" ) // TermSets term sets struct type TermSets struct { client *HTTPClient config *RequestConfig endpoint string csomEntry csom.Builder } // csomBuilderEntry gets CSOM builder entry func (termSets *TermSets) csomBuilderEntry() csom.Bui...
// Copyright Project Contour 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...
// Copyright 2015 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 traditionalchinese import ( "fmt" "io/ioutil" "strings" "testing" "golang.org/x/text/encoding" "golang.org/x/text/encoding/internal" "golang.or...
// 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, ...
/* _ _ *__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2018 Weaviate. All rights reserved. * LICENSE: https://github.com/creativesof...
package vsphere import ( "context" "time" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vapi/rest" "github.com/vmware/govmomi/vapi/tags" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim...
package spinner import ( "sync" "time" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" ) // Internal ID management for text inputs. Necessary for blink integrity when // multiple text inputs are involved. var ( lastID int idMtx sync.Mutex ) // Return the next ID we should use on ...
package highlight import ( "bytes" "fmt" "html/template" "strings" "golang.org/x/net/html" "golang.org/x/net/html/atom" "github.com/sourcegraph/sourcegraph/lib/codeintel/lsiftyped" ) // DocumentToSplitHTML returns a list of each line of HTML. func DocumentToSplitHTML(code string, document *lsiftyped.Document...
/* Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR...
package bid_action import ( "encoding/json" "time" "github.com/Oneledger/protocol/action/helpers" "github.com/Oneledger/protocol/external_apps/bid/bid_data" "github.com/pkg/errors" "github.com/tendermint/tendermint/libs/kv" "github.com/Oneledger/protocol/action" "github.com/Oneledger/protocol/data/keys" ) ...
package command import ( "fmt" "strings" "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/api/contexts" "github.com/posener/complete" ) type DeploymentStatusCommand struct { Meta } func (c *DeploymentStatusCommand) Help() string { helpText := ` Usage: nomad deployment status [options] <deployment...
package provider import ( "context" "fmt" "io/ioutil" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/aws/aws-sdk-go/service/secretsmanager/secretsmanageriface" "sigs.k8s.io/secrets-store-csi-driver/provider/v1alpha1" ) /...
// Copyright (c) 2004-present Facebook All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Code generated by entc, DO NOT EDIT. package ent import ( "fmt" "strings" "time" "github.com/facebook/ent/dialect/sql" "github.com/facebookincub...
package braft import ( "context" "errors" "log" "strings" "time" "go.uber.org/multierr" "github.com/bingoohuang/gg/pkg/ss" "google.golang.org/grpc/credentials/insecure" "github.com/bingoohuang/braft/discovery" "github.com/bingoohuang/braft/proto" "github.com/bingoohuang/braft/util" "github.com/bingoohu...
package app import ( "fmt" nmc_message_client "github.com/nwpc-oper/nmc-message-client" "github.com/nwpc-oper/nmc-message-client/sender" "github.com/spf13/cobra" "github.com/spf13/pflag" "log" "os" "strings" "time" ) var ( sourceIP string fileSize int64 statusNo int8 datetimeString ...
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. package cmd import ( "context" "fmt" "os" "os/signal" "runtime" "syscall" "t...
package main import ( "context" "errors" "log" "net/http" "os" "github.com/folbricht/desync" "github.com/spf13/cobra" ) type chunkServerOptions struct { cmdStoreOptions cmdServerOptions stores []string cache string listenAddresses []string writable bool skipVerifyWrite bool u...
// Licensed to LinDB under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. LinDB licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use this file except in compli...
/* * 纸喵软件 * Copyright (c) 2017~2020 http://zhimiao.org All rights reserved. * Author: 倒霉狐狸 <<EMAIL>> * Date: 2020/3/3 下午4:26 */ package gutils import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/md5" "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/hex" "encoding/pem" "fmt" "time" "github.com/dg...
package str import ( "fmt" "reflect" "strconv" "unicode" u "github.com/dockerian/go-coding/utils" ) // Palindrome interface type Palindrome interface { GetData() string IsPalindrome() bool } // PalindromeNumber struct type PalindromeNumber struct { input uint64 } // PalindromeString struct type PalindromeS...
// Copyright 2020 <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package wimpy reads and writes wimpy files. package wimpy import ( "bytes" "fmt" "io" "runtime" "github.com/fzipp/gg/ggdict" ) func Read(r io.Reader) (*Room,...
// Code generated by go-swagger; DO NOT EDIT. package metrics // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/...
// Copyright 2020 dfuse Platform 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 agre...
// Copyright 2020 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 main import ( "encoding/json" "net/url" "path" "reflect" "sort" "strings" "testing" "github.com/google/uuid" "github.com/sourcegraph/go-langserver/pkg/lsp" ) func TestProbablyFileURI(t *testing.T) { tests := map[string]bool{ "file:///a.py": true, "file:///a.py#line=1,char=2": true...
package validate import ( "context" "encoding/base64" "errors" "fmt" "github.com/armory/spinnaker-operator/pkg/inspect" "github.com/armory/spinnaker-operator/pkg/util" "net/http" "strings" ) type dockerRegistryService struct { address string username string password string ctx context.Context h...
package auth import ( "context" "database/sql" "net/http" "strings" "github.com/lbryio/commentron/commentapi" "github.com/lbryio/commentron/db" "github.com/lbryio/commentron/helper" "github.com/lbryio/commentron/model" "github.com/lbryio/commentron/server/lbry" "github.com/lbryio/lbry.go/v2/extras/errors" ...
package main import ( "bufio" "fmt" "os" "os/exec" "path" "regexp" "strings" ) type DownloadList struct { urls map[string]bool } func (d *DownloadList) summary() { n_failed, n_to_download := 0, 0 for _, failed := range d.urls { if failed { n_failed += 1 } else { n_to_download += 1 } } fmt.Pri...
package metrics import ( "bytes" "crypto/ecdsa" b64 "encoding/base64" "encoding/json" "errors" "github.com/OneOfOne/go-utils/memory" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/rs/xid" "github.com/singnet/snet-daemon/authutils" "github.com/singnet/snet-daemo...
/* Copyright 2020 The kconnect Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
// Copyright 2015 The LUCI 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...
// Copyright 2014 The Serviced Authors. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: readtoken.proto package readtoken_go_proto import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // Thi...