text
stringlengths
3.08k
10.4k
//------------------------------------------------------------------------------ // Copyright 2019 <NAME> (zeropointx.io) // // 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 // //...
// Copyright (c) 2012-2014 <NAME>, https://menteslibres.net/xiam // // 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, ...
package broadcast import ( "io" "log" "net/http" "net/url" "os" "path" "sync" "sync/atomic" "time" "github.com/google/uuid" cleanhttp "github.com/hashicorp/go-cleanhttp" ) // Server proxies to many target type Server struct { RequestTimeout time.Duration Targets []url.URL wg sync.Wai...
package stomp import ( "fmt" "net" "strings" "sync" "time" "errors" "github.com/micro-plat/lib4go/concurrent/cmap" "github.com/micro-plat/lib4go/logger" "github.com/micro-plat/lib4go/mq" "github.com/zkfy/stompngo" ) type consumerChan struct { msgChan <-chan stompngo.MessageData unconsumeCh chan stru...
//go:build windows /* Copyright 2018 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by ...
package hubauth import ( "crypto/ecdsa" "crypto/rand" "crypto/sha256" "crypto/x509" "encoding/base64" "encoding/json" "errors" "fmt" "log" "net/http" "net/url" "strings" "time" ) type Token struct { RefreshToken string AccessToken string Type string ExpiresAt ...
package tsdb import ( "context" "testing" "github.com/grafana/grafana-plugin-sdk-go/backend" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/plugins" "github.com/grafana/grafana/pkg/plugins/backendplugin" "github.com/grafana/grafan...
package main import ( "errors" "image" "image/color" "image/draw" "image/gif" "image/jpeg" "image/png" "io" "os" "path" "github.com/disintegration/gift" ) // LoadImage loads image from file func LoadImage(filename string) (image.Image, error) { var decoder func(io.Reader) (image.Image, error) ext := Ge...
package provider import ( "time" "github.com/Azure/azure-k8s-metrics-adapter/pkg/aim" "github.com/Azure/azure-k8s-metrics-adapter/pkg/az-metric-client" "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" apimeta "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io...
// Copyright © 2017 <NAME> <<EMAIL>> // // 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 runner import ( "encoding/base64" "encoding/json" "fmt" "log" "os" "path" "time" "golang.org/x/crypto/nacl/secretbox" "github.com/flosch/pongo2" ) var logPrefixSet = false var Verbose = true func _logln(level, msg string, args ...any) { if !Verbose { return } if !logPrefixSet { log.SetFlag...
package maincmd import ( "fmt" "io" "log" "net" "net/http" "os" "strings" "github.com/gokrazy/rsync/internal/anonssh" "github.com/gokrazy/rsync/internal/config" "github.com/gokrazy/rsync/internal/rsyncd" // For profiling and debugging _ "net/http/pprof" ) func version() { log.Printf("gokrazy rsync, pid...
// Firstwindow.go package main import ( //"encoding/json" "github.com/nsf/termbox-go" "github.com/sinni800/gocui/cui" "time" ) func main() { cui.StartTermboxBlocking(WindowLogin()) } type Window1 struct { cui.Window Button1 cui.Button Button2 cui.Button Textbox1 cui.Textbox Checkb...
// Copyright 2018 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 qemu is suitable for running QEMU-based integration tests. // // The environment variable `UROOT_QEMU` overrides the path to QEMU and the // first...
package dsn import ( "errors" "net/http" "net/url" "regexp" "strings" ) var HTTP_X_SENTRY_AUTH = "X-SENTRY-AUTH" var ( // ErrMissing User Thrown if we are missing the public key that comprises {PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}{PATH}/{PROJECT_ID} ErrMissingUser = errors.New("sentry: missing p...
package writer // this is pretty much a clone of reader/s3.go and will be merged // in to https://github.com/whosonfirst/go-whosonfirst-s3/ // see also: https://github.com/thisisaaronland/go-iiif/blob/master/aws/s3.go // (20171217/thisisaaronland) import ( "bytes" "crypto/md5" "encoding/hex" "errors" "fmt" "git...
/* Copyright 2016, Cossack Labs Limited 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, softwa...
package group import ( "encoding/xml" "github.com/PaloAltoNetworks/pango/util" "github.com/PaloAltoNetworks/pango/version" ) // Entry is a normalized, version independent representation of a BGP // peer group. type Entry struct { Name string Enable bool AggregatedConfedAsPat...
// *** 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 v3 import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Retrieves the specified intent. func LookupIntent(ctx *pulumi.Context...
// +build linux package volume import ( "context" "errors" "fmt" "os" "syscall" "time" "github.com/dnephin/cobra" "github.com/docker/docker/pkg/system" api "github.com/storageos/go-api" "github.com/storageos/go-cli/cli" "github.com/storageos/go-cli/cli/command" cliconfig "github.com/storageos/go-cli/cli...
package api import ( "errors" "fmt" "model" "net/http" "strconv" "github.com/go-redis/redis" "github.com/gin-gonic/gin" ) const redisNewsIdCounter string = "news-id-counter" const redisNewsHashPrefix string = "news" const redisNewsUpvotesSortedSet string = "news-upvotes" //PostNewsItemHand...
// Copyright 2017 ETH Zurich // Copyright 2018 ETH Zurich, 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 ...
package consoledog import ( "context" "sync" "time" "github.com/Netflix/go-expect" "github.com/creack/pty" "github.com/cucumber/godog" "github.com/hinshun/vt10x" "github.com/stretchr/testify/require" ) // Starter is a callback when console starts. type Starter func(sc *godog.Scenario, console *expect.Console...
package problem0770 import ( "sort" "strconv" "strings" ) func basicCalculatorIV(expression string, evalvars []string, evalints []int) []string { // 把 evalvars 和 evalints 转换成 eemap eemap := make(map[string]int, len(evalvars)) for i := range evalvars { eemap[evalvars[i]] = evalints[i] } // 删除 expression 中的所...
package main import ( "context" "errors" "fmt" "net/http" "strings" "time" log "github.com/inconshreveable/log15" "github.com/shurcooL/githubv4" "golang.org/x/oauth2" ) type GithubClient struct { httpClient *http.Client cache Cacher client *githubv4.Client logger log.Logger } type rateLim...
package consumer import ( "fmt" "net/http" "github.com/Capucinoxx/consumer/middleware" ) // Method est une méthode du protocole // http ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"] type Method string // Route est la représentation d'une route http type Route struct { // description de la route Name str...
/* 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, ...
/** @author: xinyulu @date: 2021/3/1 17:35 @note: **/ package cmd import ( "cloudbatch/client" "cloudbatch/log" "strings" "github.com/360EntSecGroup-Skylar/excelize/v2" "github.com/jdcloud-api/jdcloud-sdk-go/services/waf/apis" "github.com/jdcloud-api/jdcloud-sdk-go/services/waf/models" "github.com/spf13/...
// Copyright 2018 Jump Trading // // 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 devops import ( "fmt" "log" "math/rand" "reflect" "time" "github.com/timescale/tsbs/cmd/tsbs_generate_queries/utils" "github.com/timescale/tsbs/query" ) const ( allHosts = "all hosts" errNHostsCannotNegative = "nHosts cannot be negative" errNoMetrics = "cannot get 0 metric...
//go:build proxy package executor import ( "encoding/json" "fmt" "github.com/pkg/errors" "sync" "time" "github.com/suborbital/atmo/atmo/appsource" "github.com/suborbital/atmo/atmo/options" "github.com/suborbital/atmo/directive/executable" "github.com/suborbital/grav/discovery/local" "github.com/suborbital/...
// Copyright 2010 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 try contains the executable part of the gotry command. // It is not intended for general use. package try import ( "fmt" "io" "os" "reflect" "u...
package main import ( "bufio" "context" _ "embed" "github.com/jessevdk/go-flags" "github.com/pkg/errors" "io" "log" "net" "os" "os/signal" "strconv" "strings" "syscall" "uwalker/banner" "uwalker/gen" "uwalker/limiter" "uwalker/router" "uwalker/scan" "uwalker/storage" ) //go:embed static/excludes va...
package toolbox // Statistics struct import ( "fmt" "sync" "time" ) // short string format func toS(d time.Duration) string { u := uint64(d) if u < uint64(time.Second) { switch { case u == 0: return "0" case u < uint64(time.Microsecond): return fmt.Sprintf("%.2fns", float64(u)) case u < uint64(tim...
// // Copyright 2011 - 2018 Schibsted Products & Technology AS. // Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // package ratelimit import ( "errors" "github.com/gin-gonic/gin" "github.com/tomasen/realip" "github.com/throttled/throttled" "github.com/devopsfaith/krakend...
// Copyright 2022 The go-exactonline AUTHORS. All rights reserved. // // Use of this source code is governed by a MIT // license that can be found in the LICENSE file. // Code generated by gen-services.go; DO NOT EDIT. package accountancy import ( "context" "fmt" "io/ioutil" "net/http" "github.com/stack11/go-exa...
package config import ( "flag" "os" "github.com/0chain/bandwidth_marketplace/code/core/errors" "github.com/0chain/bandwidth_marketplace/code/core/provider" "gopkg.in/yaml.v2" ) type ( // Config represents configs stores in Path. Config struct { ServerChain ServerChain `yaml:"server_chain"` Handler Han...
package main import ( "os" "path/filepath" "strings" "go/types" "github.com/amyjzhu/mutation-framework" log "github.com/sirupsen/logrus" "go/token" "go/ast" "fmt" "bytes" "crypto/md5" "go/printer" "io" "go/format" "github.com/spf13/afero" ) type MutantInfo struct { pkg *types.Pack...
package main import ( "github.com/denverquane/blackjack/deck" "log" "math/rand" "time" ) const SEED = 1234567 //Dumb heuristic, assume the last 14 cards of the deck are off limits const MaxCardsInPlay = 30 var Rules deck.Rules const TOTALHANDS = 1000000 const STARTINGBANKROLL = 10000000000 const MINIMUM_BET = ...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 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 obtain a copy of the Li...
package sqlpersistence import ( "context" "database/sql" "errors" "fmt" "sync" "time" "github.com/dogmatiq/linger" "github.com/dogmatiq/verity/persistence" "go.uber.org/multierr" ) // dataStore is an implementation of persistence.DataStore for SQL databases. type dataStore struct { db *sql.DB driver ...
// Copyright (c) 2015-2021 MinIO, Inc. // // This file is part of MinIO Object Storage stack // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (...
// Copyright 2022 PingCAP, Inc. Licensed under Apache-2.0. package endpoint import ( "fmt" "io" "net/http" "net/url" "regexp" "github.com/pingcap/tidb-dashboard/util/client/httpclient" "github.com/pingcap/tidb-dashboard/util/client/pdclient" "github.com/pingcap/tidb-dashboard/util/client/tidbclient" "github...
package autotweeter import ( "context" "encoding/json" "flag" "fmt" "io" "log" "math/rand" "net/http" "os" "strings" "text/template" "time" "github.com/carlmjohnson/flagext" "github.com/dghubble/go-twitter/twitter" "github.com/dghubble/oauth1" "github.com/henvic/ctxsignal" "github.com/rugaviola/sdut-...
// osop // Copyright (C) 2014-2016 Karol '<NAME>' Woźniak // // 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, m...
// This file is part of ngaro - https://github.com/db47h/ngaro // // 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/licens...
/* Copyright 2019 <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 writing, software distributed...
// Licensed to LinDB under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. LinDB licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use this file except in compli...
/* Copyright 2020 GramLabs, 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 ...
// Copyright (c) 2020-2021 Nordix Foundation. // // SPDX-License-Identifier: Apache-2.0 // // 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...
package backend import ( "bufio" "bytes" "context" "io" "io/ioutil" "net/http" "regexp" "time" "github.com/gogo/protobuf/proto" "github.com/golang/snappy" "github.com/opentracing-contrib/go-stdlib/nethttp" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/common/mod...
package ldrlib import ( "encoding/binary" "encoding/hex" "log" ) func routingEntryToDestination(entry *routingEntry) *destination { dest := &destination{} dest.address = entry.destination dest.capacity = entry.capacity return dest } func destinationToRoutingEntry(dest *destination, currentBlock uint64, next...
// Code generated by go-swagger; DO NOT EDIT. package n_a_s // 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/go...
// Cloud Driver of CB-Spider. // The CB-Spider is a sub-Framework of the Cloud-Barista Multi-Cloud Project. // The CB-Spider Mission is to connect all the clouds with a single interface. // // * Cloud-Barista: https://github.com/cloud-barista // // This is Resouces interfaces of Cloud Driver. // // by <EMAIL>, 201...
// Copyright 2021 Splunk, 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 ...
package main import ( "context" "log" "os" "path" "path/filepath" "strings" "time" "github.com/fsnotify/fsnotify" ) // TaskCtxKey type to use for keys in task context type TaskCtxKey string const ( changedFileNameKey TaskCtxKey = "changed_file_name_key" prevTaskOutputKey TaskCtxKey = "prev_task_output_ke...
// Package experiment contains network experiment. package experiment import ( "context" "encoding/json" "errors" "os" "time" "github.com/ooni/probe-engine/collector" "github.com/ooni/probe-engine/experiment/handler" "github.com/ooni/probe-engine/model" "github.com/ooni/probe-engine/session" ) const dateFor...
// Copyright © 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 law or agreed to...
/* Copyright © 2020 <NAME> <<EMAIL>> 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, distribute, ...
// Copyright 2016-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 main import ( "fmt" "io" "os" "strconv" "strings" flag "github.com/spf13/pflag" "github.com/u-root/u-root/pkg/smbios" ) var ( flagDu...
// Copyright 2020 The Chromium 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 asset import ( "context" "fmt" "github.com/golang/protobuf/proto" "github.com/maruel/subcommands" "go.chromium.org/luci/auth/client/authcli...
/* * MinIO Cloud Storage, (C) 2017 MinIO, 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 la...
// Package skiplist implements memory skip lists. package skiplist import ( "bytes" "fmt" "math/rand" "time" ) var ( // Probability to go to next level. Probability = 0.5 // With probability 0.5 use log2(n) as MaxLevel, // n is amount of elements to be expected for index. MaxLevel = 32 ) // Element represen...
package tengo import ( "net/url" "reflect" "testing" "github.com/jmoiron/sqlx" ) // Give tests a way to avoid stomping on each others' cached instances, since // currently we don't permit creation of instances that only differ by user, // pass, or defaultParams func nukeInstanceCache() { allInstances.byDSN = ma...
/* Copyright 2019 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 writing, software dist...
// Copyright 2022, NLP Odyssey 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 gomaddness import ( "log" "math" "runtime" ) // Maddness is the primary structure that holds parameters and implements // methods of the whol...
package cmd import ( "encoding/json" "fmt" "net" "os" "sync" "github.com/amg84/om-stream/internal/app/frontend" "github.com/amg84/om-stream/internal/db/kv" "github.com/amg84/om-stream/internal/db/pubsub" "github.com/amg84/om-stream/internal/db/stream" "github.com/amg84/om-stream/internal/dlm" "github.com/a...
package main import ( "bufio" "bytes" "fmt" "os" ) func main() { reader := bufio.NewReader(os.Stdin) tc := readNum(reader) var buf bytes.Buffer for tc > 0 { tc-- n, k := readTwoNums(reader) C := readNNums(reader, n) E := make([][]int, n-1) for i := 0; i < n-1; i++ { E[i] = readNNums(reader, 2) ...
package graphqlfixture import ( "context" "errors" "fmt" "github.com/Jeffail/gabs/v2" "github.com/gmm1900/graphqlclient" ) // Setup calls each fixture's Setup (graphql call) in sequence, and captures the values from the responses. func (fs *Fixtures) Setup(ctx context.Context, graphqlClient *graphqlclient.Client...
// Onix Config Manager - Dbman // Copyright (c) 2018-2020 by www.gatblau.org // Licensed under the // Contributors to this project, hereby assign copyright in this code to the project, // to be licensed under the same terms as the rest of the code. package plugin import ( "bytes" "encoding/json" "fmt" "g...
package web import ( "errors" "fmt" "net/http" pathlib "path" "strconv" "strings" "path" "github.com/go-zepto/zepto/web/renderer" "github.com/gorilla/mux" ) type routerOptions struct { path string hosts []string isRoot bool } type RouterHandler struct { methods []string path string r...
package util import ( "encoding/json" "fmt" "testing" ) const ( // Used in parsing tests wt_time = "12:34" wt_timeT = ((12 * 60) + 34) * 60 // Public timetable does not have "00:00" times wt_zeroTime = "00:00" // Used for comparisons, ranging over midnight wt_time2 = "23:10" wt_time2T = ((23 * 60) + 10) ...
package runtime import ( "fmt" "io" "io/ioutil" "net/http" "strings" kebError "github.com/kyma-project/control-plane/components/kyma-environment-broker/internal/error" "github.com/kyma-project/control-plane/components/kyma-environment-broker/internal/iosafety" "github.com/hashicorp/go-multierror" "github.co...
package environments import ( "fmt" "io/ioutil" "os" "path" "path/filepath" "time" strftime "github.com/jehiah/go-strftime" homedir "github.com/mitchellh/go-homedir" yaml "gopkg.in/yaml.v2" "github.com/9seconds/ah/app/utils" ) const ( defaultAppDirName = ".ah" defaultTracesDirName = "traces" d...
package mtr import ( "bytes" "fmt" "time" "github.com/syepes/network_exporter/pkg/common" "github.com/syepes/network_exporter/pkg/icmp" ) // Mtr Return traceroute object func Mtr(addr string, maxHops int, count int, timeout time.Duration, icmpID int) (*MtrResult, error) { var out MtrResult var err error opt...
package crdt import ( "fmt" "io" "io/ioutil" "github.com/johnny-morrice/godless/crypto" "github.com/johnny-morrice/godless/log" "github.com/johnny-morrice/godless/proto" "github.com/pkg/errors" pb "github.com/gogo/protobuf/proto" ) type Index struct { Index map[TableName][]Link } func EmptyIndex() Index {...
package proxy import ( "context" "encoding/base64" "github.com/pkg/errors" "helm.sh/helm/v3/pkg/release" corev1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" logUtils "github.com/gardener/potter-hub/pkg/log" ) ...
package pkg import ( "errors" "net/http" kernelService "github.com/divoc/kernel_library/services" "github.com/divoc/portal-api/pkg/services" "github.com/divoc/portal-api/pkg/utils" "github.com/divoc/portal-api/swagger_gen/models" log "github.com/sirupsen/logrus" ) func GetFacilityUsers(authHeader string) ([]*...
package main import ( "fmt" "github.com/bwmarrin/discordgo" "github.com/caarlos0/env" "math/rand" "os" "os/signal" "strings" "syscall" "time" ) const ( version = "0.3b Dev" // change any time there is a milestone of development (make sure to tag release before changing!) ) // Environment variables type con...
package celeritas import ( "fmt" "log" "net/http" "os" "strconv" "time" "github.com/CloudyKit/jet/v6" "github.com/alexedwards/scs/v2" "github.com/douglasqsantos/celeritas/render" "github.com/douglasqsantos/celeritas/session" "github.com/go-chi/chi/v5" "github.com/joho/godotenv" ) const version = "1.0.0" ...
/** * @Author: DollarKiller * @Description: 解析test * @Github: https://github.com/dollarkillerx * @Date: Create in 11:32 2019-09-24 */ package test import ( "bytes" "github.com/PuerkitoBio/goquery" "github.com/dollarkillerx/easyutils" "github.com/dollarkillerx/easyutils/clog" "io/ioutil" "log" "math/rand" ...
/* * 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 main import ( "context" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/tls" "errors" "fmt" "io" "net/http" "os" "strconv" "time" _ "net/http/pprof" nanoid "github.com/matoous/go-nanoid/v2" "github.com/armon/circbuf" "github.com/gorilla/mux" "github.com/planetscale/planetscale-go/pla...
package model import ( "bytes" "crypto/rand" _ "database/sql" "encoding/binary" "encoding/json" "errors" "os" "path" "github.com/proofrock/snapkup/util" "github.com/proofrock/snapkup/util/streams" "golang.org/x/crypto/argon2" ) type Snap struct { Id int `json:"id"` Timestamp int64 `json:"time...
// Copyright 2018 <NAME>, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
package flag import ( "errors" "flag" "io" "os" "path/filepath" "time" ) type FlagSetEx struct { *flag.FlagSet envPrefix string } var DefaultConfigFlagName = "config" var ex = &FlagSetEx{ flag.NewFlagSet(os.Args[0], flag.ContinueOnError), "", } // Bool defines a bool flag with specified name, default val...
package gcode import ( "bytes" "errors" "fmt" "github.com/aligator/goslice/clip" "github.com/aligator/goslice/data" "math" ) // Builder creates GCode by combining several commands. // Use NewGCodeBuilder to create a new builder. type Builder struct { buf *bytes.Buffer extrusionAmount ...
/* * Copyright 2020 InfAI (CC SES) * * 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 collector import ( "encoding/json" "fmt" "time" "newrelic/limits" "newrelic/log" ) // rawHarvestLimits represents the harvest_limits object specified in connect // messages. We use pointers to distinguish between nil and 0. type rawHarvestLimits struct { ErrorEventData *int `json:"error_event_data"`...
package exec import ( "encoding/json" "fmt" "io" "io/ioutil" "math" "strconv" "strings" "github.com/concourse/atc" "github.com/concourse/atc/worker" "github.com/concourse/baggageclaim" ) //go:generate counterfeiter . TaskConfigFetcher // TaskConfigFetcher is used to determine a Task step's TaskConfig. typ...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package acmpca import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" "github.com/aws/aws-sdk-go-v2/private/protocol/jsonrpc" ) // Please also see ...
package controller import ( "encoding/json" "fmt" "runtime/debug" "time" jsonpatch "github.com/evanphx/json-patch" "github.com/magaldima/macro/common" "github.com/magaldima/macro/pkg/apis/microservice/v1alpha1" clientset "github.com/magaldima/macro/pkg/client/clientset/versioned/typed/microservice/v1alpha1" ...
// A combine proc merges multiple upstream inputs into one output. package combine import ( "context" "sync" "github.com/brimdata/zed/runtime/op" "github.com/brimdata/zed/zbuf" ) type Proc struct { ctx context.Context once sync.Once parents []*puller queue <-chan *puller waitCh <-chan struct{...
package autoscaling import ( "errors" "net" "sort" "strconv" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/ec2" "github.com/kelsey...
package lecimg import ( "image" "image/color" "image/draw" "log" "github.com/disintegration/gift" "github.com/mitchellh/mapstructure" ) // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- type DeskewOpti...
package client import ( "crypto/tls" "github.com/lucas-clemente/quic-go" "golang.org/x/net/context" "io" "log" "net" "os" "os/signal" "qpep/shared" "strconv" "sync" "time" ) var ( proxyListener net.Listener ClientConfiguration = ClientConfig{ListenHost: "0.0.0.0", ListenPort: 8080, GatewayHost: ...
package main import ( "fmt" "reflect" "strings" "github.com/skeptycal/siunits" . "github.com/skeptycal/types" ) const ( defaultMaxPaddingLevel = 80 defaultPaddingLevel = 1 defaultPaddingString = " " ) type ( // Any = types.Any // AnyMap map[Any]Any dict struct { name string protected bool...
// Code generated by optiongen. DO NOT EDIT. // optiongen: github.com/timestee/optiongen package xcmd import ( "io" "os" "github.com/sandwich-go/xconf" ) // config should use NewConfig to initialize it type config struct { // annotation@Short(comment="少于一行的操作说明,简短") Short string // annotation@Description(comm...
/* Copyright (c) 2020 TriggerMesh 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...
package jwthelper import ( "bytes" "encoding/json" "fmt" "io/ioutil" "strings" "github.com/dgrijalva/jwt-go" ) // Parser is used to parse JWT token string. type Parser struct { key interface{} parser jwt.Parser } // ParserOption represents the option for parsing JWT token string. // Use option helper fun...