text
stringlengths
3.08k
10.4k
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed unde...
// Copyright 2021 Chaos Mesh 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 game import ( "strings" "awesome-dragon.science/go/goGoGameBot/internal/config/tomlconf" "awesome-dragon.science/go/goGoGameBot/internal/interfaces" "awesome-dragon.science/go/goGoGameBot/pkg/format" "awesome-dragon.science/go/goGoGameBot/pkg/format/transformer" "awesome-dragon.science/go/goGoGameBot/pk...
package main import ( "flag" "fmt" "go/ast" "go/parser" "go/scanner" "go/token" "go/types" "log" "os" "path" "path/filepath" "strconv" "strings" "github.com/beevik/etree" ) func main() { sourceDirectoryPtr := flag.String("Source", "", "The source directory") targetDirectoryPtr := flag.String("Target"...
// Package reform implements reform command. package main import ( "flag" "fmt" "go/build" "os" "os/exec" "path/filepath" "strings" "github.com/xaionaro/reform" "github.com/xaionaro/reform/internal" "github.com/xaionaro/reform/parse" ) var ( logger *internal.Logger debugF = flag.Bool("debug", false, "En...
// Copyright (c) 2017 Muges // // 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 cmd import ( "fmt" "os" "github.com/helmfile/helmfile/pkg/app" "github.com/helmfile/helmfile/pkg/app/version" "github.com/helmfile/helmfile/pkg/config" "github.com/helmfile/helmfile/pkg/helmexec" "github.com/urfave/cli" "go.uber.org/zap" ) var logger *zap.SugaredLogger // RootCmd is the root command...
package business import ( "fmt" "strings" "sync" "github.com/kiali/kiali/config" "github.com/kiali/kiali/kubernetes" "github.com/kiali/kiali/log" "github.com/kiali/kiali/models" "github.com/kiali/kiali/prometheus" ) // DashboardsService deals with fetching dashboards from k8s client type DashboardsService st...
package connection import ( "encoding/json" "fmt" "log" "sync" "net/http" "time" "github.com/gorilla/websocket" "github.com/juanvallejo/streaming-server/pkg/socket/connection/util" ) // MessageDataCodec is a serializable schema representing // the contents of a socket connection message type MessageDataCode...
/* * Copyright (C) 2019-Present Pivotal Software, Inc. All rights reserved. * * This program and the accompanying materials are made available under the terms * of 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 Licens...
package main import ( "flag" "fmt" "github.com/lixvbnet/sshw/sshlib" "github.com/manifoldco/promptui" "log" "os" "path/filepath" "strings" ) var ( Name string Version string GitHash string ) var ( V = flag.Bool("v", false, "show version") H = flag.Bool("h", false, "show help and exit") P ...
// Copyright 2021 The Audit Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
// Copyright (C) 2019 SAP SE or an SAP affiliate company. All rights reserved. // This file is licensed under the Apache Software License, v. 2 except as // noted otherwise in the LICENSE file. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with t...
package salt import ( "fmt" "io/ioutil" "sort" "strings" "github.com/liyinhgqw/typesafe-config/parse" ) // This file describes the configuration information needed to connect to a // salt tile server. The Config class is the main class herein. // // Also included are utility functions to read a configuration f...
package main import ( "context" "encoding/base64" "encoding/hex" "fmt" "os" "strings" "time" "github.com/baidubce/bce-sdk-go/bce" "github.com/baidubce/bce-sdk-go/services/bos" "github.com/baidubce/bce-sdk-go/services/bos/api" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "g...
package builder import ( "debug/elf" "sort" "strings" ) // programSize contains size statistics per package of a compiled program. type programSize struct { Packages map[string]*packageSize Sum *packageSize Code uint64 Data uint64 BSS uint64 } // sortedPackageNames returns the list of packa...
package storage import ( "crypto/x509" "fmt" "net/http" "os" "strconv" "strings" "sync" "time" "code.cloudfoundry.org/credhub-cli/credhub" "github.com/doomsday-project/doomsday/storage/uaa" ) type ConfigServerAccessor struct { credhub *credhub.CredHub uaaClient *uaa.Client authType uint64 c...
package cmd import ( "fmt" "github.com/alewgbl/fdwctl/internal/config" "github.com/alewgbl/fdwctl/internal/database" "github.com/alewgbl/fdwctl/internal/logger" "github.com/alewgbl/fdwctl/internal/model" "github.com/alewgbl/fdwctl/internal/util" "github.com/spf13/cobra" "strconv" "strings" ) var ( createCmd...
// package blockservice implements a BlockService interface that provides // a single GetBlock/AddBlock interface that seamlessly retrieves data either // locally or from a remote peer through the exchange. package blockservice import ( "errors" "fmt" blocks "github.com/ipfs/go-ipfs/blocks" "github.com/ipfs/go-ip...
// (c) <NAME> [<EMAIL>]. All rights reserved. // License can be found in the LICENSE file. package jwk import ( "errors" "crypto/rsa" "google.golang.org/api/oauth2/v2" "time" "strings" "encoding/base64" "encoding/json" "crypto/sha256" "crypto" "crypto/sha512" ) /* RFC doc: https://tools.ietf.org/html/rfc7...
package luasandbox import ( lua "github.com/yuin/gopher-lua" "github.com/sourcegraph/sourcegraph/lib/errors" ) // CreateModule wraps a map of functions into a lua.LGFunction suitable for // use in CreateOptions.Modules. func CreateModule(api map[string]lua.LGFunction) lua.LGFunction { return WrapLuaFunction(func(...
// Copyright 2016 ~ 2018 AlexStocks(https://github.com/AlexStocks). // All rights reserved. Use of this source code is // governed by Apache License 2.0. // 2017-10-24 16:20 // Package gxruntime encapsulates some runtime functions // goroutine pool // ref: https://github.com/pingcap/tidb/blob/1592c7bc2873346565ab15ec...
/* * Copyright 2020 The Compass 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...
package central import ( "nli-go/lib/api" "nli-go/lib/common" "nli-go/lib/mentalese" ) // This class matches relations to other relations and reports their bindings // These concepts are used: // // sequence: a set of relations that is matched as a whole and shares a single Binding // set: a set of unordered relat...
package e2e import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "strconv" "time" "github.com/ory/herodot" "github.com/tidwall/gjson" "github.com/ory/x/healthx" "github.com/ory/keto/internal/x" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/ory/...
/* Copyright 2015 Bluek404 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
/* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
package store import ( "io/ioutil" "math/rand" "os" "testing" "time" "github.com/pingcap/ng-monitoring/component/conprof/meta" "github.com/pingcap/ng-monitoring/component/conprof/util" "github.com/pingcap/ng-monitoring/config" "github.com/pingcap/ng-monitoring/utils/testutil" "github.com/stretchr/testify/re...
/* * Copyright © 2021 <NAME>. All rights reserved. * Use of this source code is governed by the Apache 2.0 license * that can be found in the LICENSE file. */ package daf import ( "fmt" "github.com/pvillela/go-foa-realworld/internal/arch/db" "github.com/pvillela/go-foa-realworld/internal/arch/errx" "github.c...
package alicloud import ( "fmt" "log" "testing" "strings" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/services/vpc" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func init() { resource.AddTestSweepers("aliclou...
package gorilla import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( violetBirthday = nook.Birthday{ Day: 1, Mon...
/* * Minio Cloud Storage, (C) 2016 Minio, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
package internal import ( "golang.org/x/exp/mmap" "bufio" "encoding/binary" "io" "os" "github.com/pkg/errors" ) const ( defaultHeaderValSize = 8 defaultValPageSize = 64 * 1024 * 1024 defaultValfileFilename = "%09d.val" valHeaderSize = 8 * 2 valFilePath = "/tmp/00000000.val" ) /...
package network import ( "fmt" log "github.com/sirupsen/logrus" "github.com/vishvananda/netlink" "net" "strings" "syscall" ) type BridgeDriver struct{} func (bd *BridgeDriver) Name() string { return Bridge } func (bd *BridgeDriver) Init(nw *Network) error { return bd.Create(nw) } func (bd *BridgeDriver) Cr...
package calculation import ( "encoding/json" "fmt" "math" "github.com/xichen2020/eventdb/document/field" "github.com/xichen2020/eventdb/generated/proto/servicepb" xbytes "github.com/xichen2020/eventdb/x/bytes" "github.com/xichen2020/eventdb/x/compare" ) // ValueType is the type of a calculation value. type Va...
package repo import ( "fmt" "io" "path/filepath" "sort" "time" "github.com/kudobuilder/kudo/pkg/kudoctl/packages" "github.com/Masterminds/semver" "github.com/pkg/errors" "github.com/spf13/afero" "sigs.k8s.io/yaml" ) const defaultURL = "http://localhost/" // IndexFile represents the index file in an opera...
package champions_parse_tierlist import ( "encoding/csv" "encoding/json" "fmt" "os" "strconv" "strings" "github.com/raid-codex/tools/common" "github.com/raid-codex/tools/utils" "gopkg.in/alecthomas/kingpin.v2" ) // https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=1jdrS8mnsITEWL1qREShSG...
package main import ( "bytes" "fmt" "io" "log" "net/http" "net/url" "strconv" "strings" "text/template" "time" "github.com/PuerkitoBio/goquery" "github.com/gorilla/mux" ) type LinkResolverResponse struct { Status int `json:"status"` Message string `json:"message,omitempty"` Thumbnail string `json...
package server import ( "context" "errors" "fmt" "fullhouse/pkg/fullhouse/config" "fullhouse/pkg/fullhouse/game" "fullhouse/pkg/fullhouse/logger" "fullhouse/pkg/fullhouse/metrics" "fullhouse/pkg/fullhouse/models" "fullhouse/pkg/fullhouse/websocket" "github.com/gin-contrib/static" ginzap "github.com/gin-cont...
// Copyright 2016 Square 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 main import ( "fmt" "github.com/zofan/go-country" "github.com/zofan/go-fwrite" "github.com/zofan/go-req" "github.com/zofan/go-value" "path/filepath" "regexp" "runtime" "strings" "time" ) func main() { fmt.Println(Update()) } // https://www.globalfirepower.com/countries-listing.asp // https://www.n...
package client import ( "encoding/json" "io/ioutil" "os" "os/signal" "sync" "syscall" "time" "github.com/google/uuid" "github.com/rs/zerolog/log" "github.com/sushshring/torrxfer/pkg/common" "github.com/sushshring/torrxfer/pkg/net" ) // TorrxferClient struct describes the client functionality for Torrxfer ...
// Copyright 2015 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 drivers import ( "context" "crypto/ecdsa" "errors" "math/big" "strings" "github.com/ethereum-optimism/optimism/go/bss-core/txmgr" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" ) // E...
package view import ( "errors" "fmt" "github.com/crypto-com/chain-indexing/internal/json" "github.com/crypto-com/chain-indexing/usecase/coin" "github.com/crypto-com/chain-indexing/appinterface/projection/view" "github.com/crypto-com/chain-indexing/appinterface/pagination" "github.com/crypto-com/chain-indexi...
package scheduler import ( "context" "fmt" "sync" "time" "code.cloudfoundry.org/lager" "github.com/concourse/concourse/atc/db" "github.com/concourse/concourse/atc/metric" "github.com/concourse/concourse/atc/scheduler/algorithm" ) //go:generate counterfeiter . BuildScheduler type BuildScheduler interface { ...
package sql import ( "context" "fmt" "github.com/pkg/errors" "github.com/znbasedb/znbase/pkg/security/audit/server" "github.com/znbasedb/znbase/pkg/security/privilege" "github.com/znbasedb/znbase/pkg/sql/pgwire/pgcode" "github.com/znbasedb/znbase/pkg/sql/pgwire/pgerror" "github.com/znbasedb/znbase/pkg/sql/sem...
// Copyright 2021 The Fuchsia 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 fidlgen_cpp import ( "testing" "github.com/google/go-cmp/cmp" "go.fuchsia.dev/fuchsia/tools/fidl/lib/fidlgentest" ) func TestCompileTypeNames...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package apigateway 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" ) // The POST request to import API keys from an external source, such as ...
package notifier import ( "fmt" "time" api "github.com/appscode/searchlight/apis/monitoring/v1alpha1" "github.com/appscode/searchlight/client/clientset/versioned/typed/monitoring/v1alpha1/util" "github.com/appscode/searchlight/pkg/icinga" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/l...
package ast import ( "github.com/benchlab/asteroid/token" "github.com/benchlab/asteroid/typing" "github.com/benchlab/asteroid/util" ) type BinaryExpressionNode struct { Begin, Final util.Location Left, Right ExpressionNode Operator token.Type Resolved typing.Type } func (n *BinaryExpressionNode) Star...
package main import ( "os" "testing" "github.com/tamada/lioss" ) func TestInvalidOptions(t *testing.T) { testdata := []struct { args []string errorFlag bool wontStatus int message string }{ {[]string{"lioss"}, true, 2, "no arguments"}, {[]string{"lioss", "--algorithm", "tfidf"}, true, 2, "...
// Copyright Splunk Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
package config import ( "os" "path/filepath" ) const ( BackendOrmEngineTypeSqlite = "sqlite3" BackendOrmEngineTypeMysql = "mysql" ) var defaultNodeHome = os.ExpandEnv("$HOME/.fastock-chain-daemon") // SetNodeHome sets the root directory for all data. func SetNodeHome(home string) { defaultNodeHome = home } /...
// Copyright 2015 The LUCI 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 filemonitor import ( "bufio" "errors" "io" "log" "os" "sync" "syscall" "time" "unsafe" ) const flags = syscall.IN_MODIFY | syscall.IN_ATTRIB | syscall.IN_DELETE_SELF | syscall.IN_MOVE_SELF type FileChan struct { Cout chan string Cerr chan string } type INDescriptors struct { fd int wd int } //...
/* Copyright © 2022 <NAME> <EMAIL> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
/* * Copyright 2019 <NAME> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
// 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...
/* Copyright 2017 WALLIX 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 distribu...
package clientutils_test import ( "context" "errors" "fmt" "io" "math/rand" "testing" "github.com/ipfs/go-cid" "github.com/ipld/go-ipld-prime" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-multistore" "github.com/filecoin-project/go-state-t...
package client import ( "bytes" "fmt" "io" "net" "os" "strconv" "strings" "time" "github.com/ethereum/go-ethereum/crypto/ecies" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) //Some variables type reServer struct { remoteAddr string requestPort string } type loServer struct { localPort strin...
package command import ( "context" "fmt" "io/ioutil" "os" "path/filepath" "time" "github.com/evergreen-ci/evergreen/apimodels" "github.com/evergreen-ci/evergreen/model" "github.com/evergreen-ci/evergreen/rest/client" "github.com/evergreen-ci/utility" "github.com/mitchellh/mapstructure" "github.com/pkg/err...
// Copyright 2018 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 search import ( "github.com/usmanager/microservices/death-star-bench/hotelReservation/dialer" "os" "os/signal" "syscall" // "encoding/json" "fmt" "github.com/usmanager/registration-client-go" // F"io/ioutil" "log" "net" // "os" "time" opentracing "github.com/opentracing/opentracing-go" "github...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package chaincode import ( "sync" "github.com/hyperledger/fabric/core/container/ccintf" "github.com/hyperledger/fabric/core/ledger" "github.com/pkg/errors" ) // HandlerRegistry maintains chaincode Handler instances. type Handler...
// 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, distri...
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed ...
package main import ( "context" "flag" "fmt" "io/ioutil" "os" "os/signal" "github.com/brunotm/replicant/api" "github.com/brunotm/replicant/config" goDriver "github.com/brunotm/replicant/driver/go" jsDriver "github.com/brunotm/replicant/driver/javascript" webDriver "github.com/brunotm/replicant/driver/web" ...
// Copyright 2020 The PipeCD 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 agree...
package main import ( "crypto/tls" "crypto/x509" "io/ioutil" "log" "net" "os" "path" "runtime" "aqwari.net/net/styx" "bitbucket.org/mischief/libauth" "github.com/google/uuid" ) type client struct { buffer string service string event chan string done chan struct{} tabs map[string]string poll...
// SPDX-FileCopyrightText: 2020 SAP SE or an SAP affiliate company and Gardener contributors // SPDX-License-Identifier: Apache-2.0 package app import ( "context" "fmt" "strings" "time" "golang.org/x/xerrors" utiliptables "github.com/gardener/apiserver-proxy/internal/iptables" "github.com/gardener/apiserver-...
package client import ( "bufio" "bytes" "context" "fmt" "net/http" "net/url" "github.com/golang/protobuf/proto" healthcheckPb "github.com/linkerd/linkerd2/controller/gen/common/healthcheck" "github.com/linkerd/linkerd2/pkg/k8s" "github.com/linkerd/linkerd2/pkg/protohttp" pb "github.com/linkerd/linkerd2/viz...
// Copyright 2022 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 ui import ( "fmt" "io" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" _ "k8s.io/client-go/plugin/pkg/client/auth" "k8s.io/client-go/tools/clientcmd" "k8s.io/kubectl/pkg/describe" "k8s.io/kubectl/pkg/describe/versioned" "log" "os" "reflect" "rege...
package gopool import ( "errors" "strings" "sync" ) const ( putBlocks = iota getBocks neitherBlocks ) // ArrayPool implements the Pool interface, maintaining a pool of resources. type ArrayPool struct { cond *sync.Cond blocked int // putBlocks | getBlocks | neitherBlocks pc config gi int // in...
// antcalc project main.go package main import ( "flag" "fmt" "math" ) const ( version string = "0.00.002 alpha" // E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 // Phi = 1.61803398874989484820458683436563811772030917980576286213544862 // https://oeis.o...
package azbfs import ( "context" "github.com/Azure/azure-pipeline-go/pipeline" "net/url" "strings" ) var directoryResourceName = "directory" // constant value for the resource query parameter // A DirectoryURL represents a URL to the Azure Storage directory allowing you to manipulate its directories and files. t...
package elements import ( _ "image/png" "github.com/faiface/pixel" "github.com/faiface/pixel/pixelgl" "go-zelda/utils" ) type Link struct { sheet pixel.Picture anims map[string][]pixel.Rect Pos pixel.Vec currFrame pixel.Rect lastFrameType int frameCount int tick i...
package main import ( "flag" "fmt" "io" "log" "os" "sync" "syscall" "github.com/fiam/msp-tool/fc" "github.com/fiam/msp-tool/rx" "github.com/pkg/term" ) var ( portName = flag.String("p", "", "Serial port") baudRate = flag.Int("b", 115200, "Baud rate") sourceDir = fla...
package log import ( "encoding/json" "fmt" "reflect" "strings" ) var ( defaultLogger ILogger defaultBuilder LoggerBuilder ) func init() { Register(LoggerLogrus, NewLogrus("")) Register(LoggerNil, NewNil()) defaultLogger = Get(LoggerLogrus) defaultBuilder = NewLogrus } // SetDefault sets a logger instanc...
// Copyright 2018 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 framework_manager import ( "fmt" "net/http" "strings" "time" "github.com/Sirupsen/logrus" "github.com/emc-advanced-dev/layerx/layerx-mesos-tpi/mesos_master_api/mesos_data" "github.com/emc-advanced-dev/pkg/errors" "github.com/gogo/protobuf/proto" "github.com/layer-x/layerx-commons/lxhttpclient" "gith...
package main import ( "encoding/json" "flag" "fmt" "log" "math/rand" "net/http" "os" "os/signal" "strconv" "strings" "sync" "time" "github.com/hashicorp/consul/api" ) type ServiceInfo struct { ServiceID string IP string Port int Load int Timestamp int //load updated ts } type Servi...
package gee import ( "encoding/binary" "encoding/json" "fmt" "io/ioutil" "math" "net/http" "net/url" "os" "AGES/pkg/core" "AGES/pkg/net" ) //TerrainProxy proxies terrain type TerrainProxy struct { URL *url.URL } //TerrainTile does what it sounds like type TerrainTile struct { Quads [4][]Face } //Face i...
// Unless explicitly stated otherwise all files in this repository are licensed // under the MIT License. // This product includes software developed at Guance Cloud (https://www.guance.com/). // Copyright 2021-present Guance, Inc. // Package mock is for test package mock import ( "context" "testing" "time" DKtr...
// Copyright 2020 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 pinot import ( "encoding/json" "fmt" "math/rand" "strconv" "strings" "sync" "time" zk "github.com/samuel/go-zookeeper/zk" log "github.com/sirupsen/logrus" ) const ( brokerExternalViewPath = "EXTERNALVIEW/brokerResource" offlineSuffix = "_OFFLINE" realtimeSuffix = "_REALTIME" ) ...
package main import ( "fmt" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" "strconv" "time" ) // AttackAction is a gorm model for database table `attack_actions`. // Used to store the flag submitted record. type AttackAction struct { gorm.Model TeamID uint // Victim's team ID GameBoxID uint...
package goods import ( "fmt" "github.com/LiuJin1987/dayr-trade-calculator/pkg/price" "strings" ) type Good struct { name string price price.Price } func New(name string, price price.Price) Good { return Good{name, price} } func (good Good) GetName() string { return good.name } func (good *Good) SetName(nam...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: capitalise.proto /* Package capitalise is a generated protocol buffer package. It is generated from these files: capitalise.proto It has these top-level messages: CapitaliseRequest CapitaliseResponse */ package capitalise import proto "github.com/golang...
// // Copyright (c) 2017 Intel 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 main import ( "fmt" "os" "path/filepath" "time" "github.com/mitchellh/go-homedir" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" tmstrings "github.com/tendermint/tendermint/libs/strings" "github.com/tendermint/ten...
package diceware import ( "crypto/rand" "errors" "math" "math/big" "strings" ) const ( // DefaultExtra is the default value for the extra character. An extra can // be added to a passphrase to increase security without adding another // word. It isn't required by default. DefaultExtra = false // DefaultWor...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. package crypto import ( "fmt" "syscall" "time" "unsafe" ) const ( CertHashPropID = 3 CrypteEAsn1BadTag = 2148086027 certNCryptKeySpec = 0xFFFFFFFF ) var ( Modcrypt32 = syscall.NewLazyDLL("crypt32.dll") p...
package main import ( "errors" "flag" "fmt" "io" "net/http" "os" "strconv" "sync" "time" "github.com/Jeffail/tunny" "github.com/sirupsen/logrus" "github.com/turt2live/matrix-media-repo/common" "github.com/turt2live/matrix-media-repo/common/assets" "github.com/turt2live/matrix-media-repo/common/config" ...
package node import ( "fmt" "log" "net/http" "net/rpc" "net/rpc/jsonrpc" "golang.org/x/net/websocket" "time" "github.com/nobonobo/drpc" "github.com/nobonobo/drpc/rpcutil" "github.com/nobonobo/drpc/services" "github.com/nobonobo/drpc/services/naming" ) // Server ... type Server struct { *rpc.Server don...
package ipfs import ( "time" "github.com/docker/docker/api/types/container" ) const ( containerSwarmPort = "4001" containerAPIPort = "5001" containerGatewayPort = "8080" ) // containerResources generates Docker resource constraints for a container, // based on documentation: // https://docs.docker.com/co...
package cmd import ( "fmt" "io/ioutil" "os" "path" "regexp" "strings" "github.com/spf13/cobra" "gopkg.in/yaml.v2" "k8s.io/cli-runtime/pkg/genericclioptions" ) type ImportConfigOptions struct { configFlags *genericclioptions.ConfigFlags fromDir string openstackConfigFile string genericcliop...
package memdb import ( "sort" "github.com/lindb/lindb/pkg/logger" "github.com/lindb/lindb/pkg/timeutil" pb "github.com/lindb/lindb/rpc/proto/field" "github.com/lindb/lindb/tsdb/field" "github.com/lindb/lindb/tsdb/tblstore" ) //go:generate mockgen -source ./field_store.go -destination=./field_store_mock_test.go...