text
stringlengths
3.08k
10.4k
package db import ( "context" "database/sql" "go.uber.org/zap" "github.com/jmoiron/sqlx" "github.com/pkg/errors" "github.com/Masterminds/squirrel" "github.com/imperiuse/golib/db/transaction" ) type ( // Logger - Uber Zap logger Logger = *zap.Logger // Condition - squirrel.Sqlizer Condition = squirrel.Sq...
package insteon import "fmt" type Event interface { fromBytes([]byte) ID() byte Length() int } type Ack struct { Response []byte Type byte } func (a *Ack) fromBytes(buffer []byte) { a.Response = buffer a.Type = buffer[len(buffer)-1] } func (a *Ack) ID() byte { return a.Type } func (a *Ack) Length() in...
package main import ( "encoding/json" "fmt" "io/ioutil" "log" "os" "path/filepath" "reflect" "strings" "time" "github.com/go-xorm/core" "github.com/go-xorm/xorm" _ "github.com/go-sql-driver/mysql" _ "github.com/lib/pq" "github.com/etgryphon/stringUp" "github.com/kyokomi/goma" ) var sampleDataMap = m...
/* Copyright 2017 <NAME> <www.webx.top> 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 2018 <NAME> <EMAIL> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
/* Copyright © 2019 <NAME> <<EMAIL>> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
package podrescli import ( "context" "fmt" "os" "reflect" "strings" "time" "google.golang.org/grpc" "k8s.io/klog/v2" podresourcesapi "k8s.io/kubelet/pkg/apis/podresources/v1" "k8s.io/kubernetes/pkg/kubelet/apis/podresources" "k8s.io/kubernetes/pkg/kubelet/cm/cpuset" ) const ( defaultPodResourcesTimeout ...
package main import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "mime/multipart" "net/http" "os" "time" "github.com/golang/glog" ) type Config struct { MenagerieBase string `json:"menagerie_base"` PollingInterval time.Duration `json:"polling_interval"` PollingAttempts int `json:"...
// Code generated by entc, DO NOT EDIT. package db import ( "fmt" "strings" "entgo.io/ent/dialect/sql" "github.com/flacatus/qe-dashboard-backend/pkg/storage/ent/db/codecov" "github.com/flacatus/qe-dashboard-backend/pkg/storage/ent/db/repository" "github.com/google/uuid" ) // CodeCov is the model entity for th...
package run import ( "context" "fmt" "os" "os/signal" "regexp" "strconv" "strings" "time" "github.com/bakito/dns-checker/pkg/check" "github.com/bakito/dns-checker/pkg/check/dns" "github.com/bakito/dns-checker/pkg/check/manualdns" "github.com/bakito/dns-checker/pkg/check/port" "github.com/bakito/dns-check...
package main import ( "encoding/base64" "encoding/json" "fmt" "html/template" "io/ioutil" "log" "net/http" "regexp" "github.com/carlmjohnson/gracefulserver" "github.com/go-chi/chi" "github.com/go-chi/chi/middleware" ) var router = chi.NewRouter() func init() { gracefulserver.Logger = middleware.Logger ...
package bubble import ( "gonum.org/v1/plot" "gonum.org/v1/plot/plotter" "gonum.org/v1/plot/vg" "gonum.org/v1/plot/vg/draw" "image/color" "math" ) // XYZer wraps the Len and XYZ methods. type XYZer interface { // Len returns the number of x, y, z triples. Len() int // XYZ returns an x, y, z triple. XYZ(int)...
package main import ( "os" "strconv" "sync" "time" log "github.com/sirupsen/logrus" "github.com/valyala/fasthttp" ) var ( // env variables webhookURL = "http://localhost:9087/webhook" avgMessagesPerSec = 10 // test duration in seconds testDuration = 10 // initial delay in seconds when pod starts ...
package solutions import ( "github.com/aewens/aoc20/pkg/shared" ) func init() { Map[16] = Solution16 } const ( rulesMode int = iota yoursMode othersMode ) type TicketRule struct { Lower int Upper int } type TicketSystem struct { Mode int Rules map[string][]*TicketRule Yours []int Others [][]int Val...
package duck import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( joeyBirthday = nook.Birthday{ Day: 3, Month: t...
// Copyright 2016 The Vulcan 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 t...
package token import ( "crypto/hmac" "crypto/rand" "crypto/sha256" "encoding/asn1" "scrit/keydir" "golang.org/x/crypto/ed25519" ) var ( randomSource = rand.Reader ) type ParamFactory interface { FetchServerParam(signer ed25519.PublicKey) error // Called to check if unused server params are availeble...
package deployflow import ( "context" "fmt" "time" kruiseappsv1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1" "github.com/pkg/errors" "github.com/triton-io/triton/pkg/kube/fetcher" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "sig...
package main import ( "flag" "fmt" "image" "image/color" "os" "time" "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/driver/desktop" "github.com/ichirin2501/rgnes/nes/apu" "github.com/ichirin2501/rgnes/nes/cassette" "github.com/ichirin2501/rg...
// 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 2017 Datadog, Inc. package metrics import ( "bytes" "encoding/json" "expvar" "fmt" "strings" ...
// Copyright © 2016 The Things Network // Use of this source code is governed by the MIT license that can be found in the LICENSE file. package handler import ( "encoding" "encoding/binary" dbutil "github.com/TheThingsNetwork/ttn/core/storage" "github.com/TheThingsNetwork/ttn/utils/errors" "github.com/TheThings...
/* Copyright 2022. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed un...
package subrecord import ( "bytes" "encoding/binary" "fmt" "time" ) // SRAcceleration EGTS_SR_ACCEL_DATA /* Применяется АСН для передачи на аппаратно- программный комплекс данных о состоянии */ type SRAccelerationData struct { RTM uint16 `json:"RTM"` // RTM (Relative Time) XAAV int16 `json:"XAAV"` // XA...
package dal import ( "database/sql" "fmt" "strconv" "strings" "time" ) // Agent : Agents d'execution des taches // AgentList liste des users func AgentList(filter SearchQuery) ([]DbAgent, PagedResponse, error) { var err error arr := make([]DbAgent, 0) var pagedResp PagedResponse //nb rows var nbRow sql.Nu...
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
package respx import "encoding/json" // errcode 000_00~99 const ( ERR000_01 errcode = "00001" //通用错误 ERR000_01_MSG errmsg = "网络错误,请稍后重试!" //通用错误 ERR000_02 errcode = "00002" //无操作权限 ERR000_02_MSG errmsg = "无操作权限" //无操作权限 ERR000_03 errcode = "00003" //请求格式不正确 ERR000_03_MSG errmsg = "请求格式不...
package model import ( "database/sql" "time" "github.com/guregu/null" "github.com/satori/go.uuid" ) var ( _ = time.Second _ = sql.LevelDefault _ = null.Bool{} _ = uuid.UUID{} ) /* DB Table Details ------------------------------------- CREATE TABLE `spawn_conditions` ( `zone` varchar(32) NOT NULL DEFAULT...
// Source: https://raw.githubusercontent.com/charmbracelet/glow/master/ui/stashitem.go package model import ( "fmt" "log" "strings" "github.com/byxorna/jot/pkg/db" "github.com/byxorna/jot/pkg/text" "github.com/byxorna/jot/pkg/ui" lib "github.com/charmbracelet/charm/ui/common" "github.com/muesli/termenv" "git...
package handlers import ( "encoding/json" "fmt" "io/ioutil" "net/http" "os" "strconv" "valorize-app/creatortoken" "valorize-app/models" "valorize-app/services" "valorize-app/services/ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/labstack/echo/...
package main import ( "bufio" "fmt" "github.com/jasdel/harvester/internal/common" "github.com/jasdel/harvester/internal/queue" "github.com/jasdel/harvester/internal/storage" "io" "log" "net/http" "net/url" "strings" ) // Response message to a successful job being scheduled type jobScheduledMsg struct { // ...
// Copyright 2021 The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to...
package main import ( "bufio" "bytes" "fmt" "os" "sort" ) func main() { reader := bufio.NewReader(os.Stdin) tc := readNum(reader) var buf bytes.Buffer for tc > 0 { tc-- n := readNum(reader) P := make([][]int, n) for i := 0; i < n; i++ { P[i] = readNNums(reader, 2) } res := solve(n, P) ...
package cmd import ( "fmt" "io/ioutil" "os" "testing" "time" "math/rand" "encoding/hex" "strings" "github.com/drausin/libri/libri/common/ecid" "github.com/drausin/libri/libri/librarian/server" "github.com/spf13/viper" "github.com/stretchr/testify/assert" "go.uber.org/zap" ) // TestStartLibrarianCmd_o...
// Copyright (c) 2013-2015 The btcsuite developers // Copyright (c) 2015-2018 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package txscript import ( "bytes" "testing" "github.com/picfight/pfcd/chaincfg/chainhash" "github.com/picfight/pfc...
package storages import ( "context" "fmt" "github.com/hashicorp/go-multierror" "github.com/jitsucom/jitsu/server/adapters" "github.com/jitsucom/jitsu/server/appconfig" "github.com/jitsucom/jitsu/server/logging" "github.com/jitsucom/jitsu/server/schema" ) //AwsRedshift stores files to aws RedShift in two modes:...
package ibmmq /* Copyright (c) IBM Corporation 2018 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 viewer import ( "encoding/json" "fmt" "io" "math" "sort" "time" "github.com/dustin/go-humanize" "github.com/pkg/errors" ) const ( mapBuffer = 1024 ) //var json = jsoniter.ConfigCompatibleWithStandardLibrary type Request struct { Level string `json:"level"` Ts float64 `json:"ts"` Cal...
package net2 import ( "github.com/huangwenjimmy/gosml" "math" "strings" ) type Ipv4Range struct { Start int64 End int64 } type Ipv4Ranges struct { ips []*Ipv4Range } func (this *Ipv4Range) Contains(ipstr string) bool { var ipLong int64 = IpToInt64(ipstr) return this.ContainsIpLong(ipLong) } func (this *Ipv...
package rules import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/pagination" ) type ( // Protocol represents a valid rule protocol Protocol string ) const ( // ProtocolAny is to allow any protocol ProtocolAny Protocol = "any" // ProtocolICMP is to allow the ICMP protocol Proto...
/* Copyright 2018 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, ...
// +build !providerless // +build linux /* 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...
// Copyright 2019 dfuse Platform 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...
package index import ( . "github.com/jtejido/golucene/core/codec/spi" "strings" "sync" ) type ReaderPool struct { owner *IndexWriter sync.Locker readerMap map[*SegmentCommitInfo]*ReadersAndUpdates } func newReaderPool(owner *IndexWriter) *ReaderPool { return &ReaderPool{ owner: owner, Locker: &sync...
/* Copyright The ocicrypt 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 i...
// Code generated by go generate. DO NOT EDIT. // Generated from Debian project md/netbase at https://salsa.debian.org // At 2021-09-16T08:40:30Z // File etc/protocols // Commit <PASSWORD> package netdb var BuiltinProtocols []Protocol = builtinProtocols var builtinProtocols = []Protocol{ { Name: "ip", Number: 0, A...
package pluggable import ( "bufio" "bytes" "encoding/json" "fmt" "io" "os" "os/exec" "strings" "get.porter.sh/porter/pkg/config" "get.porter.sh/porter/pkg/plugins" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-plugin" "github.com/pkg/errors" ) // PluginLoader handles finding, configuring and ...
package goprismic import ( "encoding/json" "errors" "fmt" "io/ioutil" "log" "net/http" "net/url" "time" ) type work struct { u string data map[string]string res interface{} ret chan error } const ( StatusOK = iota StatusOverCapacity ) type Api struct { URL string AccessToken string Dat...
// Copyright (c) 2016 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
// Copyright 2017 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
package netutil import ( "net" "sync/atomic" "time" "github.com/weikaishio/go-logger/logger" "util/buffer" ) type CrypterFunc func(dst, src []byte) type DecryptFunc func(dst, src []byte) type Session interface { Id() string Send(*buffer.Buffer) Run(onNewSession, onQuitSession func()) Quit() SetEncrypter(...
package main import ( "bytes" "context" "encoding/json" "errors" "testing" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/kms" "github.com/aws/aws-sdk-go-v2/service/kms/types" "github.com/aws/aws-sdk-go-v2/service/secretsmanager" v1 "k8s.io/api/core/v1" ) type MockListKeys struct{...
package ltreevisualizer import ( "context" "errors" "fmt" "github.com/emicklei/dot" "github.com/goccy/go-graphviz" "github.com/jinagamvasubabu/ltreevisualizer/database" log "github.com/sirupsen/logrus" "strconv" "strings" "time" ) //IVisualizer interface for to interact ltree visualizer type IVisualizer int...
// SPDX-License-Identifier: MIT // // Copyright (C) 2021 <NAME>. All Rights Reserved. // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree or at // https://spdx.org/licenses/MIT.html // Package opaque implements the OPAQUE asymmetric password-a...
// +build e2e /* 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 agreed to in w...
// See License for license information. // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. package main import ( "fmt" "net/http" "net/url" "github.com/pkg/errors" "github.com/mattermost/mattermost-server/model" ) type Webhook interface { Events() StringSet PostToChannel(p *Plugin, channelI...
// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. package mock import ( "database/sql" "fmt" "io/ioutil" "net/http" "net/http/pprof" "net/url" "strconv" "strings" "sync" "time" "github.com/go-sql-driver/mysql" "github.com/pingcap/errors" "github.com/pingcap/log" "github.com/pingcap/tidb/config...
// 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 ccunits import ( "fmt" "testing" ) func TestUnitsExact(t *testing.T) { testCases := []struct { in string want Unit }{ {"b", NewUnit("Bytes")}, {"B", NewUnit("Bytes")}, {"byte", NewUnit("Bytes")}, {"bytes", NewUnit("Bytes")}, {"BYtes", NewUnit("Bytes")}, {"Mb", NewUnit("MBytes")}, {"MB"...
// Copyright 2014 beego 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 required by applica...
// Copyright 2021 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // nolint:typecheck,goconst,gocritic,stylecheck,nolintlint package shared import ( "context" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "gopkg.in/yaml.v3" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pk...
// Code generated by smithy-go-codegen DO NOT EDIT. package ec2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/awslabs/smithy-go/middleware" smithyhttp "github.com/awslabs/smithy-go/transport/http" ) // Initiates the copy o...
// 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 dashboards import ( "context" "errors" "fmt" "os" "path/filepath" "strings" "time" "github.com/grafana/grafana/pkg/services/dashboards" "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/log" "github.com/grafana/grafana/pkg...
package cfgfile import ( "path/filepath" "sync" "time" "github.com/joeshaw/multierror" "github.com/pkg/errors" "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/monitoring" "github.com/elastic/beats/li...
// 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// Package netx contains OONI's net extensions. // // This package provides a replacement for net.Dialer that can Dial, // DialContext, and DialTLS. During its lifecycle this modified Dialer // will emit network level events on a channel. // // ⚠️: This package is not maintained anymore. Use github.com/ooni/probe-engin...
package main import ( "encoding/json" "fmt" "log" "os" "sync/atomic" "time" "github.com/pion/webrtc/v3" ) const ( bufferedAmountLowThreshold uint64 = 512 * 1024 // 512 KB maxBufferedAmount uint64 = 1024 * 1024 // 1 MB ) func check(err error) { if err != nil { panic(err) } } func setRemoteDes...
package fusion // Stitcher stitches two reads (R1 and R2) and produces a Fragment. It can be // used to stitch multiple read pairs. Thread compatible. type Stitcher struct { // config params kmerLength int lowComplexityFraction float64 // temp states kmerizer *kmerizer r2KmerMap map[Kmer]Pos freeP...
// Copyright © 2018 NAME HERE <EMAIL ADDRESS> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
package quarkslink import ( "context" "encoding/json" "fmt" "net/http" "path/filepath" "regexp" "sort" "strings" "go.uber.org/zap" corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/runtime/inject" "sigs.k8s.io/controller-runtime/pkg/webhook/admiss...
package main import ( "encoding/json" "fmt" "os" "time" middlewares "github.com/crowdsecurity/crowdsec/pkg/apiserver/middlewares/v1" "github.com/crowdsecurity/crowdsec/pkg/database" "github.com/enescakir/emoji" "github.com/olekukonko/tablewriter" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) ...
// @File: jd_joy_park.go // @Time: 2022/1/7 3:17 PM // @Author: ClassmateLin // @Email: <EMAIL> // @Site: https://www.classmatelin.top // @Description: 汪汪乐园 // @Cron: 0 5 * * * package main import ( "encoding/json" "fmt" "github.com/go-resty/resty/v2" "github.com/tidwall/gjson" "scripts/config/jd" "scripts/con...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package efs import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" "github.com/aws/aws-sdk-go-v2/private/protocol/restjson" ) // Please also...
package clone import ( "context" "database/sql" "fmt" _ "net/http/pprof" "time" "github.com/cenkalti/backoff/v4" "github.com/mightyguava/autotx" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) // Heartbeat receives transactions and requests to snapshot and writes transactions and strongly consistent ...
package storage import ( "context" proof2 "github.com/filecoin-project/specs-actors/v2/actors/runtime/proof" "math/rand" "time" "github.com/ipfs/go-cid" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-type...
// MIT License // // Copyright (c) 2020 Lack // // 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 cmd import ( "fmt" "io" "os" "path/filepath" "k8s.io/helm/pkg/proto/hapi/chart" "github.com/jenkins-x/jx/pkg/helm" "github.com/jenkins-x/jx/pkg/log" "github.com/pkg/errors" jenkinsv1 "github.com/jenkins-x/jx/pkg/apis/jenkins.io/v1" "github.com/jenkins-x/jx/pkg/util" "github.com/jenkins-x/jx/pkg...
/* * MinIO Cloud Storage, (C) 2019 MinIO, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
package reversesshfs import ( "bytes" "html/template" "io" "os" "os/exec" "path/filepath" "strconv" "github.com/lima-vm/sshocker/pkg/ssh" "github.com/lima-vm/sshocker/pkg/util" "github.com/pkg/errors" "github.com/pkg/sftp" "github.com/sirupsen/logrus" ) type ReverseSSHFS struct { *ssh.SSHConfig LocalPa...
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. package tablespace import ( "context" "github.com/elastic/beats/x-pack/metricbea...
// +build testworld package testworld import ( "net/http" "strings" "testing" "github.com/centrifuge/go-centrifuge/documents" "github.com/centrifuge/go-centrifuge/nft" "github.com/ethereum/go-ethereum/common" "github.com/gavv/httpexpect" "github.com/stretchr/testify/assert" ) func TestGenericMint_successful...
/* * Copyright (c) 2018 <NAME> * * Use of this work is governed by a MIT License. * You may find a license copy in project root. */ package etherscan import ( "bytes" "encoding/json" "fmt" "io" "net/http" "net/http/httputil" "net/url" "time" ) // Client etherscan API client // Clients are safe for concu...
// Package graphql provides client support for executing graphql requests // against a host that supports the graphql protocol. package graphql import ( "bytes" "context" "encoding/json" "fmt" "io" "io/ioutil" "net" "net/http" "strings" "time" ) // This provides a default client configuration, but it's reco...
// Code generated by go-swagger; DO NOT EDIT. package inventory_operations // 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...
package main import ( "context" "encoding/csv" "fmt" "log" "os" "strconv" "strings" "time" "github.com/milvus-io/milvus-sdk-go/v2/client" "github.com/milvus-io/milvus-sdk-go/v2/entity" ) func main() { // Milvus instance proxy address, may verify in your env/settings milvusAddr := `localhost:19530` // s...
// Copyright 2022 The go-exactonline AUTHORS. All rights reserved. // // Use of this source code is governed by a MIT // license that can be found in the LICENSE file. // Code generated by gen-services.go; DO NOT EDIT. package bulk import ( "context" "github.com/stack11/go-exactonline/api" "github.com/stack11/go-e...
package main import ( "image" "image/color" "image/draw" "math" "math/rand" "time" "github.com/faiface/pixel" "github.com/faiface/pixel/pixelgl" ) const ( w, h = 192, 108 fw, fh = float64(w), float64(h) globalScale = 0.5 ) var ( maxSpeed = 2.1 * globalScale friendRadius = 60 * globalScale boid...
package user import ( "github.com/radiantrfid/iris" "github.com/radiantrfid/iris/mvc" ) var ( // About Code: iris.StatusSeeOther -> // When redirecting from POST to GET request you -should- use this HTTP status code, // however there're some (complicated) alternatives if you // search online or even the HTTP RF...
package main import ( "context" "encoding/json" "fmt" "os" "strings" extapi "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "github.com/cert-manager/webhook-freedns/freedns" "github.com/jetstack/...
//Copyright ©2021 <NAME> <EMAIL> //Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 //Unless required by applicable law or agreed to in writing, soft...
// Licensed to 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. Apache Software Foundation (ASF) licenses this file to you under // the Apache License, Version 2.0 (the "Li...
package gcloudcleanup import ( "context" "encoding/json" "fmt" "io/ioutil" "math/rand" "net/http" "net/http/httptest" "os" "testing" "time" "cloud.google.com/go/storage" compute "google.golang.org/api/compute/v1" "google.golang.org/api/option" "github.com/sirupsen/logrus" "github.com/stretchr/testify/...
/* 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 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
/* Copyright (c) 2016-2017 Bitnami Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
// Copyright (c) 2018 <NAME> All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package k8s import ( "context" "github.com/pkg/errors" "github.com/bborbe/world/pkg/validation" ) type PodTemplate struct { Metadata Metadata `yaml:"metadata...
// Package matrix implements a simple library for matrix operations. // A matrix struct is used to create new matrixes and operations are // performed using this structure. package matrix import ( "errors" "sync" ) // Matrix is the main matrix data structure. type Matrix struct { RowCount int ColCount int Matrix...
package builds import ( "fmt" "io/ioutil" "net/http" "net/http/httptest" "reflect" "testing" drycc "github.com/drycc/controller-sdk-go" "github.com/drycc/controller-sdk-go/api" ) const buildsFixture string = ` { "count": 1, "next": null, "previous": null, "results": [ { "a...
/* Copyright 2018 BlackRock, 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 di...
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...