text
stringlengths
3.08k
10.4k
package service import ( "errors" "fmt" "regexp" "strconv" "time" "gateway/admin" "gateway/config" "gateway/errors/report" "gateway/logreport" "github.com/jmoiron/sqlx" ) const ( postgresCurrentVersion = 1 ) var ( ErrMigrate = errors.New("The log db is not up to date. Please migrate by invoking with th...
package web import ( "fmt" "io/ioutil" "net/http" "net/url" "path/filepath" "regexp" "strconv" "strings" "github.com/dchest/captcha" "github.com/gorilla/mux" "gopkg.in/flosch/pongo2.v3" ) var spiderRe *regexp.Regexp func init() { spiderRe = regexp.MustCompile(`(?i)qihoobot|Baiduspide...
/*- * Copyright 2014 Square 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 ...
// Copyright 2021 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 cmd import ( "fmt" "os" "path/filepath" "github.com/spf13/cobra" "github.com/Blesmol/pfscf/pfscf/args" "github.com/Blesmol/pfscf/pfscf/cfg" "github.com/Blesmol/pfscf/pfscf/pdf" "github.com/Blesmol/pfscf/pfscf/template" "github.com/Blesmol/pfscf/pfscf/utils" ) var ( actionBatchCrea...
package helpers import ( "github.com/byuoitav/common/log" "github.com/byuoitav/common/nerr" "github.com/byuoitav/common/status" ) //SetInput sets the input on the projector func SetInput(address, port string) error { //Map for all the different input hex values inputs := map[string]byte{ "computer": 0x01, "...
package client import ( "fmt" "os" "time" "github.com/clagraff/devoid/actions" "github.com/clagraff/devoid/commands" "github.com/clagraff/devoid/components" "github.com/clagraff/devoid/entities" "github.com/clagraff/devoid/network" termbox "github.com/nsf/termbox-go" uuid "github.com/satori/go.uuid" ) typ...
package handler import ( "bytes" "crypto/md5" "encoding/base64" "io" "sort" "strings" "sync" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3iface" "github.com/chialab/streamlined-backup/config" "github.com/hashicorp/go-multierror" ) ...
package node import ( "io" "os" "path/filepath" "github.com/p9c/node9/app/apputil" "github.com/p9c/node9/cmd/node/path" "github.com/p9c/node9/pkg/conte" "github.com/p9c/node9/pkg/log" ) // dirEmpty returns whether or not the specified directory path is empty func dirEmpty(dirPath string) (bool, error) { f, e...
package dns import ( "errors" "fmt" ) var ( ErrBuf error = errors.New("dns: buffer size too small") ErrRdata error = errors.New("dns: bad rdata") ErrLongDomain error = errors.New(fmt.Sprintf("domain name exceeded %d wire-format octets", maxDomainNameWireOctets)) ErrCompress error = errors.New("too...
// This is Free Software covered by the terms of the Apache 2 license. // See LICENSE file for details. package main import ( "bytes" "fmt" "image" "io" "log" "mime/multipart" "net/http" "os" "strconv" _ "image/gif" _ "image/jpeg" _ "image/png" "github.com/NYTimes/gziphandler" ) const ( maxSize = 2 * ...
/* * Copyright 2020 The Dragonfly 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 la...
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package approvecmd import ( "strconv" "github.com/hyperledger/fabric-cli/cmd/commands/common" "github.com/hyperledger/fabric-cli/pkg/environment" "github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt" "githu...
package main import ( "bytes" crypto_rand "crypto/rand" "encoding/binary" "encoding/csv" "encoding/json" "fmt" "io" "log" math_rand "math/rand" "net" "net/http" "os" "strings" "sync" "time" ) type Configuration struct { VUsersAmount int TotalTestTime int TimeOut int RampUpInterva...
package plugin import ( "context" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "runtime" "strings" "syscall" "github.com/ghodss/yaml" ) const ( cacheDir = ".conftest" cacheDirectory = xdgPath(cacheDir) ) // Plugin represents a plugin. type Plugin struct { Name string `yaml:"name"` Ver...
package unit_ping import ( "encoding/json" "errors" "github.com/gazercloud/gazernode/common_interfaces" "github.com/gazercloud/gazernode/resources" "github.com/gazercloud/gazernode/system/units/units_common" "github.com/gazercloud/gazernode/utilities" "github.com/gazercloud/gazernode/utilities/gazerping" "gith...
package hamster 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 ( hamphreyBirthday = nook.Birthday{ Day: 25, ...
package models import ( "time" "github.com/gobuffalo/pop" "github.com/gobuffalo/validate" "github.com/gobuffalo/validate/validators" "github.com/gofrs/uuid" "github.com/transcom/mymove/pkg/unit" ) // MTOShipmentType represents the type of shipments the mto shipment is type MTOShipmentType string const ( // ...
package metadata import ( "bytes" "encoding/base64" "encoding/json" "errors" "github.com/incognitochain/incognito-chain/common" "github.com/incognitochain/incognito-chain/dataaccessobject/statedb" "github.com/incognitochain/incognito-chain/wallet" "strconv" ) // PortalRequestUnlockCollateral - portal custodia...
package zm import ( "github.com/pkg/errors" "github.com/tiglabs/baudengine/proto/metapb" "github.com/tiglabs/baudengine/util/log" ) //master global error definitions var ( ErrSuc = errors.New("success") ErrInternalError = errors.New("internal error") ErrSysBusy = errors.New("system busy") ErrPa...
package resource import ( "log" "time" ) var refreshGracePeriod = 30 * time.Second // StateRefreshFunc is a function type used for StateChangeConf that is // responsible for refreshing the item being watched for a state change. // // It returns three results. `result` is any object that will be returned // as the ...
package view func GetView(title string) string { var html string switch title { case "main": html = viewMain() case "test": html = viewTest() default: html = "data:text/html,<html><head><title>googleapp</title></head></html>" } return html } func GetJs(title string) string { var js string switch title ...
package wrkchains import ( "encoding/json" "fmt" "github.com/spf13/viper" "github.com/tendermint/tendermint/libs/log" "github.com/unification-com/wrkoracle/types" "io/ioutil" "net/http" "strconv" ) // nolint const ( DataHash string = "DataHash" AppHash string = "AppHash" ValidatorsHash...
// 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package selenium import ( "encoding/json" "os" "path" "time" "github.com/pkg/errors" "github.com/theRealAlpaca/go-selenium/logger" "github.com/theRealAlpaca/go-selenium/selector" "github.com/theRealAlpaca/go-selenium/types" ) type runnerSettings struct { ParallelRuns int `json:"parallel_runs"` } type eleme...
// Copyright (c) 2014 Dataence, LLC. 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 app...
// Copyright © 2020 The Things Network Foundation, The Things Industries B.V. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Un...
package torrent import ( "log" "os" "testing" "github.com/anacrolix/missinggo/bitmap" "github.com/lkslts64/charo-torrent/metainfo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) //TODO:maybe create a benchmark for the dispatching time func TestPiece(t *testing.T) { blockSz := 1...
package dictgen import ( "bytes" "encoding/json" "fmt" "reflect" "sort" "strings" "testing" ) type testcase struct { What string In string Err error Out DictFile OutDictFile string OutKoboHTML string } // TODO(v1): more specific tests var testcases = []testcase{{ What: "some of everything", In: `@...
// 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 grpcserver import ( "context" "crypto/tls" "crypto/x509" "net" "net/http" "strconv" grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags" "github.com/lstoll/grpce/h2c" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ...
package main import ( "errors" "fmt" "io/ioutil" "net" "net/http" "os/exec" "strconv" "strings" "time" ping "github.com/go-ping/ping" "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" ) type DefaultRoute struct { Interface string Gateway string Source string Activ...
// Copyright August 2020 Maxset Worldwide 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 ...
package main import ( "database/sql" "encoding/json" "flag" "fmt" _ "github.com/go-sql-driver/mysql" "github.com/gobwas/glob" "log" "os" "runtime" "strings" "time" ) var ( Build = "devel" logger = log.New(os.Stderr, "", log.LstdFlags) V = flag.Bool("version", false, "show version") f = flag.String("c...
package main import ( "fmt" "garbage/conio" "garbage/utils" "sort" ) var ( key int ch rune width, height int canClose bool ) var ( posX = 5 posY = 5 offsX = 1 index = 0 numItems = -1 borderNames []string logWidth = 50 evLog []string sho...
package brokerutil import ( "errors" ) var ( // ErrConcurrentDriverCast is the error thrown when a cast to a concurrent driver // failed ErrConcurrentDriverCast = errors.New("could not cast driver to concurrency driver") // ErrBlockingDriverCast is the error thrown when a cast to a blocking driver // failed ...
package main import ( "context" "encoding/json" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/credentials/stscreds" "github.com/aws/aws-sdk-go-v2/service/secretsmanager" "github.com/aws/aws-sdk-...
package main import ( "bufio" "fmt" "math" "os" "strings" ) type coord struct { x int y int } func main() { mapp := [][]bool{} asteroids := make(map[coord]bool) // sightCount := make(map[coord]int) scanner := bufio.NewScanner(os.Stdin) // Read and process input from st...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package personalize import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type CreateSolutionInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the dataset grou...
// Copyright cni-isolation authors // Copyright 2017 CNI authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
package agent import ( "context" "fmt" "github.com/pennsieve/pennsieve-agent/protos" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/vbauerster/mpb/v5" "github.com/vbauerster/mpb/v5/decor" "google.golang.org/grpc" "log" "math/rand" "sync" "time" ) var subscribeCmd = &cobra.Command{ Use: "...
package softmail import ( "github.com/aws/aws-sdk-go/aws" "fmt" "github.com/aws/aws-sdk-go/service/sqs" "github.com/h2ik/go-sqs-poller/worker" "github.com/aws/aws-sdk-go/aws/session" "encoding/json" "time" "log" ) type SqsMessage struct { Type, MessageId, TopicArn, Subject, Timestamp, Message, SignatureVersi...
package orthocal_test import ( "reflect" "testing" "github.com/nord2ost/orthocal" ) func TestComputePDists(t *testing.T) { year := orthocal.NewYear(2018, false) pascha := orthocal.GregorianDateToJDN(2018, 4, 8) if pascha != year.Pascha { t.Errorf("Got incorrect date for Pascha: %d. Should be %d", year.Pasch...
package jws import ( "crypto" "crypto/ecdsa" "crypto/rand" "encoding/asn1" "fmt" "math/big" "github.com/lestrrat-go/jwx/internal/keyconv" "github.com/lestrrat-go/jwx/internal/pool" "github.com/lestrrat-go/jwx/jwa" "github.com/pkg/errors" ) var ecdsaSigners map[jwa.SignatureAlgorithm]*ecdsaSigner var ecdsaV...
package main import ( "flag" "fmt" "os" "os/signal" "regexp" "sync" "syscall" "time" "github.com/DataDog/datadog-go/statsd" "github.com/ruimarinho/nsq-dogstatsd/collector" "github.com/ruimarinho/nsq-dogstatsd/dogstatsd" "github.com/ruimarinho/nsq-dogstatsd/internal/checker" "github.com/ruimarinho/nsq-dog...
package routed import ( "fmt" "net" "strings" log "github.com/Sirupsen/logrus" "github.com/docker/libnetwork/iptables" ) const ( containersChainName = "CONTAINERS" containerRejectChainName = "CONTAINER-REJECT" vethChainPrefix = "CONTAINER-" ) type IPRange struct { from net.IP to net.IP } ...
package main import ( "encoding/json" "flag" "fmt" "io/ioutil" "log" "net/http" "os" "os/user" "path/filepath" "time" "github.com/gorilla/mux" //Workflow variables wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" wfclientset "github.com/argoproj/argo/pkg/client/clientset/versioned" "github.c...
// Copyright 2021-2022 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law...
/* Copyright 2021 The Skaffold 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, sof...
package main import ( "encoding/json" "fmt" pluginapi "github.com/mattermost/mattermost-plugin-api" "github.com/mattermost/mattermost-plugin-starter-template/server/chai" "github.com/mattermost/mattermost-server/v6/model" "io/ioutil" "net/http" "strconv" "sync" "time" "github.com/mattermost/mattermost-plug...
// Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions). /* * Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved. */ package xreg import ( "github.com/NVIDIA/aistore/api/apc" "github.com/NVIDIA/aistore/cluster" "github.com/NVIDIA/aistore/cmn" "github.com/NV...
package testdata // GetShipmentsResponse example const GetShipmentsResponse = `{ "resource": "shipment", "id": "shp_3wmsgCJN4U", "orderId": "ord_kEn1PlbGa", "createdAt": "2018-08-09T14:33:54+00:00", "tracking": { "carrier": "PostNL", "code": "3SKABA000000000", "url":...
package ffiwrapper import ( "context" "io" "io/ioutil" "runtime" "github.com/filecoin-project/lotus/extern/sector-storage/fr32" "github.com/filecoin-project/lotus/extern/sector-storage/partialfile" "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ffi "github.com/filecoin-project/filecoin-f...
package plates import ( "bytes" "fmt" "io" "io/ioutil" "os" "path/filepath" ) type ( // FileReader allows overriding how filenames are evaluated and loaded. FileReader interface { ReadFile(filename string) ([]byte, error) } // FileReaderFunc allows overriding how filenames are evaluated and loaded. File...
package config import ( "os" "sync" "crypto/ecdsa" "encoding/json" "math/big" "github.com/trust-net/go-trust-net/db" "github.com/ethereum/go-ethereum/p2p/discover" "github.com/ethereum/go-ethereum/crypto" ) // container class for different service configurations type config struct{ bootnodes []*discover.Nod...
// Copyright 2015 The Chihaya Authors. All rights reserved. // Use of this source code is governed by the BSD 2-Clause license, // which can be found in the LICENSE file. // Package stats implements a means of tracking processing statistics for a // BitTorrent tracker. package stats import ( "time" "github.com/pus...
package command import ( "bytes" "errors" "fmt" "io" "io/ioutil" "log" "net/http" "net/url" "os" "path" "runtime" "strings" "github.com/lunjon/http/client" "github.com/lunjon/http/util" ) var ( newline = []byte("\n") errCertFlags = errors.New("--cert-pub-file requires --cert-key-file a...
package bazi import "fmt" // TZhu 柱 type TZhu struct { PGanZhi *TGanZhi `json:"pGanZhi"` // 干支 PGan *TGan `json:"pGan"` // 天干 PZhi *TZhi `json:"pZhi"` // 地支 PCangGan *TCangGan `json:"pCangGan"` // 藏干 PShiShen *TShiShen `json:"pShiShen"` // 十神 NDayGan int `json:"nDayG...
package main import ( "io/ioutil" "log" "os" "path" "strings" "time" "github.com/tarm/serial" "gopkg.in/yaml.v2" ) // configuration holds the application configuration. type configuration struct { GPSDevice struct { Port string Baud int PollRate time.Duration } } var ( // application config...
package routes import ( "net/http" "regexp" "github.com/globocom/huskyCI/api/analysis" "github.com/globocom/huskyCI/api/db" "github.com/globocom/huskyCI/api/log" "github.com/globocom/huskyCI/api/types" "github.com/globocom/huskyCI/api/util" "github.com/labstack/echo" mgo "gopkg.in/mgo.v2" ) // GetAnalysis r...
// Copyright 2021 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 web import ( "fmt" "path/filepath" "strconv" "github.com/snowlyg/helper/str" "github.com/snowlyg/iris-admin/g" "github.com/snowlyg/iris-admin/server/viper_server" "github.com/spf13/viper" ) var CONFIG = Web{ MaxSize: 1024, Except: Route{ Uri: "", Method: "", }, System: System{ Tls: ...
// Copyright (C) 2015 <NAME> <<EMAIL>> // 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 2021 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
// Unless explicitly stated otherwise all files in this repository are licensed // under the MIT License. // This product includes software developed at Guance Cloud (https://www.guance.com/). // Copyright 2021-present Guance, Inc. package sinkm3db import ( "bytes" "context" "errors" "fmt" "io/ioutil" "net/http...
package types import ( "log" "math" "github.com/antonmedv/expr" "github.com/antonmedv/expr/vm" "github.com/imhotep-nb/units/quantity" "gonum.org/v1/gonum/optimize" ) type APIInput struct { /* Parse variables and Equations data from API in JSON format */ Equations []EquationJSON `json:"eqns"` Variables []...
/* Copyright 2018 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, ...
package controllers import ( "context" "errors" "fmt" "strings" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" opsterv1 "opensearch.opster.io/api/v1" tls "opensearch.opster.io/pkg/tls" "sigs.k8s.io/controller-runtime/pkg/c...
package modules import ( "fmt" "os" "sync" "go.uber.org/fx" "golang.org/x/xerrors" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/node/bundle" "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/...
package main import ( "github.com/uuosio/chain" ) func check(b bool, msg string) { chain.Check(b, msg) } //table accounts type account struct { balance chain.Asset //primary: t.balance.Symbol.Code() } //table stat type currency_stats struct { supply chain.Asset //primary: t.supply.Symbol.Code() max_supply ...
package data import ( "fmt" "github.com/Junvary/gin-quasar-admin/GQA-BACKEND/global" "github.com/Junvary/gin-quasar-admin/GQA-BACKEND/model/system" "go.uber.org/zap" "gorm.io/gorm" "time" ) var SysMenu = new(sysMenu) type sysMenu struct{} var sysMenuData = []system.SysMenu{ {GqaModel: global.GqaModel{Stable:...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package glacier 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/restjson" ) // The input valu...
// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package db import ( "fmt" "github.com/goradd/goradd/pkg/datetime" . "github.com/goradd/goradd/pkg/orm/query" "strings" ) // Column describes a database column. Most of the information is either // gleaned from the structure of the database, or is taken from a file that describes the relationships between // diffe...
/* 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 under the License ...
package repository import ( "context" "fmt" "time" "github.com/fabric8-services/fabric8-auth/application/repository/base" resourcetype "github.com/fabric8-services/fabric8-auth/authorization/resourcetype/repository" "github.com/fabric8-services/fabric8-auth/errors" "github.com/fabric8-services/fabric8-auth/gor...
package pods import ( "bytes" "fmt" "github.com/hyper-ml/hyperml/server/pkg/base" "github.com/hyper-ml/hyperml/server/pkg/types" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" "strings" ) func (k *Keeper) updateUserPod(userpid uint64, pod *corev1.Pod) (userPod *types.POD) { switch pod.Status.Phase...
package opt import ( "magic_pkg/emacs/lisp" "magic_pkg/emacs/rt" "sexp" "sexpconv" ) // ReduceStrength replaces operations with their less expensive // equivalents. func ReduceStrength(fn *sexp.Func) bool { sr := strengthReducer{} fn.Body = sr.rewrite(fn.Body).(sexp.Block) return sr.triggered } type strengthR...
package main import ( "flag" "fmt" "os" "os/signal" "regexp" "strings" "syscall" "time" "github.com/bwmarrin/discordgo" "github.com/stegosawr/Albedo/command" "github.com/stegosawr/Albedo/embed" "github.com/stegosawr/Albedo/reactions" "github.com/stegosawr/Albedo/static" "github.com/stegosawr/Albedo/util...
// //Copyright [2016] [SnapRoute 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 agr...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: enum.proto package validator_examples 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 // T...
package duck 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 ( pateBirthday = nook.Birthday{ Day: 23, Month: ...
package passlib import ( "fmt" "gopkg.in/hlandau/passlib.v1/abstract" "gopkg.in/hlandau/passlib.v1/hash/argon2" "gopkg.in/hlandau/passlib.v1/hash/bcrypt" "gopkg.in/hlandau/passlib.v1/hash/bcryptsha256" "gopkg.in/hlandau/passlib.v1/hash/pbkdf2" "gopkg.in/hlandau/passlib.v1/hash/scrypt" "gopkg.in/hlandau/passlib...
/* Sniperkit-Bot - Status: analyzed */ // Copyright 2015-2016, Cyrill @ Sch<EMAIL> and the CoreStore contributors // // 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.apa...
package secrets import ( "fmt" "github.com/ActiveState/cli/internal/access" "github.com/ActiveState/cli/internal/keypairs" "github.com/ActiveState/cli/internal/locale" "github.com/ActiveState/cli/internal/logging" "github.com/ActiveState/cli/internal/output" "github.com/ActiveState/cli/internal/primer" "githu...
// Package shed implements client and server middleware to propagate and // respect client timeouts between services. package shed import ( "context" "net/http" "strconv" "time" ) const ( // Header contains the header key expected to be set by incoming requests // in order to propagate timeouts across the netwo...
package ffparser import ( "testing" "time" "github.com/prometheus/common/log" "github.com/stretchr/testify/assert" ) type TestPojo1 struct { Name string `record:"start=1,end=10"` Address string `record:"start=11,end=30"` PhoneNumber string `record:"start=31,end=40"` Other string } type Test...
package p2pc import ( "fmt" "math/rand" "net" "sync" "time" "github.com/supergiant-hq/xnet/model" "github.com/supergiant-hq/xnet/network" "github.com/supergiant-hq/xnet/p2p" "github.com/supergiant-hq/xnet/udp" udpc "github.com/supergiant-hq/xnet/udp/client" udps "github.com/supergiant-hq/xnet/udp/server" ...
// Copyright 2009 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 ( "bytes" "exec" "flag" "fmt" "go/ast" "go/parser" "go/printer" "go/scanner" "go/token" "io" "io/ioutil" "os" "path/filepath" ...
package logger_test import ( "encoding/json" "fmt" "io" "strings" "testing" "time" "github.com/eltorocorp/nobslogger/v2/logger" "github.com/eltorocorp/nobslogger/v2/mocks/mock_io" "github.com/golang/mock/gomock" ) func Test_ServiceInitializeWriterHappyPath(t *testing.T) { ctrl := gomock.NewController(t) d...
// providerID package implements a controller to reconcile the providerID spec // property on nodes in order to identify a machine by a node and vice versa. // This functionality is traditionally (but not mandatory) a part of a // cloud-provider implementation and it is what makes auto-scaling works. package providerid...
package mongo import ( "encoding/json" "errors" "fmt" "math/rand" "testing" "time" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" db "github.com/mulansoft/mgodb" ) const ( CAR_COLLECTION = "car" OWNER_COLLECTION = "owner" CAR_OWNER_COLLECTION = "car_owner" ) type Car struct { CarId int64 `...
package sync import ( "context" "fmt" "time" "github.com/Azure/azure-sdk-for-go/services/preview/frontdoor/mgmt/2018-08-01-preview/frontdoor" "github.com/Azure/go-autorest/autorest/azure/auth" "github.com/Azure/go-autorest/autorest/to" "github.com/lawrencegripper/azurefrontdooringress/utils" azlock "github.co...
// Package scan contains the scanning functionality of servicedef. It uses the // an array of host definitions HostDef created from the hosts.json file as // input. // Currently only scanning via nmap is supported and it is unlikely we will // ever support other methods. Servicedef is currently strongly coupled with //...
/* Copyright the Sonobuoy contributors 2020 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writi...
// author: <NAME> // site: https://programmaticponderings.com // license: MIT License // purpose: NLP microservices: nlp-client // modified: 2021-06-15 package main import ( "io" "io/ioutil" "net/http" "os" "strconv" "strings" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middle...
// Copyright 2020 Security Scorecard 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 ...
package veryfi import ( "crypto/tls" "fmt" "io/ioutil" "os" "testing" "time" "github.com/stretchr/testify/assert" "github.com/veryfi/veryfi-go/veryfi/scheme" "github.com/veryfi/veryfi-go/veryfi/test" ) func setUp(t *testing.T) (test.HTTPServer, *Client, string, *scheme.Document) { server := test.NewHTTPSer...
package matcher import ( "github.com/iNamik/go_container/stack" "github.com/iNamik/go_lexer" ) type Matcher interface { // MatchZeroOrOneBytes consumes the next rune if it matches, always returning true MatchZeroOrOneBytes([]byte) MatcherOperator // MatchZeroOrOneRunes consumes the next rune if it matches, alw...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package alpha import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Creates a new Future Reservation. type FutureReservation struct { ...