text
stringlengths
3.08k
10.4k
package util import ( "bytes" "crypto/md5" "crypto/sha1" "encoding/binary" "errors" "fmt" "github.com/json-iterator/go" "github.com/satori/go.uuid" "net" "net/url" "os" "strings" "time" ) var json = jsoniter.ConfigCompatibleWithStandardLibrary func GetInternalIP() (string, error) { addrs, err := net.In...
package config import ( "context" "encoding/base64" "errors" "fmt" "io/ioutil" ghttp "net/http" "sync" "time" "github.com/hodgesds/dlg/config/dhcp4" "github.com/hodgesds/dlg/config/dns" "github.com/hodgesds/dlg/config/etcd" "github.com/hodgesds/dlg/config/http" "github.com/hodgesds/dlg/config/ldap" "git...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.15.2 // source: events/events.proto package evpb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang....
// Copyright 2017 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...
// Code generated by entc, DO NOT EDIT. package ent import ( "fmt" "strings" "time" "entgo.io/ent/dialect/sql" "github.com/willie-lin/kubeMonitor/pkg/nextserver/database/ent/k8sdeployment" ) // K8sDeployment is the model entity for the K8sDeployment schema. type K8sDeployment struct { config `json:"-"` // ID...
package shared import ( "bytes" "errors" "fmt" "regexp" "strconv" "strings" xpp "github.com/mmcdole/goxpp" ) var ( emailNameRgx = regexp.MustCompile(`^([^@]+@[^\s]+)\s+\(([^@]+)\)$`) nameEmailRgx = regexp.MustCompile(`^([^@]+)\s+\(([^@]+@[^)]+)\)$`) nameOnlyRgx = regexp.MustCompile(`^([^@()]+)$`) emailOn...
// 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 wr...
package csv import ( "bufio" "bytes" "errors" "fmt" "io" "unicode" "github.com/mithrandie/go-text" ) type Reader struct { Delimiter rune WithoutNull bool AllowUnevenFields bool Encoding text.Encoding reader *bufio.Reader line int column int recordBuf bytes.Buffer fieldS...
/* 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, ...
package crud import ( "fmt" "io/fs" "os" "path/filepath" "github.com/aerogear/charmil/cli/pkg/common/generate" "github.com/aerogear/charmil/cli/pkg/common/modname" "github.com/aerogear/charmil/cli/internal/template/crud" "github.com/aerogear/charmil/cli/pkg/factory" "github.com/spf13/cobra" ) // TemplateDa...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package v20201208 import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type SkuName string const ( SkuNameF0 = SkuName("F0") SkuNameS...
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V. // // 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 // // Un...
// 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 2020 the Exposure Notifications Verification Server 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...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package appmesh 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 DescribeRouteInput struct { _ struct{} `type:"structure"` // MeshNa...
// Copyright 2017-present The Hugo 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 web import ( "fmt" "github.com/gin-gonic/gin" "go-rad/database" "net/http" "time" ) type PieStruct struct { Value interface{} `json:"value"` Name string `json:"name"` Selected bool `json:"selected"` } // 新用户发展统计 type NewUserStatistic struct { CreateDate string `xorm:"create_date" ...
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
// Copyright 2020 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 ...
/* 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 base import ( "bufio" "bytes" "testing" "github.com/stretchr/testify/require" ) var casesRequest = []struct { name string byts []byte req Request }{ { "options", []byte("OPTIONS rtsp://example.com/media.mp4 RTSP/1.0\r\n" + "CSeq: 1\r\n" + "Proxy-Require: gzipped-messages\r\n" + "Require...
package reward import ( "bytes" "fmt" gbig "math/big" "testing" abi "github.com/filecoin-project/specs-actors/actors/abi" big "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" "github.com/stretchr/testify/assert" "github.com/xorcare/golden" ) ...
// Copyright (C) 2019-2020 Zilliz. 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 l...
package router import ( "net/http" "net/http/httptest" "strconv" "testing" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/mocktracer" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/DataDog/dd-trace-go.v1/ddtra...
package goshopify import ( "fmt" "time" "github.com/shopspring/decimal" ) const customersBasePath = "admin/customers" const customersResourceName = "customers" // CustomerService is an interface for interfacing with the customers endpoints // of the Shopify API. // See: https://help.shopify.com/api/reference/cus...
/* Copyright 2020 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 main import ( "bytes" "encoding/json" "fmt" "log" "net/http" "net/url" "os" "strings" "text/template" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/mrjones/oauth" "golang.org/x/net/context" "golang.org/x/oauth2...
package service import ( "errors" "platform_report/dao" "time" ) type XzqUserService struct { UserId int64 `json:"UserId"` // 用户id Mobile string `json:"mobile"` // 手机号 Nick string `json:"nick"` // 用户昵称 UserName string `json:"userName"` // 用户名称 U...
package minersc_test import ( "fmt" "strconv" "testing" "time" chainstate "0chain.net/chaincore/chain/state" "0chain.net/smartcontract" "0chain.net/chaincore/state" "0chain.net/chaincore/mocks" sci "0chain.net/chaincore/smartcontractinterface" "0chain.net/chaincore/transaction" . "0chain.net/smartcontr...
package main import ( "flag" "fmt" "os" "runtime" ) const ( VERSION = "0.1.0" ) type LogSetting struct { Filename string // "/var/log/gulfire/access/gulfire-access.log" MaxSize int // in Megabyte MaxBackups int MaxAge int LocalTime bool } type AppSettings struct { id string GoMaxProcs ...
// Code generated by entc, DO NOT EDIT. package ent import ( "encoding/json" "fmt" "strings" "entgo.io/ent/dialect/sql" "github.com/google/uuid" "github.com/lemon-mint/open-backend/ent/group" "github.com/lemon-mint/open-backend/ent/resource" ) // Resource is the model entity for the Resource schema. type Res...
// Copyright 2017 Drone.IO Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "context" "fmt" "time" "github.com/jenkins-x/go-scm/scm" ) type reviewService struct { client *wrapper } func (s *reviewService) ...
// Copyright 2018 Samsung Electronics 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 applic...
// Copyright 2014 Prometheus 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 in wri...
// Copyright © 2021 Cisco Systems, Inc. and 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. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 //...
package log import ( "fmt" golog "log" "os" "sync" ) // Outputer is a interface that ensures we can print with call stack type Outputer interface { Output(i int, s string) error } var ( // Verbose triggers printing og debug info Verbose = false createflags = golog.LstdFlags | golog.Lshortfile Ilog ...
package testing import ( "fmt" "net/http" "testing" "github.com/opentelekomcloud/gophertelekomcloud/openstack/cts/v1/tracker" th "github.com/opentelekomcloud/gophertelekomcloud/testhelper" fake "github.com/opentelekomcloud/gophertelekomcloud/testhelper/client" ) func TestCreate(t *testing.T) { th.SetupHTTP() ...
package smsproviders import ( "encoding/json" "fmt" "log" "os" "time" "io/ioutil" "net/http" ) ///////////////////////////////////// // Kaylera specific configurations // ///////////////////////////////////// const ( kaleyraSlug string = "KALEYRA" kaleyraAPIUrl string = "https://a...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
package account import ( "github.com/iotaledger/iota.go/account/event" "github.com/iotaledger/iota.go/account/store" "github.com/iotaledger/iota.go/account/store/inmemory" "github.com/iotaledger/iota.go/account/timesrc" "github.com/iotaledger/iota.go/address" "github.com/iotaledger/iota.go/api" "github.com/iota...
package bls import ( "dfinity/beacon/blscgo" "fmt" "github.com/ethereum/go-ethereum/common" "log" "math/big" ) // Logging counters var secAggCalls, secAggLen, secShareCalls, secShareLen, secRecoverCalls, secRecoverLen int // SeckeyCtrs -- one-line summary of counter values related to secret key operations func ...
package ui import ( "bytes" "fmt" "github.com/ajstarks/svgo" "github.com/lovelly/gleam/pb" ) var ( WidthStep = 20 * m HightStep = 3 * m HightStepHeader = 2 * m Margin = 5 * m LineLength = 5 * m SmallMargin = 4 VerticalGap = 4 * m ) type stepGroupPosition struct { input ...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package amazonmq import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Resource Type definition for AWS::Amaz...
// // (C) Copyright 2020-2021 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // package control import ( "context" "time" "github.com/daos-stack/daos/src/control/build" "github.com/pkg/errors" ) type ( // hostListGetter defines an interface to be implemented // by requests that can prov...
package tags import ( "fmt" "reflect" "regexp" "strconv" "strings" "github.com/NyaaPantsu/nyaa/config" "github.com/NyaaPantsu/nyaa/models" "github.com/NyaaPantsu/nyaa/models/users" "github.com/NyaaPantsu/nyaa/utils/log" ) // FilterOrCreate check if a tag type has reached the maximal votes and removes the ot...
/* Copyright 2018 Heptio 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, software dis...
// 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 gofeed import ( "bytes" "context" "errors" "fmt" "io" "net/http" "strings" "github.com/mmcdole/gofeed/atom" "github.com/mmcdole/gofeed/json" "github.com/mmcdole/gofeed/rss" ) // ErrFeedTypeNotDetected is returned when the detection system can not figure // out the Feed format var ErrFeedTypeNotDete...
package cluster import ( "context" "sync" "time" log "gopkg.in/inconshreveable/log15.v2" "github.com/lxc/lxd/client" "github.com/lxc/lxd/lxd/db" "github.com/lxc/lxd/lxd/endpoints" "github.com/lxc/lxd/lxd/revert" "github.com/lxc/lxd/shared" "github.com/lxc/lxd/shared/api" "github.com/lxc/lxd/shared/logger"...
// Code generated by go-swagger; DO NOT EDIT. package events // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "time" "golang.org/x/net/context" "github.com/go-openapi/errors" "github.com/go-openapi/runtime"...
package registry_test import ( "bytes" "io/ioutil" "os" "path/filepath" "testing" "time" "github.com/buildpacks/pack/logging" "github.com/sclevine/spec" "gopkg.in/src-d/go-git.v4" "gopkg.in/src-d/go-git.v4/plumbing/object" ilogging "github.com/buildpacks/pack/internal/logging" "github.com/buildpacks/pac...
// Copyright (c) 2019, The Decred developers // See LICENSE for details. package exchanges import ( "crypto/tls" "encoding/json" "fmt" "net/http" "sync" "time" "github.com/carterjones/signalr" "github.com/carterjones/signalr/hubs" "github.com/gorilla/websocket" ) const ( wsWriteTimeout = 5 * time.Second ...
package nsqadmin import ( "bytes" "crypto/tls" "crypto/x509" "encoding/json" "errors" "fmt" "io/ioutil" "log" "net" "net/http" "net/url" "os" "path" "sync" "sync/atomic" "github.com/nsqio/nsq/internal/http_api" "github.com/nsqio/nsq/internal/util" "github.com/nsqio/nsq/internal/version" ) type NSQA...
package simulator_context import ( "encoding/hex" "fmt" "net" "os/exec" "radio_simulator/lib/ngap/ngapType" "radio_simulator/lib/openapi/models" "radio_simulator/src/logger" ) var simContext = Simulator{} const MaxValueOfPdrFar uint64 = 0xffffffffffffffff func init() { Simulator_Self().RanPool = make(map[st...
// Copyright 2009 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. // Waiting for FDs via epoll(7). package epoll // This file is a slightly modified copy of Go's src/pkg/net/fd_linux.go, see // http://code.google.com/p/go/so...
// Package gaper implements a supervisor restarts a go project // when it crashes or a watched file changes package gaper import ( "fmt" "os" "os/signal" "path/filepath" "syscall" "time" shellwords "github.com/mattn/go-shellwords" ) // DefaultBuildPath is the default build and watched path var DefaultBuildPat...
package main import ( "context" "flag" "fmt" "os" "os/signal" "path/filepath" "regexp" "runtime" "sort" "strings" "github.com/saracen/walker" ) const ( name = "files" version = "0.3.3" revision = "HEAD" ) type config struct { ignore string ignoreenv string hidden bool absolu...
// Package drivers talks to various database backends and retrieves table, // column, type, and foreign key information package drivers import ( "sort" "github.com/friendsofgo/errors" "github.com/volatiletech/sqlboiler/v4/importers" "github.com/volatiletech/strmangle" ) // These constants are used in the config ...
// 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 services import ( "errors" "sync" "time" "github.com/OWASP/Amass/v3/config" "github.com/OWASP/Amass/v3/graph" "github.com/OWASP/Amass/v3/graph/db" "github.co...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package iam import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Provides an IAM access key. This is a set of credenti...
package gdbserial import ( "bufio" "bytes" "fmt" "io" "io/ioutil" "os" "os/exec" "strings" "unicode" ) // Record uses rr to record the execution of the specified program and // returns the trace directory's path. func Record(cmd []string, wd string, quiet bool) (tracedir string, err error) { rfd, wfd, err :...
// Copyright 2009 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. // Generate a self-signed X.509 certificate for a TLS server. Outputs to // 'cert.pem' and 'key.pem' and will overwrite existing files. package e2eutil import...
package validate import ( "errors" "fmt" "io" "os" "text/tabwriter" "github.com/spf13/cobra" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/util/validation/field" configapilatest "github.com/openshift/origin/pkg/cmd/server/api/latest" "github.com/openshift/origin/pkg/cmd/server/ap...
/* SPDX-License-Identifier: BSD-3-Clause-Open-MPI */ package impl import ( "fmt" "math" "os" "testing" "time" "github.com/stretchr/testify/assert" ) var configFile = "../config.json" func setup() error { err := Initialize(configFile) if err != nil { return nil } FabricConfig.Enabled = false return se...
/* Copyright 2019 The Vitess 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, soft...
package Terminal import ( "fmt" "math/rand" "os" "strings" "github.com/gdamore/tcell/v2" "github.com/gdamore/tcell/v2/encoding" "github.com/mattn/go-runewidth" "github.com/oxide-one/systemd.go/pkg/clear" "github.com/oxide-one/systemd.go/pkg/sleeper" ) func emitStr(s tcell.Screen, x, y int, style tcell.Style...
package main import ( "crypto/rand" "encoding/csv" "encoding/json" "fmt" "io" "io/ioutil" "log" "os" "sync" "time" ) var conf Config // RunResult provides the results for each command run type RunResult struct { stdOut string stdErr string returnVal int timedOut bool pid int } // Config ...
package commands import ( "fmt" "os" "path/filepath" "github.com/git-lfs/git-lfs/errors" "github.com/git-lfs/git-lfs/filepathfilter" "github.com/git-lfs/git-lfs/git" "github.com/git-lfs/git-lfs/git/githistory" "github.com/git-lfs/git-lfs/lfs" "github.com/git-lfs/git-lfs/tasklog" "github.com/git-lfs/git-lfs/...
package main import ( "encoding/json" "flag" "fmt" "io/ioutil" "net/http" "github.com/BurntSushi/toml" "github.com/bobinette/papernet" "github.com/bobinette/papernet/auth" "github.com/bobinette/papernet/bleve" "github.com/bobinette/papernet/bolt" "github.com/bobinette/papernet/gin" "github.com/bobinette/...
// Copyright 2019 Drone IO, 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...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package lockbasedtxmgr import ( "testing" "github.com/hyperledger/mchain/core/ledger" "github.com/hyperledger/mchain/core/ledger/kvledger/txmgmt/privacyenabledstate" "github.com/hyperledger/mchain/core/ledger/kvledger/txmgmt/versi...
package cmd import ( "bytes" "encoding/json" "errors" "fmt" "io/ioutil" "os" "path/filepath" "sync" "github.com/mitchellh/go-homedir" "github.com/mithrandie/csvq/lib/file" "github.com/mithrandie/go-text/color" ) const ( ConfigDir = ".config" CSVQConfigDir = "csvq" EnvFileName ...
package pat import ( "context" "net/http" "reflect" "testing" "goji.io/v3/pattern" ) func mustReq(method, path string) *http.Request { req, err := http.NewRequest(method, path, nil) if err != nil { panic(err) } ctx := pattern.SetPath(context.Background(), req.URL.EscapedPath()) return req.WithContext(ctx...
package speculative import ( "encoding/json" "fmt" "regexp" "strconv" "strings" ) // Query represents a SQL query. type Query struct { QueryID int ResultSet [][]interface{} Arguments []interface{} IsSelect bool } func listToString(list []interface{}) string { strs := make([]string, len(list)) for i, el...
package conjungo import ( "context" "errors" "fmt" "reflect" ) // Options is used to determine the behavior of a merge. // It also holds the collection of functions used to determine merge behavior of various types. // Always use NewOptions() to generate options and then modify as needed. type Options struct { /...
package synacormedia import ( "encoding/json" "fmt" "net/http" "text/template" "github.com/golang/glog" "github.com/mxmCherry/openrtb" "github.com/prebid/prebid-server/adapters" "github.com/prebid/prebid-server/errortypes" "github.com/prebid/prebid-server/macros" "github.com/prebid/prebid-server/openrtb_ext...
// 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-2020 Datadog, Inc. package quantile import ( "math" "testing" "github.com/DataDog/sketches...
package client_conn import ( "fmt" . "github.com/fengleng/flight/log" "github.com/fengleng/flight/server/my_errors" "github.com/fengleng/flight/server/plan" "github.com/fengleng/flight/server/wrap_conn" "github.com/fengleng/flight/sqlparser/sqlparser" "github.com/fengleng/go-mysql-client/mysql" "github.com/fen...
// Copyright 2016 by caixw, All rights reserved. // Use of this source code is governed by a MIT // license that can be found in the LICENSE file. package input import ( "path/filepath" "testing" "github.com/tanxiaolong/apidoc/input/encoding" "github.com/tanxiaolong/apidoc/types" "github.com/issue9/assert" ) v...
package controllers import ( "context" "fmt" "os" "github.com/go-logr/logr" apiv1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" kerrors "k8s.io/apimachinery/pkg/util/errors" "sigs.k8s.io/cluster-api/util/patch" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" anyw...
package main import ( "flag" "fmt" "net" "regexp" "strings" "time" "github.com/sirupsen/logrus" "github.com/vharitonsky/iniflags" ) var ( appVersion = "unknown" buildTime = "unknown" ) var ( logFile = flag.String("logfile", "", "Path to logfile") logFormat = flag.String("log_format", ...
package wav import ( "bytes" "encoding/binary" "fmt" "github.com/go-audio/riff" ) var ( // See http://bwfmetaedit.sourceforge.net/listinfo.html markerIART = [4]byte{'I', 'A', 'R', 'T'} markerISFT = [4]byte{'I', 'S', 'F', 'T'} markerICRD = [4]byte{'I', 'C', 'R', 'D'} markerICOP = [4]byte{'I', 'C'...
// Copyright 2015 Keybase, Inc. All rights reserved. Use of // this source code is governed by the included BSD license. package engine import ( "strings" "testing" "time" "github.com/keybase/client/go/libkb" keybase1 "github.com/keybase/client/go/protocol/keybase1" "github.com/keybase/clockwork" ) type flake...
// +build windows package client import ( "encoding/json" "fmt" "os" "path/filepath" "strconv" "strings" "github.com/Microsoft/hcsshim" "github.com/sirupsen/logrus" ) // Mode is the operational mode, both requested, and actual after verification type Mode uint const ( // defaultUvmTimeoutSeconds is the de...
// Copyright (C) 2017 Space Monkey, 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 agre...
/* Copyright 2021 The KServe 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, soft...
package postman2 import ( "encoding/json" "strings" ) type Collection struct { Info CollectionInfo `json:"info"` Item []Item `json:"item"` Event []Event `json:"event,omitempty"` } func NewCollectionFromBytes(data []byte) (Collection, error) { pman := Collection{} err := json.Unmarshal(data, &...
package server import ( "encoding/json" "fmt" "io/ioutil" "github.com/spf13/cobra" "github.com/tendermint/go-crypto/keys" "github.com/tendermint/go-crypto/keys/words" cmn "github.com/tendermint/tmlibs/common" dbm "github.com/tendermint/tmlibs/db" "github.com/tendermint/tmlibs/log" tcmd "github.com/tenderm...
// Copyright 2019 The Go Cloud Development Kit 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
package gendemo // Code generated by go-ipld-prime gengo. DO NOT EDIT. import ( ipld "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/node/mixins" "github.com/ipld/go-ipld-prime/schema" ) type _String struct{ x string } type String = *_String func (n String) String() string { return n.x } func (_...
package service import ( "context" "crypto/md5" "fmt" topic_v1 "go-common/app/service/bbq/topic/api" video_v1 "go-common/app/service/bbq/video/api/grpc/v1" "go-common/app/service/bbq/video/model" "go-common/library/ecode" "go-common/library/log" "io" "net/url" "strconv" "time" "github.com/golang/protobuf...
package main import ( "bufio" "fmt" "os" "os/signal" "runtime/pprof" "syscall" "time" kingpin "gopkg.in/alecthomas/kingpin.v2" ) const ( // SATEXITCODE is the exit code for UNKNOWN SATEXITCODE = 10 // UNSATEXITCODE is the exit code for UNKNOWN UNSATEXITCODE = 20 // UNKNOWNEXITCODE is the exit code for U...
package internal import ( "context" "fmt" "strings" "time" "github.com/ovh/cds/sdk" "github.com/rockbears/log" ) func StartWorker(ctx context.Context, w *CurrentWorker, bookedJobID int64) (mainError error) { log.Info(ctx, "Starting worker %s on job %d", w.Name(), bookedJobID) if bookedJobID == 0 { return ...
// Copyright (c) 2020 Target Brands, Inc. All rights reserved. // // Use of this source code is governed by the LICENSE file in this repository. package main import ( "encoding/json" "fmt" "os" "time" "github.com/go-vela/vela-git/version" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" _ "github.co...
package buildcontrol import ( "fmt" "github.com/pkg/errors" "github.com/tilt-dev/tilt/internal/container" "github.com/tilt-dev/tilt/internal/controllers/apis/liveupdate" "github.com/tilt-dev/tilt/internal/sliceutils" "github.com/tilt-dev/tilt/internal/store" "github.com/tilt-dev/tilt/internal/store/liveupdate...
// Copyright 2017 Qubit Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package kropa import ( "bytes" "context" "encoding/json" "errors" "io/ioutil" "net/http" "strings" "github.com/devopsfaith/krakend/config" "github.com/devopsfaith/krakend/logging" "github.com/devopsfaith/krakend/proxy" ) const authHeader = "Authorization" const Namespace = "github_com/zean00/kropa" type x...
// Copyright 2015-2018 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...
package linter import ( "github.com/setpill/noverify/src/meta" "github.com/setpill/noverify/src/php/parser/node" "github.com/setpill/noverify/src/php/parser/node/expr" "github.com/setpill/noverify/src/php/parser/node/expr/assign" "github.com/setpill/noverify/src/php/parser/node/name" "github.com/setpill/noverify...