text
stringlengths
3.08k
10.4k
package ec2 import ( "encoding/csv" "fmt" "log" "strconv" "strings" "sync" "github.com/afeeblechild/aws-go-tool/lib/utils" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" ) type RegionVolumes struct { Region string Profile string Volumes [...
package postgres import ( "fmt" "log" "time" "github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2020-01-01/postgresql" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" uuid "github.com/satori/go.uuid" "github.com/terraform-provide...
/* * Copyright 2018 It-chain * * 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 wri...
package graph import ( "context" "errors" "net/http" "os" "reflect" "time" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/handler/extension" "github.com/99designs/gqlgen/graphql/handler/lru" "github.com/99designs/gqlgen/graphql/handl...
package config import ( "encoding/json" blockchainc "github.com/DSiSc/blockchain/config" "github.com/DSiSc/craft/log" consensusc "github.com/DSiSc/galaxy/consensus/config" participatesc "github.com/DSiSc/galaxy/participates/config" rolec "github.com/DSiSc/galaxy/role/config" "github.com/DSiSc/justitia/tools" "...
// +build consistency // This test requires to be run twice to check for data consistency issues. // Hence this test is not run by default and will only be run if a flag // 'consistency' is specified while running the tests. // // E.g.: ~/go-pmem/bin/go test -tags="consistency" -v # run 1 // E.g.: ~/go-pmem/bin/go tes...
package main import ( "bytes" "crypto/sha1" "encoding/json" "fmt" "html/template" "io/ioutil" "net/http" "os" "os/exec" "strings" ) const gonagallConfigFile = "gonagallconfig.json" var gonagallConfig struct { BaseDir string CacheDir string ThumbSize uint ViewSize uint CatchAll bool } func writeC...
package xeno import ( "fmt" "log" "math/rand" "os" "strconv" ) type CommStrategy struct { opponentInfo map[PlayerID]int } func (s CommStrategy) SelectDiscard(g *Game, p *Player) CardEvent { var discard int if p.hand.Has(10) { // 10は選べない discard = p.hand.Another(10) } else { discard = p.hand.Random() ...
package news_sina import ( "encoding/json" "github.com/gohp/goutils/color" "github.com/gohp/goutils/gotime" "github.com/gohp/goutils/hash" "github.com/gohp/goutils/rand" "io/ioutil" "net/http" "spiderhub/models" "strconv" "time" ) type AutoGenerated struct { Novels []interface{} `json:"novels"` Data []s...
// Copyright 2021 Northern.tech AS // // 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 utils import ( "fmt" "time" coreops "github.com/portworx/sched-ops/k8s/core" rbacops "github.com/portworx/sched-ops/k8s/rbac" "github.com/portworx/sched-ops/task" "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/...
package braintree import ( "bytes" "context" "crypto/tls" "encoding/xml" "errors" "fmt" "log" "net" "net/http" "time" ) type apiVersion int const ( apiVersion3 apiVersion = 3 apiVersion4 = 4 ) const defaultTimeout = time.Second * 60 var ( // defaultTransport uses the same configuration as h...
package easing_test import ( "fmt" "os" "github.com/draoncc/tween" . "github.com/draoncc/tween/easing" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) // FuncInfo stores information about a func. type FuncInfo struct { Name string Func tween.TransitionFunc } var _ = Describe("Basic Curves", func() ...
package main import ( "fmt" "path/filepath" "os" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" tmstrings "github.com/tendermint/tendermint/libs/strings" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tende...
package gpapdu const ( privSecurityDomain = 0x80 privDAPVerification = 0x40 privDelegatedManagement = 0x20 privCardLock = 0x10 privCardTerminate = 0x08 privCardReset = 0x04 privCVMManagement = 0x02 privMandatedDAPVerification ...
package email import ( "bufio" "bytes" "os" "text/template" gomail "gopkg.in/gomail.v2" "github.com/cybozu-go/kkok" "github.com/cybozu-go/log" "github.com/pkg/errors" ) const ( transportType = "email" defaultHost = "localhost" defaultPort = 25 mailer = "kkok " + kkok.Version ) type transport struct {...
/* Copyright 2022 Red Hat, 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, software d...
package client import ( "bytes" "crypto/tls" "encoding/json" "fmt" "github.com/sirupsen/logrus" "github.com/spf13/viper" "gitlab.sandmanbb.com/perfil-digital-agro/agro-ws/build/scicrop-scraper/models/schema" "io/ioutil" "net/http" "net/url" "time" ) type SchemaClient struct { uri *url.URL client ...
// Code generated by go-swagger; DO NOT EDIT. package move_task_order // 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 "git...
package main import ( "bufio" "fmt" "net/http" _ "net/http/pprof" "os" "strings" "the_brink/characters" "the_brink/console" "the_brink/party" "the_brink/world" "github.com/Pallinder/go-randomdata" "github.com/fatih/color" ) var trim string = "-----------------------------------------\n" var player charac...
package main import ( "bytes" "encoding/json" "fmt" "github.com/pkg/errors" "go/format" "io" "reflect" "sort" "strings" "time" ) // func Goify(reader io.Reader) error { // var m map[string]interface{} // // dec := json.NewDecoder(reader) // if err := dec.Decode(&m); err != nil { // return fmt.Errorf("I...
package mdb import ( "context" "strconv" "strings" "time" "github.com/AlexTransit/vender/cmd/vender/subcmd" "github.com/AlexTransit/vender/hardware" "github.com/AlexTransit/vender/hardware/mdb" "github.com/AlexTransit/vender/helpers/cli" "github.com/AlexTransit/vender/internal/engine" "github.com/AlexTransi...
// Copyright 2019, 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: common.proto package proto import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-t...
package main import ( "crypto/md5" "encoding/hex" "errors" "fmt" "io" "log" "os" "os/exec" "runtime" "strconv" "strings" "gopkg.in/cheggaaa/pb.v1" ) func progress() { if target.verbose == false { progressBar.Increment() } } func createProgressBar() { step := 29 if target.resource { step-- } if...
/* Copyright (c) 2021 Intel Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribut...
// Copyright 2017 GRAIL, Inc. All rights reserved. // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. package pool import ( "context" "net/url" "testing" "time" "github.com/grailbio/base/digest" "github.com/grailbio/reflow" "github.com/grailbio/reflow/er...
package fpgo import ( "reflect" "strings" ) // NewComparableOrdered Generate a Ordered Comparable for Comparator func NewComparableOrdered[T Ordered](val T) ComparableOrdered[T] { return ComparableOrdered[T]{ Val: val, } } // ComparableOrdered A Ordered Comparable for Comparator type ComparableOrdered[T Ordere...
package sqobj import ( "fmt" "reflect" // Import Namespaces . "github.com/djthorpe/go-errors" . "github.com/mutablelogic/go-sqlite" . "github.com/mutablelogic/go-sqlite/pkg/lang" ) /////////////////////////////////////////////////////////////////////////////// // TYPES type View struct { *SQReflect SQSource...
/* Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR...
// Code generated by go-swagger; DO NOT EDIT. package p_cloud_images // 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 "gith...
/* * Copyright 2017 StreamSets 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...
/* Copyright 2021 The Cockroach 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
// Copyright 2021 iLogtail Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
/* Copyright 2022 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 main import ( "context" "fmt" "github.com/RichardKnop/machinery/v2" redisbackend "github.com/RichardKnop/machinery/v2/backends/redis" amqpbroker "github.com/RichardKnop/machinery/v2/brokers/amqp" "github.com/RichardKnop/machinery/v2/config" "github.com/RichardKnop/machinery/v2/example/tracers" eagerloc...
// Copyright © 2018 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 ...
// Code generated by smithy-go-codegen DO NOT EDIT. package elasticloadbalancing import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing/types" smithy "github.com/awslabs/smithy-go" "gi...
package tgbotapi import ( "fmt" "io" "strconv" "strings" "unicode/utf16" "golang.org/x/net/html" ) // Converts an HTML string to a markup free string and an array of Telegram message entities. // Set strict to true if you want the function to error out on bad HTML or false to ignore. // NOTE: The offset and le...
package maze import ( "encoding/json" "io/ioutil" "net/http" "strings" "github.com/gorilla/schema" tk "github.com/quintans/toolkit" ) type IContext interface { Proceed() error GetResponse() http.ResponseWriter SetResponse(http.ResponseWriter) GetRequest() *http.Request GetAttribute(interface{}) interface...
package squirrel 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 ( sheldonBirthday = nook.Birthday{ Day: 26, ...
// Copyright 2015 <NAME>. All Rights Reserved. // See LICENSE for licensing terms. package flagz import ( "bytes" "encoding/json" "log" "net/http" "strings" "text/template" "fmt" flag "github.com/spf13/pflag" ) // StatusEndpoint is a collection of `http.HandlerFunc` that serve debug pages about a given `Fl...
package appstate import ( "context" "time" "github.com/replicatedhq/kots/kotsadm/operator/pkg/appstate/types" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kuber...
package registry import ( "context" "encoding/json" "fmt" "github.com/outblocks/outblocks-plugin-go/registry/fields" "github.com/outblocks/outblocks-plugin-go/util" ) type ResourceState int const ( ResourceStateNew ResourceState = iota + 1 ResourceStateExisting ResourceStateDeleted ) var mutexKV = util.New...
package rtc import ( "time" "github.com/byyam/mediasoup-go-worker/internal/utils" "github.com/byyam/mediasoup-go-worker/mediasoupdata" "github.com/byyam/mediasoup-go-worker/pkg/rtpparser" "github.com/pion/rtcp" ) type RtpStreamSend struct { *RtpStream logger utils.Logger lostPr...
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package identity_test import ( "context" "fmt" "io/ioutil" "net/http" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" "github.com/urfave/negroni" "github.com/ory/jsonschema/v3/httploader" "github.com/ory/kratos/x" "github.com/ory/x/httpx" "github.com/golang/mock/gomock" "github.com/j...
package controllerutils import ( "crypto/tls" "fmt" "io" "net/http" "sort" "strconv" "github.com/ghodss/yaml" "github.com/tnozicka/openshift-acme/pkg/util" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog" _ "github.com/openshift/client-go/route/clientset/versioned/s...
package analyze import ( "encoding" "fmt" "sort" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/kiteco/kiteco/kite-golib/segment/segmentsrc" ) // - Dates - // Da...
/* Copyright 2018 Turbine Labs, 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, softw...
package steroids import ( "encoding/json" "fmt" "net/http" "strings" "time" ) const blockcypherURL = "https://api.blockcypher.com/v1/btc/main/addrs/%s/balance" const blockcypherBatchLimit = 3 // can query upto this many addresses at time const blockcypherHourlyLimit = 200 // can query upto this many addresses...
package cmd import ( "bytes" "crypto/rand" "encoding/hex" "errors" "fmt" "os" ) const ( magicBytes3 = "\x80sabakan-cryptsetup3" magicBytes2 = "\x80sabakan-cryptsetup2" maxCipherName3 = 105 maxCipherName2 = 106 idLength = 16 metadataSize = 2 * 1024 * 1024 ) // Pre-defined errors var ( ErrNo...
package attrs import ( "strings" "github.com/gobuffalo/nulls" "github.com/swiftcarrot/dashi/generators/attrs/database" "github.com/swiftcarrot/flect" ) type Attr struct { Original string Name flect.Ident inputType string goType string } type Attrs []Attr func (a Attr) String() string { return a.Or...
package main // ////////////////////////////////////////////////////////////////////////////////// // // // // Copyright (c) 2021 ESSENTIAL KAOS // // Apache License, Version 2.0 <ht...
package main import ( "database/sql" "flag" "fmt" "log" "net/http" "os" "text/template" "time" "github.com/golangcollege/sessions" _ "github.com/lib/pq" "github.com/vharitonsky/iniflags" "github.com/golang-migrate/migrate/v4" "github.com/golang-migrate/migrate/v4/database/postgres" _ "github.com/golang...
// Code generated by protoc-gen-go. // source: service.proto // DO NOT EDIT! /* Package echopb is a generated protocol buffer package. It is generated from these files: service.proto It has these top-level messages: EchoMessage */ package echopb import proto "github.com/golang/protobuf/proto" import fmt "fmt" imp...
/* Copyright (c) Facebook, Inc. and its affiliates. 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 bls import ( "errors" "fmt" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/pairing/bn256" "go.dedis.ch/kyber/v3/sign/bls" "go.dedis.ch/kyber/v3/util/random" "math/rand" ) // ========================================================= // shamir secret share // 密钥保存为scalar // 公钥保存为G2.point // 签名保存为G1.point ...
// MIT License // // (C) Copyright [2020-2021] 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 limitatio...
package svg import ( "crypto/md5" "encoding/hex" _ "errors" "fmt" geojson_svg "github.com/whosonfirst/go-geojson-svg" "github.com/whosonfirst/go-whosonfirst-geojson-v2" "github.com/whosonfirst/go-whosonfirst-geojson-v2/properties/geometry" "github.com/whosonfirst/go-whosonfirst-spr/v2/util" "io" _ "log" "os...
package priorityclasses import ( "context" context2 "github.com/loft-sh/vcluster/cmd/vcluster/context" "github.com/loft-sh/vcluster/pkg/controllers/resources/generic" "github.com/loft-sh/vcluster/pkg/util/loghelper" "github.com/loft-sh/vcluster/pkg/util/translate" schedulingv1 "k8s.io/api/scheduling/v1" "k8s.io...
package scheduling import ( "log" "sort" "strings" "github.com/montanaflynn/stats" ) type Evaluator func(X *GeneticSchedule) (fit, min, max float64, err error) type EvaluatorInfo struct { Key string Explain string Weight float64 F Evaluator } var ( EvaluatorsTable = map[string]*EvaluatorInfo{ ...
package actor import ( "fmt" "math/bits" "math/rand" "sync" "time" core "github.com/awesome-flow/flow/pkg/corev1alpha1" ) const ( MaxPeersCnt = 64 ReplTimeout = 50 * time.Millisecond ) type ReplicateMode uint8 const ( ReplicateUnknown ReplicateMode = iota ReplicateFanout ReplicateRand ReplicateNcopy R...
package fire_di import ( "errors" "fmt" "github.com/1-bi/log-api" "reflect" "strings" ) // RegisterBean define register bean type RegisterBean struct { // define base bean Bean interface{} ProvideFun interface{} } /** * create new beanCtx implement */ func newRegister() *register { register := new(r...
// Copyright (C) 2017 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 t...
package main import ( "fmt" "math/rand" "time" "github.com/gizak/termui" ) // snake directions const ( initDuration = 400 minDuration = 130 ) var debug bool // Game is general game struct type Game struct { score int scoreDisplay *termui.Par arena *Arena isStarted bool IsOver bo...
package templates import ( "encoding/base64" "fmt" "strings" "testing" "github.com/go-kit/kit/log" "github.com/go-openapi/swag" "github.com/stretchr/testify/assert" "github.com/tredoe/osutil/user/crypt/sha512_crypt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/sapcc/kubernikus/pkg/api/models" ...
// The server program issues Google search requests and demonstrates the use of // the go.net Context API. It serves on port 8080. // // The /search endpoint accepts these query params: // q=the Google search query // timeout=a timeout for the request, in time.Duration format // // For example, http://localhost:808...
// Copyright (c) 2021 Terminus, 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 agree...
package gorilla 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 ( janeBirthday = nook.Birthday{ Day: 0, Month...
/* Copyright 2019 Red Hat 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, software di...
/* * main.go * * Copyright 2021 <NAME> */ /* * This file is part of Hubfs. * * You can redistribute it and/or modify it under the terms of the GNU * Affero General Public License version 3 as published by the Free * Software Foundation. */ package main import ( "flag" "fmt" "net/url" "os" "path/filepat...
// Package action defines actions that you can trigger using events. // Normally you would do this with the .On() function that all goradd controls have. // // Defining Your Own Actions // You can define your own actions by creating a class that implements the ActionI interface, AND that is // encodable by gob.Serializ...
package main import ( "fmt" "io/ioutil" "log" "net" "os" "path" "strconv" "sync" "time" sshhandler "github.com/yashLadha/ssh-tail/sshHandling" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" "golang.org/x/crypto/ssh/knownhosts" ) func determinePrivateKey(path string, passphrase string) (ssh.S...
package main import ( "encoding/csv" "fmt" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "io" "os" "os/exec" "strconv" "strings" "time" ) //{ "_id" : ObjectId("557c8a526607852a166feda8"), "id" : 3031, "author" : "小山内薫", "author_en" : "OsanaiKaoru", "open_at" : "2001-05-01", "update_at" : "2014-09-17", "title" : ...
package geo import ( "fmt" "sort" "strings" "github.com/paulmach/orb" "github.com/paulmach/orb/geo" "github.com/paulmach/orb/planar" "go.starlark.net/starlark" ) func newLine(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (v starlark.Value, err error) { var points...
package mrgitlab import ( "bytes" "context" "encoding/json" "net/http" "sync" "time" "github.com/Sirupsen/logrus" "github.com/pkg/errors" "github.com/verath/mrgitlab/lib/gitlab" ) // handleWebhookTimeout specifies the max amount of // time that may elapse while handling a webhook const handleWebhookTimeout ...
package datadog import ( "encoding/json" "io" "github.com/coinbase/watchdog/primitives/datadog/client" "github.com/coinbase/watchdog/primitives/datadog/types" "github.com/pkg/errors" ) var ( // ErrInvalidComponentTypeID is returned when invalid type ID is used. ErrInvalidComponentTypeID = errors.New("invalid...
package smetrics // BytePair structs hold a pair of bytes type BytePair struct { firstByte byte secondByte byte } //DefaultSubstitutionWeights holds weights for common misidentifications of // letters and numbers taken from https://www.ismp.org/resources/misidentification-alphanumeric-symbols var DefaultSubstituti...
package main import ( "fmt" "github.com/evgeniyp/go-snake/fonts" "image/color" "log" "math/rand" "github.com/golang/freetype/truetype" "github.com/hajimehoshi/ebiten" "github.com/hajimehoshi/ebiten/inpututil" "github.com/hajimehoshi/ebiten/text" "golang.org/x/image/font" ) const ( w = 75 h ...
package main import ( "encoding/hex" "fmt" "math" ) type ParseState int const ( ExpectPacketVersion ParseState = 0 ExpectPacketType ParseState = 1 ExpectLenType ParseState = 2 ExpectLenBits ParseState = 3 ExpectLenNumPacks ParseState = 4 ExpectLiteralValue Par...
package datadog import ( "context" "errors" "fmt" "strconv" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" ) const ( traceIDHeaderKey = "x-datadog-trace-id" parentIDHeaderKey = "x-datadog-parent-id" priorityHeaderKey = "x-datadog-sampling-priority" // TODO: other headers: https://...
///usr/bin/go run "$0" "$@"; exit $? // // This program can be used to replace deprecated API versions in your Helm templates automatically. Run as: // // find $CHART_DIRECTORY/templates -type f -exec go run autofix-beta-apiversions.go {} \; // // Then review and commit any changes. package main import ( "fmt" "i...
package odoo import ( "fmt" ) // IrActionsActWindow represents ir.actions.act_window model. type IrActionsActWindow struct { LastUpdate *Time `xmlrpc:"__last_update,omptempty"` AutoSearch *Bool `xmlrpc:"auto_search,omptempty"` BindingModelId *Many2One `xmlrpc:"binding_model_id,omptempty"` Bind...
package http import ( "encoding/json" "errors" "net" "strings" "time" "github.com/gin-gonic/gin" lp "gitlab.jiagouyun.com/cloudcare-tools/cliutils/lineproto" uhttp "gitlab.jiagouyun.com/cloudcare-tools/cliutils/network/http" "gitlab.jiagouyun.com/cloudcare-tools/datakit" "gitlab.jiagouyun.com/cloudcare-tool...
package tabulate import ( "bytes" ) // TableFormatterInterface determines how a layout will format the table. // Create your own implementation if you need a custom format. type TableFormatterInterface interface { // Passed in a list of column widths (including the header if shown) // before drawing the table. Sav...
package odoo import ( "fmt" ) // LoyaltyReward represents loyalty.reward model. type LoyaltyReward struct { LastUpdate *Time `xmlrpc:"__last_update,omptempty"` CreateDate *Time `xmlrpc:"create_date,omptempty"` CreateUid *Many2One `xmlrpc:"create_uid,omptempty"` Discount ...
package util import ( "fmt" "strconv" "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" kapi "k8s.io/kubernetes/pkg/api" "github.com/golang/glog" buildapi "github.com/openshift/origin/pkg/build/api" buildclient "github.com/openshift/origin/pkg/build/client" ) const ( ...
// Copyright (c) 2021 GPBR Participacoes LTDA. // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merg...
package main import ( "container/heap" "fmt" "io/ioutil" "runtime" "strings" "time" ) type Node struct { ch rune freq int // The index is needed by update and is maintained by the heap.Interface methods. index int // The index of the item in the heap. left, right *Node } type CompressedPart struct...
package go_delay_queue import ( "context" "encoding/json" "errors" "fmt" "github.com/sony/sonyflake" "log" "sync" "time" ) type Delayer struct { levelTopicMap map[int]*DelayLevel levelMax int clientCtx context.Context clientWg *sync.WaitGroup queuer Iqueue now int64 // 当前时...
/* CLI tooling - generate ENV-docs */ package main import ( "fmt" "go/ast" "go/parser" "go/token" "log" "strings" "github.com/pterm/pterm" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" "github.com/spf13/viper" "github.com/batazor/shortlink/cmd/cli/internal/tool" ) func init() { viper.SetDefault...
/* * Copyright (c) 2020 Devtron Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
// Copyright 2021 - See NOTICE file for copyright holders. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
// Copyright 2022 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 router import ( "encoding/json" "fmt" "math/rand" "testing" "time" "github.com/gogo/protobuf/proto" "github.com/golang/mock/gomock" appchain_mgr "github.com/meshplus/bitxhub-core/appchain-mgr" "github.com/meshplus/bitxhub-kit/log" "github.com/meshplus/bitxhub-model/constant" "github.com/meshplus/bi...
package src import "time" // Playlist : Contains all Playlist Information that the Buffer needs type Playlist struct { Folder string PlaylistID string PlaylistName string Tuner int Clients map[int]ThisClient Streams map[int]ThisStream } // ThisClient : Client Information type ThisClient struct ...
/* * Copyright (c) 2020 <NAME>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish...
package graph import ( "bytes" "fmt" ) // Node defined a node with int64 ID and string name type Node struct { id int64 name string observable bool } // Path defines a path with node type // fork - f chain - h collider - c end - e type Path struct { from, to int64 nodes []int64 types ...
package stats import ( "log" "github.com/rubrikinc/rubrik-sdk-for-go/rubrikcdm" "github.com/rubrikinc/rubrik-splunk-hec-agent/utils" "encoding/json" ) // ArchiveLocationUsageBody - return interface for archive location usage type ArchiveLocationUsageBody struct { ClusterName string `json:"clust...