text
stringlengths
3.08k
10.4k
// 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 server import ( "context" "crypto/tls" "crypto/x509" "net" "net/http" "os" "strings" "fmt" "os/signal" "github.com/kraken/ui" "google.golang.org/grpc" "google.golang.org/grpc/health" servertls "github.com/liferaft/kubekit/pkg/server/tls" ) // Server encapsulate the server configuration type S...
package dev import ( "strings" "testing" "github.com/sirupsen/logrus" logrusTest "github.com/sirupsen/logrus/hooks/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/kelda-inc/kelda/pkg/proto/dev" "github.com/kelda-inc/kelda/pkg/sync" syncMocks "github.com/kelda-inc/ke...
package fsm import ( "bytes" "encoding/json" "fmt" "io" "os/exec" "strings" "github.com/emicklei/dot" ) // Action represents an action type Action string // Status represent a status type Status string // StatusAction represents either // an action and its origin state (Source) // an action and its state re...
package riddles import ( "fmt" "math" "strconv" "strings" "unicode" ) // https://www.geeksforgeeks.org/string-data-structure/ // sumAllNumbers // Given a string containing alphanumeric characters, // calculate sum of all numbers present in the string. func sumAllNumbers(str string) int { if len(str) == 0 { r...
package test import ( "github.com/eredotpkfr/golidators" "testing" ) var ( Ipv4Cases = [26]StrTestRecord{ {"127.0.0.1", true}, {"10.0.0.0", true}, {"192.168.1.43", true}, {"172.16.17.32", true}, {"", false}, {"192.168.127.12", true}, {"12.12.12.12", true}, {"255.255.255.255", true}, {"abc.0.0.1",...
package main import ( "bytes" "flag" "fmt" "os" "path" "path/filepath" "strings" "github.com/howeyc/gopass" ) const splitDefVal = 24000000 // CLIOpts describes all possible arguments and options available in the command-line interface. type CLIOpts struct { Input []string InputDir string Outdir s...
package publication import ( "context" "crypto/sha256" "fmt" "io" "io/ioutil" "net/http" "net/http/httptest" "os" "path/filepath" "strings" "testing" "time" "github.com/stretchr/testify/assert" ) func TestCatalogNeedsUpdate(t *testing.T) { tmp, err := ioutil.TempDir("", "go-jwlm") assert.NoError(t, er...
package kernels import ( "gitlab.com/akita/mgpusim/insts" ) // WGFilterFunc is a filter type WGFilterFunc func( *HsaKernelDispatchPacket, *WorkGroup, ) bool // KernelLaunchInfo includes the necessary information to launch a kernel. type KernelLaunchInfo struct { CodeObject *insts.HsaCo Packet *HsaKernelDisp...
package rtspsrv import ( "errors" "fmt" "time" "github.com/use-go/websocket-streamserver/logger" "github.com/use-go/websocket-streamserver/mediatype/amf" "github.com/use-go/websocket-streamserver/wssapi" ) //RTCP Cmd Type const ( RTCPSR = 200 RTCPRR = 201 RTCPSDES = 202 RTCPBYE = 203 RTCPAPP = 204 )...
package main import ( "bufio" "bytes" "fmt" "os" ) func main() { reader := bufio.NewReader(os.Stdin) n := readNum(reader) S := make([]string, n) for i := 0; i < n; i++ { S[i] = readString(reader) } q := readNum(reader) Q := make([][]int, q) for i := 0; i < q; i++ { Q[i] = readNNums(reader, 2) } ...
// Copyright 2015 The Prometheus 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 main import ( "context" "encoding/json" "errors" "fmt" "log" "net/http" "github.com/google/go-github/v32/github" "github.com/hashicorp/go-multierror" "github.com/wolfeidau/dynalock" ) var ( lockedSuffix = "locked" ) type issuesService interface { AddLabelsToIssue(ctx context.Context, owner string...
package illusive import ( "encoding/json" ) type TimelineItem struct { Details json.RawMessage `json:"details"` EventID *int `json:"eventId,omitempty"` ID string `json:"id"` Source string `json:"source"` Starred bool `json:"starred"` Time int64 `json:"...
package utils import ( "sync" syncv1alpha1 "github.com/Skyscanner/applicationset-progressive-sync/api/v1alpha1" argov1alpha1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" "k8s.io/apimachinery/pkg/util/intstr" ) type ProgressiveSyncState interface { MarkAppAsSynced(app argov1alpha1.Application, sta...
package sounds import "fmt" import ( lc "../langcode" "unicode/utf8" "strings" "errors" ) type Signs [lc.Size]string type ruleFunc func(*Sounds, int) (bool, bool) type Sound struct { signs Signs rules []ruleFunc property uint } type SoundsStore []Sound type Sounds struct { property u...
package elaapi import ( "Elastos.ELA/account" "Elastos.ELA/core/contract" "Elastos.ELA/core/signature" tx "Elastos.ELA/core/transaction" "Elastos.ELA/core/transaction/payload" "bytes" "encoding/hex" "fmt" "github.com/yuin/gopher-lua" ) const luaTransactionTypeName = "transaction" // Registers my person ty...
package aws import ( "github.com/Qovery/pleco/pkg/common" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" log "github.com/sirupsen/logrus" "time" ) type documentDBCluster struct { DBClusterIdentifier string DBClusterMembers []string ClusterCreateTime time.Time SubnetGroupName ...
package ecs import ( "strconv" "strings" "text/template" "github.com/BurntSushi/ty/fun" "github.com/containous/traefik/log" "github.com/containous/traefik/provider/label" "github.com/containous/traefik/types" ) // buildConfiguration fills the config template with the given instances func (p *Provider) buildCo...
package rpc import ( "context" "crypto/ed25519" "crypto/rand" "crypto/tls" "crypto/x509" "fmt" "math/big" "net" "time" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/test/bufconn" "source.monogon.dev/metropolis/node/core/identity" "source.monogon.dev/metropolis/pk...
package main /* #cgo CFLAGS: -I../../headers #cgo LDFLAGS: -ljson-c #include <json-c/json.h> #include "kuzzlesdk.h" */ import "C" import "unsafe" func JsonCType(jobj *C.json_object) C.json_type { // Returning the value directly results in a type mismatch switch C.json_object_get_type(jobj) { case C.json_type_...
package uierrors import ( "context" "fmt" "sync" "time" clientv3 "go.etcd.io/etcd/client/v3" "github.com/golang/protobuf/proto" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/batchcorp/plumber-schemas/build/go/protos" "github.com/batchcorp/plumber/embed/etcd" ) const ( // DefaultErrorT...
package metrics //#include "ogr_api.h" //#include "ogr_srs_api.h" //#include "cpl_conv.h" //#cgo pkg-config: gdal import "C" import ( "bytes" "encoding/json" "fmt" "log" "net" "net/url" "time" "unsafe" "github.com/nci/gsky/utils" ) type URLInfo struct { RawURL string `json:"raw_url"` Host st...
package tasks import ( "bufio" "encoding/json" f "floe/workflow/flow" "fmt" "io" "testing" ) func Test_LoadEmptyPushTrigger(t *testing.T) { prev := loadPrevHashes("empty.stat.json") if len(prev.Hashes) != 0 { t.Error("empty hash should be empty") } newH := &GitHashes{} branch, hash, ok := gotDifferentHa...
package syncer import ( "context" "errors" "fmt" "net/url" "strings" "time" "github.com/jackc/pgx/v4" "github.com/jmoiron/sqlx" "github.com/mergestat/fuse/internal/db" uuid "github.com/satori/go.uuid" ) const ( reviewsFullSyncDays = 90 // 90 days selectGitHubPRReviews = `SELECT github_prs.number AS pr_n...
package runner import ( "context" "encoding/base64" "encoding/json" "errors" "io" "path" "strings" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" // "g...
package main import ( "image" "image/color" "math" "sync" ) // A Vec3 represents three-component vector. type Vec3 [3]float64 // Length returns length (magnitude) of x. func (x *Vec3) Length() float64 { return math.Sqrt(x.Length2()) } // Length2 returns squared length of x. func (x *Vec3) Length2() float64 { ...
/* 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...
// Copyright ©2020 <NAME>. 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" "log" "path/filepath" "modernc.org/kv" "github.com/biogo/biogo/alphabet" "github.com/biogo/biogo/io/seqio" "github.com/biog...
package sema import ( "github.com/onflow/cadence/runtime/ast" "github.com/onflow/cadence/runtime/errors" ) func (checker *Checker) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ast.Repr { checker.visitVariableDeclaration(declaration, false) return nil } func (checker *Checker) visitVariableDecla...
package libs import ( "fmt" "reflect" "strings" "unsafe" "github.com/gotranspile/cxgo/types" ) func (c *Env) NewIdent(cname, goname string, v interface{}, typ types.Type) *types.Ident { err := c.checkType(reflect.TypeOf(v), typ) if err != nil { panic(fmt.Errorf("unexpected type for %s: %w", goname, err)) }...
//Package httpcli is toolkit for simplification of http request package httpcli import ( "bytes" "crypto/tls" "fmt" "io/ioutil" "net/http" "net/url" "strings" ) type Proto struct { } const ( HTTP1 = "HTTP/1.1" HTTP2 = "HTTP/2.0" ) // Params represents the request params. type Params map[string]string // C...
package model func GetBlockMut(size int) BlockMut { if size > 64 { if size > 32768 { return GetBlock64Mut() } if size > 16384 { return GetBlock32Mut() } if size > 8192 { return GetBlock16Mut() } if size > 4096 { return GetBlock8Mut() } if size > 2048 { return GetBlock4Mut() } if s...
package db import ( "database/sql" "log" "os" "sort" "strconv" "strings" "time" "github.com/keydotcat/keycatd/static" "github.com/keydotcat/keycatd/util" ) type MigrateMgr struct { db *sql.DB dbType string migrations map[int]string } func NewMigrateMgr(db *sql.DB, dbType string) *MigrateMgr ...
package common import ( "database/sql" "os" "time" "github.com/golang/glog" "github.com/lib/pq" ) // Storage. Wraps the database type Storage interface { BotConfig() []*BotConfig SetCount(string, int) error } /* * Mock STORAGE */ // Simplistic Storage implementation used by the test suite type MockStorage...
// SPDX-License-Identifier: Apache-2.0 // Copyright 2018 Authors of Cilium package binary import ( "bytes" "encoding/binary" "strconv" cilium "github.com/cilium/proxy/go/cilium/api" log "github.com/sirupsen/logrus" "github.com/cilium/cilium/proxylib/memcached/meta" "github.com/cilium/cilium/proxylib/proxylib...
package trafficstats /* * 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 (t...
// Copyright 2013, <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package logging implements a logging infrastructure for Go. It supports // different logging backends like syslog, file and memory. Multiple backends // can be util...
package controller import ( "fmt" "github.com/stretchr/gomniauth" "github.com/stretchr/gomniauth/providers/facebook" "github.com/stretchr/gomniauth/providers/github" "github.com/stretchr/gomniauth/providers/google" "github.com/stretchr/gomniauth/providers/uber" "github.com/stretchr/goweb" "github.com/stretchr/...
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. package aws import ( "net/http" "net/url" awssdk "github.com/aws/aws-sdk-go-v2/...
/* 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...
package huobi // Response stores the Huobi response information type Response struct { Status string `json:"status"` Channel string `json:"ch"` Timestamp int64 `json:"ts"` ErrorCode string `json:"err-code"` ErrorMessage string `json:"err-msg"` } // KlineItem stores a kline item type KlineItem s...
// Copyright 2014 <NAME>. All rights reserved. // Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package log import ( "encoding/json" "errors" "fmt" "log" "os" "time" "bytes" "bitbucket.org/tshannon/freehold/data" "bitbucket.org/tshannon/freehold/fail" "bi...
package edit import ( "bytes" "encoding/json" "errors" "fmt" "net/http" "sort" "strings" "github.com/AlecAivazis/survey/v2" "github.com/cli/cli/api" "github.com/cli/cli/internal/config" "github.com/cli/cli/internal/ghinstance" "github.com/cli/cli/pkg/cmd/gist/shared" "github.com/cli/cli/pkg/cmdutil" "gi...
package stellar import ( "encoding/base64" "fmt" "time" "github.com/keybase/client/go/libkb" "github.com/keybase/client/go/msgpack" "github.com/keybase/client/go/protocol/keybase1" "github.com/keybase/client/go/protocol/stellar1" "github.com/keybase/client/go/stellar/relays" "github.com/keybase/client/go/ste...
// Copyright 2017 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package service import ( "bytes" "crypto/md5" storage "filesrv/api/pb" "filesrv/conf" "filesrv/library/log" "flag" "fmt" . "github.com/smartystreets/goconvey/convey" "io/ioutil" "os" "sync" "testing" "time" ) func TestMain(m *testing.M) { _ = flag.Set("conf", "./../cmd/filesrv.toml") flag.Parse() if e...
// Copyright 2020 The OPA Authors. All rights reserved. // Use of this source code is governed by an Apache2 // license that can be found in the LICENSE file. // +build opa_wasm package wasm_test import ( "context" "math/rand" "testing" "time" "github.com/open-policy-agent/opa/ast" "github.com/open-policy-ag...
package mgo import ( "bytes" "fmt" "regexp" "github.com/trist725/mgsu/pb/plugin/golang" "github.com/trist725/mgsu/pb/plugin/golang/generator" ) var ( collectionRegexp = regexp.MustCompile(`@collection(?:\s*=\s*(\d+))?`) msgRegexp = regexp.MustCompile(`@msg(?:\s*=\s*(\S+))?`) mapKeyRegexp = regexp....
package dtls import ( "context" "crypto/ecdsa" "crypto/ed25519" "crypto/tls" "crypto/x509" "time" "github.com/pion/logging" ) // Config is used to configure a DTLS client or server. // After a Config is passed to a DTLS function it must not be modified. type Config struct { // Certificates contains certifica...
package main import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/wafv2" "github.com/google/uuid" "github.com/pkg/errors" log "github.com/sirupsen/logrus" ) type WAFIpSet struct { ips []string name string arn string ipType string scope string id...
// Copyright 2022 Teamgram 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 app...
package reconcilers_test import ( "context" "crypto/rand" "fmt" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" api "github.com/kubernetes-sigs/multi-tenancy/incubator/hnc/api/...
// Copyright © 2014 <NAME>, LiuDing All rights reserved. // This file is part of gopush-cluster. // gopush-cluster is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at ...
package dynaml import ( "fmt" "github.com/mandelsoft/spiff/debug" "github.com/mandelsoft/spiff/yaml" "reflect" "strings" ) func staticScope(binding Binding) Binding { self, _ := binding.FindReference([]string{yaml.SELF}) if self != nil { return self.Resolver().(Binding) } return binding } type LambdaExpr ...
package main import ( "context" "encoding/json" "os" "sort" "strings" "text/template" "github.com/spf13/cobra" "v.io/x/lib/cmd/pflagvar" ) var wheelCmd = &cobra.Command{ Use: "dependency-wheel", Short: "dependency wheel visualization", RunE: dependencyWheel, } var itreeCmd = &cobra.Command{ Use: "i...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/nnqq/td/bin" "github.com/nnqq/td/tdp" "github.com/nnqq/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _ = context.Background() _ = fmt...
// Copyright © The MPS Author. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package mps import ( "math/bits" "golang.org/x/exp/constraints" ) // hashable is the set of hashable types. type hashable interface { constraints.Integer } ...
package main import ( "bytes" "encoding/base64" "encoding/json" "flag" "fmt" "io/ioutil" "log" "os" "strconv" "strings" "github.com/go-openapi/spec" apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" k8sjson "k8s.io/apimachinery/pkg/runtime/serializer/json" ) var ( protoDescr...
package wiremock import ( "encoding/json" "net/http" "time" ) const ScenarioStateStarted = "Started" // ParamMatcherInterface is pair ParamMatchingStrategy and string matched value type ParamMatcherInterface interface { Strategy() ParamMatchingStrategy Value() string } // URLMatcherInterface is pair URLMatchin...
// Copyright (c) 2017 Uber Technologies, Inc. // // 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...
package controller import ( "fmt" "github.com/stakater/Reloader/internal/pkg/options" "time" "github.com/sirupsen/logrus" "github.com/stakater/Reloader/internal/pkg/handler" "github.com/stakater/Reloader/internal/pkg/metrics" "github.com/stakater/Reloader/internal/pkg/util" "github.com/stakater/Reloader/pkg/k...
package apparmor import ( "fmt" "io/ioutil" "os" "path/filepath" "strings" "text/template" deviceConfig "github.com/lxc/lxd/lxd/device/config" "github.com/lxc/lxd/lxd/project" "github.com/lxc/lxd/lxd/sys" "github.com/lxc/lxd/lxd/util" "github.com/lxc/lxd/shared" ) // Internal copy of the device interface....
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package qldb 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" ) type GetBlockInput struct { _ struct{} `type:"structure"` // The location o...
// Copyright 2017 <NAME>. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. package amass import ( "crypto/tls" "crypto/x509" "fmt" "net" "strconv" "strings" "time" ) type ActiveCertService struct { BaseAmassService // Queue for requests ...
// MIT License // // Copyright (c) 2020 <NAME>, <NAME> and EASE lab // // 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 us...
/* Copyright © 2020 Dell Inc. or its subsidiaries. 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 ...
/* Copyright 2019 The Tekton 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 onedrive import ( "errors" "fmt" "github.com/Xhofe/alist/conf" "github.com/Xhofe/alist/drivers/base" "github.com/Xhofe/alist/model" "github.com/Xhofe/alist/utils" "github.com/go-resty/resty/v2" log "github.com/sirupsen/logrus" "path/filepath" "time" ) var oneClient = resty.New() type Host struct { ...
package main import ( "encoding/json" "io/ioutil" "os" "strings" "time" "github.com/aws/aws-lambda-go/events" "github.com/aws/aws-lambda-go/lambda" f "github.com/fauna/faunadb-go/v5/faunadb" ) // Reference on the tags: https://dev.to/faruq2/how-to-build-a-crud-rest-api-with-go-gin-and-fauna-37o6. type Comme...
// 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...
package service import ( "fmt" "github.com/joeqian10/neo3-gogogo/crypto" "github.com/joeqian10/neo3-gogogo/helper" "github.com/joeqian10/neo3-gogogo/rpc/models" "strconv" "time" ) //NeoToRelay ... func (this *SyncService) NeoToRelay() { //this.relaySyncHeight, _ = this.GetCurrentRelayChainSyncHeight(this.confi...
// Copyright (c) 2021 The Houyi 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...
package containerfs import ( "archive/tar" "fmt" "io" "os" "path/filepath" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/system" "github.com/sirupsen/logrus" ) // TarFunc provides a function definition for a custom Tar function type TarFunc func(...
package rabbit 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 ( claudeBirthday = nook.Birthday{ Day: 3, Mont...
package installer import ( "fmt" "path" "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/proto/hapi/chart" "github.com/Azure/draft/pkg/version" "k8s.io/helm/pkg/tiller/environment" ) const draftChart = `name: draftd description: The Draft server version: %s apiVersion: v1 ` const draftVal...
// Copyright (c) 2018 Uber Technologies, Inc. // // 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...
// 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-2019 Datadog, Inc. // +build clusterchecks package clusterchecks import ( "fmt" "sort" "ti...
// Copyright 2018 <NAME>. All rights reserved. // Copyright 2022 OOO SuperJob. All rights reserved. // Licensed under the MIT license that can be found in the LICENSE file. package sphinxql import ( "fmt" "strings" ) const ( updateMarkerInit injectionMarker = iota updateMarkerAfterUpdate updateMarkerAfterSet u...
// Copyright (c) 2016 Uber Technologies, Inc. // // 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...
// 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...
package zboxutil import ( "crypto/aes" "crypto/cipher" "crypto/rand" "encoding/base64" "fmt" "io" "math" "os" "path/filepath" "strings" "errors" "github.com/0chain/gosdk/core/util" "github.com/0chain/gosdk/zboxcore/blockchain" "github.com/h2non/filetype" "github.com/lithammer/shortuuid/v3" "golang.or...
/* 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, sof...
package stw import ( "container/heap" "context" "sync" "time" "github.com/leesper/holmes" ) const ( tickPeriod time.Duration = 500 * time.Millisecond bufferSize = 1024 ) var timerIds *AtomicInt64 func init() { timerIds = NewAtomicInt64(0) } // timerHeap is a heap-based priority queue type ti...
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
package sqlite import ( "database/sql" "fmt" "github.com/OntoLedgy/storage_interop_services/code/services/database_services/constants" "github.com/OntoLedgy/storage_interop_services/code/services/database_services/contract" object_model2 "github.com/OntoLedgy/storage_interop_services/code/services/database_servic...
package item import ( "github.com/jchavannes/jgo/jerr" "github.com/jchavannes/jgo/jutil" "github.com/memocash/index/db/client" "github.com/memocash/index/ref/bitcoin/memo" "github.com/memocash/index/ref/config" "sort" ) type OutputInput struct { PrevHash []byte PrevIndex uint32 Hash []byte Index u...
// 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...
// Copyright 2017 Baliance. All rights reserved. // // Use of this source code is governed by the terms of the Affero GNU General // Public License version 3.0 as published by the Free Software Foundation and // appearing in the file LICENSE included in the packaging of this file. A // commercial license can be purchas...
// Copyright 2017-present <NAME>. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package openstack import ( "fmt" "net/http" ) // Result represents in compact form the result of an HTTP API call. type Result struct { OK bool C...
package controller import ( "math/rand" "strconv" "strings" "testing" "github.com/sirupsen/logrus" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/uuid" ...
// Copyright 2020+ <NAME>. All rights reserved. // License information can be found in the LICENSE file. package zstd import ( "bytes" "errors" "io" ) // HeaderMaxSize is the maximum size of a Frame and Block Header. // If less is sent to Header.Decode it *may* still contain enough information. const HeaderMaxSiz...
package plumber import ( "fmt" "net" "time" "github.com/nakabonne/tstorage" "github.com/pkg/errors" uuid "github.com/satori/go.uuid" "github.com/sirupsen/logrus" "google.golang.org/grpc" "github.com/batchcorp/plumber-schemas/build/go/protos" "github.com/batchcorp/plumber/embed/etcd" "github.com/batchcorp...
// Copyright 2017 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 applicable law or ag...
// Copyright (c) 2016 <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package specdir import ( "fmt" "os" "path" "sort" ) // NodeName represents the name of a node and returns a value for its name given a TemplateValues object. ...
// Copyright © 2019 <NAME> – This file is part of GoatCounter and // published under the terms of a slightly modified EUPL v1.2 license, which can // be found in the LICENSE file or at https://license.goatcounter.com package widgets import ( "context" "zgo.at/goatcounter" "zgo.at/zstd/zint" "zgo.at/zstd/ztime" )...
// Copyright The OpenTelemetry 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 service import ( "crypto/md5" "encoding/hex" "encoding/json" "io" "io/ioutil" "os" "path" "path/filepath" "strconv" "strings" "github.com/Sirupsen/logrus" "github.com/rancher/go-rancher/v3" "github.com/gitlawr/cihelper/git" "github.com/gitlawr/cihelper/model" "github.com/pkg/errors" //from pi...
package main import ( "context" "crypto/hmac" "crypto/rand" "crypto/sha256" "encoding/base64" "encoding/json" "fmt" "log" "math/big" "net/http" "net/url" "os" "path" "golang.org/x/oauth2" "golang.org/x/oauth2/spotify" ) const id = "SpotifyAuthProxy" var ( source oauth2.TokenSource apiKey string to...
/* Copyright 2021 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, softwar...