text
stringlengths
3.08k
10.4k
package deno import ( "encoding/json" "fmt" "io/ioutil" "net/http" "os" "path" "runtime" "github.com/axetroy/denox/internal/fs" "github.com/axetroy/denox/internal/utils" "github.com/pkg/errors" ) var ( ErrNotSupport = errors.New("not support your platform") ) type Os string type Arch string const ( OsL...
package contribution import ( "fmt" "gitmonitor/sections/data" "gitmonitor/services/utils" "fyne.io/fyne/v2" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/theme" "fyne.io/fyne/v2/widget" ) type authorTable struct { author author authorInfo authorInfo } func fillCommitString( textGrid *widget.TextGrid, ...
package main import ( "context" "fmt" "mime" "net" "net/http" "os" "sort" "strings" "github.com/gogo/gateway" "github.com/gorilla/handlers" "github.com/grpc-ecosystem/go-grpc-middleware" "github.com/grpc-ecosystem/go-grpc-middleware/recovery" "github.com/grpc-ecosystem/go-grpc-middleware/validator" "git...
// Copyright observIQ, 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 transport import ( "errors" "fmt" "net/url" "strconv" "strings" "sync" "github.com/LiuzhouChan/go-paxos/internal/server" "github.com/LiuzhouChan/go-paxos/internal/utils/logutil" "github.com/LiuzhouChan/go-paxos/paxosio" ) // INodeRegistry is the local registry interface used to keep all known // nod...
package main import ( "errors" "sort" ) const ( tornado = "🌪" tropicalStorm = "💨" hurricane = "💨" severeThunderstorms = "⛈" thunderstorms = "⛈" mixedRainAndSnow = "🌨" mixedRainAndSleet = "🌧" mixedSnowAndSleet = "🌨" freezingDrizz...
package icons import ( "bufio" "fmt" "image" "io" "os" "os/exec" "path/filepath" "runtime" "strings" "github.com/develar/app-builder/pkg/linuxTools" "github.com/develar/app-builder/pkg/log" "github.com/develar/app-builder/pkg/util" "github.com/develar/errors" "github.com/develar/go-fs-util" "go.uber.or...
package partition import ( "bufio" "bytes" "encoding/binary" "fmt" "io" "os" "sort" "strings" ) const partitionLimit = 1 << 24 // Collector is used to abstract partitioning, automatically writing and merging partitions where needed type Collector struct { dir string extension string ...
package topic import ( "context" "sync" "time" ) // Topic is a datastructure that holds a set of strings. Each time a list of // strings are published by the topic, a new id is created. It is possible to // receive all strings at once or the strings that published after a specivic // id. // // A Topic has to be cr...
/* Copyright 2018 The OpenEBS 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, softwa...
package main import ( "bytes" "encoding" "flag" "github.com/mmmorris1975/simple-logger/logger" "net" "os" "path/filepath" "sync" "time" "x32-osc-bridge/osc" "x32-osc-bridge/x32" ) var ( lsnr *net.UDPConn mixer *x32.Mixer iaddrs []net.Addr clients sync.Map log = logger.StdLogger port int v...
package prometheus import ( "context" "fmt" "regexp" "strings" "time" "github.com/opentracing/opentracing-go" "net/http" "github.com/grafana/grafana/pkg/components/null" "github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/tsdb" api "github.c...
package ekafka import ( "fmt" "sync" "github.com/gotomicro/ego/core/elog" "github.com/segmentio/kafka-go" ) const PackageName = "component.ekafka" // Component kafka 组件,包含Client、Producers、Consumers type Component struct { config *config logger *elog.Component client *Client consum...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package delivery import ( "context" "strings" "time" "github.com/hyperledger/fabric-protos-go/common" ab "github.com/hyperledger/fabric-protos-go/orderer" pb "github.com/hyperledger/fabric-protos-go/peer" "github.com/pkg/error...
package rj import ( "crypto/tls" "crypto/x509" "encoding/json" "fmt" "io" "log" "math" "net" "net/http" "net/http/httptrace" "os" "strings" "time" "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/http3" "github.com/spf13/cobra" ) type param struct { method string userAg...
package logtimer import ( "fmt" "math" "time" "github.com/Eun/mapprint" ) var longDayNames = []string{ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", } var shortDayNames = []string{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", } var shortMonthNames = []string{ ...
package wavefront import ( "bufio" "bytes" "io" "log" "strconv" "sync" "time" "github.com/circonus-labs/circonus-unified-agent/cua" "github.com/circonus-labs/circonus-unified-agent/metric" ) const MAX_BUFFER_SIZE = 2 type Point struct { Name string Value string Timestamp int64 Source string...
/* doubly-linked list */ package linkedList import ( "strconv" "strings" ) /* consumers of this package must implement the following interfaces in order for the AVL tree to order the elements of the tree. it's critical to use a type assertion; as a type assertion can cause a panic if the types don't match, ...
/* *Copyright 2015 Huawei Technologies Co., Ltd. All rights reserved. * eSDK is licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2....
/* * Copyright The Dragonfly 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 agr...
package addrutil import ( "context" "fmt" logging "github.com/ipsn/go-ipfs/gxlibs/github.com/ipfs/go-log" ma "github.com/ipsn/go-ipfs/gxlibs/github.com/multiformats/go-multiaddr" manet "github.com/ipsn/go-ipfs/gxlibs/github.com/multiformats/go-multiaddr-net" ) var log = logging.Logger("addrutil") // FilterAddr...
package docker10 import ( "time" ) // DockerImage is the type representing a container image and its various properties when // retrieved from the Docker client API. type DockerImage struct { ID string `json:"Id"` Parent string `json:"Parent,omitempty"` Comment string ...
package jwt import ( "crypto/ecdsa" "crypto/ed25519" "crypto/rsa" "crypto/x509" "encoding/pem" "testing" "time" ) var testKeyEC256 = mustParseECKey(`-----<KEY> -----END EC PRIVATE KEY-----`) var testKeyEC384 = mustParseECKey(`-----BEGIN EC PRIVATE KEY----- <KEY> -----END EC PRIVATE KEY-----`) var testKeyEC52...
// Copyright 2013 Google Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
package qbackend import ( "encoding/json" "fmt" "io" "os" "testing" ) var dummyConnection *Connection type BasicStruct struct { StringData string } type BasicQObject struct { QObject StringData string StructData BasicStruct Child *BasicQObject Signal func() initWasCalled bool } func (o *Basi...
/* Copyright 2018 The Skaffold 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, sof...
package ssclient import ( "bytes" "encoding/binary" "fmt" "io" "net" "shadowss/pkg/crypto" "shadowss/pkg/protocol" "shadowss/pkg/util" bytesPool "shadowss/pkg/util/pool/bytes" "github.com/golang/glog" ) type Client struct { net.Conn cryp *crypto.Crypto //every to remote request have diff iv ch...
package functions import ( "fmt" "github.com/influxdata/platform/query" "github.com/influxdata/platform/query/execute" "github.com/influxdata/platform/query/plan" "github.com/influxdata/platform/query/semantic" "github.com/pkg/errors" ) const LimitKind = "limit" // LimitOpSpec limits the number of rows return...
// Copyright 2015 The rkt 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...
package httph import ( "errors" "github.com/apaxa-go/helper/mathh" "net/http/httptest" "net/url" "os" "testing" ) func TestScanError_Error(t *testing.T) { tests := []struct { err ScanError str string }{ {ScanError{FieldNum: 0, FieldName: "f1", Type: ScanErrorTypeNoSuchField, SubError: nil}, "scan error ...
// Copyright 2017 Drone.IO Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package scm import ( "context" "errors" "io" "net/http" "net/url" "os" "strconv" "strings" "sync" ) var ( // ErrNotFound indicates a resource is not f...
/* Copyright IBM Corp. 2016 All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
/* Copyright 2014 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, ...
// Code generated by go-swagger; DO NOT EDIT. // // Copyright NetFoundry, 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unl...
package cmd import ( "fmt" "os" "path/filepath" "strings" "github.com/CircleCI-Public/circleci-cli/logger" "github.com/CircleCI-Public/circleci-cli/md_docs" "github.com/CircleCI-Public/circleci-cli/settings" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/viper" ) var defaultEndpoint = "...
// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may not // use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license" fil...
// Copyright 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 to in...
package main import ( "encoding/json" "fmt" "go/ast" "go/parser" "go/token" "os" "path/filepath" "strconv" "strings" h "github.com/gopherjs/output-size-action/helpers" "github.com/gopherjs/output-size-action/report" "github.com/sethvargo/go-githubactions" ) // env contains GitHub Action environment infor...
package storage import ( "context" "fmt" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/rest" configapiv1 "github.com/openshift/api/config/v1" imageregistryv1 "github.com/openshift/api/imageregistry/v1" regopclient "github.com/openshift/cluster-image-registry-operator/pkg/client" "github.com/openshift/cluste...
/* Copyright (c) 2019 the Octant contributors. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package navigation import ( "context" "encoding/json" "fmt" "path" "sort" "github.com/pkg/errors" apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apimachinery/pkg/a...
package paginate import ( "math" "net/url" "reflect" "strconv" "github.com/lucidfy/lucid/pkg/errors" "github.com/lucidfy/lucid/pkg/facade/logger" "github.com/lucidfy/lucid/pkg/facade/response" ) const DefaultView = "pkg/pagination/tailwind.go.html" func Construct(items interface{}, total int, perPage int, cu...
package dsl import ( "fmt" "log" "net" "net/rpc" "net/url" "regexp" "strconv" "strings" "time" "github.com/pact-foundation/pact-go/types" ) var ( timeoutDuration = 10 * time.Second commandStartServer = "Daemon.StartServer" commandStopServer = "Daemon.StopServer" commandVerifyProvider = "Da...
package model import ( "github.com/mongodb/grip" "github.com/pkg/errors" ) type dependencyIncluder struct { Project *Project requester string included map[TVPair]bool } // IncludeDependencies takes a project and a slice of variant/task pairs names // and returns the expanded set of variant/task pairs to incl...
package physical import ( "database/sql" "fmt" "sort" "strings" "time" "github.com/armon/go-metrics" _ "github.com/denisenkom/go-mssqldb" log "github.com/mgutz/logxi/v1" ) type MsSQLBackend struct { dbTable string client *sql.DB statements map[string]*sql.Stmt logger log.Logger } func newMsSQ...
// Copyright 2017 Factom Foundation // Use of this source code is governed by the MIT // license that can be found in the LICENSE file. package state_test import ( "fmt" "math/rand" "net/http/pprof" "testing" "time" "github.com/DCNT-developer/dcnt/common/constants" "github.com/DCNT-developer/dcnt/common/inter...
package main import ( "encoding/gob" "encoding/json" "fmt" "hash/fnv" "io/ioutil" "log" "net/http" "net/http/httptest" "net/url" "os" "os/exec" "path/filepath" "runtime" "time" "code.google.com/p/goauth2/oauth" ) type clientCredentials struct { ClientId string `json:"client_id"` ClientSecret str...
// Copyright (c) 2012-2015 <NAME>. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec // DO NOT EDIT. THIS FILE IS AUTO-GENERATED FROM gen-dec-(map|array).go.tmpl const genDecMapTmpl = ` {{var "v"}} := *{{ .Varname }} {{var "l"}} := r.ReadMapStart() ...
package main import ( "encoding/binary" "fmt" "log" "math/rand" "net/http" _ "net/http/pprof" "os" "sync" "sync/atomic" "time" "gx/ipfs/QmdG6rxQFetuV853nsNQn9EbrUEjQcbPB2htDniuLTQBsg/badger" "gx/ipfs/QmdG6rxQFetuV853nsNQn9EbrUEjQcbPB2htDniuLTQBsg/badger/options" "gx/ipfs/QmdG6rxQFetuV853nsNQn9EbrUEjQcbPB...
package simulation import ( "math/rand" "strconv" "time" sdk "github.com/cosmos/cosmos-sdk/types" sim "github.com/cosmos/cosmos-sdk/x/simulation" "github.com/desmos-labs/desmos/x/posts/internal/types" ) var ( randomMessages = []string{ "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "Vestibulu...
// Copyright 2019 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 source import ( "context" "fmt" "go/ast" "go/token" "go/types" "golang.org/x/tools/internal/lsp/protocol" "golang.org/x/tools/internal/telemetr...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-2021 Datadog, Inc. //go:build kubeapiserver && orchestrator // +build kubeapiserver,orchestrato...
package utils import ( "bufio" "bytes" "context" "fmt" "io" "io/ioutil" "net/http" "net/url" "strings" "time" "github.com/gogo/protobuf/proto" "github.com/golang/snappy" "github.com/opentracing-contrib/go-stdlib/nethttp" "github.com/pkg/errors" "github.com/prometheus/common/config" configutil "github....
/* * Copyright (C) 2017-Present Pivotal Software, Inc. All rights reserved. * * This program and the accompanying materials are made available under * the terms of the 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 ...
package functional import ( goctx "context" "fmt" "github.com/integr8ly/integreatly-operator/test/common" v1 "k8s.io/api/core/v1" "math" "os" k8sclient "sigs.k8s.io/controller-runtime/pkg/client" "strings" "testing" ) var ( namespacesToCheck = []string{ common.RHSSOUserProductOperatorNamespace, common.R...
package mylog import ( "context" "fmt" "io" "time" ) type LogLevel uint8 const ( Debug LogLevel = iota Info Warn Error Fatal ) var logLevel2Name = []string{ "[DEBUG]", "[INFO] ", "[WARN] ", "[ERROR]", "[FATAL]", } func (ll LogLevel) String() string { if ll < 5 { return logLevel2Name[ll] } else { ...
package server import ( "crypto/tls" "io" "log" "net" "net/http" "net/url" "strings" ) // ReverseProxy is a WebSocket reverse proxy. It will not work with a regular // HTTP request, so it is the caller's responsiblity to ensure the incoming // request is a WebSocket request. type ReverseProxy struct { // Dire...
// // Copyright 2022 IBM Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
/* Copyright 2016 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 namesys import ( "context" "strings" "time" lru "github.com/hashicorp/golang-lru" ds "github.com/ipfs/go-datastore" path "github.com/ipfs/go-path" opts "github.com/ipfs/interface-go-ipfs-core/options/namesys" isd "github.com/jbenet/go-is-domain" ci "github.com/libp2p/go-libp2p-crypto" peer "github.c...
package postgres import ( "fmt" _ "github.com/lib/pq" "github.com/pkg/errors" "github.com/chef/automate/components/applications-service/pkg/storage" ) const ( selectService = ` SELECT * FROM service WHERE origin = $1 AND name = $2 AND sup_id IN ( SELECT id FROM supervisor WHERE member_id = $3 ) `...
package models import ( "context" "encoding/hex" "encoding/json" "multisig/configs" "multisig/session" "sort" "strings" "time" "github.com/MixinNetwork/bot-api-go-client" "github.com/MixinNetwork/go-number" "github.com/MixinNetwork/mixin/common" "github.com/MixinNetwork/mixin/crypto" ) const ( MultisigS...
package peer_protocol import ( "bufio" "bytes" "encoding/binary" "errors" "fmt" "io" "io/ioutil" ) type ( MessageType byte Integer uint32 ) func (i *Integer) Read(r io.Reader) error { return binary.Read(r, binary.BigEndian, i) } const ( Protocol = "\x13BitTorrent protocol" ) const ( Choke M...
package repos import ( "context" "sort" "testing" "github.com/stretchr/testify/require" "github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies" livedependencies "github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies/live" "github.com/sourcegraph/sourcegraph/internal/conf/reposource" ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: types.proto package pb import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/timestamp" _ "github.com/golang/protobuf/ptypes/wrappers" ) // Reference imports to suppress errors if they are not oth...
package tester import ( "context" "encoding/json" "net/http" "strconv" "github.com/pladdy/cabby" "github.com/pladdy/stones" log "github.com/sirupsen/logrus" ) const ( baseURL = "https://localhost" eightMB = 8388608 // APIRootPath for tests APIRootPath = "cabby_test_root" // CollectionID for tests Colle...
/* * Copyright 2018 Comcast Cable Communications Management, 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 require...
package filters import ( "fmt" "github.com/vodinhphuc/golearn/base" "math" ) // ChiMergeFilter implements supervised discretisation // by merging successive numeric intervals if the difference // in their class distribution is not statistically signficant. // See Bramer, "Principles of Data Mining", 2nd Edition //...
// Copyright Istio 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 wri...
/* Copyright 2018 Pressinfra SRL. 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...
package fasthttp import ( "errors" "io" ) // NewBuffer creates and initializes a new Buffer using buf as its // initial contents. The new Buffer takes ownership of buf, and the // caller should not use buf after this call. NewBuffer is intended to // prepare a Buffer to read existing data. It can also be used to si...
package logger import ( "bytes" "context" "encoding/json" "errors" "fmt" "github.com/go-kratos/kratos/v2/log" "github.com/sirupsen/logrus" "io" "os" //"realworld/pkg/tracer" "runtime" "strings" "sync" "time" ) type Logger struct { logger *logrus.Logger } var _ logrus.Formatter = (*LogFormatter)(nil) ...
package secret import ( "context" "encoding/json" "fmt" "github.com/pkg/errors" "github.com/viant/smirror/auth" "github.com/viant/smirror/config" "github.com/viant/smirror/secret/kms" "github.com/viant/smirror/secret/kms/aws" "github.com/viant/smirror/secret/kms/gcp" "github.com/viant/afs" "github.com/viant...
package fmp4parser func getTrackType(box uint32) TrackType { if box == avc1SampleEntry || box == avc2SampleEntry || box == avc3SampleEntry || box == avc4SampleEntry || box == encvSampleEntry || box == hev1SampleEntry || box == hvc1SampleEntry || box == hVC1SampleEntry || box == dvavSampleEntry || bo...
// Copyright 2019 The Kanister 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...
// Copyright 2019 Istio 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 i...
package config import ( "encoding/json" "errors" "fmt" "io/ioutil" "net" "os" "github.com/massnetorg/mass-core/config" "github.com/massnetorg/mass-core/logging" ) const ( DefaultConfigFilename = "config.json" DefaultLoggingFilename = "mass" defaultShowVersion = false DefaultDataDirname ...
/* * MinIO Client (C) 2020 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 law or agr...
/* Copyright 2019 Gravitational, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
// Copyright (c) 2021 <NAME> // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. package store import ( "crypto/md5" "encoding/binary" "fmt" "strconv" "strings"...
package server import ( "errors" "io" "net" "strings" "sync" "time" "github.com/go-kit/kit/metrics" "github.com/go-kit/kit/metrics/provider" libmetrics "github.com/jingweno/upterm/metrics" "github.com/jingweno/upterm/upterm" log "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh" ) var ( ErrListnerCl...
// Copyright 2021 Monoskope 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...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package codepipeline import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Represents the input of a CreateCustomActionType operation. type CreateCustomActionTypeInput struct { _ stru...
package streamdeck import ( "image" "log" "github.com/davecgh/go-spew/spew" "github.com/stamp/hid" ) var NUM_KEYS = 15 var ICON_SIZE = 72 var NUM_FIRST_PAGE_PIXELS = 2583 var NUM_SECOND_PAGE_PIXELS = 2601 var reset = []byte{0x0B, 0x63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} var brightnessBytes = []byte{...
// Copyright ©2015 The Gonum 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 gen import ( "errors" "fmt" "golang.org/x/exp/rand" "github.com/savalin/gonum/graph" "github.com/savalin/gonum/graph/simple" "github.com/sa...
package internal import ( "fmt" "strings" "github.com/operator-framework/api/pkg/manifests" operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" "github.com/operator-framework/api/pkg/validation/errors" interfaces "github.com/operator-framework/api/pkg/validation/interfaces" v1 "k8s.io/...
// 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 w...
package main import ( "flag" "fmt" "os" "strings" ) type flags struct { DisplayHelp bool DisplayVersion bool DisplayEncodings bool rawColumns string Columns map[string]bool OffsetBase string Group int BytesPerRow int Encoding string Filename st...
package flate // fastGen maintains the table for matches, // and the previous byte block for level 2. // This is the generic implementation. type fastEncL1 struct { fastGen table [tableSize]tableEntry } // EncodeL1 uses a similar algorithm to level 1 func (e *fastEncL1) Encode(dst *tokens, src []byte) { ...
package main // RedisConfig define redis-config type RedisConfig struct { Port string `json:"port"` Bind string `json:"bind"` Unixsocket string `json:"unixsocket"` Unixsocketperm string `json:"unixsocketperm"` Daemonize string `json:"daemonize"` Pidfile string `json:"pidfile"`...
package gateway import ( "fmt" "sync/atomic" "github.com/submariner-io/admiral/pkg/log" "github.com/submariner-io/admiral/pkg/workqueue" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apima...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package datasync import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // CreateTaskRequest // Please also see https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTaskReques...
package service import ( "context" "fmt" "github.com/cortezaproject/corteza-server/pkg/logger" "strconv" "time" "github.com/cortezaproject/corteza-server/compose/types" "github.com/cortezaproject/corteza-server/pkg/actionlog" "github.com/cortezaproject/corteza-server/pkg/corredor" "github.com/cortezaproject/...
// Copyright 2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package chart import ( "bytes" "context" "fmt" "io" "net" "os" "sort" "sync" "github.com/AndreZiviani/aws-fuzzy/internal/common" "github.com/AndreZiviani/aws-fuzzy/internal/sso" "github.com/AndreZiviani/aws-fuzzy/internal/tracing" "github.com/AndreZiviani/aws-fuzzy/internal/vpc" "github.com/aws/aws-sdk-g...
package endurance_test import ( "context" "fmt" "io/ioutil" "log" "math/rand" "net/http/httptest" "os" "testing" "time" "golang.org/x/net/webdav" "github.com/kopia/kopia/tests/testenv" ) const ( maxSourcesPerEnduranceRunner = 3 enduranceRunnerCount = 3 runnerIterations = 1000 ) ty...
package miniweb import ( "context" "crypto/tls" "fmt" "log" "net" "net/http" "path/filepath" socks "github.com/armon/go-socks5" "github.com/jueckstock/miniweb/pkg/minica" ) // Server encapsulates the inner state of a running miniweb server (ports, filesystem root, configurations, caches, etc.) type Server s...
package music import ( "encoding/json" "fmt" "io/ioutil" "log" "net/http" "time" ) type Response struct { Href string `json:"href"` Items []struct { AddedAt time.Time `json:"added_at"` AddedBy struct { ExternalUrls struct { Spotify string `json:"spotify"` } `json:"external_urls"` Href string...
package ftxapi import ( "time" ) type WsChannel string const ( // public channels WsChannelTicker WsChannel = "ticker" WsChannelMarkets WsChannel = "markets" WsChannelTrades WsChannel = "trades" WsChannelOrderBook WsChannel = "orderbook" WsChannelOrderbookGrouped WsChannel ...
package client import ( "encoding/base64" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "net/url" "strings" "time" "github.com/prometheus/common/model" "github.com/grafana/loki/pkg/logql" "github.com/gorilla/websocket" "github.com/prometheus/common/config" "github.com/prometheus/prometheus/promql...
package config import ( "fmt" "regexp" "strconv" "github.com/pkg/errors" ) // TODO https://github.com/jbrekelmans/kube-compose/issues/46 var portBindingSpecRegexp = regexp.MustCompile( "^" + // Match full string "(?:" + // External part "(?:(?P<host>[a-fA-F\\d.:]+?):)?" + // IP address "(?P<ex...