text
stringlengths
3.08k
10.4k
// Copyright © 2022 Kaleido, Inc. // // 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/LICENSE-2.0 // // Unle...
package hijri import ( "strconv" "strings" "time" "unicode" "github.com/hablullah/go-hijri" "github.com/markusmobius/go-dateparser/date" "github.com/markusmobius/go-dateparser/internal/digit" "github.com/markusmobius/go-dateparser/internal/parser/absolute" "github.com/markusmobius/go-dateparser/internal/sett...
package command import ( "fmt" "io/ioutil" "os" log "github.com/sirupsen/logrus" "github.com/mkrakowitzer/ghsettings/api" "github.com/mkrakowitzer/ghsettings/config" "github.com/mkrakowitzer/ghsettings/context" "github.com/spf13/cobra" "gopkg.in/yaml.v2" homedir "github.com/mitchellh/go-homedir" "github....
package poller import ( "fmt" "strings" "time" "github.com/davidnewhall/unifi-poller/pkg/metrics" "golift.io/unifi" ) // GetUnifi returns a UniFi controller interface. func (u *UnifiPoller) GetUnifi() (err error) { u.Lock() defer u.Unlock() if u.Unifi != nil { u.Unifi.CloseIdleConnections() } // Create...
// metainfo a package for dealing with '.torrent' files package metainfo import ( "crypto/sha1" "fmt" "os" "time" "bytes" "errors" bencode "github.com/jackpal/bencode-go" ) // MetaInfo a mapping of a .torrent file to a struct type MetaInfo struct { Info Announce string AnnounceList [][]string ...
package plugins import ( "log" "math" "github.com/lightyeario/kelp/api" "github.com/lightyeario/kelp/model" "github.com/lightyeario/kelp/support/utils" "github.com/stellar/go/build" "github.com/stellar/go/clients/horizon" ) // sellSideStrategy is a strategy to sell a specific currency on SDEX on a single side...
/* integer stabbing. */ package intstab import ( "container/list" "fmt" "math" "sort" ) /* * Public */ type IntervalStabber interface { Intersect(uint16) ([]*Interval, error) } func (ts *intStab) Intersect(query uint16) (results []*Interval, err error) { return ts.stab(query) } func NewIntervalStabber(interv...
// Copyright 2016 LINE Corporation // // LINE Corporation licenses this file to you 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 requi...
package fuse import ( "fmt" "log" "net" "os" "os/exec" "strings" "sync" "syscall" ) func handleFusermountStderr(errCh chan<- error) func(line string) (ignore bool) { return func(line string) (ignore bool) { if line == `fusermount: failed to open /etc/fuse.conf: Permission denied` { // Silence this parti...
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use ...
package cos import ( "bytes" "encoding/xml" "io/ioutil" "net/http" "net/http/httptest" "net/url" "reflect" "testing" "time" ) var ( // mux is the HTTP request multiplexer used with the test server. mux *http.ServeMux // client is the COS client being tested. client *Client // server is a test HTTP ser...
// Code generated by gotdgen, DO NOT EDIT. package tdapi import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _...
/* * Copyright (c) 2020, NVIDIA CORPORATION. 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 requi...
/* * Copyright 2020 the go-netty project * * 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 ...
// Copyright (c) 2019 InfraCloud Technologies // // 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 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 (c) 2021 - Present. Blend Labs, Inc. All rights reserved Use of this source code is governed by a MIT license that can be found in the LICENSE file. */ package migration import ( "context" "database/sql" "fmt" "github.com/blend/go-sdk/db" ) // Always always runs a step. func Always() GuardFunc { ...
package main import ( "net" log "github.com/Sirupsen/logrus" "github.com/vmihailenco/msgpack" "os" "io" "path/filepath" ) var done chan bool func (s *Server) setupServerConnection(address string) { //also listen from requests from the server on a random port listeningAddress, err := net.ResolveUDPAddr("udp4...
// Copyright (C) 2018 <NAME> All rights reserved. // Use of this source code is governed by a Licensed under the Apache License, Version 2.0 (the "License"); package grpcx import ( "fmt" "reflect" "strings" "github.com/pigogo/grpcx/codec" "golang.org/x/net/context" xlog "github.com/pigogo/grpcx/grpclog" ) typ...
// Copyright 2021 The gVisor Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
// Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package integrations import ( "fmt" "net/http" "testing" "time" "code.gitea.io/gitea/models" api "code.gitea.io/gitea/modules/structs" "github.com/...
package backend import ( "bytes" "encoding/json" "sort" "github.com/google/zoekt" "github.com/sourcegraph/sourcegraph/schema" ) // zoektIndexOptions are options which change what we index for a // repository. Everytime a repository is indexed by zoekt this structure is // fetched. See getIndexOptions in the zo...
// Package compression handles compressing the number of data points that need to be searched for a code insight series. // // The purpose is to reduce the extremely large number of search queries that need to run to backfill a historical insight. // // An index of commits is used to understand which time frames actual...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: keyboard.proto package pc import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-ti...
// // // File generated from our OpenAPI spec // // package stripe import "encoding/json" type CustomerTaxAutomaticTax string const ( CustomerTaxAutomaticTaxFailed CustomerTaxAutomaticTax = "failed" CustomerTaxAutomaticTaxNotCollecting CustomerTaxAutomaticTax = "not_collecting" CustomerTaxAu...
/* Copyright The containerd 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...
// Copyright © 2017 The virtual-kubelet 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 la...
// +build unittest package storkctl import ( "testing" storkv1 "github.com/libopenstorage/stork/pkg/apis/stork/v1alpha1" "github.com/portworx/sched-ops/k8s/core" storkops "github.com/portworx/sched-ops/k8s/stork" "github.com/stretchr/testify/require" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/api...
// Copyright 2018 HenryLee. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
package namer import ( "container/list" "errors" "io/ioutil" "os" "path" "path/filepath" "regexp" "strconv" "strings" "github.com/tnextday/animenamer/pkg/verbose" "github.com/tnextday/animenamer/pkg/tvdbex" ) type EpisodeSearch struct { Filters []*regexp.Regexp MediaExt FileExt SubtitlesExt F...
package mx import ( "crypto/sha1" "encoding/hex" "encoding/json" "fmt" "github.com/google/logger" "github.com/sudachen/go-dnn/mx/capi" "strings" ) func (identity GraphIdentity) String() string { return hex.EncodeToString(identity[:]) } func (g *Graph) Identity() GraphIdentity { if g.identity == nil { js, ...
package skiplist import ( "github.com/liyue201/gostl/utils/comparator" "github.com/liyue201/gostl/utils/sync" "github.com/liyue201/gostl/utils/visitor" "math/rand" gosync "sync" "time" ) var ( defaultKeyComparator = comparator.BuiltinTypeComparator defaultMaxLevel = 10 defaultLocker sync.FakeLock...
package main import ( "fmt" "log" "os" "time" "github.com/glycerine/lmdb-go/lmdb" ) // This example shows the deadlock under linux without the use of the // fix provided by -DMDB_USE_SYSV_SEM // // from https://gist.githubusercontent.com/xlab/f7aee266ab741a0412b44ee145ccbc23/raw/035e6af42fedcc9f1a2d12013ca480a...
package main import ( "flag" "fmt" "log" "github.com/jmoiron/sqlx" "github.com/timmy21/ckcourse/pkg/chutils" "github.com/timmy21/ckcourse/pkg/utils" ) var ( action string debug bool ) func init() { flag.StringVar(&action, "action", "", "action name, ex: init, loaddata, cleanup") flag.BoolVar(&debug, "deb...
package custom_test import ( "encoding/json" "fmt" "github.com/stretchr/testify/assert" "reflect" "strings" "testing" "time" "github.com/bingoohuang/gogotcha/jso/custom" "github.com/bingoohuang/gogotcha/lang" ) type Person struct { Name string `json:"name,abc"` Age int `json:"age"` } type Document st...
// This file is part of go-pst (https://www.go-pst.org/) // Copyright (C) 2020 <NAME> (https://www.mooijtech.com/) package pst import ( "bytes" "encoding/binary" "errors" "os" ) // ParsableFile represents a PST file. type ParsableFile struct { Path string } // NewPSTFile is a constructor for creating PST files....
package wollemi import ( "bytes" "fmt" "os" "path/filepath" "runtime" "strings" "sync" "github.com/tcncloud/wollemi/ports/golang" "github.com/tcncloud/wollemi/ports/logging" "github.com/tcncloud/wollemi/ports/please" "github.com/tcncloud/wollemi/ports/wollemi" ) type Config = wollemi.Config type Gofmt = w...
// 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 ( "fmt" "strings" "sync" "time" "github.com/OWASP/Amass/config" eb "github.com/OWASP/Amass/eventbus" "github.com/OWASP/Amass/requests" "gith...
package reporter import ( "bytes" "crypto/tls" "fmt" "net/http" "strings" "time" "deng/src/github.com/getlantern/golog" "deng/src/github.com/getlantern/measured" ) var ( log = golog.LoggerFor("measured.reporter") ) type influxDBReporter struct { httpClient *http.Client url string username st...
package commands import ( "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "syscall" "github.com/bwmarrin/discordgo" "gopkg.in/src-d/go-git.v4" "github.com/paulloz/bip-boup/bot" "github.com/paulloz/bip-boup/log" ) func commandRestart(args []string, env *bot.CommandEnvironment, b *bot.Bot) (*discordgo.Mess...
package sudy_cookie_parser import ( "encoding/base64" "fmt" "net/url" "strings" "time" ) type SudyCookieInfo struct { Cookie string `json:"cookie"` IpAddress string `json:"ipAddress"` UserId int `json:"userId"` LoginNum int `json:"loginNum"` LastActiv...
package proximitytransport import ( "context" "fmt" "io" "net" "sync" "time" peer "github.com/libp2p/go-libp2p-core/peer" tpt "github.com/libp2p/go-libp2p-core/transport" ma "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" "github.com/pkg/errors" "go.uber.org/zap" ) ...
package config import ( "io/ioutil" "os" "path/filepath" "reflect" "testing" ) const rootConfigFilePath = "../../.ecrc" const configWithIgnoredDefaults = "../../testfiles/.ecrc" func TestNewConfig(t *testing.T) { actual, _ := NewConfig("abc") var expected Config if actual == &expected { t.Errorf("expected...
package gutscript import ( "fmt" "strings" "unicode/utf8" ) type stateFn func(*GutsLex) stateFn type GutsLex struct { // the line Input string Line int Start int Pos int IndentLevel int state stateFn // rollback position rollbackPos int // current space prefix length (...
package tlog import ( "testing" "github.com/stretchr/testify/assert" ) func TestFilterMatchTopics(t *testing.T) { var ff filter assert.True(t, ff.matchTopics("a", []string{"a", "b", "c"})) assert.True(t, ff.matchTopics("a+b", []string{"a", "b", "c"})) assert.True(t, ff.matchTopics("c+d", []string{"a", "b", "c...
/* * Tencent is pleased to support the open source community by making Blueking Container Service available. * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obta...
/* 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...
package iso20022 // Provides further details on the original transactions, to which the status report message refers. type PaymentTransaction52 struct { // Unique identification, as assigned by an instructing party for an instructed party, to unambiguously identify the reported status. // Usage: The instructing par...
package ethutils /* Author: https://github.com/gorhill Source: https://gist.github.com/gorhill/5285193 */ import ( "math" "strconv" ) var renderFloatPrecisionMultipliers = [10]float64{ 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, } var renderFloatPrecisionRounders = [10]flo...
/* Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
package main import ( _ "embed" "flag" "fmt" "strconv" "strings" "github.com/alexchao26/advent-of-code-go/mathy" "github.com/alexchao26/advent-of-code-go/util" ) //go:embed input.txt var input string func init() { // do this in init (not main) so test file has same input input = strings.TrimRight(input, "\...
// Copyright (C) 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 t...
package language import ( "io/ioutil" "log" "path/filepath" "sort" "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/language" "github.com/bazelbuild/bazel-gazelle/rule" "go.skia.org/infra/bazel/gazelle/cpp/common" "go.skia.org/infra/bazel/gazelle/cpp/configurer" "go.skia.or...
package net import ( "context" "crypto/tls" "crypto/x509" "io/ioutil" "os" "testing" "time" "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" ) func SetTLSConfig(t *testing.T) *tls.Config { cert, err := tls.X509KeyPair(CertPEMBlock, KeyPEMBlock) require.NoError(t, err) caRootPo...
package node import ( "context" "fmt" "time" ctlcorev1 "github.com/rancher/wrangler/pkg/generated/controllers/core/v1" "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" kv1 "kubevirt.io/client-go/api/v1" harvesterv1 "gith...
package postgres import ( "database/sql" "fmt" "strconv" "strings" "github.com/caivega/cayley/clog" "github.com/caivega/cayley/graph" "github.com/caivega/cayley/graph/log" csql "github.com/caivega/cayley/graph/sql" "github.com/caivega/cayley/quad" "github.com/lib/pq" ) const Type = "postgres" var QueryDia...
/* Copyright 2020 The Crossplane 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 The Knative 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 hjt import ( "github.com/bwmarrin/discordgo" "github.com/lordralex/absol/api" "github.com/lordralex/absol/api/database" "github.com/lordralex/absol/api/logger" "github.com/spf13/viper" "gorm.io/gorm" "io/ioutil" "net/http" "regexp" "strings" ) type Module struct { api.Module } var appId string fu...
// Copyright (c) 2018 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
package v1 import ( condition "github.com/rancher/cis-operator/pkg/condition" "github.com/rancher/wrangler/pkg/genericcondition" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) const ( ClusterProviderRKE = "rke" ClusterProviderEKS = "eks" ClusterProviderGKE = "gke" ClusterProviderAKS = "aks" ClusterProviderK3...
package nakadi import ( "encoding/json" "fmt" "io/ioutil" "net/http" "time" "github.com/pkg/errors" ) // AuthorizationAttribute represents a record for SubscriptionAuthorization which is used by the Nakadi high level API. type AuthorizationAttribute struct { DataType string `json:"data_type"` Value string...
// Copyright The Shipwright Contributors // // SPDX-License-Identifier: Apache-2.0 package buildlimitcleanup import ( "context" "sort" build "github.com/shipwright-io/build/pkg/apis/build/v1alpha1" "github.com/shipwright-io/build/pkg/config" "github.com/shipwright-io/build/pkg/ctxlog" corev1 "k8s.io/api/core/v...
// Copyright 2015 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 applicable ...
/* Copyright 2019 The Crossplane 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 http import ( "github.com/stretchr/testify/assert" "io" "net/http" "net/http/httptest" "regexp" "sync" "testing" "time" ) func TestAuthConfig_Validate(t *testing.T) { testcases := []struct { valid bool cfg AuthConfig wantAuth bool wantTls bool }{ {valid: true, cfg: AuthConfig{}, w...
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package dynamicselection import ( "fmt" "sort" "strings" "sync" "github.com/golang/protobuf/proto" "github.com/pkg/errors" "app/service/fabric-sdk-go-gm/internal/github.com/hyperledger/fabric/core/common/ccp...
package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // AddonSpec defines the desired state of Addon. type AddonSpec struct { // Human readable name for this addon. // +kubebuilder:validation:MinLength=1 DisplayName string `json:"displayName"` // Pause reconciliation of Addon when set to Tr...
package cmd import ( "fmt" "os" "path/filepath" "strings" "github.com/jwalton/gchalk" "github.com/minepkg/minepkg/cmd/bump" "github.com/minepkg/minepkg/cmd/config" "github.com/minepkg/minepkg/cmd/dev" "github.com/minepkg/minepkg/cmd/initCmd" "github.com/minepkg/minepkg/internals/commands" "github.com/minep...
// Copyright (c) 2018 Cisco and/or its affiliates. // // 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 applicabl...
package core import ( "bytes" "strings" "github.com/pkg/errors" ) // EnsureValid ensures that Entry's invariants are respected. func (e *Entry) EnsureValid() error { // A nil entry is technically valid, at least in certain contexts. It // represents the absence of content. if e == nil { return nil } // Ot...
// Copyright (c) 2017 - The Event Horizon 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...
// 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...
// 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 a...
// // Copyright © 2016-2021 Solus Project <<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 applicab...
// +build !windows /* Copyright © 2019 blacktop Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
package lib import ( "bytes" "fmt" "os" "os/exec" "os/signal" "syscall" "time" clients "github.com/litmuschaos/litmus-go/pkg/clients" "github.com/litmuschaos/litmus-go/pkg/events" experimentTypes "github.com/litmuschaos/litmus-go/pkg/generic/node-drain/types" "github.com/litmuschaos/litmus-go/pkg/log" "gi...
package main import ( "fmt" "github.com/smartedge/codechallenge/deps" "net/http" "os" "path/filepath" "regexp" "strconv" ) // DirToFilter is the directory to modify const ( DirToFilter = "godoc" ) // PackageURI is the full package name as Go knows it const ( PackageURI = "github.com/smartedge/codechallenge"...
package pgtype_test import ( "net" "reflect" "testing" "github.com/mercua/pgx/pgtype" "github.com/mercua/pgx/pgtype/testutil" ) func TestInetTranscode(t *testing.T) { for _, pgTypeName := range []string{"inet", "cidr"} { testutil.TestSuccessfulTranscode(t, pgTypeName, []interface{}{ &pgtype.Inet{IPNet: mu...
// Copyright 2017 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package visualizer import ( "fmt" "strings" "time" "github.com/blevesearch/bleve" "github.com/blevesearch/bleve/analysis/analyzer/keyword" "github.com/blevesearch/bleve/search" "github.com/blevesearch/bleve/search/query" ) type Store struct { Index bleve.Index } func NewStore() (*Store, error) { keywordFie...
// Copyright 2020 The Chromium OS 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 hwsec import ( "context" "chromiumos/tast/common/hwsec" "chromiumos/tast/errors" "chromiumos/tast/local/bundles/cros/hwsec/util" hwseclo...
package cmd import ( "fmt" "github.com/jenkins-x/jx/pkg/apis/jenkins.io/v1" "github.com/jenkins-x/jx/pkg/gits" "github.com/jenkins-x/jx/pkg/jenkinsfile" "github.com/jenkins-x/jx/pkg/kube" "github.com/jenkins-x/jx/pkg/log" "github.com/jenkins-x/jx/pkg/util" "github.com/pkg/errors" "github.com/jenkins-x/jx/p...
package services import ( "fmt" "log" "strings" "testing" "github.com/jarcoal/httpmock" "github.com/luchojuarez/issue-assigner/dao" env "github.com/luchojuarez/issue-assigner/environment" "github.com/luchojuarez/issue-assigner/utils" "github.com/stretchr/testify/assert" "github.com/ztrue/tracerr" ) func Te...
//Copyright (c) 2013, The Impendulo Authors //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 conditio...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 // source: sample.proto package main import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) c...
// Copyright 2019 The Chromium OS 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 graphics import ( "context" "net/http" "net/http/httptest" "time" "chromiumos/tast/common/media/caps" "chromiumos/tast/common/perf" "c...
package scrape import ( "fmt" "io/ioutil" "os" "testing" "time" "github.com/pingcap/log" "github.com/pingcap/ng-monitoring/component/conprof/meta" "github.com/pingcap/ng-monitoring/component/conprof/store" "github.com/pingcap/ng-monitoring/component/topology" "github.com/pingcap/ng-monitoring/config" "gith...
/* Copyright © 2021 Red Hat, 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...
package remotectrl import ( "bytes" "context" "encoding/json" "log" "net/http" "time" "github.com/kiteco/kiteco/kite-golib/errors" "github.com/kiteco/kiteco/kite-golib/kitectx" "github.com/kiteco/kiteco/kite-golib/rollbar" "github.com/kiteco/websocket" ) // Message type variables for the possible message t...
/* Copyright 2019 The Fossul 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...
package meme import ( "github.com/moniquelive/tv-gin/internal/utils" "bytes" _ "embed" "encoding/json" "fmt" "image" "image/color" "image/draw" "image/jpeg" _ "image/png" "log" "os" "strings" "github.com/golang/freetype" "github.com/golang/freetype/truetype" ) type ( meme struct { ID strin...
/* * Copyright (c) 2018 VMware Inc. All Rights Reserved. * 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/LI...
package desc import ( "fmt" "github.com/clubpay/ronykit" "github.com/clubpay/ronykit/utils/reflector" ) type Desc interface { Desc() *Service } type Error struct { Code int Item string Message ronykit.Message } // Contract is the description of the ronykit.Contract you are going to create. type Contra...
package virtualstorages import ( "github.com/nttcom/eclcloud/v2" "github.com/nttcom/eclcloud/v2/pagination" ) // CreateOptsBuilder allows extensions to add additional parameters to the // Create request. type CreateOptsBuilder interface { ToVirtualStorageCreateMap() (map[string]interface{}, error) } // CreateOpts...
/* * Copyright 2022 <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 wr...
// Package config provides constants and functions related to the // application's configuration. package config import ( "errors" "os" "path/filepath" "runtime" "github.com/NethermindEth/juno/internal/errpkg" "github.com/NethermindEth/juno/internal/log" "gopkg.in/yaml.v2" ) // rpcConfig represents the juno R...
package main import ( "bytes" "context" "fmt" "io" "net/http" "os" "runtime" "strings" "github.com/PacktPublishing/Go-for-DevOps/chapter/11/packer/plugins/goenv/internal/config" "github.com/gopherfs/fs/io/mem/simple" "github.com/hashicorp/hcl/v2/hcldec" "github.com/hashicorp/packer-plugin-sdk/packer" "g...
package viber import "encoding/json" /* { "receiver": "01234567890A=", "min_api_version": 1, "sender": { "name": "<NAME>", "avatar": "http://avatar.example.com" }, "tracking_data": "tracking data", "type": "text", "text": "a message from pa" } */ type messageResponse struct { Status int `json:"...
package ui import ( "fmt" "regexp" "runtime" "sort" "strconv" "strings" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/model" "github.com/derailed/tview" runewidth "github.com/mattn/go-runewidth" ) const ( menuIndexFmt = " [key:-:b]<%d> [fg:-:d]%s " maxRows = 6 ) var me...