text
stringlengths
3.08k
10.4k
// Copyright 2020 MongoDB Inc // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
package b2 import ( "io" "strings" "time" "github.com/graymeta/stow" "github.com/pkg/errors" "gopkg.in/kothar/go-backblaze.v0" ) type container struct { bucket *backblaze.Bucket } var _ stow.Container = (*container)(nil) // ID returns the name of a bucket func (c *container) ID() string { // Although backb...
// Copyright (c) 2016, 2018, 2022, 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...
// This code is under BSD license. See license-bsd.txt package store import "fmt" type Lang struct { Code string Name string NameNative string } // list of languages that we know about var ( Languages = [...]Lang{ Lang{"af", "Afrikaans", "Afrikaans"}, Lang{"am", "Armenian", "Հայերեն"}, Lang{"ar...
// // SPDX-License-Identifier: BSD-3-Clause // package redfish import ( "encoding/json" "github.com/stmcginnis/gofish/common" ) // TaskState indicates the state of a task. type TaskState string const ( // NewTaskState shall represent that this task is newly created but the // operation has not yet started. N...
package commands import ( "flag" "fmt" appConfig "k8s-pv-provisioner/cmd/provisioner/config" "k8s-pv-provisioner/cmd/provisioner/controllers" "k8s-pv-provisioner/cmd/provisioner/controllers/pv" "k8s-pv-provisioner/cmd/provisioner/controllers/pvc" "os" "strconv" "strings" "github.com/spf13/cobra" storage_v1...
package main import ( "fmt" "log" "net/http" "sync" "time" auth "github.com/heroku/lumbermill/Godeps/_workspace/src/github.com/heroku/authenticater" influx "github.com/heroku/lumbermill/Godeps/_workspace/src/github.com/influxdb/influxdb-go" ) var influxDbStaleTimeout = 24 * time.Minute // Would be nice to mak...
/* 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, ...
// 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 examples import ( "bytes" "context" "flag" "fmt" "io" "github.com/mrcook/svgtoolkit/svg" "github.com/google/subcommands" ) type ExamplesCmd struct { name string } func (ExamplesCmd) Name() string { return "examples" } func (ExamplesCmd) Synopsis() string { return "SVG Toolkit: Examples" } func ...
package main import ( "encoding/base64" "fmt" "io/ioutil" "log" "math/rand" "net" "os" "os/signal" "strconv" "strings" "time" ) type Colors struct { red string green string blue string black string yellow string magenta string cyan string white string reset string } func initCo...
package ginkgo import ( "github.com/onsi/ginkgo/types" "time" ) type example struct { subject exampleSubject focused bool containers []*containerNode state types.ExampleState runTime time.Duration failure types.ExampleFailure didInterceptFailure bool interceptedFailur...
// Copyright Suneido Software Corp. All rights reserved. // Governed by the MIT license found in the LICENSE file. package runtime import ( "log" "strconv" "sync/atomic" "github.com/apmckinlay/gsuneido/options" "github.com/apmckinlay/gsuneido/util/regex" "github.com/apmckinlay/gsuneido/util/tr" ) // MainThrea...
// Copyright (c) 2020 Doc.ai and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // // 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/LIC...
package tetris import ( "fmt" "github.com/faiface/pixel" "github.com/faiface/pixel/pixelgl" "golang.org/x/image/colornames" _ "image/png" //"math" "encoding/gob" "github.com/TetrisAI/project/agent" gb "github.com/TetrisAI/project/gameboard" hp "github.com/TetrisAI/project/helper" _ "math" "os" "time" ) f...
// Copyright 2015 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
/* Copyright 2022 The Cockroach 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 applicable law or agreed to in writing, s...
// Copyright (C) 2020 WuPeng <<EMAIL>>. // Use of this source code is governed by an MIT-style. // 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 limitati...
// tailer manages objects which tail the logs of a collection of pods specified by a label selector. // This is similar to what the cli tool `stern` does. package tailer import ( "context" "regexp" "sync" "text/template" "time" "github.com/epinio/epinio/helpers/kubernetes" "github.com/epinio/epinio/internal/cl...
package sshd import ( "context" "fmt" "io/ioutil" "net/http" "net/http/httptest" "path" "testing" "time" "github.com/stretchr/testify/require" "golang.org/x/crypto/ssh" "gitlab.com/gitlab-org/gitlab-shell/client/testserver" "gitlab.com/gitlab-org/gitlab-shell/internal/config" "gitlab.com/gitlab-org/gitl...
package merkle import ( "math" "github.com/qlcchain/qlc-go-sdk/pkg/types" ) // nextPowerOfTwo returns the next highest power of two from a given number if // it is not already a power of two. This is a helper function used during the // calculation of a merkle tree. func nextPowerOfTwo(n int) int { // Return the...
// Copyright (c) 2010 CZ.NIC z.s.p.o. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // blame: jnml, labs.nic.cz package zdb import ( "bytes" "github.com/cznic/fileutil/falloc" "github.com/cznic/fileutil/storage" ) /* Chunk layout: P...
package olive import ( "fmt" "strings" "github.com/eidolon/wordwrap" ) // helpBuilder is a type used to build help messages type helpBuilder struct { c *Command b strings.Builder w wordwrap.WrapperFunc } // getHelpMessage generates a help message for a given command func getHelpMessage(c *Command) string { h...
// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
package pb import ( "log" "time" "github.com/ftl/hamradio/callsign" "github.com/ftl/hamradio/locator" "github.com/ftl/hellocontest/core" "github.com/ftl/hellocontest/core/parse" ) func ToQSO(pbQSO QSO) (core.QSO, error) { var qso core.QSO var err error qso.Callsign, err = callsign.Parse(pbQSO.Callsign) if...
package keycloakbackup import ( "context" "fmt" "time" kc "github.com/keycloak/keycloak-operator/pkg/apis/keycloak/v1alpha1" "github.com/keycloak/keycloak-operator/pkg/common" errors "github.com/pkg/errors" v1 "k8s.io/api/batch/v1" "k8s.io/api/batch/v1beta1" corev1 "k8s.io/api/core/v1" kubeerrors "k8s.io/ap...
package integrationtest import ( "bytes" "context" "encoding/json" "fmt" "log" "path" "strings" "strconv" "testing" "time" "logrusfluenthook/hook" dockerContainer "github.com/docker/docker/api/types/container" dockerMount "github.com/docker/docker/api/types/mount" dockerClient "github.com/docker/docker...
// Package interaction handles the user interaction with mouse and keyboard. package interaction import ( window "github.com/adrianderstroff/pbr/pkg/core/window" "github.com/go-gl/glfw/v3.2/glfw" ) // Interaction holds all eventhandlers and propagates them to it's registered handlers. type Interaction struct { ctx...
/* * * * // Copyright (c) 2021 <NAME>. All rights reserved. * * // The license can be found in the root of this project; see LICENSE. * */ package bloom import ( "fmt" "github.com/scottcagno/storage/pkg/bits" "github.com/scottcagno/storage/pkg/hash/cityhash" "math" ) const ( kp00 = uint64(1610612741) kp...
// Package audittest provides helper methods for writing tests that interact // with the audit logging service. package audittest import ( "bufio" "encoding/csv" "fmt" "io" "os" "reflect" "strings" "sync" "testing" "github.com/go-phorce/dolly/algorithms/slices" "github.com/stretchr/testify/assert" "github...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package iot 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 UpdateProvisioningTemplateInput struct { _ struct{} `type:"structure"` ...
package keeper // DONTCOVER import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/osmosis-labs/osmosis/osmomath" "github.com/osmosis-labs/osmosis/x/gamm/types" ) const poolBalanceInvariantName = "pool-account-balance-equals-expected" // RegisterInvariants registers all governance invariants func...
package fwd import "io" const ( // DefaultWriterSize is the // default write buffer size. DefaultWriterSize = 2048 minWriterSize = minReaderSize ) // Writer is a buffered writer type Writer struct { w io.Writer // writer buf []byte // 0:len(buf) is bufered data } // NewWriter returns a new writer // tha...
package api import ( "errors" "fmt" "github.com/cihub/seelog" "github.com/denisbakhtin/sitemap" "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" "github.com/gitlubtaotao/wblog/models" "github.com/gitlubtaotao/wblog/repositories" "github.com/gitlubtaotao/wblog/system" "github.com/gitlubtaotao/wblo...
package fs // CountSuffix is parsed by flag with k/M/G decimal suffixes import ( "fmt" "math" "sort" "strconv" "strings" "github.com/pkg/errors" ) // CountSuffix is an int64 with a friendly way of printing setting type CountSuffix int64 // Common multipliers for SizeSuffix const ( CountSuffixBase CountSuffix...
package testh_test import ( "io/ioutil" "testing" "time" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" "github.com/ryboe/q" "github.com/neilotoole/sq/drivers/csv" "github.com/neilotoole/sq/libsq/core/sqlz" "github.com/neilotoole/sq/libsq/core/stringz" "github.com/neilotoole/sq/libsq/s...
// Code generated by go-swagger; DO NOT EDIT. package interfaces // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.c...
//go:build linux // +build linux package intel_powerstat import ( "bufio" "encoding/binary" "fmt" "io" "os" "path/filepath" "regexp" "strconv" "strings" "time" ) // fileService is responsible for handling operations on files. type fileService interface { getCPUInfoStats() (map[string]*cpuInfo, error) get...
package ccd import ( "fmt" "time" "github.com/mattn/go-pkg-xmlx" ) var ( MedicationsTid = []string{"2.16.840.1.113883.10.20.1.8", "2.16.840.1.113883.10.20.22.2.1.1"} MedicationsParser = Parser{ Type: PARSE_SECTION, Values: MedicationsTid, Priority: 0, Func: parseMedications, } ) type Medica...
package wingedGrid import ( "math" "testing" ) func (grid WingedGrid) computeMeanAndVariance() (float64, float64) { // compute mean edge length var meanSum float64 for _, edge := range grid.Edges { var vert1, vert2 WingedVertex vert1 = grid.Vertices[edge.FirstVertexA] vert2 = grid.Vertices[edge.FirstVertex...
package wamp import ( "context" "crypto/tls" "crypto/x509" "encoding/json" "encoding/pem" "errors" "fmt" "io/ioutil" "os" "github.com/gammazero/nexus/v3/client" "github.com/gammazero/nexus/v3/wamp" "github.com/mosaicnetworks/babble/src/net/signal" "github.com/pion/webrtc/v2" "github.com/sirupsen/logrus"...
package data import ( "context" "fmt" "git.hxecloud.com/cloudwonder-portal/rms-server/pkg/gplugin" "github.com/go-kratos/kratos/v2/log" "github.com/google/wire" jsoniter "github.com/json-iterator/go" "github.com/patrickmn/go-cache" "github.com/realotz/mstore/internal/biz" "github.com/realotz/mstore/internal/c...
package gombokey import ( "fmt" log "github.com/livelace/logrus" "github.com/spf13/viper" "os" "strings" "sync" ) type Config struct { ExecTimeout int Hold []string InputDevice string InputTimeout int LogLevel string Parallel int Rules map[string]*Rule } type Rule struct { m ...
package gcse import ( "encoding/gob" "regexp" "strings" "time" "unicode" "github.com/agonopol/go-stem" "github.com/daviddengcn/sophie" "github.com/golangplus/bytes" "github.com/golangplus/errors" "github.com/golangplus/strings" "github.com/x0rzkov/go-index" ) // DocInfo is the information stored in backen...
package k8swatch import ( "context" "sync" "github.com/pkg/errors" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "github.com/tilt-dev/tilt/internal/controllers/apis/cluster" "github.com/tilt-dev/tilt/internal/k8s" "github.com/tilt-dev/tilt/internal/store" "github.com/tilt-dev/tilt/pkg/apis/core/v1...
package simpledbsql import ( "context" "database/sql/driver" "encoding/base64" "io" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/service/simpledb" "github.com/aws/aws-sdk-go/service/simpledb/simpledbiface" "github.com/jjeffery/errors" "github.com/jjeffery/simpledbsql/internal/parse" ) type column...
package main import ( "bytes" "context" "encoding/json" "fmt" "io/ioutil" "os" "regexp" "strings" "text/template" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/serializer/yaml" "k8s.io...
package main import ( "flag" "fmt" "io/ioutil" "net" "os" "os/exec" "sync" "time" "github.com/getlantern/systray" "encoding/json" ) type endpoint struct { Macs []string `json:"macs"` Excluding string `json:"excluding"` Onit string `json:"onit"` Menu *systr...
package blockgen import ( "math/rand" "sync" "github.com/DCNT-developer/dcnt/common/entryBlock" "github.com/DCNT-developer/dcnt/common/entryCreditBlock" "github.com/DCNT-developer/dcnt/common/interfaces" "github.com/DCNT-developer/dcnt/common/primitives" "github.com/DCNT-developer/dcnt/common/primitives/rando...
package cosmic import ( "fmt" "log" "strings" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceCosmicIPAddress() *schema.Resource { aclidSchema := &schema.Schema{ Type: schema.TypeString, Optional: true, Default: none, } aclidSchema.StateFunc = func(v interface{}) string { ...
/* This module creates a fuzzy precision representation of a time interval. - It makes calculations based on a 64 year representation of time from January 1, 1970 to January 1, 2098. - Values are encoded with a number of bits(represented by an ASCII character) that indicate the amount of time to add to 1970. - Times pr...
package chunk import ( "bytes" "compress/gzip" "context" "fmt" "io" "math" "path" "github.com/pachyderm/pachyderm/src/client/pkg/grpcutil" "github.com/pachyderm/pachyderm/src/server/pkg/obj" "modernc.org/mathutil" ) // ReaderFunc is a callback that returns the next set of data references // to a reader. ty...
package wallet import ( "encoding/hex" "testing" "lukechampine.com/frand" ) func TestBIP39Vectors(t *testing.T) { tests := []struct { entropy string phrase string }{ { entropy: "00000000000000000000000000000000", phrase: "abandon abandon abandon abandon abandon abandon abandon abandon abandon aban...
package kelpos import ( "bufio" "fmt" "io/ioutil" "log" "os/exec" "github.com/nikhilsaraf/go-tools/multithreading" ) // StreamOutput runs the provided command in a streaming fashion func (kos *KelpOS) StreamOutput(command *exec.Cmd) error { stdout, e := command.StdoutPipe() if e != nil { return fmt.Errorf(...
package client import ( "bytes" "compress/flate" "encoding/base64" "fmt" "github.com/google/uuid" log "github.com/sirupsen/logrus" "net/url" "text/template" "time" ) // AzureAuthnRequest is SAML AuthnRequest components. type AzureAuthnRequest struct { URL string ID string TenantID ...
package s3 import ( "fmt" "io" "strings" log "github.com/Sirupsen/logrus" "github.com/drone/drone-cache-lib/storage" "github.com/dustin/go-humanize" "github.com/minio/minio-go" ) // Options contains configuration for the S3 connection. type Options struct { Endpoint string Key string Secret st...
package stats import ( "bytes" "fmt" "sort" "github.com/guigolab/bamstats/annotation" "github.com/guigolab/bamstats/sam" ) // general element constants const ( Exon = "exon" ExonIntron = "exonic_intronic" Intergenic = "intergenic" Intron = "intron" Other = "others" Total = "total" ) v...
/* Copyright 2019 The GitLab-Controller 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 iec61499 import ( "encoding/xml" ) //DebugInfo is used when valid so that if something is invalid //we can let the user know type DebugInfo struct { SourceLine int SourceFile string } //FB is the overall type for function blocks type FB struct { XMLName xml.Name Name string `xml:"Name,attr"` Comment...
package services import ( "bufio" "encoding/binary" "fmt" "log" "net" "github.com/looooj/gcommons/goproxy-utils/utils" "strconv" "sync" "time" ) type BridgeItem struct { ServerChn chan *net.Conn ClientChn chan *net.Conn ClientControl *net.Conn Once *sync.Once Key string } type...
package server import ( "io" "net" "time" "github.com/dgrijalva/jwt-go" "github.com/fatih/color" protocol "github.com/gjbae1212/grpc-vpn/grpc/go" "github.com/gjbae1212/grpc-vpn/internal" "github.com/pkg/errors" "github.com/songgao/water/waterutil" "go.uber.org/atomic" ) const ( queueSizeForClientIn = 1000...
// Copyright © 2019 The Tekton Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
package testutil import ( "fmt" "github.com/stretchr/testify/suite" "github.com/line/lbm-sdk/client/flags" "github.com/line/lbm-sdk/crypto/hd" "github.com/line/lbm-sdk/crypto/keyring" clitestutil "github.com/line/lbm-sdk/testutil/cli" "github.com/line/lbm-sdk/testutil/network" sdk "github.com/line/lbm-sdk/ty...
package aws import ( "fmt" "github.com/infracost/infracost/internal/resources/aws" "github.com/infracost/infracost/internal/schema" "github.com/tidwall/gjson" ) func getInstanceRegistryItem() *schema.RegistryItem { return &schema.RegistryItem{ Name: "aws_instance", Notes: []string{ "Costs associated wit...
package schema import ( "encoding/json" "errors" "fmt" "io/ioutil" "sort" "strings" log "github.com/sirupsen/logrus" "github.com/newrelic/tutone/internal/util" ) // Type defines a specific type within the schema type Type struct { Name string `json:"name,omitempty"` Description string `json:"descri...
// Copyright 2021 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 confd /** * Copyright 2021 gowrk Author. 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 ...
/* * Copyright The Dragonfly Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
package platformclientv2 import ( "time" "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" ) // Crossplatformpolicy type Crossplatformpolicy struct { // Id - The globally unique identifier for the object. Id *string `json:"id,omitempty"` // Name Name *string `json:"name,omitempty"` // M...
package main import ( "net/http" "strconv" "time" // "strconv" "fmt" "io/ioutil" "log" "math" "os" ) func main() { // presAge := make(map[string] int) // map init //exception handling // excHandling(1/0) //pointers // num := 2 // refChange(&num) //creating pointers // var ptrVal *int = new(int) /...
package ospreytest import ( "fmt" "io/ioutil" "net/http" "github.com/SermoDigital/jose/jws" "github.com/SermoDigital/jose/jwt" "github.com/sky-uk/osprey/common/web" "github.com/sky-uk/osprey/server/osprey" "k8s.io/client-go/tools/clientcmd" clientgo "k8s.io/client-go/tools/clientcmd/api" ) const targetNam...
package douyin import ( "fmt" "strings" "github.com/go-resty/resty/v2" pb "github.com/lalifeier/vvgo-mall/api/paser/service/v1" ) type DouyinData struct { StatusCode int `json:"status_code"` ItemList []struct { CommentList interface{} `json:"comment_list"` GroupID int64 `json:"group_id"` ...
package loltools import ( "appengine" "appengine/user" "fmt" "github.com/OwenDurni/loltools/model" "github.com/OwenDurni/loltools/task" "github.com/OwenDurni/loltools/util/dispatch" "github.com/OwenDurni/loltools/view" "net/http" ) func debugHandler(w http.ResponseWriter, r *http.Request, args map[string]stri...
/* 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 under the License i...
package main import ( "fmt" "strings" "strconv" "io/ioutil" ) func main(){ Solve("input.txt") } func Solve(file string){ input, err := ioutil.ReadFile(file) if(err != nil){ panic(err) } lines := strings.Split(string(input), "\n") fields, myticket, othertickets := ParseLines(lines) p1, validTickets := C...
package print import ( "bytes" "strings" "time" "github.com/abourget/ledger/parse" ) func accountLength(post *parse.PostingNode) int { accountLen := len([]rune(post.Account)) if post.IsCleared { accountLen += 2 } else if post.IsPending { accountLen += 2 } return accountLen } func quantityLength(amount ...
package raft import ( "fmt" "sync" "time" "github.com/ds-test-framework/scheduler/pkg/logger" transport "github.com/ds-test-framework/scheduler/pkg/transports/http" "github.com/ds-test-framework/scheduler/pkg/types" "github.com/spf13/viper" ) const ( ErrFailedMasterConnect = "MASTER_CONNECT_FAILED" ErrW...
package run import ( "context" "fmt" "sort" "github.com/neelance/parallel" "github.com/opentracing/opentracing-go/ext" otlog "github.com/opentracing/opentracing-go/log" "github.com/sourcegraph/sourcegraph/cmd/frontend/backend" "github.com/sourcegraph/sourcegraph/internal/conf" "github.com/sourcegraph/source...
package services import ( "context" "encoding/json" "fmt" "sync" "time" "github.com/google/uuid" "github.com/sirupsen/logrus" "github.com/ulfox/cinit/cinitd/channels" "github.com/ulfox/cinit/cinitd/models" ) // ServiceOperator for managing cinitd services type ServiceOperator struct { sync.Mutex logger ...
// Copyright (C) 2017 ScyllaDB package scyllaclient import ( "context" "math" "math/rand" "net" "net/url" "runtime" "sort" "sync" "time" "github.com/pkg/errors" "github.com/scylladb/scylla-manager/pkg/util/timeutc" "github.com/scylladb/scylla-manager/swagger/gen/scylla/v1/client/operations" ) // CheckHo...
package engine import ( "context" "testing" "time" "github.com/stretchr/testify/assert" "github.com/windmilleng/tilt/internal/testutils/output" "github.com/windmilleng/tilt/internal/k8s" "github.com/windmilleng/tilt/internal/model" "github.com/windmilleng/tilt/internal/store" corev1 "k8s.io/api/core/v1" ...
package main import ( "fmt" "net/http" "os" "golang.org/x/net/context" "google.golang.org/appengine" "google.golang.org/appengine/log" "google.golang.org/appengine/urlfetch" "io" "io/ioutil" "image" "image/gif" "bytes" "sync" "math" "sort" "strconv" ) func getLogger(c context.C...
package cmd import ( "encoding/json" "fmt" "github.com/lokalise/go-lokalise-api/v3" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" ) var ( projectId string // List projects options includeStatistics uint8 includeSettings uint8 filterTeamID int64 filterNames string ...
/* Copyright 2018 <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 writing, software distribu...
/* * gomacro - A Go interpreter with Lisp-like macros * * Copyright (C) 2018-2019 <NAME> * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * * as...
// Copyright 2021 <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 writ...
package cmd import ( "fmt" "strings" "github.com/ctlchild/agenda/datarw" "github.com/ctlchild/agenda/entity" "github.com/spf13/cobra" "github.com/modood/table" ) var listmeetingCmd = &cobra.Command{ Use: "listmeeting", Short: "list meeting notes can see the details of the meeting.", Long: `listmeeting: li...
// Package kapacitor provides the means for alerting if a stat exceeds a threshold. package kapacitor // configured alerts should be stored within kapacitor import ( "fmt" "strings" "time" "github.com/influxdata/kapacitor/client/v1" "github.com/jcelliott/lumber" "github.com/spf13/viper" "github.com/twinj/uuid...
package weed_server import ( "context" "fmt" "github.com/chrislusf/seaweedfs/weed/cluster" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "github.com/chrislusf/seaweedfs/wee...
package apptheme import ( "image/color" "gioui.org/layout" "gioui.org/text" "gioui.org/unit" "gioui.org/widget/material" "github.com/lucasb-eyer/go-colorful" ) type ( C = layout.Context D = layout.Dimensions ) // Note: the values choosen are a best-guess heuristic, open to change. var ( DefaultMaxImageHeig...
// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.13.0 // source: bookmark.sql package db import ( "context" ) const checkBookmark = `-- name: CheckBookmark :one SELECT id, book_id, type, created_by, created_at FROM bookmarks WHERE book_id = $1 AND created_by = $2 ` type CheckBookmarkParams struct ...
package generator import ( "github.com/pkg/errors" "sort" "strings" ) const ( TagAction = "action" TagTarget = "target" TagDirection = "direction" TagPolicyStack = "policy-stack" TagRule = "rule" TagProtocol = "protocol" TagPort = "port" TagPeerIPBlock = "peer-i...
package artifact import ( "errors" "fmt" "io/ioutil" "path" "strings" "github.com/google/go-containerregistry/pkg/name" "github.com/google/ko/pkg/build" "github.com/google/ko/pkg/commands" "github.com/google/ko/pkg/commands/options" "github.com/wavesoftware/go-magetasks/config" "github.com/wavesoftware/go-...
// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
// Copyright 2019 eBay Inc. // Primary authors: <NAME>, <NAME>, // <NAME>, and <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 // https://www.apache.org/licenses/...
package main import ( "encoding/binary" "fmt" "io/ioutil" "net" "os" "path" "regexp" "strconv" "strings" ) const ( redirectMode1 = 0x01 redirectMode2 = 0x02 ipRecordLength = 7 maxCacheSize = 100000 ) type Seeker struct { buffer []byte start int64 end int64 count int64 } type Location struc...
package main import ( "context" "crypto/rsa" "crypto/x509" "encoding/pem" "fmt" "net" "net/http" "os" "strings" "time" "encoding/json" "github.com/gorilla/mux" "github.com/gorilla/websocket" "github.com/kelseyhightower/envconfig" "github.com/parnurzeal/gorequest" "github.com/shellhub-io/shellhub/pkg/...
package middleware import ( "context" "net/http" ) type ( // IDFunc is a function that produces span and trace IDs for consumption // by tracing systems such as Zipkin or AWS X-Ray. IDFunc func() string // Doer is the http client Do interface. Doer interface { Do(*http.Request) (*http.Response, error) } ...
/* Copyright © 2021 Rasa Technologies GmbH 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 slackbot hopes to ease development of Slack bots by adding helpful // methods and a mux-router style interface to the github.com/nlopes/slack package. // // Incoming Slack RTM events are mapped to a handler in the following form: // bot.Hear("(?i)how are you(.*)").MessageHandler(HowAreYouHandler) // // The ...