text
stringlengths
3.08k
10.4k
/* 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 writing, software dis...
package ecsdemo //Licensed under the Apache License, Version 2.0 (the "License"); //you may not use this file except in compliance with the License. //You may obtain a copy of the License at // //http://www.apache.org/licenses/LICENSE-2.0 // //Unless required by applicable law or agreed to in writing, software //distr...
package solcover import ( "bytes" "fmt" "math/big" "sort" "time" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" ) // Collector returns an EVMLogger that can be used to trace EVM operations for // code coverage. The returned function returns an LCOV trace file at any time //...
package common import ( "bufio" "bytes" "fmt" "io" "log" "os/exec" "strings" "sync/atomic" "time" ) const DefaultHangTimeout = 20 * 60 type ExternalProgramExecutor struct { execName string arguments *ExternalProgramArguments HangTimeout int64 stdErrPipe io.ReadCloser stdOutPipe io.ReadCloser stdI...
// Code generated by go-swagger; DO NOT EDIT. package blueprint_terraform_integrations // 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/...
// Copyright 2021 The Chromium OS 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 firmware import ( "context" "path/filepath" "time" "chromiumos/tast/ctxutil" "chromiumos/tast/errors" "chromiumos/tast/remote/dutfs" "...
package certutils import ( "fmt" "os" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/acm" "github.com/olekukonko/tablewriter" ) type ACM struct { client *acm.ACM } type ACMDescription struct { arn string name...
package main import ( "bytes" "io" "os" "sort" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type templateWithError struct{} func (t *templateWithError) entry() string { return "{{.Undefined}}" } func (t *templateWithError) list() string { return "" } f...
// Copyright 2014 <NAME>. All rights reserved. // Use of this source code is governed by The MIT License // found in the accompanying LICENSE file. package ora /* #include <oci.h> #include <stdlib.h> #include "version.h" const ACTUAL_LENGTH_TYPE sof_OCIDate = sizeof(OCIDate *); */ import "C" import ( "bytes" "time...
// Copyright (c) <NAME> and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. package binary import ( "bytes" "io" "math" "testing" "time" "github.com/stretchr/testify/assert" ) func TestReader_Slice(t *testing.T) { r := newSliceReader([]b...
// mrmanager - request temporary credentals and put them in a useful place // aws.go: support for pulling and writing AWS credentials // // Copyright 2019 Threat Stack, Inc. // Licensed under the BSD 3-clause license; see LICENSE for more information. // Author: <NAME> <<EMAIL>> package main import ( "flag" "fmt" ...
package page import ( "fmt" "strconv" "strings" "time" "gioui.org/layout" "gioui.org/op" "gioui.org/widget" "github.com/planetdecred/dcrlibwallet" "github.com/planetdecred/godcr/app" "github.com/planetdecred/godcr/ui/decredmaterial" "github.com/planetdecred/godcr/ui/load" "github.com/planetdecred/godcr/u...
/* Copyright (C) 2018 Expedia Group. 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 dis...
package dashboard import ( "context" "fmt" "html/template" "net/http" "strings" "github.com/rs/zerolog/log" "github.com/authzed/spicedb/internal/datastore" "github.com/authzed/spicedb/pkg/schemadsl/generator" ) const rootTemplate = ` <html> <head> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/...
package prtgapi import ( "context" "fmt" "net/url" "strconv" "strings" ) // DevicesService handles communication with the device related methods of the PRTG API type DevicesService service type deviceList struct { Items []*Device `json:"devices"` } // Device represents a PRTG device type Device struct { ID ...
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
// *** WARNING: this file was generated by pulumigen. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package node import ( "context" "reflect" mount "github.com/frezbo/pulumi-provider-kind/sdk/v3/go/kind/mount" patchjson6902 "github.com/frezbo/pulumi-provider-kind/sdk/v3/go...
package main import ( "math/rand" "strings" "sync" "time" "github.com/mattermost/mattermost-server/v5/model" "github.com/mattermost/mattermost-server/v5/plugin" "github.com/robfig/cron/v3" ) // Plugin implements the interface expected by the Mattermost server to communicate between the server and plugin proce...
package docker import ( "context" "strings" "sync" "time" "github.com/cuigh/auxo/app/container" "github.com/cuigh/auxo/cache" "github.com/cuigh/auxo/errors" "github.com/cuigh/auxo/log" "github.com/cuigh/auxo/util/lazy" "github.com/cuigh/swirl/misc" "github.com/docker/docker/api/types" "github.com/docker/d...
// Code generated by go-swagger; DO NOT EDIT. package members // 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/...
package drmaa2os import ( "time" "github.com/dgruber/drmaa2interface" "github.com/dgruber/drmaa2os/pkg/d2hlp" "github.com/dgruber/drmaa2os/pkg/jobtracker" ) // JobSession instance acts as container for job instances controlled // through the DRMAA API. The session methods support the submission // of new jobs an...
// // Licensed to Apache Software Foundation (ASF) under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Apache Software Foundation (ASF) licenses this file to you under // the Apache License, Version 2.0 (the ...
package dns import ( "encoding/json" "log" mdns "github.com/miekg/dns" kcp "github.com/xtaci/kcp-go" "github.com/awgh/ratnet" "github.com/awgh/ratnet/api" ) // MTU - the effective MTU inside the DNS tunnel const MTU = 150 // MaxMsgSize - the maximum size of a single message const MaxMsgSize = 2889 func init...
/* 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, soft...
package goat 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 ( svenBirthday = nook.Birthday{ Day: 0, Month: t...
// Copyright 2020 Google 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 applicable...
package tileserver import ( "container/list" "sync" "time" "github.com/op/go-logging" "github.com/orofarne/hmetrics2" "app" "gopnik" "gopnikrpc" "perflog" "tilerender" ) var log = logging.MustGetLogger("global") var hReqT = hmetrics2.MustRegisterPackageMetric("request_time", hmetrics2.NewHistogram()).(*h...
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package startcmd import ( "encoding/json" "net/http" "strconv" "time" "github.com/gorilla/mux" "github.com/rs/cors" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" cmdutils "github.com/trustbloc/ed...
package builder import ( "context" "io" "path/filepath" "strings" "github.com/gravitational/force" "github.com/containerd/console" "github.com/containerd/containerd/namespaces" controlapi "github.com/moby/buildkit/api/services/control" bkclient "github.com/moby/buildkit/client" "github.com/moby/buildkit/id...
/** * Copyright 2020 Napptive * * 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 ...
/* Copyright The Kubeform 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, softwar...
package main import ( "crypto/md5" "flag" "fmt" "github.com/bitly/nsq/nsq" "github.com/bitly/nsq/util" "hash/crc32" "io" "log" "net" "os" "os/signal" "regexp" "strconv" "strings" "syscall" "time" ) var ( showVersion = flag.Bool("version", false, "print version string") httpAddress ...
package internal import "testing" func TestParseCommit(t *testing.T) { var cases = []struct { commit string typ CommitType scope, description string major bool }{ {`feat(something): test`, TypeFeat, `something`, `test`, false}, {`bug(something): test`, TypeFix, `s...
package plugin import ( "context" "flag" "time" "github.com/puppetlabs/wash/activity" ) type defaultOpCode int8 const ( // ListOp represents Parent#List ListOp defaultOpCode = iota // ReadOp represents Readable/BlockReadable#Read ReadOp // MetadataOp represents Entry#Metadata MetadataOp ) var defaultOpCo...
/* Copyright © 2021 <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 in writing, softw...
package domain import ( "time" "github.com/savannahghi/enumutils" "github.com/savannahghi/feedlib" "github.com/savannahghi/mycarehub/pkg/mycarehub/application/enums" ) // User holds details that both the client and staff have in common // // Client and Staff cannot exist without being a user type User struct { ...
package servian import ( "context" "encoding/base64" "fmt" "time" "github.com/hashicorp/errwrap" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/logical" ) const secretAccessKeyType = "service_account_token" func secret(b *backend) *framework.Secret { return &framework.Secret{ T...
// Package dhcp6rd provides utils for decoding the dhcp 6rd option (option 212) // and calculating what prefix is usable based on the current IPv4 address package dhcp6rd import ( "errors" "net" "strconv" "strings" ) // Option6RD contains the parsed values for the 6RD DHCP Option type Option6RD struct { // MaskL...
// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls // // Copyright 2019 Centrifuge GmbH // // 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 th...
// Copyright ©2017 The go-hep 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 hbook import ( "fmt" "math" ) // DivideH1D divides 2 1D-histograms and returns a 2D scatter. // DivideH1D returns an error if the binning of th...
// Copyright 2017, Yahoo Holdings Inc. // Licensed under the terms of the Apache license. See LICENSE file in project root for terms. package protocol import ( "fmt" "testing" "github.com/yahoo/bftkv/crypto/pgp" "github.com/yahoo/bftkv/node" "github.com/yahoo/bftkv/node/graph" "github.com/yahoo/bftkv/packet" ...
package strategies import ( "context" "os" "os/signal" "sync" "syscall" "github.com/tagirmukail/tccbot-backend/internal/scheduler" bitmextradedata "github.com/tagirmukail/tccbot-backend/internal/tradedata/bitmex" "github.com/tagirmukail/tccbot-backend/internal/candlecache" "github.com/sirupsen/logrus" "...
package modbus import ( "context" "errors" "github.com/aldas/go-modbus-client/packet" "io" "os" "sync" "time" ) // SerialClient provides mechanisms to send requests to modbus server over serial port type SerialClient struct { // readTimeout is total amount of time reading the response can take before client r...
// Package group contains group related subcommands. package group import ( "context" "fmt" "github.com/spf13/cobra" "github.com/twmb/franz-go/pkg/kerr" "github.com/twmb/franz-go/pkg/kmsg" "github.com/twmb/kcl/client" "github.com/twmb/kcl/flagutil" "github.com/twmb/kcl/out" ) func Command(cl *client.Client...
package jwt import ( "crypto/rand" "encoding/base64" "errors" "fmt" "net/http" "os" "regexp" "strconv" "time" "github.com/18F/e-QIP-prototype/api" jwt "github.com/dgrijalva/jwt-go" ) const ( // Issuer is the JWT issuer. Issuer = "eqip" ) var ( // JwtSecret is the secret used to generate tokens. JwtSe...
package generic import ( "context" "time" "github.com/lawrencejones/pgsink/internal/telem" "github.com/lawrencejones/pgsink/pkg/changelog" kitlog "github.com/go-kit/kit/log" "github.com/oklog/run" ) // AckCallback will acknowledge successful publication of up-to this message. It is not // guaranteed to be cal...
package controller import ( "fmt" "sync/atomic" "time" "github.com/chzyer/flow" "github.com/chzyer/logex" "github.com/chzyer/next/packet" ) var ( ErrTimeout = fmt.Errorf("timed out") ) type Controller struct { timeout time.Duration flow *flow.Flow in chan *Request out packet.Chan toDC pac...
package session import ( "encoding/base64" "errors" "os" "strings" "github.com/graniet/go-pretty/table" "github.com/segmentio/ksuid" ) type Target struct { Id int `json:"-" gorm:"primary_key:yes;column:id;AUTO_INCREMENT"` SessionId int `json:"-" go...
// *** 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 v20170601 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type Volume struct { pulumi.CustomResou...
// Package dice utilises the standard "nds" notation where n = number of die and s = number of sides; i.e 1d6, 3d10, 8d8 etc // in order to create individual sets of a single type of die or bags of mixed collections that can then be manipulated or rolled package dice import ( "fmt" "math/rand" "strings" "time" ) ...
package middleware import ( "context" "database/sql" "encoding/json" "io/ioutil" "net/http" "strings" "go.uber.org/zap" "github.com/TailorDev/crick/api/config" "github.com/TailorDev/crick/api/models" "github.com/auth0-community/go-auth0" "github.com/julienschmidt/httprouter" "gopkg.in/square/go-jose.v2" ...
package main import ( "encoding/json" "flag" "fmt" "github.com/APTrust/exchange/constants" "github.com/APTrust/exchange/network" "github.com/APTrust/exchange/partner_apps/common" "github.com/aws/aws-sdk-go/service/s3" "os" "strings" "time" ) func main() { opts := getUserOptions() if opts.HasErrors() { f...
package nodegateway import ( go_redis_orm "github.com/fananchong/go-redis-orm.v2" "github.com/fananchong/go-xserver/common" "github.com/fananchong/go-xserver/common/config" "github.com/fananchong/go-xserver/common/context" "github.com/fananchong/go-xserver/internal/components/misc" nodecommon "github.com/fananch...
// Package authservice to serve a REST api for authentication and token refresh package authservice import ( "crypto/ecdsa" "crypto/tls" "crypto/x509" "fmt" "io/ioutil" "net/http" "github.com/gorilla/mux" "github.com/sirupsen/logrus" "github.com/wostzone/hub/auth/pkg/authenticate" "github.com/wostzone/hub/a...
// // Copyright 2021 IBM Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
// Copyright 2020 IBM Corp. // SPDX-License-Identifier: Apache-2.0 package app import ( "context" "errors" app "github.com/ibm/the-mesh-for-data/manager/apis/app/v1alpha1" statusErr "k8s.io/apimachinery/pkg/api/errors" "github.com/ibm/the-mesh-for-data/manager/controllers/utils" "k8s.io/apimachinery/pkg/types...
// Copyright (C) 2018 Aerospike, Inc. // // All rights reserved. // // THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE. THE COPYRIGHT NOTICE ABOVE DOES // NOT EVIDENCE ANY ACTUAL OR INTENDED PUBLICATION. package asconfig import ( "bufio" "fmt" "regexp" "strconv" "strings" "github.com/go-logr/logr" ) var leadclose...
package gen import ( "bytes" "fmt" "github.com/Masterminds/sprig" "gopkg.in/yaml.v2" "html/template" "io" "io/ioutil" "os" "path/filepath" "strings" ) type genConfig struct { source string target string context map[string]map[string]interface{} } func (tm *TemplateModel) Generate() error { var excludeM...
package main import ( "fmt" "strings" "time" "gonum.org/v1/gonum/mat" ) var showRaw bool var showMatrices bool = true func capture(pipeline <-chan *Measurement, monitor chan int) { var ( estimateError float64 = 1.0 meaurementError float64 = .5 // Error in Measurement kalmanGain float64 //...
// nolint:lll // Generates the layer5 adapter's resource yaml. It contains the adapter's configuration, name, // supported template names (metric in this case), and whether it is session or no-session based. //go:generate $REPO_ROOT/bin/mixer_codegen.sh -a mixer/adapter/layer5/config/config.proto -x "-s=false -n layer5...
package paych import ( "context" "fmt" "os" "time" "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/testground/sdk-go/sync" "github.com/filecoi...
package main import ( "context" "io" "log" "net/http" "os" "os/signal" "sort" "strings" "syscall" "time" "github.com/urfave/cli" ) type Options struct { Port string HeartBeat bool ShutdownDelay int } var opts Options func main() { app := cli.NewApp() app.Name = "explorer" app.Usage = ...
package cassgowary import ( "fmt" "log" "regexp" "strings" "github.com/emirpasic/gods/stacks/arraystack" "github.com/pkg/errors" ) const constraintParserOperations = "-+/*^" type ConstraintParser struct { pattern *regexp.Regexp } func NewConstraintParser() *ConstraintParser { p, err := regexp.Compile(`\s*(...
package cache import ( "context" "encoding/json" v1 "github.com/flanksource/canary-checker/api/v1" "github.com/flanksource/canary-checker/pkg" "github.com/flanksource/canary-checker/pkg/db" "github.com/flanksource/commons/logger" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" ) type postgresCach...
package policy import ( "bufio" "bytes" "context" "encoding/json" "errors" "fmt" "io/ioutil" "strings" "github.com/dnephin/cobra" "github.com/storageos/go-api/types" "github.com/storageos/go-cli/cli" "github.com/storageos/go-cli/cli/command" ) type stringSlice []string func (s *stringSlice) Type() strin...
/* * Copyright (c) 2021 NetEase 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 (c) 2020 the original author or 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 appl...
package config import ( "errors" "fmt" "net" "net/url" "os" "strings" "time" "github.com/urfave/cli" ) type ManagerConfig struct { LogLevel string `json:"logLevel"` ListenAddr string `json:"listenAddr"` MesosFrameworkUser string `json:"mesosFrameworkUser"` Hostname string `jso...
/* * Copyright (c) 2013-2017, <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 ...
package types import ( "encoding/json" "fmt" "time" "github.com/mb0/wkt" "github.com/pkg/errors" "github.com/twpayne/go-geom" ) // A Region holds information about a geographical region, including its ID, name & shape. type Region struct { ID ID `json:"id"` // Identifier of the region Name stri...
/* Copyright AppsCode Inc. and 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.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
package predictor import ( "image" "image/png" "os" "runtime" "runtime/debug" "github.com/pkg/errors" imagetypes "github.com/rai-project/image/types" tf "github.com/tensorflow/tensorflow/tensorflow/go" "github.com/tensorflow/tensorflow/tensorflow/go/op" gotensor "gorgonia.org/tensor" ) func disableFramewor...
package generator import ( "context" "strconv" "time" "github.com/abilioesteves/metrics-generator/generator/accidenttypes" "github.com/abilioesteves/metrics-generator/metrics" "github.com/sirupsen/logrus" ) // Tabajara generates metrics type Tabajara struct { Collector *metrics.Collector Entropy Entropy A...
// Copyright 2017 Andrew 'Diddymus' Rolfe. All rights reserved. // // Use of this source code is governed by the license in the LICENSE file // included with the source code. package cmd import ( "log" "os" "runtime" rtdebug "runtime/debug" "runtime/pprof" "code.wolfmud.org/WolfMUD.git/config" ) // Syntax: DE...
package main import ( "encoding/json" "fmt" "math/rand" "os" "strconv" "strings" "sync" "time" storageengine "github.com/fitant/storage-engine-go/storageengine" tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api" ) var photoIDMap = make(map[string]string) var photoList []string var listMutex *sync.M...
/* Copyright © 2021 NAME HERE <EMAIL ADDRESS> 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...
package clientcmd import ( "fmt" "os" "github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta" kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd" "github.com/GoogleCloudPlatform/kube...
// Copyright (C) 2018 <NAME>. All Rights Reserved. // Package cc describes Creative Commons software licenses. package cc import "github.com/creachadair/lice/licenses" func init() { licenses.Register(licenses.License{ Name: "Creative Commons CC0", Slug: "cc0", URL: "https://creativecommons.org/publi...
// This file contains a full demo of most available features, for both testing // and for reference package main import ( "fmt" "log" "strings" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/evertras/bubble-table/table" ) const ( columnKeyID = "id" columnKey...
package main import ( "encoding/json" "io" "math/rand" "net/http" "strings" "sync/atomic" "time" log "github.com/Sirupsen/logrus" marathon "github.com/gambol99/go-marathon" ) // StatsResult JSON payload type StatsResult struct { KilledTasks uint64 `json:"gone"` } // RampageResult JSON ...
// Package parallel provide API for running function in parallel. package parallel import ( "errors" "fmt" "reflect" "sync" ) type taskInput interface{} // Task representation. type Task struct { n int f reflect.Value hasError bool numOut int input []taskInput result []interface{} err error ...
// 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 ( "context" "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-opena...
// Package cat provides integration testing framework for control-nodes, agents // and CRPDs. Each control-node and agent runs as a separate unix process. // Each CRPD runs inside a docker container. Framework hangles the confguration // and life cycle management of all these objects. package cat import ( "errors" "...
package context import ( gcontext "context" "strconv" "sync/atomic" "time" "go.uber.org/zap" ) // type alias type ( CancelFunc = gcontext.CancelFunc ) // variable alias var ( Canceled = gcontext.Canceled DeadlineExceeded = gcontext.DeadlineExceeded ) // Context extend default context package, make ...
// Code generated by entc, DO NOT EDIT. package movie const ( // Label holds the string label denoting the movie type in the database. Label = "movie" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldTitle holds the string denoting the title field in the database. FieldT...
package board import ( "github.com/nsf/termbox-go" "../console" "../cursor" "../helpers" "log" "math/rand" ) var ( ItemNone int = 0 ItemX int = 1 ItemO int = 2 ) type Board struct { items [3][3]int DivisionsFgColor termbox.Attribute PlayersFgColor termbox.Attribute BorderFgColor termbox.Attribute Di...
package cmd import ( "database/sql" "encoding/json" "fmt" "github.com/markuszm/npm-analysis/codeanalysis/packagecallgraph" "github.com/markuszm/npm-analysis/database" "github.com/spf13/cobra" "io/ioutil" "log" "os" "path/filepath" "strings" "sync" ) var exportUsageNeo4jUrl string var exportUsageMysqlUrl s...
/* Copyright © 2021 <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 in writing, softw...
// Copyright 2018 NetApp, Inc. All Rights Reserved. package azgo import ( "bytes" "encoding/xml" "fmt" "io/ioutil" log "github.com/sirupsen/logrus" ) // LunMapListInfoRequest is a structure to represent a lun-map-list-info ZAPI request object type LunMapListInfoRequest struct { XMLName xml.Name `xml:"lun-map-...
package syncer import ( "fmt" "sort" "github.com/juju/errors" "github.com/mkmik/multierror" toposort "github.com/philopon/go-toposort" "k8s.io/klog" "github.com/bitnami-labs/charts-syncer/internal/chart" "github.com/bitnami-labs/charts-syncer/internal/utils" ) // Chart describes a chart, including dependenc...
package main import ( "context" "net/http" "github.com/fatih/structs" "github.com/go-kit/kit/log" "github.com/go-kit/kit/metrics" "github.com/thedevsaddam/gojsonq/v2" "github.com/xmidt-org/webpa-common/v2/device" "github.com/xmidt-org/webpa-common/v2/logging" "github.com/xmidt-org/webpa-common/v2/xhttp" "gi...
/** * Copyright 2015 @ z3q.net. * name : sale_tag * author : jarryliu * date : -- : * description : * history : */ package item import ( "go2o/core/domain/interface/item" "go2o/core/domain/interface/valueobject" ) var _ item.ISaleLabel = new(saleLabelImpl) type saleLabelImpl struct { rep item.ISaleLabelR...
package bots import ( "fmt" "github.com/go-telegram-bot-api/telegram-bot-api" "github.com/romanornr/Bitmex-referral-analyzer/bmex" "log" "strings" "time" ) const PARSEMODE = "html" type TelegramBot struct { api string bot *tgbotapi.BotAPI } func NewTelegramBot(api string) *TelegramBot { bot, err := tgbotapi...
package constants import ( "math" "path/filepath" "github.com/buildbuddy-io/buildbuddy/enterprise/server/raft/keys" "github.com/buildbuddy-io/buildbuddy/server/util/status" rfpb "github.com/buildbuddy-io/buildbuddy/proto/raft" ) // Gossip (broadcast) constants const ( NodeHostIDTag = "node_host_id" RaftAddr...
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" ) func makeTimestamp() int64 { return time.Now().UnixNano() / int64(time.Millisecond) } var ...
package model import ( "context" "database/sql" "strings" "github.com/piotrkowalczuk/charon" ) const ( // UserConfirmationTokenUsed ... UserConfirmationTokenUsed = "!" ) var ( // ExternalPassword is a password that is set when external source of authentication is provided (e.g. LDAP). ExternalPassword = []b...
package cfe2e import ( "fmt" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "go.mongodb.org/atlas/mongodbatlas" "github.com/mongodb/atlas-osb/test/cfe2e/config" "github.com/mongodb/atlas-osb/test/cfe2e/model/atlasclient" "github.com/mongodb/atlas-osb/test/cfe2e/model/test" "github.com/mongodb/atlas-os...
package main import ( "encoding/json" "fmt" "net" "strconv" "sync" "time" "os" tf "github.com/tensorflow/tensorflow/tensorflow/go" "github.ibm.com/Blue-Horizon/aural2/libaural2" "github.ibm.com/Blue-Horizon/aural2/vsh" "github.ibm.com/Blue-Horizon/aural2/vsh/intent" ) type intentMsg struct { Name string...
package execution import ( "errors" "fmt" "github.com/j3ssie/osmedeus/libs" "github.com/j3ssie/osmedeus/utils" "log" "strings" "github.com/xanzy/go-gitlab" ) // GitlabAuth do authentication with gitlab func GitlabAuth(options libs.Options) (*gitlab.Client, error) { if options.NoGit { ...
// Copyright 2020 Intrinsec // 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, ...