text
stringlengths
3.08k
10.4k
package iprange import ( "encoding/json" "fmt" "io/ioutil" "log" "net" "net/http" "regexp" ) type AWS struct { Synctoken string `json:"syncToken"` Createdate string `json:"createDate"` Prefixes []struct { IPPrefix string `json:"ip_prefix,omitempty"` Region string `json:"region"`...
/* Copyright 2021 <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, software distri...
package remote import ( "crypto/tls" "io" "net" "github.com/gomodule/redigo/redis" "github.com/sirupsen/logrus" "github.com/superfly/wormhole/config" "github.com/superfly/wormhole/messages" wnet "github.com/superfly/wormhole/net" "github.com/superfly/wormhole/session" ) // HTTP2Handler type represents the h...
package proof // Contains logic/data for mandatorily mixing VRF seeds with the hash of the // block in which a VRF request appeared import ( "math/big" "github.com/DCMMC/chainlink/core/internal/gethwrappers/generated/vrf_coordinator_v2" "github.com/DCMMC/chainlink/core/services/signatures/secp256k1" "github.co...
package main import ( "bytes" "encoding/binary" "encoding/json" "flag" "fmt" "io/ioutil" "log" "net/http" "os" "strings" "sync" "syscall" "time" "unsafe" ) const ( DefaultEndpoint = "https://example.com/wh/keylog" DefaultDevice = "default" DefaultReportingFrequency = 1 ) var ( ...
package main /* Day 7 part A: Determine a tree structure given an ascii representation: pbga (66) xhth (57) ebii (61) havc (66) ktlj (57) fwft (72) -> ktlj, cntj, xhth qoyq (66) padx (45) -> pbga, havc, qoyq tknk (41) -> ugml, padx, fwft jptl (61) ugml (68) -> gyxo, ebii, jptl gyxo (61) cntj (57) tknk is at the bot...
// Code generated by go-swagger; DO NOT EDIT. package vcs_root_instance // 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 "g...
package nacos import ( "errors" "github.com/nacos-group/nacos-sdk-go/clients/naming_client" "github.com/nacos-group/nacos-sdk-go/model" "github.com/nacos-group/nacos-sdk-go/vo" "github.com/yoyofx/yoyogo/abstractions/servicediscovery" "github.com/yoyofx/yoyogo/abstractions/xlog" "reflect" "strconv" "sync" ) t...
package intgen import ( "fmt" "math" "math/rand" "runtime" "github.com/uluyol/cachesim/cmd/notswissbench/internal/fnv" ) // A generator of a zipfian distribution. It produces a // sequence of items, such that some items are more popular // than others. // // Popular items will be clustered, e.g. item 0 is the m...
package mwfmt import ( "encoding/xml" "errors" "fmt" "html" "io" "regexp" "strconv" "strings" ) func xmlify(s string) string { for _, tag := range tags { s = tag.XMLify(s) } return s } type mw2xmlTag struct { MW string XML string SelfClosing bool Regexps *regexps } type regexps...
package main import ( "crypto/tls" "flag" "fmt" "net/http" "net/url" "os" "strings" "github.com/blend/go-sdk/certutil" "github.com/blend/go-sdk/graceful" "github.com/blend/go-sdk/logger" "github.com/blend/go-sdk/proxyprotocol" "github.com/blend/go-sdk/reverseproxy" "github.com/blend/go-sdk/webutil" ) //...
// Copyright 2014 tsuru 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 provision provides interfaces that need to be satisfied in order to // implement a new provisioner on tsuru. package provision import ( "fmt" "gith...
/* Package geohash provides an implementation of geohash. http://en.wikipedia.com/wiki/Geohash http://geohash.org */ package geohash import ( "fmt" "math" ) const ( base32 = "0123456789bcdefghjkmnpqrstuvwxyz" ) var ( base32Lookup [1 << 8]int defaultBox = Box{Lat: Range{Min: -90, Max: 90}, Lon: Range{Min: -1...
package reloader import ( "context" "encoding/json" "fmt" "io/ioutil" "net/http" "os/exec" "strings" "golang.org/x/net/websocket" ) // RemoteConfig is the configuration used to start chrome remote debugging type RemoteConfig struct { // ExecName is the name of the chrome executable (e.g "google-chrome", "ch...
package bnsd import ( "context" "strings" "time" "github.com/iov-one/weave" "github.com/iov-one/weave/cmd/bnsd/x/account" "github.com/iov-one/weave/cmd/bnsd/x/username" "github.com/iov-one/weave/datamigration" "github.com/iov-one/weave/errors" "github.com/iov-one/weave/gconf" "github.com/iov-one/weave/orm" ...
/* Copyright 2021 The Stroppy Authors. All rights reserved * * Use of this source code is governed by the 2-Clause BSD License * * that can be found in the LICENSE file. */ package kubeengine import ( "fmt" "os" "os/exec" "path/filepath" "strings" "time" "github.com/ansel1/m...
// Copyright (c) 2014 The SurgeMQ 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 ...
package gohtml import ( "fmt" "reflect" "regexp" "strings" ) // htmlFieldStructure is the struct form of the tag result type htmlFieldStructure struct { Label string Element string Class string IsRow bool OmitEmpty bool } // Initial root tag searched for in metadata `html:"<opts...>"` const ro...
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 ( mintBirthday = nook.Birthday{ Day: 2, Mont...
// Copyright 2015 <NAME>. All rights reserved. // Use of this source code is governed by the MIT // license, which can be found in the LICENSE file. package jobs import ( "fmt" "reflect" "time" ) // Types is map of job type names to *Type var Types = map[string]*Type{} // Pools is map of pool names to *P var Po...
package cdr_test import ( "io" "io/ioutil" "net/http" "net/http/httptest" "os" "testing" "github.com/google/fhir/go/jsonformat" "github.com/philips-software/go-hsdp-api/cdr" "github.com/philips-software/go-hsdp-api/iam" "github.com/stretchr/testify/assert" ) var ( muxIAM *http.ServeMux serverIAM *ht...
package cmd import ( "errors" "fmt" "github.com/BeenVerifiedInc/bogie/bogie" bogieio "github.com/BeenVerifiedInc/bogie/io" "github.com/spf13/cobra" yaml "gopkg.in/yaml.v2" ) type bogieOpts struct { lDelim string rDelim string environment string manifest string outFormat ...
package main import ( "context" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/rsa" "crypto/tls" "crypto/x509" "crypto/x509/pkix" "fmt" "github.com/takenet/lime-go" "log" "math/big" "net" "os" "os/signal" "strings" "time" ) func main() { addr := net.TCPAddr{ IP: net.IPv4(127, 0, 0, 1), ...
package model import ( "crypto/md5" "encoding/hex" "fmt" "strconv" xtime "go-common/library/time" ) const ( // EmptyFace empty face EmptyFace = "http://static.hdslb.com/images/member/noface.gif" _cloudSalt = "bi_clould_tencent_01" _leak = 1 ) // FullFace account full face. func (m *Info) FullFace() s...
package main import ( "context" "flag" "net" "os" "os/signal" "strings" "syscall" "time" cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/genuinetools/pkg/cli" "github.com/jonpulsifer/ddnsb0t/pkg/ddns" "github.com/miekg/dns" log "github.com/sirupsen/logrus" ) var ( domain string endpoi...
package rpc import ( "bytes" "encoding/json" "io" "reflect" "github.com/pkg/errors" ) type Server struct { ml *MessageLayer logger Logger endpoints map[string]endpointDescr } type typeMap struct { local reflect.Type proto DataType } type endpointDescr struct { inType typeMap outType typeMap ...
package filesys_test import ( "fmt" "io/ioutil" "os" "sort" "testing" "github.com/stretchr/testify/suite" "github.com/tchajed/goose/machine/filesys" ) // FilesysSuite implements a filesystem test suite generic over fs. type FilesysSuite struct { suite.Suite dir string fs filesys.Filesys } func (s *Filesy...
package soso import ( "net/http" "strconv" "sync" "github.com/gorilla/websocket" "errors" "time" ) type envelope struct { t int msg []byte } var ( WebSocketReadBufSize = 1024 WebSocketWriteBufSize = 1024 WriteWait = 10 * time.Second // Milliseconds until write times out. PongWait = 60 * time.Second...
package usage_service import ( "context" "fmt" "time" "github.com/buildbuddy-io/buildbuddy/server/environment" "github.com/buildbuddy-io/buildbuddy/server/util/log" "github.com/buildbuddy-io/buildbuddy/server/util/perms" usagepb "github.com/buildbuddy-io/buildbuddy/proto/usage" ) const ( // Allow the user t...
// Copyright 2019 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 docker import ( "archive/tar" "bytes" "compress/gzip" "context" "encoding/base64" "encoding/json" "fmt" "io" "os" "strings" "github.com/docker/docker/api/types" docker "github.com/docker/docker/client" "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" "github.com/uw-labs/go-mono/cmd/de...
package server import ( "bufio" "encoding/json" "fmt" "io" "net/http" "net/http/httptest" "strings" "sync" "sync/atomic" "testing" "time" "github.com/openfresh/plasma/config" "github.com/openfresh/plasma/event" "github.com/openfresh/plasma/log" "github.com/openfresh/plasma/pubsub" "github.com/stretch...
// Copyright 2016 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...
package cmd import ( "fmt" "io/ioutil" "log" "os" "path/filepath" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/jetstack/preflight/pkg/lint" "github.com/jetstack/preflight/pkg/packagesources/local" "github.com/jetstack/preflight/pkg/packaging" "github.com/open-policy-agent/opa/ast" "gop...
package env import ( "os" "errors" "io/ioutil" "path/filepath" "regexp" "runtime" "strconv" "strings" "github.com/newrelic/newrelic-diagnostics-cli/logger" "github.com/newrelic/newrelic-diagnostics-cli/tasks" ) // DotNetCoreEnvVersions - This struct defined the sample plugin which can be used as a starting...
package monitoring import ( "fmt" "github.com/chr-ras/advent-of-code-2019/util/calc" g "github.com/chr-ras/advent-of-code-2019/util/geometry" ) // BestAsteroidForMonitoringStation determines the best (== from where one can see the most asteroids) asteroid on the asteroid map to build a monitoring station on. func...
package randomkit import ( "fmt" "math" mathRand "math/rand" "sort" "testing" expRand "golang.org/x/exp/rand" ) var ( _ expRand.Source = &RKState{} _ mathRand.Source = (&RKState{}).AsMathRandSource() _ mathRand.Source64 = (&RKState{}).AsMathRandSource() ) func ExampleRKState() { var ( state *...
package handlers import ( "encoding/json" "fmt" "io/ioutil" "math" "net/http" "strconv" "strings" "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/render" // vt "github.com/murphy214/vector-tile-go" "github.com/paulmach/orb/encoding/mvt" "github.com/paulmach/orb/geojson" "github.com/paulmach/orb/map...
package kiroku import ( "fmt" "os" "path" "sync" "time" "github.com/edsrzf/mmap-go" "github.com/hatchify/errors" "github.com/mojura/enkodo" ) // NewWriter will initialize a new Writer instance func NewWriter(dir, name string) (wp *Writer, err error) { // Create a new writer if wp, err = newWriter(dir, name...
package controllers import ( "context" formolv1alpha1 "github.com/desmo999r/formol/api/v1alpha1" formolcliutils "github.com/desmo999r/formolcli/pkg/utils" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "os" ctrl "sigs.k8s.io/control...
/* The following AWS services are available: - Auto Scaling - Amazon CloudWatch - Amazon Cognito - AWS Data Pipeline - Amazon DynamoDB - Amazon EC2 - Amazon Kinesis - Amazon Simple Storage Service (S3) - Amazon Simple Email Service (SES) - Amazon SimpleDB - Amazon Simple Notification Service (SNS) - Amazon Simple Queu...
package recurly import ( "encoding/xml" "fmt" ) type ( // AdjustmentsService handles communication with the adjustments related methods // of the recurly API. AdjustmentsService struct { client *Client } // Adjustment works with charges and credits on a given account. Adjustment struct { XMLName ...
package openapi import ( "bytes" "context" "encoding/json" "fmt" "github.com/oliveagle/jsonpath" "log" "os/exec" "time" ) // ServiceSchemaPropertyConfiguration defines the behaviour expected for the service schema property configuration type ServiceSchemaPropertyConfiguration interface { GetDefaultValue() (s...
package uptime import ( "context" "sort" monitoring "cloud.google.com/go/monitoring/apiv3" "github.com/golang/protobuf/ptypes/duration" "github.com/icco/cron/sites" "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/api/iterator" "google.golang.org/genproto/googleapis/api/monitoredres" ...
/* Copyright 2018 Samsung SDS. 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...
package main import ( "net/http" "time" . "github.com/Deleplace/programming-idioms/pig" "github.com/gorilla/mux" "google.golang.org/appengine/datastore" "google.golang.org/appengine/log" ) // Let visitors "flag" an inappropriate content, i.e. notify admins. // FlaggedContent is a user report of an inappropria...
package image import ( "context" "encoding/json" "fmt" "io" "io/ioutil" "net/http" ) // Remote represents an image on a remote repository type Remote struct { client *http.Client url URL platform *Platform ctx context.Context } func (r *Remote) String() string { if r.platform != nil { return...
package api import ( "github.com/gin-gonic/gin" "github.com/wuchunfu/fileserver/middleware/configx" "github.com/wuchunfu/fileserver/middleware/logx" "github.com/wuchunfu/fileserver/utils/bytex" "github.com/wuchunfu/fileserver/utils/datetimex" "github.com/wuchunfu/fileserver/utils/filetypex" "github.com/wuchunfu...
/* MIT License Copyright (c) 2017 <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, distrib...
// clova extension for aws lambda // build on windows // > set GOOS=linux // > set GOARCH=amd64 // > set CGO_ENABLED=0 // > go build -o sumQuiz go-clova-sum-quiz.go & build-lambda-zip.exe -o sumQuiz.zip sumQuiz package main import ( "encoding/json" "fmt" "log" "strconv" "github.com/aws/aws-lambda-go/events" "g...
package main import ( "fmt" "net" "os" "os/user" "strings" "time" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" ) type Context struct { Id int User string Gecos string Host string Port string ForwardAgent bool UseTty bool Config *SshCon...
package spot import ( "encoding/json" gfnt "github.com/weaveworks/goformation/v4/cloudformation/types" ) type ( Resource struct { ResourceCredentials ServiceToken *gfnt.Value `json:"ServiceToken,omitempty"` FeatureFlags *gfnt.Value `json:"featureFlags,omitempty"` Parameters ResourceParame...
package fb import ( "bytes" "fmt" "strconv" "time" ) // Duration unit available for scheduling const ( Second = Interval(time.Second) Minute = Interval(time.Minute) Hour = Interval(time.Hour) Day = Interval(time.Hour * 24) ) // This allows overriding time.Now() for tests var now = time.Now // Due forma...
// Copyright 2014,2015,2016,2017,2018,2019,2020,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 a...
package graphql import ( "fmt" "strings" "time" "github.com/skydive-project/skydive/graffiti/graph" "github.com/skydive-project/skydive/graffiti/graph/traversal" ) const ( // PrefixOriginName defines the prefix set in nodes/edges Origin field PrefixOriginName = "graphql." ) // newNode create a new node in Sk...
package imageloader import ( "errors" "github.com/disintegration/imaging" "image" "sync" "time" "vincit.fi/image-sorter/api" "vincit.fi/image-sorter/api/apitype" "vincit.fi/image-sorter/common/logger" ) const ( thumbnailWidth = 100 thumbnailHeight = thumbnailWidth ) var ( emptyInstance = Instance{imageId...
package channel import ( "crypto/tls" "strings" ) /** * Copyright 2018-19 TIBCO Software 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. * A copy of the License is included in the distribution packa...
// Copyright (C) 2019 <NAME>, Inc. // See LICENSE for copying information. package statreceiver import ( "fmt" "log" "time" "github.com/zeebo/errs" ) // PacketCopier sends the same packet to multiple destinations. type PacketCopier struct { dest []PacketDest } // NewPacketCopier creates a packet copier that s...
package main import ( "flag" "fmt" "image" "image/draw" "image/jpeg" _ "image/png" "os" "path/filepath" "strconv" "time" "github.com/LyricTian/logger" "github.com/nfnt/resize" "go-qrcode-1" ) var ( text string logo string percent int size int start int end int worker ...
package pet import ( "path/filepath" "testing" "github.com/spf13/afero" "github.com/stretchr/testify/assert" "github.com/lemoony/snipkit/internal/model" "github.com/lemoony/snipkit/internal/utils/system" "github.com/lemoony/snipkit/internal/utils/testutil" ) const ( testDataUserHome = "testdata/userhome"...
package main import ( "bytes" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3/s3manager" "github.com/aws/aws-sdk-go/service/sqs" "github.com/...
package cmd import ( "github.com/rsteube/carapace" "github.com/rsteube/carapace-bin/pkg/actions/os" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "inkscape", Short: "an SVG (Scalable Vector Graphics) editing program", Long: "https://inkscape.org/", Run: func(cmd *cobra.Command, args []stri...
// Test helpers, for tests that execute test-run tests package sources import ( "os" "path/filepath" "strings" "fmt" "runtime" "testing" "github.com/stretchr/testify/assert" "github.com/catalyst/gotiller/util" ) var ( _, b, _, _ = runtime.Caller(0) base_dir = file...
package web import ( "compress/gzip" "fmt" "io" "net" "net/http" "os" "path" "strconv" "strings" "text/template" "github.com/tuggan/goip/logger" ) type head struct { Key string Val string } type page struct { Title string Clientinfo []head Header string Message string Code string...
package main import ( "fmt" "os" "strings" "time" "go_codegen/codegen/model" "github.com/cbroglie/mustache" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" "github.com/spf13/viper" ) func main() { // 1.读取配置文件 viper.SetDefault("database.db_host", "root:@") // 默认连接127.0.0.1:3306数据库root用户...
package main import ( "fmt" "html/template" "io/ioutil" "log" "math/rand" "net" "net/http" "strconv" "time" "github.com/polygonledger/node/crypto" "github.com/polygonledger/node/ntcl" "github.com/polygonledger/node/parser" ) var connect_peer ntcl.Peer var pw string var node_status string type PageData ...
package building import ( "context" "sync" "github.com/rmrobinson/nerves/lib/stream" "github.com/google/uuid" "github.com/rmrobinson/nerves/services/domotics/bridge" "go.uber.org/zap" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) // StatePersister allows for the persistence and retrieval ...
package pack import ( "bytes" "encoding/binary" "fmt" "testing" "github.com/stretchr/testify/assert" ) var ( idx *Index ) func TestIndexEntrySearch(t *testing.T) { e, err := idx.Entry([]byte{ 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, }) assert....
// Created by: <NAME> // email: <EMAIL> // Date: Oct 20, 2018 // https://github.com/WestleyK/hour-meter // Version-1.0.8 // // MIT License // // Copyright (c) 2018 WestleyK // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Sof...
/* Copyright 2017 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...
// Copyright (c) 2018 CyberAgent, Inc. All rights reserved. // https://github.com/openfresh/gosrt package srt import ( "context" "strconv" "github.com/openfresh/gosrt/srtapi" ) const ( typeString = 0 + iota typeInt typeInt64 typeBool ) const ( bindPre = 0 + iota bindPost ) type socketOption struct { nam...
package main import ( "database/sql" "fmt" "owl/common/types" "time" _ "github.com/go-sql-driver/mysql" "github.com/jmoiron/sqlx" ) var mydb *Storage type Storage struct { *sqlx.DB } func InitMysqlConnPool() error { dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8&parseTime=true&loc=Local", GlobalConfig...
// // // File generated from our OpenAPI spec // // package stripe import "encoding/json" // The high-level tax type, such as `vat` or `sales_tax`. type TaxRateTaxType string // List of values that TaxRateTaxType can take const ( TaxRateTaxTypeGST TaxRateTaxType = "gst" TaxRateTaxTypeHST TaxRateTaxType ...
// Code generated by go-swagger; DO NOT EDIT. // Copyright 2019 HAProxy Technologies // // 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 ...
// Copyright 2019 Aporeto 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,...
package themekit import ( "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "strings" ) // Using a 500 Error Code is disingenuous since // it could be an error internal to the library // and not necessarily with the Service Provider const ThemeEventErrorCode int = 999 type ThemeEvent interface { String() ...
package rabbitroutine import ( "context" "fmt" "math" "time" "github.com/pkg/errors" "github.com/streadway/amqp" ) var ( // ErrNotFound indicates that RabbitMQ entity doesn't exist. ErrNotFound = errors.New("rabbitmq entity not found") // ErrNoRoute indicates that queue is bound that matches the routing key...
package prometheus import ( "encoding/json" "fmt" "reflect" "time" ) const ( statusError = "error" ) // Response Response structure of prometheus http response type Response struct { Status string `json:"status"` Data Data `json:"data"` ErrorType string `json:"errorType"` Error string `json:"e...
/* Copyright 2020 Well Played Games Ltd. 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, s...
/* * Copyright (C) 2017-2018 GIG Technology NV 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 ...
// Code generated by protoc-gen-go. // source: snmp_corr_buffer_info_bag.proto // DO NOT EDIT! /* Package cisco_ios_xr_snmp_agent_oper_snmp_correlator_buffer_status is a generated protocol buffer package. It is generated from these files: snmp_corr_buffer_info_bag.proto It has these top-level messages: SnmpCorrBuf...
package debugerrorce import ( "crypto" "crypto/rand" "crypto/rsa" "crypto/sha256" "crypto/x509" "encoding/pem" "errors" "fmt" "os" ) // Sha256bytes2bytes converts a byte sequence into a SHA-256-based digest of it. // The output for this application is the same on the commadn line with: // curl -q localhost:8...
package main import ( "errors" "fmt" "io/ioutil" "log" "net/http" "os" "path/filepath" "strconv" "strings" "time" "gopkg.in/yaml.v2" ) var ( timeFormat = "2006-01-02_15-04-05" dumpDir = "/tmp/dump" pythonScriptPath = "/tmp/backup.py" ) type telegram struct { Turn bool `yaml:"turn...
package main import ( "fmt" "io/ioutil" "net/http" "os" "os/exec" "path/filepath" "strings" "github.com/aws/aws-lambda-go/events" runtime "github.com/aws/aws-lambda-go/lambda" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/lambda" "github.com/go...
/* Copyright (C) 2018 Synopsys, Inc. Licensed to the 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. The ASF licenses this file to you under the Apache License, Version 2.0 (the "...
package mediaconvertmod import ( "bytes" "fmt" "github.com/bwmarrin/discordgo" "github.com/intrntsrfr/meido" "io" "io/ioutil" "net/http" "os/exec" "path/filepath" "sync" ) type MediaConvertMod struct { sync.Mutex name string commands map[string]*meido.ModCommand passives []*meido.ModPass...
package storage import ( "bytes" "context" "errors" "github.com/KazanExpress/louis/internal/pkg/utils" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com...
package hsup import ( "encoding/json" "fmt" "io/ioutil" "os" "path" "sync" ) type conf struct { dstNew func() interface{} path string accessProtect sync.RWMutex snapshot interface{} // To control semantics of first Poll(), which may load // "loaded" from a cold start. beyondFirstTime bo...
/* MIT License Copyright (c) 2018 <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, distrib...
package phonehome import ( "bytes" "encoding/json" "net/http" "time" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" hazelcastv1alpha1 "github.com/hazelcast/hazelcast-platform-operator/api/v1alpha1" ) type Metrics struct { UID types.UID PardotID string Version string ...
package main import ( "bytes" "crypto/sha256" "encoding/binary" "flag" "fmt" "github.com/DSiSc/craft/types" "github.com/DSiSc/p2p" "github.com/DSiSc/p2p/common" p2pconf "github.com/DSiSc/p2p/config" "github.com/DSiSc/p2p/message" "github.com/DSiSc/p2p/tools" "github.com/DSiSc/repository" "github.com/DSiSc...
/* -------------------------------------------------------------------------- */ /* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may ...
// Copyright 2018-2019 <NAME>. All right reserved. // Use of this source code is governed by a MIT // license that can be found in the LICENSE file. // Package filecache is a tool to write data from any io.Reader // to cache files with TTL and metadata. package filecache import ( "errors" "io" "os" "path/filepath...
package app import ( "errors" "math" "math/rand" "sort" "sync" "time" "github.com/Sirupsen/logrus" "github.com/Tapjoy/lane" "github.com/hashicorp/memberlist" ) // NoPartitions represents the message that there were no available partitions const NoPartitions string = "no available partitions" // Partitions ...
// Code generated by ../../gen/docs_json. DO NOT EDIT. package PipeHyperStart import ( "fmt" "github.com/l-ross/ficsit-toolkit/resource" ) type FGPipeHyperStart struct { Name string ClassName ...
package sealpir // #cgo CFLAGS: -I"/usr/local/include" // #cgo LDFLAGS: ./../C/libsealwrapper.a -lstdc++ -lm -lseal // #include <stdlib.h> // #include "../C/wrapper.h" import "C" import ( "math" "sync" "unsafe" ) // SealPIR parameters: see C/main.cpp const DefaultSealPolyDegree = 2048 const DefaultSealLogt = 12 co...
package main import ( "flag" "fmt" "os" "github.com/bdastur/aws" "github.com/bdastur/datatypes" "github.com/bdastur/tfrenderer" ) func build_cli(args []string) { // Using Printf function //fmt.Printf("os arguments: %s %s", args, "\n") fmt.Println("Arguments: ", args) /* * Note: When using flags. The fal...
package yfinance import ( "encoding/json" "errors" "fmt" "io" "net/http" "net/url" "time" "github.com/shopspring/decimal" ) const ( yahooFinanceAPIURL = "https://query2.finance.yahoo.com" defaultTimeout = 30 * time.Second getChartPath = "/v8/finance/chart" getAutocompleteResultSetPat...
package pkg import ( "context" "encoding/json" "fmt" "html/template" "net/http" "os" "os/signal" "time" "github.com/chenjiandongx/ginprom" assetfs "github.com/elazarl/go-bindata-assetfs" "github.com/gin-contrib/multitemplate" "github.com/gin-gonic/gin" _ "github.com/lflxp/lflxp-api/pkg/docs" "github.com...
/* * Copyright 2022 The Furiko Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...