text
stringlengths
3.08k
10.4k
// Copyright (c) 2015, <NAME>. All rights reserved. // Use of this source code is governed by an MIT license // that can be found in the LICENSE file. package repo import ( "fmt" "github.com/cassava/repoctl/internal/term" "github.com/cassava/repoctl/pacman" "github.com/cassava/repoctl/pacman/aur" "github.com/ca...
// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
package native import ( "fmt" "reflect" "runtime" "strings" "github.com/hyperledger/burrow/acm" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution/engine" "github.com/hyperledger/burrow/execution/errors" "github.com/hyperledger/burrow/execution/evm/abi" "github.com/hyperledger/b...
// See License.txt in main repository directory // dbSqlite is the plugin for SQLite and contains the // data and functions specific for SQLite to generate // table and field data for html forms, handlers and // table sql i/o for a specific database. // SQLite is a fairly simple interface and easy to work // with. ...
package setup import ( "fmt" "os" "os/exec" "os/signal" "sync" "syscall" "time" log "github.com/sirupsen/logrus" "github.com/twitter/scoot/os/temp" ) // Cmds runs commands for Cloud Scoot setup. // Over os/exec, it offers: // *) (best-effort) clean-up (via Kill()) // *) logging when a process is started //...
// Copyright 2019 the u-root 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 mount_test import ( "fmt" "os" "path/filepath" "reflect" "strings" "testing" "github.com/craftyguy/u-root/pkg/mount" "github.com/craftyguy/...
package upload import ( "context" "fmt" "time" "github.com/bittorrent/go-btfs/core/commands/storage/upload/guard" uh "github.com/bittorrent/go-btfs/core/commands/storage/upload/helper" "github.com/bittorrent/go-btfs/core/commands/storage/upload/sessions" renterpb "github.com/bittorrent/go-btfs/protos/renter" ...
/* Copyright The ORAS Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distrib...
// Package goenv defines an object that parses values from strings. package goenv import ( "github.com/pkg/errors" "reflect" "strconv" "strings" "time" ) // DefaultParser - A default way to parse a string into a specific primitive or pointer. type DefaultParser struct{} // ParseType - Parses a string value for ...
// Copyright 2021 The PipeCD 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 main import ( "os" "strconv" ) const ( //BalanceRoundRobin is a Round-Robin Load Balancer type constant. Services receive connections each after another. BalanceRoundRobin = "RR" //BalanceRandom is a Pseudo-Random Load Balancer type constant. Services receive connections in random order. BalanceRandom ...
// Copyright 2019 The nutsdb 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 app...
// Copyright 2019 Anapaya Systems // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package caigo import ( "bytes" "fmt" "math/big" ) type TypedData struct { Types map[string]TypeDef PrimaryType string Domain Domain Message TypedMessage } type Domain struct { Name string Version string ChainId int } type TypeDef struct { Encoding *big.Int Definitions []Definition }...
package integration import ( "context" "io" "net" "os" "os/exec" "path/filepath" "strings" "syscall" "testing" "time" "github.com/docker/docker/client" "github.com/moby/buildkit/identity" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" ) const ( shortLen = 12 d...
// Copyright 2020 Insolar Network Ltd. // All rights reserved. // This material is licensed under the Insolar License version 1.0, // available at https://github.com/insolar/insolar/blob/master/LICENSE.md. package foundation import ( "crypto/x509/pkix" "encoding/asn1" "encoding/base64" "encoding/binary" "encodin...
package server import ( "encoding/json" "github.com/vmware/transport-go/bus" "github.com/vmware/transport-go/plank/utils" "io/ioutil" "os" "path/filepath" "reflect" "strings" "time" ) // generatePlatformServerConfig is a generic internal method that returns the pointer of a new // instance of PlatformServerC...
// Copyright 2020 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 ( "fmt" "io/ioutil" ) // CellTree structure is the main structure for the bst // of active cells on the window grid. type CellTree struct { root *Cell count int } // initCellTree initializes a new CellTree with appropriate fields // set to zero or nil. Not sure if I need to initialize the va...
package models import ( "database/sql" "fmt" e "github.com/donohutcheon/gowebserver/controllers/errors" "github.com/donohutcheon/gowebserver/controllers/response/types" "github.com/donohutcheon/gowebserver/datalayer" "github.com/donohutcheon/gowebserver/router/auth" "github.com/donohutcheon/gowebserver/state" ...
// // Copyright 2019 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 applica...
/* Copyright 2017 Gravitational, 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 writing, soft...
/******************************************************************************* * Copyright 2018 Dell 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/licen...
package hystrix import ( "sync" "time" "github.com/slover2000/prisma/hystrix/internal" prom "github.com/prometheus/client_golang/prometheus" ) // MetricCollector represents the contract that all collectors must fulfill to gather circuit statistics. // Implementations of this interface do not have to maintain loc...
// Copyright 2017, Google // // 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 writ...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package api import ( "encoding/json" "fmt" "log" "net/http" "net/url" "runtime" "sort" "strings" "time" "github.com/twitchdev/twitch-cli/internal/login" "github.com/twitchdev/twitch-cli/internal/mod...
// 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...
package beater import ( "bufio" "encoding/json" "io" "net/url" "strconv" "strings" "sync" "time" "github.com/icinga/icingabeat/config" "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/logp" ) // Eventstream type type Eventstream struct {...
package redis import ( "errors" "math" "net/url" "strings" "github.com/go-redis/redis" "github.com/sirupsen/logrus" "examples/go/urlshortener/db" "examples/go/urlshortener/log" "examples/go/urlshortener/model" "examples/go/urlshortener/util" ) type redisSess struct { client *redis.Client } type Config s...
package xormhelper import ( "errors" _ "github.com/go-sql-driver/mysql" xorm "github.com/laixyz/xormplus" "github.com/laixyz/xormplus/log" "github.com/laixyz/xormplus/names" "sync" "time" ) const ( SnakeMapper = "snake" SameMapper = "same" GonicMapper = "gonic" ) type XormSession struct { session ...
package kubernetes import ( "fmt" corev1 "k8s.io/api/core/v1" _ "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" _ "k8s.io/client-go/tools/clientcmd" _ "k8s.io/client-go/util/homedir" _ "pat...
package http import ( "context" "crypto/tls" "fmt" "log" "net/http" "os" "os/signal" "reflect" "strings" "time" "github.com/gorilla/mux" ) const ( rColor = "\x1b[31;1m" gColor = "\x1b[32;1m" yColor = "\x1b[33;1m" bColor = "\x1b[34;1m" wColor = "\x1b[37;1m" nColor = "\x1b[0m" ) // NewServer creates ...
package controllers import ( "blogo/models" "crypto/md5" "fmt" "github.com/google/uuid" "github.com/labstack/echo/v4" "io" "net/http" "strconv" "strings" "time" ) // Home Admin Home func Home(c echo.Context) error { fmt.Println("Current session values:", getSession(c).Values) return c.Render(http.StatusO...
package core import ( "log" "sync" "time" "github.com/DanielRenne/GoCore/core/fileCache" ) //CronJobs provides a cron job engine for golang function callbacks to schedule events to execute at specific times of the day and week. var CronJobs cronJobs //RecurringType defines a type of cron job. type RecurringType...
package stats import ( "crypto/md5" "encoding/json" "fmt" "sort" "strings" "time" "github.com/op/go-logging" "github.com/patrickmn/go-cache" "github.com/zero-os/0-core/base/pm" "github.com/zero-os/0-core/apps/core0/transport" ) const ( StatisticsQueueKey = "statistics:%d" StateKey = "state:%s:%...
package common import ( "context" "fmt" "log" "reflect" "strings" "time" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" ) func newRunner(steps []multistep.Step, config PackerConfig, ui packer.Ui) (multistep.Runner, multistep.DebugPauseFn) { switch config.PackerOnError { ...
// // Copyright © 2016-2020 Solus Project <<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 applicab...
// 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...
// Copyright 2021 Akamai Technologies, Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
package main import ( "bufio" _ "embed" "github.com/BaiMeow/msauth" "io/ioutil" "log" "net" "os" "strconv" "time" "github.com/Tnze/go-mc/bot" "github.com/Tnze/go-mc/bot/basic" "github.com/Tnze/go-mc/chat" "github.com/Tnze/go-mc/data/entity" _ "github.com/Tnze/go-mc/data/lang/zh-cn" "github.com/Tnze/go-...
// Copyright (c) 2016 <NAME>, Inc. // Use of this source code is governed by the Apache License 2.0 // that can be found in the COPYING file. package daemon import ( "github.com/aristanetworks/quantumfs" "github.com/aristanetworks/quantumfs/utils" ) // implements quantumfs.DirectoryRecord type HardlinkLeg struct {...
package ostrich 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 ( cranstonBirthday = nook.Birthday{ Day: 23, ...
/* * (C) Copyright [2021-2022] Hewlett Packard Enterprise Development LP * * 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...
//go:generate ../../../tools/readme_config_includer/generator package vsphere import ( "context" _ "embed" "sync" "time" "github.com/vmware/govmomi/vim25/soap" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/config" "github.com/influxdata/telegraf/plugins/common/tls" "github.com/influxdata/...
package auth import ( "github.com/gofiber/fiber/v2" "github.com/jmoiron/sqlx" "github.com/oidc-mytoken/api/v0" log "github.com/sirupsen/logrus" "github.com/oidc-mytoken/server/internal/config" dbhelper "github.com/oidc-mytoken/server/internal/db/dbrepo/mytokenrepo/mytokenrepohelper" "github.com/oidc-mytoken/se...
// Copyright 2013 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 types // This file implements the CREATE phase of SSA construction. // See builder.go for explanation. import ( "fmt" "os" "sync" . "github.com/d...
package proxy import ( "encoding/base64" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "os" "strings" log "github.com/buzzfeed/sso/internal/pkg/logging" "github.com/buzzfeed/sso/internal/pkg/sessions" "github.com/buzzfeed/sso/internal/pkg/validators" "github.com/buzzfeed/sso/internal/proxy/provid...
package findingaid import ( _ "github.com/whosonfirst/go-reader-http" ) import ( "context" "database/sql" "fmt" "github.com/jtacoma/uritemplates" wof_reader "github.com/whosonfirst/go-reader" "github.com/whosonfirst/go-whosonfirst-findingaid/v2/resolver" wof_uri "github.com/whosonfirst/go-whosonfirst-uri" "i...
// Copyright (c) 2020 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package starlark import ( "fmt" "io" "os" "path/filepath" "strings" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/vmware-tanzu/crash-diagnostics/ssh" "go.starlark.net/starlark" "go.starlark.net...
package ingress import ( "context" "fmt" "github.com/prometheus/client_golang/prometheus" corev1 "k8s.io/api/core/v1" "github.com/openshift/cluster-ingress-operator/pkg/manifests" operatorv1 "github.com/openshift/api/operator/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/me...
package wbo import ( "fmt" "github.com/astaxie/beego" "strings" "webo/models/itemDef" "webo/models/s" "webo/models/t" "webo/models/u" ) type SqlBuilder struct { oEntityDef itemDef.ItemDef table []string limit int64 offset int64 orders []string conditions []condition groupBy string ...
// Copyright 2020 SAP SE // // 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 writ...
package main import ( "fmt" "reflect" "sync" "time" // YOUR CODE BEGIN remove the follow packages if you don't need them // YOUR CODE END _ "github.com/go-sql-driver/mysql" sql "github.com/jmoiron/sqlx" ) var ( // YOUR CODE BELOW EvaluatorID = "15307130201" // your student id, e.g. 18307130177 Submiss...
/* * 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...
package psutil import ( "encoding/json" "strconv" "strings" ) type VirtualMemoryStat struct { // Total amount of RAM on this system Total int64 `json:"total"` // RAM available for programs to allocate // // This value is computed from the kernel specific values. Available int64 `json:"available"` // RAM u...
package orm import ( "errors" "strings" "time" "github.com/rs/zerolog" "gorm.io/driver/mysql" "gorm.io/driver/postgres" "gorm.io/gorm" gormLog "gorm.io/gorm/logger" "gorm.io/plugin/dbresolver" gormopentracing "gorm.io/plugin/opentracing" "github.com/nerocho/fastfiber/utils/eventmanager" ) const ( Errors...
package kafkaclient import ( "context" "fmt" "github.com/Shopify/sarama" "github.com/go-light/metadata" "log" "strings" "sync" "time" ) type ConsumerConfig struct { Brokers string Group string Topics string OffsetReset string // latest, earliest, none Assignor ...
// // Copyright 2014, <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 w...
// Copyright 2017 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
/* * Copyright 2018 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 in...
// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 package ssh_executor import ( "bytes" "fmt" "io" "io/ioutil" "net" "sync" "testing" "time" "git.arvados.org/arvados.git/lib/dispatchcloud/test" "golang.org/x/crypto/ssh" check "gopkg.in/check.v1" ) // Goche...
package manager import ( "fmt" "net/http" "net/url" "os" "path" "github.com/lbryio/transcoder/internal/metrics" "github.com/lbryio/transcoder/pkg/dispatcher" "github.com/lbryio/transcoder/pkg/timer" "github.com/prometheus/client_golang/prometheus/promhttp" "go.uber.org/zap" "github.com/fasthttp/router" "...
/* Copyright 2020 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 asyncui import ( "context" "fmt" "github.com/kyma-incubator/hydroform/parallel-install/pkg/components" "github.com/kyma-incubator/hydroform/parallel-install/pkg/deployment" "github.com/kyma-project/cli/pkg/step" ) //End-user messages const ( deployPrerequisitesPhaseMsg string = "Deploying pre-requisi...
// Copyright 2016 Apcera Inc. All rights reserved. package stores import ( "sort" "sync" "time" "github.com/nats-io/go-nats-streaming/pb" ) // MemoryStore is a factory for message and subscription stores. type MemoryStore struct { genericStore } // MemorySubStore is a subscription store in memory type MemoryS...
/* Copyright 2014 Outbrain 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 w...
package test import ( "context" dataSource "github.com/tidepool-org/platform/data/source" "github.com/tidepool-org/platform/page" "github.com/tidepool-org/platform/request" ) type ListInput struct { UserID string Filter *dataSource.Filter Pagination *page.Pagination } type ListOutput struct { Source...
package performance import ( "bytes" "fmt" "github.com/shopspring/decimal" "go.uber.org/atomic" "math" "sync" "time" ) const ( LE01MillSECOND = iota LE05MillSECOND LE10MillSECOND LE100MillSECOND LE500MillSECOND LE01SECOND LE10SECOND LE30SECOND LE01MINUTE LE05MINUTE LE10MINUTE GT10MINUTE ) var _Ran...
package report import ( "bytes" "encoding/json" "log" "os" "strings" "time" "github.com/smotti/tad/config" "github.com/sorcix/irc" ) type ( // meta defines a reports meta data. meta struct { Timestamp int `json:"timestamp"` } // cfengine defines data about a hosts cfengine installation. cfengine stru...
package test import ( "fmt" "os" "os/signal" "path/filepath" "strings" "testing" "github.com/gruntwork-io/terratest/modules/gcp" "github.com/gruntwork-io/terratest/modules/random" "github.com/gruntwork-io/terratest/modules/terraform" "github.com/stretchr/testify/assert" //"github.com/stretchr/testify/requi...
/* Copyright 2014 Ooyala, Inc. All rights reserved. * * This file is 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 applic...
// Copyright 2020 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 api import ( "context" "fmt" "sync" "github.com/romshark/dgraph_graphql_go/api/graph/auth" "github.com/pkg/errors" "github.com/romshark/dgraph_graphql_go/api/config" "github.com/romshark/dgraph_graphql_go/api/gqlshield" "github.com/romshark/dgraph_graphql_go/api/graph" "github.com/romshark/dgraph_gr...
package client import ( "fmt" log "github.com/sirupsen/logrus" "gopkg.in/ldap.v3" "strings" ) // User is the base implementation of ad Group object type ADGroup struct { name string dn string description string } type ADGroupRequest struct { group_name string group_base_ou string...
// author <EMAIL> package main import ( "encoding/json" "flag" "html/template" "io" "io/ioutil" "log" "net/http" "path/filepath" "strconv" "sync" "github.com/IBM/pass/pass/utils/view/pkg/relay" "github.com/gorilla/websocket" ) const ( socketBufferSize = 1024 messageBufferSize = 256 ) type message st...
package converter import ( "reflect" "testing" grabana "github.com/K-Phoen/grabana/decoder" "github.com/K-Phoen/sdk" "github.com/stretchr/testify/require" "go.uber.org/zap" ) func defaultVar(varType string) sdk.TemplateVar { return sdk.TemplateVar{ Type: varType, Name: "var", Label: "Label", } } fun...
/* Copyright 2018 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 dao import ( "errors" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/utils" "math" "sblog/app/gorm/model" "sblog/app/gorm/validate" "sblog/app/logic" "sblog/system/common" "strconv" "strings" "time" ) type article struct { } var DefaultArticleDao = article{} // Save 保存 func (d article...
// Copyright (c) 2019-present Mattermost, Inc. All Rights Reserved. // See License for license information. package solarlottery import ( "fmt" "strings" "time" "github.com/mattermost/mattermost-server/v5/model" "github.com/pkg/errors" "github.com/mattermost/mattermost-plugin-solar-lottery/server/store" ) ty...
package loadtest import ( "fmt" "math/rand" "net/http" "strings" "time" "github.com/spf13/viper" "github.com/topfreegames/khan/lib" "github.com/topfreegames/khan/log" "github.com/uber-go/zap" ) // App represents a load test application type App struct { config *viper.Viper logger zap.Logger cache...
package resolver import ( "context" "time" uuid "github.com/satori/go.uuid" "github.com/vektah/gqlparser/v2/gqlerror" "github.com/beneath-hq/beneath/infra/engine/driver" "github.com/beneath-hq/beneath/server/control/gql" "github.com/beneath-hq/beneath/services/middleware" ) func (r *queryResolver) GetUsage(c...
// 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 gosnmp import ( "bytes" "errors" "fmt" ) func marshalObjectIdentifier(oid []int) (ret []byte, err error) { out := bytes.NewBuffer(make([]byte, 0, ...
package remote import ( "context" "fmt" "io" "strconv" "strings" "time" "github.com/mimecast/dtail/internal/clients/handlers" "github.com/mimecast/dtail/internal/config" "github.com/mimecast/dtail/internal/io/logger" "github.com/mimecast/dtail/internal/ssh/client" "golang.org/x/crypto/ssh" ) // Connectio...
package values import ( "context" "fmt" "github.com/loft-sh/vcluster/cmd/vclusterctl/cmd/app/create" "github.com/loft-sh/vcluster/cmd/vclusterctl/log" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "regexp" "strconv" "strings" ...
package main import ( "flag" "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "net/url" "os" "strings" ) // Print an error message then quit. func exitErrorf(msg string, args ...interface{}) { _, _ = f...
// See // https://github.com/uber-go/icu4go // http://userguide.icu-project.org/formatparse/numbers // http://icu-project.org/apiref/icu4c/unum_8h.html package spell // #include "unicode/utypes.h" // #include "bridge.h" import "C" import ( "fmt" "math" "unicode" "unicode/utf8" "unsafe" "github.com/go-playgroun...
// This file is subject to a 1-clause BSD license. // Its contents can be found in the enclosed LICENSE file. package ipintel import ( "crypto/md5" "encoding/json" "fmt" "github.com/jteeuwen/ircb/cmd" "github.com/jteeuwen/ircb/plugin" "github.com/jteeuwen/ircb/proto" "io" "io/ioutil" "log" "net" "net/http"...
package api import ( "io" "os" "path/filepath" "time" "github.com/google/uuid" "github.com/leapp-to/leapp-go/pkg/executor" ) // ActorRunnerID represents an unique of a running actor. type ActorRunnerID struct { uuid.UUID } // NewActorRunnerID returns a new ActorRunnerID. func NewActorRunnerID() ActorRunnerID...
package get import ( "fmt" "sort" "strconv" "github.com/jenkins-x/jx/pkg/log" "github.com/jenkins-x/jx/pkg/util" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "github.com/jenkins-x/jx/pkg/cmd/helper" "github.com/pkg/errors" "github.com/s...
package model import ( "encoding/json" "errors" "os" "github.com/sirupsen/logrus" ) // ConditionEnum models endpoint conditionality based on: // Account and Transaction API Specification - v3.1 - Section 4 Endpoints // https://openbanking.atlassian.net/wiki/spaces/DZ/pages/937820271/Account+and+Transaction+API+S...
package service import ( "context" "fmt" "log" "os" "path/filepath" "sync" "time" "github.com/containerd/containerd" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker" "github.com/docker/cli/cli/config" "github.com/docke...
package common import ( "fmt" "net/url" "os" "path/filepath" "regexp" "runtime" "strings" "time" "github.com/hashicorp/packer/packer" ) // PackerKeyEnv is used to specify the key interval (delay) between keystrokes // sent to the VM, typically in boot commands. This is to prevent host CPU // utilization fro...
package tasks import ( "encoding/json" "fmt" "github.com/starkandwayne/rdpgd/globals" "github.com/starkandwayne/rdpgd/utils/backup" "github.com/starkandwayne/rdpgd/log" "github.com/starkandwayne/rdpgd/pg" ) type restoreParams struct { pgPsqlPath string `json:"psql_path"` pgPort string `json:"pg_port"` ...
package day6 import ( "ryepup/advent2021/utils" ) /* The sea floor is getting steeper. Maybe the sleigh keys got carried this way? A massive school of glowing lanternfish swims past. They must spawn quickly to reach such large numbers - maybe exponentially quickly? You should model their growth rate to be sure. Al...
package server import ( "testing" "github.com/google/uuid" "github.com/ovn-org/libovsdb/mapper" "github.com/ovn-org/libovsdb/model" "github.com/ovn-org/libovsdb/ovsdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestMutateOp(t *testing.T) { defDB, err := model.NewDBModel...
// Copyright © 2016 <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...
package lingvo import ( "bytes" "context" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "sync" ) const ( libraryVersion = "0.0.0" defaultBaseURL = "https://developers.lingvolive.com/" defaultUserAgent = "go-lingvo/" + libraryVersion endpointAuth = "api/v1.1/authenticate" ) // Client m...
package twitter import ( "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "net/url" "reflect" "strings" "time" ) // A Request is the service request to be made. type Request struct { Config Config APIInfo APIInfo EndPointInfo *EndPointInfo AttemptTime time.Time Time time.Time H...
package szextractor import ( "crypto/sha1" "crypto/sha256" "fmt" "hash" "io" "os" "path/filepath" "runtime" "time" humanize "github.com/dustin/go-humanize" "github.com/go-errors/errors" "github.com/itchio/arkive/zip" "github.com/modulesio/isolator/archive/szextractor/formulas" "github.com/modulesio/isol...
// Copyright (c) 2019 Pantheon.tech // // 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...