text
stringlengths
3.08k
10.4k
// //Copyright [2016] [SnapRoute 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 t...
package sharding import ( "bytes" "fmt" "io" "io/ioutil" "net/http" "strings" "github.com/allegro/akubra/internal/akubra/utils" "github.com/allegro/akubra/internal/akubra/watchdog" "github.com/allegro/akubra/internal/akubra/log" "github.com/allegro/akubra/internal/akubra/regions/config" "github.com/allegr...
/* * MIT License (MIT) * Copyright (c) 2018 * * 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 updraft import ( "crypto/sha256" "errors" "fmt" "hash" "io" "sync" ) const ( DefaultChunkSize = 4096 // Bytes ) var ( ChunkNotFound = errors.New("chunk not found") FileNotFound = errors.New("file not found") ) type Store interface { GetChunk(hash []byte) ([]byte, error) GetMetadata(*RevisionID) ...
/* Copyright 2021 SANGFOR TECHNOLOGIES Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package circuit import ( "sort" "github.com/heustis/tsp-solver-go/model" "github.com/heustis/tsp-solver-go/stats" ) const minimumSignificance = 1.0 const maxClones uint16 = 1000 // DisparityClonable relies on the following priniciples to approximate the smallest concave circuit: // 1. That the minimum convex hul...
package packages import "github.com/cpmech/gosl/utl" func init() { Packages["gosl/utl"] = map[string]interface{}{ "AllFalse": utl.AllFalse, "AllTrue": utl.AllTrue, "Alloc": utl.Alloc, "ArgMinMax": utl.ArgMinMax, "BestSquare": utl.BestSquare, "BestSq...
package controllers import ( "github.com/valyala/fasthttp" "io" "strings" "strconv" "os" "gis/app" "gis/app/utils" ) // 获取文件大小的接口 type Size interface { Size() int64 } // 获取文件信息的接口 type Stat interface { Stat() (os.FileInfo, error) } type ImageController struct { BaseController } func NewImageController() *...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. package performance import ( "context" "fmt" "math/rand" "os" "testing" "time" "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base" internalTime "github.com/AzureAD/microsoft-authentication-library-for-go/ap...
package inmobi import ( "encoding/json" "errors" "fmt" "github.com/econnelly/myrevenue" "github.com/econnelly/myrevenue/adnetwork" "io" "io/ioutil" "log" "net/http" "net/url" "time" ) type ReportRequester struct { SessionID string `json:"session_id"` AccountID string `json:"account_id"` Username string...
package impl_test import ( "fmt" impl "github.com/SchnorcherSepp/storage/defaultimpl" interf "github.com/SchnorcherSepp/storage/interfaces" "io" "log" "math/rand" "reflect" "sync" "testing" ) func TestNewMultiReaderAt(t *testing.T) { _, s, f := initTestFileAndTestService(t) // test with invalid file and i...
package main import ( "context" "crypto/x509" "encoding/json" "encoding/pem" "fmt" "log" dockerregistryproxyv1 "github.com/VJftw/docker-registry-proxy/api/proto/v1" "github.com/VJftw/docker-registry-proxy/pkg/auth/aws" "github.com/VJftw/docker-registry-proxy/pkg/plugin" "github.com/golang/protobuf/ptypes/em...
/* * Copyright (c) 2020, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions...
package main import ( "encoding/json" "flag" "io/ioutil" "net/http" "time" "github.com/gorilla/mux" jwtverifier "github.com/okta/okta-jwt-verifier-golang" "github.com/rs/zerolog" "github.com/rs/zerolog/log" ) var wgclient WGClient var clientID string var issuer string var disableAuth = false // NewUserHand...
package entropy import ( "bufio" "fmt" "io" "math" "strings" ) // NGramCounter contains counts and totals for Ngrams of a // particular size type NGramCounter struct { Size int Counts map[string]uint64 Total uint64 } // NewNGramCounter returns a new ngram counter func NewNGramCounter(maxNGramSize int) (co...
package pickett import ( "strings" "testing" "time" "code.google.com/p/gomock/gomock" "github.com/igneous-systems/pickett/io" ) var netExample = ` // example that uses networking... part1 is consumed by part2 and when // part2 is done, we want to snapshot part1. This uses a container // called part1-image to p...
/* *Copyright (c) 2019-2021, Alibaba Group Holding Limited; *Licensed under the Apache License, Version 2.0 (the "License"); *you may not use this file except in compliance with the License. *You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 *Unless required by applicable law or a...
package autoconversion import ( "fmt" "io" "io/ioutil" "os" "gopkg.in/yaml.v2" ) var ( fmsgs, finner *os.File ) var ( handlerstr = "\n" + `func NewHandlers() {` + "\n" + " // if you want to do with CLOSE_CONNECT, you have to achieve this function.\n" + " // Services.Register(uint16(Services.CLOSE_CONNE...
package main import ( "os" "log" "strconv" "io" "io/ioutil" "encoding/json" "fmt" "net/http" "bytes" "github.com/gorilla/mux" ) const Memory = 100 var CellPort string var CellDataPath string type KeyValue struct { Key string `json:"key"` Value string `json:"value"` } type KeyStore struct { freememor...
package problem import ( "context" "encoding/json" "errors" "fmt" "net/http/httptest" "strings" "testing" ge "github.com/go-errors/errors" "github.com/hcnet/go/support/log" "github.com/hcnet/go/support/test" "github.com/stretchr/testify/assert" ) // TestProblemRender tests the render cases func TestProble...
/* Copyright 2019 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 frontends import ( "fmt" "log" "math" "time" colorable "github.com/mattn/go-colorable" runewidth "github.com/mattn/go-runewidth" "github.com/schachmat/wego/iface" ) type emojiConfig struct { unit iface.UnitSystem } func (c *emojiConfig) formatTemp(cond iface.Cond) string { color := func(temp float3...
package main import ( "fmt" "strings" ) // marshal creates a function that encodes the structs in SSZ format. It creates two functions: // 1. MarshalTo(dst []byte) marshals the content to the target array. // 2. Marshal() marshals the content to a newly created array. func (e *env) marshal(name string, v *Value) st...
// Copyright ©2017 The bíogo Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This program tabulates statistics on a bam file from the sam flag. // It replicates functionality in samtools flagstat. package main import ( "fmt" "i...
// 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...
// Copyright 2013 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 loader_test // This file enumerates all packages beneath $GOROOT, loads them, plus // their external tests if any, runs the type checker on them, and /...
// 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...
// This code is available on the terms of the project LICENSE.md file, // also available online at https://blueoakcouncil.org/license/1.0.0. //go:build lgpl // +build lgpl package eth import ( "context" "fmt" "math/big" dexeth "decred.org/dcrdex/dex/networks/eth" swapv0 "decred.org/dcrdex/dex/networks/eth/cont...
package dblentry import "github.com/prataprc/goparsec" var ytokHardSpace = parsec.TokenExact(` {2}|\t`, "HARDSPACE") var ytokWhitespace = parsec.TokenExact(`[ ]*`, "WHITESPACE") var ytokEqual = parsec.Atom("=", "EQUAL") var ytokCurrency = parsec.Token(`[^0-9 \t\r\n.,;:?!/@+*/^&|=<>(){}\[\]-]+`, "CURRENCY") var ytokAm...
// Copyright (c) TFG Co. All Rights Reserved. // // 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 2021. 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 un...
/* * Copyright 2020 The Yorkie Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
package middleware import "context" // InitializeInput wraps the input parameters for the InitializeMiddlewares to // consume. InitializeMiddleware may modify the parameter value before // forwarding it along to the next InitializeHandler. type InitializeInput struct { Parameters interface{} } // InitializeOutput p...
package app import ( "errors" "fmt" "os" "github.com/kubeedge/kubeedge/edge/pkg/edgestream" "github.com/mitchellh/go-ps" "github.com/spf13/cobra" "k8s.io/apiserver/pkg/util/term" cliflag "k8s.io/component-base/cli/flag" "k8s.io/component-base/cli/globalflag" "k8s.io/klog" "github.com/kubeedge/beehive/pkg...
package main import ( "context" "flag" "fmt" "net/http" _ "net/http/pprof" "os" "runtime" "sync" "github.com/brynbellomy/klog" "github.com/urfave/cli" "github.com/webview/webview" "redwood.dev/cmd/cmdutils" "redwood.dev/process" ) func init() { runtime.LockOSThread() } func main() { cliApp := cli.Ne...
// 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 db import ( "context" "time" "github.com/meitu/titan/conf" "github.com/meitu/titan/metrics" "go.uber.org/zap" ) var ( sysZTLeader = []byte("$sys:0:ZTL:ZTLeader") sysZTKeyPrefixLength = len(toZTKey([]byte{})) sysZTLeaderFlushInterval = 10 * time.Second ztQueue chan []byte ) // load...
/* Collection of information relating to an .rm file bundle. MIT licensed, please see LICENCE RCL December 2019 */ package files import ( "encoding/json" "errors" "fmt" "github.com/google/uuid" "io/ioutil" "os" "path/filepath" "strconv" "strings" "time" ) // struct defining the collected metadata about a ...
package disk import ( "crypto/sha256" "encoding/hex" "fmt" "io" "io/ioutil" "log" "net/http" "os" "path/filepath" "sort" "sync" "github.com/djherbis/atime" "github.com/swsnider/testrepo/cache" ) // lruItem is the type of the values stored in SizedLRU to keep track of items. // It implements the SizedIte...
package config import ( "errors" "fmt" "github.com/cronokirby/safenum" "github.com/fxamacker/cbor/v2" "github.com/sa8/multi-party-sig/internal/types" "github.com/sa8/multi-party-sig/pkg/math/curve" "github.com/sa8/multi-party-sig/pkg/paillier" "github.com/sa8/multi-party-sig/pkg/party" "github.com/sa8/multi-...
package start import ( "context" "io/ioutil" "math/rand" "os" "time" "github.com/openshift/library-go/pkg/controller/controllercmd" "github.com/openshift/library-go/pkg/serviceability" "github.com/spf13/cobra" "k8s.io/client-go/pkg/version" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s....
package supportbundle import ( "encoding/json" "errors" "fmt" "net/http" "strings" ctlappsv1 "github.com/rancher/wrangler/pkg/generated/controllers/apps/v1" ctlcorev1 "github.com/rancher/wrangler/pkg/generated/controllers/core/v1" "github.com/sirupsen/logrus" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/c...
// Copyright 2016 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 bug implements the ``go bug'' command. package bug import ( "bytes" "fmt" exec "internal/execabs" "io" "io/ioutil" urlpkg "net/url" "os" "pa...
package to import ( "bytes" "context" "fmt" "io/ioutil" "net/http" "net/http/httptest" "strings" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" "github.com/davecgh/go-spew/spew" ) func TestUnmarshalRequest(t *testing.T) { tests := []struct { r *http.Requ...
// Copyright 2021 VMware // // 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 logging import ( "bytes" "fmt" "reflect" "sort" "strconv" "strings" "time" log "github.com/lxc/lxd/shared/log15" ) const ( timeFormat = "2006-01-02T15:04:05-0700" floatFormat = 'f' errorKey = "LOG15_ERROR" termTimeFormat = "01-02|15:04:05" termMsgJust = 40 ) // Imported from the...
package main import ( "encoding/json" "errors" "flag" "fmt" "os" "time" "golang.org/x/net/context" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/koding/logging" "koding/kites/kloud/pkg/dnsclient" "koding/kites/kloud/utils/res" ) var ( accessKey = os.Getenv("ROUTE53_ACCESS_KEY") secretKey =...
package main import ( _alertmanager "alertmanager-bot/pkg/alertmanager" _discord "alertmanager-bot/pkg/discord" _utils "alertmanager-bot/pkg/utils" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "strings" "time" "github.com/bwmarrin/discordgo" "gopkg.in/resty.v1" "github.com/gin-gonic/gin" "github....
package models import ( "fmt" "net" "strings" "github.com/miekg/dns" ) /* .Target is kind of a mess. For simple rtypes it is the record's value. (i.e. for an A record it is the IP address). For complex rtypes (like an MX record has a preference and a value) it might be a space-delimited string with all the par...
// Copyright 2016 Keybase, Inc. All rights reserved. Use of // this source code is governed by the included BSD license. package keybase import ( "fmt" "os" "time" "github.com/keybase/go-updater" "github.com/keybase/go-updater/command" "github.com/keybase/go-updater/saltpack" //"github.com/keybase/go-updater/...
package runtime import ( "context" "fmt" "os" "time" "github.com/oasisprotocol/oasis-core/go/common" "github.com/oasisprotocol/oasis-core/go/common/persistent" "github.com/oasisprotocol/oasis-core/go/oasis-test-runner/env" "github.com/oasisprotocol/oasis-core/go/oasis-test-runner/oasis" "github.com/oasisprot...
package raft import ( "strconv" "time" log "github.com/sirupsen/logrus" ) // State represent the current state of a raft node type State uint32 const ( // FOLLOWER state FOLLOWER State = iota // CANDIDATE state CANDIDATE // LEADER state LEADER // SHUTDOWN state SHUTDOWN ) // Raft node type Raft struct {...
// Copyright © 2018 NAME HERE <EMAIL ADDRESS> // // 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 ...
/* Copyright 2021 ForgeRock AS. 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 2021 IBM Corp // // 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 wr...
package common import ( "bytes" "errors" "github.com/stretchr/testify/assert" // "gopkg.in/gin-gonic/gin.v1" "github.com/gin-gonic/gin" "net/http" "net/http/httptest" "os" "testing" ) func TestConnectingDatabase(t *testing.T) { asserts := assert.New(t) db := Init() // Test create & close DB _, err := os...
/* Copyright 2017 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, ...
/** * @license * Copyright 2020 Dynatrace 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 ag...
// Package info provides the OSI presentation layer. package info import "errors" // CommonAddr is a station address. Zero is not used. // The width is controlled by Params.AddrSize. // See companion standard 101, subclause 7.2.4. type CommonAddr uint16 // ErrAddrZero signals an uninitialized CommonAddr. var errAddr...
package main import ( "encoding/binary" "fmt" "math" "math/rand" "os" "path" "github.com/phil-mansfield/guppy/lib/snapio" "unsafe" ) var ( XDelta = 0.001 VDelta = 1.00 L = 62.5 InputPath = "/data/mansfield/simulations/Erebos_CBol_L63_N256/particles/raw" OutputPath = "/data/mansfield/simulations/Erebos...
// Copyright (c) 2019 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...
// // (C) Copyright 2020-2021 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // package control import ( "encoding/json" "sort" "strings" "github.com/dustin/go-humanize/english" "github.com/pkg/errors" "google.golang.org/protobuf/proto" "github.com/daos-stack/daos/src/control/common/pr...
package twointerior import ( "fmt" "github.com/fgiorgetti/qpid-dispatch-go-tests/pkg/api/client/amqp" "github.com/fgiorgetti/qpid-dispatch-go-tests/pkg/api/client/amqp/qeclients" "github.com/fgiorgetti/qpid-dispatch-go-tests/pkg/framework" "github.com/onsi/ginkgo" "github.com/onsi/gomega" "strconv" ) const ( ...
package websocket import ( "bufio" "context" "math/rand" "net" "net/http" "strings" "time" "golang.org/x/net/websocket" "github.com/p4gefau1t/trojan-go/common" "github.com/p4gefau1t/trojan-go/config" "github.com/p4gefau1t/trojan-go/log" "github.com/p4gefau1t/trojan-go/redirector" "github.com/p4gefau1t/t...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package sagemaker import ( "context" "time" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type ListExperimentsInput struct { _ struct{} `type:"structure"` // A filter that returns only experiments crea...
package handler import ( "time" "github.com/labstack/echo/v4" "golang-starter-pack/model" "golang-starter-pack/user" "golang-starter-pack/utils" ) type userResponse struct { User struct { Username string `json:"username"` Email string `json:"email"` Bio *string `json:"bio"` Image *string `...
// Copyright 2021 FabEdge Team // // 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 2021 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, ...
/* 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
// 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 ag...
package main import ( "flag" "fmt" "github.com/EndlessCheng/mahjong-helper/util" "github.com/EndlessCheng/mahjong-helper/util/model" "github.com/fatih/color" "math/rand" "strings" "time" ) var ( considerOldYaku bool isMajsoul bool isTenhou bool isAnalysis bool isInteractive bool showImprov...
package pipeline import ( "context" "database/sql/driver" "encoding/json" "net/url" "reflect" "strconv" "strings" "time" "github.com/jinzhu/gorm" "github.com/mitchellh/mapstructure" "github.com/pkg/errors" "github.com/shopspring/decimal" "github.com/vordev/VOR/core/logger" "github.com/vordev/VOR/core/st...
/* Copyright 2018-Present Couchbase, Inc. Use of this software is governed by the Business Source License included in the file licenses/BSL-Couchbase.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, Version ...
// Copyright 2018 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package main import ( "errors" "fmt" "os" "strings" "github.com/keybase/client/go/kbfs/libpages/config" "github.com/keybase/client/go/minterm" ) func newKBPConf...
package maze import "github.com/lord/lodo/core" type Player struct { x, y int drawX, drawY int } var playerColor = core.MakeColor(0, 10, 0) var playerArrowColor = core.MakeColor(0, 2, 0) var playerGateArrowColor = core.MakeColor(2, 2, 0) func MakePlayer(x, y int) *Player { return &Player{ x: x, y...
package oauth20 import ( "bytes" "context" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "strings" "github.com/kyma-incubator/compass/components/director/internal/model" "github.com/kyma-incubator/compass/components/director/pkg/log" "github.com/pkg/errors" ) const clientCredentialScopesPrefix = "clie...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: ping.proto /* Package ping is a generated protocol buffer package. It is generated from these files: ping.proto It has these top-level messages: Request Response */ package ping import proto "github.com/golang/protobuf/proto" import fmt "fmt" import mat...
// // Description: // Author: <NAME> // Created at: Mon Apr 22 14:04:27 -03 2019 // package rtsp import ( "errors" "fmt" "io" "net" "net/http" "strings" "time" "github.com/rsfreitas/go-rtsp/internal/adt" "github.com/rsfreitas/go-rtsp/internal/packet" "github.com/rsfreitas/go-rtsp/internal/rtp" "github.com/...
package main import ( "log" "net" "os" "github.com/jessevdk/go-flags" "github.com/kentik/libkflow/api" "github.com/kentik/libkflow/api/test" ) type Args struct { Port int `short:"p" description:"listen on port "` Host string `long:"host" description:"listen on host ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/type/range.proto package envoy_type import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" // Reference imports to suppress errors if they are not otherwise used. var _ = proto...
// This package is for deleting all obsolete documents and it's all related // relationships // it is deleting the documents which are older then one month package main import ( "flag" "koding/db/models" helper "koding/db/mongodb/modelhelper" "koding/helpers" "koding/tools/config" "koding/tools/logger" "time" ...
package routing import ( "fmt" "io/ioutil" "log" "github.com/maseology/mmaths" geojson "github.com/paulmach/go.geojson" ) func BuildSegment(roots []*mmaths.Node) []*mmaths.Node { o := []*mmaths.Node{} for itree, r := range roots { sws := r.Climb() var xys [][][]float64 queue := []*mmaths.Node{r} //...
package module import ( "context" "errors" "fmt" "io" "io/ioutil" "os" "path/filepath" "sort" "time" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/apistruct" marketevent...
// +build !windows package containerd import ( "context" "io/ioutil" "os" "path/filepath" "syscall" "golang.org/x/sys/unix" "github.com/containerd/containerd/mount" "github.com/containerd/containerd/namespaces" specs "github.com/opencontainers/runtime-spec/specs-go" ) const ( rwm = "rwm" d...
package cmd import ( "fmt" "io" "text/tabwriter" "time" "github.com/iovisor/kubectl-trace/pkg/factory" "github.com/iovisor/kubectl-trace/pkg/meta" "github.com/iovisor/kubectl-trace/pkg/tracejob" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/a...
// Copyright 2020 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
package lightstep import ( "fmt" "math" "strings" "github.com/lightstep/lightstep-tracer-common/golang/gogo/collectorpb" "github.com/opentracing/opentracing-go/log" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("ProtoLogEncoderTest", func() { It("encodes empty keys correctly", fun...
package wr import ( "math/rand" "time" "github.com/rs/zerolog/log" "local/global" ) // 加权随机算法的集群 type Cluster struct { config global.ServiceConfig nodes []Node total int totalWeight int // 节点权重总和 rand *rand.Rand // 随机种子 } type Node struct { ip string // ip port uin...
package main import ( "flag" "fmt" "go/format" "os" "path" "path/filepath" "strings" "github.com/maxbrunsfeld/counterfeiter/arguments" "github.com/maxbrunsfeld/counterfeiter/generator" "github.com/maxbrunsfeld/counterfeiter/locator" "github.com/maxbrunsfeld/counterfeiter/model" "github.com/maxbrunsfeld/co...
// Copyright ©2016 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 distuv import ( "math" "golang.org/x/exp/rand" "gonum.org/v1/gonum/mathext" ) // Gamma implements the Gamma distribution, a two-parameter con...
package v7 import ( "fmt" "strings" "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/actor/v7action" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/util/ui" ) type MarketplaceCommand struct { BaseCommand ServiceOfferingName string `shor...
/* * Copyright © 2021 peizhaoyou <<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...
package main import ( "fmt" "log" "os" "github.com/google/uuid" thingscloud "github.com/nicolai86/things-cloud-sdk" memory "github.com/nicolai86/things-cloud-sdk/state/memory" ) func printTag(tag *thingscloud.Tag, state *memory.State, indent string) { fmt.Printf("%s-\t%s\n", indent, tag.Title) children := st...
// Copyright 2020, Chef. All rights reserved. // https://github.com/q191201771/lal // // Use of this source code is governed by a MIT-style license // that can be found in the License file. // // Author: Chef (<EMAIL>) package remux import ( "github.com/q191201771/lal/pkg/aac" "github.com/q191201771/lal/pkg/avc" ...
/* Copyright 2021 The pdfcpu 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, softwar...
/* Copyright 2021 The KubeVela 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, so...
package alipay import ( "bytes" "crypto" "crypto/rand" "crypto/rsa" "crypto/sha1" "encoding/base64" "encoding/json" "fmt" "github.com/bennya8/go-union-payment/payloads" "github.com/bennya8/go-union-payment/utils/crypt" "github.com/bennya8/go-union-payment/utils/date" "io" "io/ioutil" "log" "net/http" "...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package s3 import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" "github.com/aws/aws-sdk-go-v2/private/protocol/restxml" "github.com/aws/aw...
package wsutil import ( "encoding/binary" "errors" "fmt" "io" "strings" "github.com/gorilla/websocket" spb "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/anypb" "github.com/chronos-tachyon/roxy/proto...
package main import "C" import ( "encoding/binary" "fmt" "git.wow.st/gmp/nswrap/examples/bluetooth/ns" "runtime" "time" ) func updateState(self ns.CBDelegate, c *ns.CBCentralManager, b bool) { fmt.Printf("Go: did update state\n") switch ns.NSInteger(cm.CBManager.State()) { case ns.CBManagerStateUnknown: fm...