text
stringlengths
3.08k
10.4k
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package clients import ( "bytes" "container/list" "github.com/hyperledger-labs/mirbft/pkg/modules" "sync" "github.com/pkg/errors" "github.com/hyperledger-labs/mirbft/pkg/pb/msgs" "github.com/hyperledger-labs/mirbft/pkg/statem...
/* Copyright 2018 Pressinfra SRL 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 hook import ( "fmt" "os" "path/filepath" "sort" "strings" "github.com/romana/rlog" "github.com/flant/shell-operator/pkg/executor" utils_file "github.com/flant/shell-operator/pkg/utils/file" ) type HookManager interface { Run() GetHook(name string) (*Hook, error) GetHooksInOrder(bindingType Bindin...
package collectors import ( "fmt" "sync" "time" "strconv" log "github.com/Sirupsen/logrus" "github.com/shirou/gopsutil/cpu" "github.com/fabianTMC/noderig/core" ) // CPU collects cpu related metrics type CPU struct { times []cpu.TimesStat mutex sync.RWMutex MetricsCollected []core.MetricCollected le...
package boilingcore import ( "fmt" "io/ioutil" "path/filepath" "sort" "strings" "text/template" "github.com/pkg/errors" "github.com/vattle/sqlboiler/bdb" "github.com/vattle/sqlboiler/queries" "github.com/vattle/sqlboiler/strmangle" ) // templateData for sqlboiler templates type templateData struct { Table...
// Copyright 2019 Istio Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
package handshake import ( "crypto/tls" "net" "time" "unsafe" "github.com/marten-seemann/qtls" ) type conn struct { remoteAddr net.Addr } func newConn(remote net.Addr) net.Conn { return &conn{remoteAddr: remote} } var _ net.Conn = &conn{} func (c *conn) Read([]byte) (int, error) { return 0, nil } f...
/* Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR...
package cose import ( "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/x509" "encoding/hex" "math/big" "github.com/duo-labs/webauthn/protocol/webauthncose" crpt "github.com/findy-network/findy-common-go/crypto" "github.com/fxamacker/cbor/v2" "github.com/lainio/err2" "github.com/lainio/err2/...
package main import ( "context" "flag" "fmt" "github.com/kyma-project/test-infra/development/prow-installer/pkg/cluster" "github.com/kyma-project/test-infra/development/prow-installer/pkg/config" "github.com/kyma-project/test-infra/development/prow-installer/pkg/installer" "github.com/kyma-project/test-infra/de...
package db import ( "fmt" "strings" "github.com/mongodb/mongo-tools/common/log" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" ) type CollectionInfo struct { Name string `bson:"name"` Type string `bson:"type"` Options *bson.D `bson:"options"` } func (ci *CollectionInfo) IsView() bool { return ci.Type == ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/api/control.proto package serviceconfig import ( fmt "fmt" math "math" proto "github.com/catper/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf /...
package main import ( "fmt" "math/rand" "os" "strings" pb "github.com/eozgit/property-portal/propertyportal" "gorm.io/driver/sqlite" "gorm.io/gorm" ) type DataAccessLayer struct { db *gorm.DB } func (dal *DataAccessLayer) initDb() { db_file := "/tmp/property.db" os.Remove(db_file) db, err := gorm.Open(sq...
// +builda ignore package main import ( "bufio" "flag" "fmt" "github.com/worldiety/tools" "go/format" "html/template" "io/ioutil" "net/http" "os" "path/filepath" "strings" ) // Config provides self-populating getters type Config struct { pkg *tools.Package isDev bool baseURL string proj...
// Copyright 2012, Google, Inc. All rights reserved. // Copyright 2009-2011 <NAME>. All rights reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. package layers import ( "github.com/google/gopacket" "testing" ) var ...
package pop import ( "fmt" "strings" ) // Query is the main value that is used to build up a query // to be executed against the `Connection`. type Query struct { RawSQL *clause limitResults int addColumns []string eager bool eagerFields []...
// 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 Anapaya Systems // // 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...
package recommendation import ( // "encoding/json" "fmt" "github.com/hailocab/go-geoindex" "github.com/opentracing/opentracing-go" "github.com/usmanager/microservices/death-star-bench/hotelReservation/registry" pb "github.com/usmanager/microservices/death-star-bench/hotelReservation/services/recommendation/proto...
package cfg import ( "bytes" "fmt" "html/template" "strings" ) /* cssVar contains CSS variables - which go from config JSON file into CSS blocks of HTML templates. For instance --nav-height: 8vh; --clr-pri: rgba( 0, 105, 180, 0.999); slash* primary color *slash */ /* */ type cssV...
package operator import ( "flag" "fmt" "github.com/go-kit/kit/log" "github.com/weaveworks/common/logging" "k8s.io/apimachinery/pkg/runtime" controller "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/...
// Copyright 2014 The goyy 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 controller import ( "gopkg.in/goyy/goyy.v0/data/result" "gopkg.in/goyy/goyy.v0/web/xhttp" ) // ---------------------------------------...
/* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package main import ( "bufio" "bytes" "fmt" "os" ) func readInt(bytes []byte, from int, val *int) int { i := from sign := 1 if bytes[i] == '-' { sign = -1 i++ } tmp := 0 for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' { tmp = tmp*10 + int(bytes[i]-'0') i++ } *val = tmp * sign return i } ...
/* Copyright © 2021 zc2638 <<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...
package syncer import ( "github.com/appscode/go/log" api "github.com/appscode/kubed/apis/kubed/v1alpha1" "github.com/appscode/kubed/pkg/eventer" "github.com/golang/glog" "github.com/pkg/errors" core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/api...
package moira import ( "time" "github.com/beevee/go-chart" "gopkg.in/tomb.v2" ) // Database implements DB functionality type Database interface { // SelfState UpdateMetricsHeartbeat() error GetMetricsUpdatesCount() (int64, error) GetChecksUpdatesCount() (int64, error) GetRemoteChecksUpdatesCount() (int64, er...
// Copyright 2020 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 types import ( "fmt" "github.com/cosmos/cosmos-sdk/x/params/subspace" sdk "github.com/cosmos/cosmos-sdk/types" "strings" ) // Default parameter values const ( // DefaultParamspace default name for parameter store DefaultParamspace = ModuleName MinLinkMsgCost = 1 MinRecoveryPeriod = 100 MinA...
/* © Copyright 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 agreed to in writing, software d...
package cluster import ( "encoding/json" "math/rand" "net/http" "sync" "time" "github.com/mattermost/mattermost-server/v6/model" "github.com/pkg/errors" apierrors "github.com/mattermost/mattermost-plugin-api/errors" ) const ( // oncePrefix is used to namespace key values created for a scheduleOnce job onc...
package ckgroup import ( "database/sql" "errors" "fmt" "math/rand" "net/url" "reflect" "regexp" "strings" "time" "unsafe" "github.com/dchest/siphash" "github.com/tal-tech/go-zero/core/logx" ) const ( DRIVER = "clickhouse" DbTag = "db" unknowDB = `unknow_db` unknowTable = `unknow_table` ...
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Un...
package godog import ( "encoding/xml" "fmt" "io" "os" "sort" "strconv" "sync" "time" "github.com/cucumber/godog/gherkin" ) func init() { Format("junit", "Prints junit compatible xml to stdout", junitFunc) } func junitFunc(suite string, out io.Writer) Formatter { return &junitFormatter{ basefmt: basefmt...
package querier import ( "fmt" "net/http" "github.com/go-kit/log/level" "github.com/gorilla/mux" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/opentracing-contrib/go-stdlib/nethttp" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" htt...
package cmd import ( "strings" "github.com/ArjenSchwarz/awstools/config" "github.com/ArjenSchwarz/awstools/drawio" "github.com/ArjenSchwarz/awstools/helpers" "github.com/spf13/cobra" ) // tgwroutetablesCmd represents the tgwroutes command var tgwroutetablesCmd = &cobra.Command{ Use: "routetables", Short: "...
// 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...
package aws import ( "fmt" "log" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/datasync" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsDataSyncLocationNfs() *schema.Resource { return &schema.Resource{ Creat...
package crdtverse import ( "fmt" "context" "crypto/rand" "encoding/base64" "errors" "strings" "time" "golang.org/x/crypto/argon2" query "github.com/ipfs/go-datastore/query" proto "google.golang.org/protobuf/proto" pb "github.com/pilinsin/p2p-verse/crdt/pb" pv "github.com/pilinsin/p2p-verse" ) type acFil...
package stackoverflow import ( "encoding/json" "flag" "fmt" "io/ioutil" "log" "net/http" "net/url" "strconv" "strings" "github.com/kiteco/kiteco/kite-go/lang" ) var ( maxStackoverflowPostsPerError int maxStackoverflowPostsToFetch int ) // SearchType specifies the type of search performed by the index. ...
// 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...
package main import ( "encoding/json" "math/rand" "strings" "time" "cloud.google.com/go/civil" "github.com/corpix/uarand" ) type LogLine struct { Timestamp time.Time TimeTaken float64 ClientIP string Username string ExceptionID string FilterResult string Categories []string Stat...
package main import ( "context" "fmt" "os" "os/signal" "regexp" "strconv" "syscall" "time" awsutil "github.com/Comcast/kuberhealthy/pkg/aws" kh "github.com/Comcast/kuberhealthy/pkg/checks/external/checkClient" "github.com/aws/aws-sdk-go/aws/session" log "github.com/sirupsen/logrus" "k8s.io/client-go/kube...
package frog 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 ( cousteauBirthday = nook.Birthday{ Day: 17, Mon...
// Copyright 2017, Google // // 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...
// Copyright 2019 Istio Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
// @APIVersion 1.0.0 // @APITitle 9volt API // @APIDescription 9volt's API for fetching check state, event data and cluster information // @Contact <EMAIL> // @License MIT // @LicenseUrl https://opensource.org/licenses/MIT // @BasePath /api/v1 // @SubApi Cluster State [/cluster] // @SubApi Monitor Configuration [/monit...
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package main import ( "context" "encoding/json" "errors" "flag" "fmt" "io" "log/syslog" "net/http" "os" "os/signal" "path" "syscall" "time" "github.com/etherlabsio/healthcheck" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/zerolog" "github.com/rs/zerolog/log" sidlog "githu...
package tests import ( "context" "encoding/json" "fmt" "io" "log" "os" "runtime/debug" "strings" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" "github.com/jmoiron/sqlx" "g...
package governance import ( "gioui.org/layout" "gioui.org/text" "gioui.org/widget" "github.com/planetdecred/dcrlibwallet" "github.com/planetdecred/godcr/ui/decredmaterial" "github.com/planetdecred/godcr/ui/load" "github.com/planetdecred/godcr/ui/values" ) type ticketSelector struct { *load.Load dialogTitle...
// Copyright 2018 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 cli import ( "fmt" "log" "os" "os/exec" "os/signal" "runtime" "strings" "syscall" "github.com/99designs/keyring" "github.com/arafato/alicloud-vault/vault" "gopkg.in/alecthomas/kingpin.v2" ) type ExecCommandInput struct { ProfileName string Command string Args []string Ke...
package rpc import ( "bytes" "context" "encoding/base64" "fmt" "io/ioutil" "net/http" "time" "github.com/cenkalti/backoff/v4" "github.com/consensys/orchestrate/pkg/encoding/json" "github.com/consensys/orchestrate/pkg/errors" "github.com/consensys/orchestrate/pkg/toolkit/ethclient/utils" ethcommon "github....
// Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package cache import ( "context" "fmt" "reflect" "strings" "sync" "time" "github.com/govim/govim/cmd/govim/internal/golang_org_x_tools/event" "github....
package memdb import ( "sort" "github.com/lindb/roaring" "github.com/lindb/lindb/aggregation" "github.com/lindb/lindb/constants" "github.com/lindb/lindb/flow" "github.com/lindb/lindb/pkg/encoding" "github.com/lindb/lindb/series/field" ) // Filter filters the data based on fieldIDs/seriesIDs/familyIDs, // if ...
package config import ( "time" "github.com/hellofresh/logging-go" "github.com/kelseyhightower/envconfig" "github.com/mitchellh/go-homedir" "github.com/pkg/errors" "github.com/spf13/viper" ) // Specification for basic configurations type Specification struct { Port int `envconfig:"POR...
package main import ( "context" "fmt" "time" "github.com/jjincer/solana_exporter/pkg/rpc" "github.com/prometheus/client_golang/prometheus" "k8s.io/klog/v2" ) const ( slotPacerSchedule = 1 * time.Second ) var ( totalTransactionsTotal = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "solana_confirmed_trans...
package db import ( "context" "database/sql" "github.com/jmoiron/sqlx" "github.com/jphacks/B_2121_server/models" "github.com/jphacks/B_2121_server/models_gen" "github.com/labstack/echo/v4" "github.com/volatiletech/sqlboiler/v4/queries/qm" "golang.org/x/xerrors" ) func NewCommunityRestaurantsRepository(db *sq...
package pod import ( "bytes" "crypto/md5" "encoding/hex" "encoding/json" "fmt" "io" kapiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientset "k8s.io/client-go/kubernetes" corev1listers "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/record" rapi "github.com/amadeusit...
package common import ( "encoding/hex" "encoding/json" "fmt" "github.com/DeAccountSystems/das-lib/molecule" "github.com/nervosnetwork/ckb-sdk-go/types" "math/big" "strings" ) type MMJsonObj struct { Types struct { EIP712Domain []struct { Name string `json:"name"` Type string `json:"type"` } `json:"E...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: clientStructure.proto /* Package client is a generated protocol buffer package. It is generated from these files: clientStructure.proto It has these top-level messages: Client */ package client import proto "github.com/golang/protobuf/proto" import fmt "...
package handler import ( b64 "encoding/base64" "encoding/json" "fmt" "github.com/catchkvs/Coral/pkg/model" "github.com/catchkvs/Coral/pkg/repo" "github.com/catchkvs/Coral/pkg/server" "github.com/gorilla/websocket" "github.com/speps/go-hashids" "log" "math/rand" "net/http" "sync" "time" ) var upgrader = w...
package lege import ( "bufio" "errors" "fmt" "io" "unicode/utf8" ) // ParseOptions are options passed to a parser type ParseOptions struct { Boundaries []Boundary } // Boundary are boundaries to use when collecting strings type Boundary struct { Start string End string } func (options *ParseOptions) maxSt...
package main import ( "flag" "fmt" "io/ioutil" "os" "path/filepath" "strings" "github.com/yinqiwen/gsnova/common/logger" "github.com/yinqiwen/gsnova/local/gsnova" "github.com/yinqiwen/gsnova/local/proxy" ) func printASCIILogo() { logo := ` ___ ___ ___ ___ ___ ...
package rpc import ( "context" "flag" "fmt" "math/rand" "sync" "sync/atomic" "testing" "time" _ "github.com/alipay/sofa-mosn/pkg/filter/network/proxy" "github.com/alipay/sofa-mosn/pkg/log" "github.com/alipay/sofa-mosn/pkg/protocol" "github.com/alipay/sofa-mosn/pkg/protocol/sofarpc" _ "github.com/alipay/s...
package stackdriver import ( "context" "encoding/json" "fmt" "reflect" "strings" "time" "google.golang.org/api/option" "cloud.google.com/go/logging" "cloud.google.com/go/logging/logadmin" "github.com/egnyte/ax/pkg/backend/common" "google.golang.org/api/iterator" ) const QueryLogTimeout = 20 * time.Second...
package queue import ( "net/url" "regexp" "strings" "k8s.io/klog" ) const ( QueueProviderSQS = "sqs" QueueProviderBeanstalk = "beanstalk" BenanstalkProtocol = "beanstalk" UnsyncedQueueMessageCount = -1 UnsyncedIdleWorkers = -1 ) // Queues maintains a list of all queues as specified...
/* Copyright (c) 2018, Tomasz "VedVid" Nowakowski All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and...
/* Copyright 2021. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed un...
/* 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 server_test import ( "sync" "testing" "time" rpcproto "github.com/hatobito-io/natsrpc/proto" "github.com/hatobito-io/natsrpc/server" "github.com/nats-io/nats.go" "google.golang.org/protobuf/proto" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" nserver "github.com/nats-io/nats-server/v2/serv...
package main import ( "encoding/csv" "flag" "fmt" "io" "math/rand" "os" "strconv" "time" ) // Global variables set by the flag parsing logic var _minLines int var _delimiter string var _noheader bool // Given a string, tries to convert it to various types to figure out // the actual data of the underlying da...
package wx import ( "bytes" "crypto/hmac" "crypto/md5" "crypto/sha256" "fmt" "log" "net/http" "strconv" "strings" "time" ) func UnifiedOrder2(req *UnifiedOrderRequest) (resp *UnifiedOrderResponse, err error) { m1 := make(map[string]string, 24) m1["body"] = req.Body m1["out_trade_no"] = req.OutTradeNo m1...
// Copyright © 2019 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 sql import ( "context" "io" "math" "sync" "time" opentracing "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/log" ) type key uint const ( // QueryKey to access query in the context. QueryKey key = iota ) // Session holds the session data. type Session interface { //...
// Copyright (c) 2017 The Go Authors. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd package safehtml import ( "bytes" "strconv" ) // https://infra.spec.whatwg.org/#ascii-...
/* Copyright IBM Corp. 2017 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 agreed to in wri...
package requests import ( "encoding/json" "fmt" "io/ioutil" "net/url" "strings" "github.com/google/go-querystring/query" "github.com/atomicjolt/canvasapi" "github.com/atomicjolt/canvasapi/models" "github.com/atomicjolt/string_utils" ) // CreateLinkOutcomeCourses Link an outcome into the outcome group. The ...
// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package riscv64 import ( "cmd/internal/obj/riscv" "cmd/internal/objabi" "cmd/internal/sys" "cmd/link/internal/ld" "cmd/link/internal/sym" "fmt" "log" ) ...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. // +build all azurevirtualmachineextension package controllers import ( "context" "testing" azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1" "github.com/Azure/azure-service-operator/pkg/errhelp" metav1 "k8s.io/apimac...
// +build dev // NOTE: that build tag ^ ensures that end users won't get this dev-only command // in the published Envoy. /* * Copyright 2020 Rackspace US, 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 ...
package vhost import ( "fmt" "io" "io/ioutil" "net" "net/http" "strconv" "strings" "testing" "time" ) // TestErrors ensures that error types for this package are implemented properly func TestErrors(t *testing.T) { // test case for https://github.com/inconshreveable/go-vhost/pull/2 // create local err var...
/* Copyright 2019 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, sof...
package ds import ( "math/rand" "strings" ) var ( skiplistHeight = 4 probability = 0.25 ) // SlItem represents our skiplist node // // This implementation is NOT thread-safe type SlItem struct { Key string level int after []*SlItem before []*SlItem } // SkipList is our skiplist...
// Code generated by goa v3.0.2, DO NOT EDIT. // // resume HTTP client types // // Command: // $ goa gen goa.design/examples/multipart/design -o // $(GOPATH)/src/goa.design/examples/multipart package client import ( resume "goa.design/examples/multipart/gen/resume" resumeviews "goa.design/examples/multipart/gen/res...
package kafka import ( "context" cluster "github.com/bsm/sarama-cluster" "time" "github.com/Shopify/sarama" "github.com/denislobanov/go-pubsub" "golang.org/x/sync/errgroup" ) var _ pubsub.MessageSource = (*messageSource)(nil) const ( OffsetOldest int64 = -2 OffsetLatest ...
package client import ( "context" "errors" "fmt" ) // Triggers describes all the trigger-related methods that the Honeycomb API // supports. // // API docs: https://docs.honeycomb.io/api/triggers/ type Triggers interface { // List all triggers present in this dataset. List(ctx context.Context, dataset string) ([...
// Copyright 2021 PingCAP, Inc. Licensed under Apache-2.0. package metautil import ( "context" "crypto/sha256" "testing" "github.com/golang/mock/gomock" . "github.com/pingcap/check" backuppb "github.com/pingcap/kvproto/pkg/backup" mockstorage "github.com/pingcap/br/pkg/mock/storage" ) type metaSuit struct{}...
// Copyright 2021 Edgecast Inc., Licensed under the terms of the Apache 2.0 license. // See LICENSE file in project root for terms. package dnsroute import ( "context" "encoding/json" "log" "strconv" "terraform-provider-edgecast/ec/helper" "terraform-provider-edgecast/ec/api" "github.com/hashicorp/terraform-...
// Copyright 2017 Sourced Technologies SL // 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 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
// Copyright (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...
// 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 wri...
package archive import ( "context" "errors" "fmt" "io" "os" "github.com/0xPolygon/polygon-edge/helper/common" "github.com/0xPolygon/polygon-edge/server/proto" "github.com/0xPolygon/polygon-edge/types" "github.com/hashicorp/go-hclog" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.or...
package badgercache import ( "bytes" "compress/gzip" "crypto/sha1" "encoding/binary" "fmt" "io" "io/ioutil" "github.com/dgraph-io/badger" "github.com/golang/snappy" "github.com/hashicorp/go-msgpack/codec" "gopkg.in/kothar/brotli-go.v0/enc" ) const ( // GzipMinSize gzip min size GzipMinSize = 1024 // Ca...
// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package parse // Code for assignment, a little intricate as there are many cases and many // validity checks. import ( "robpike.io/ivy/value" ) // Assignmen...
package server_test import ( "context" "errors" "io" "log" "net" "testing" "github.com/alog-rs/bridge/internal/mocks" "github.com/alog-rs/bridge/server" rs3pb "github.com/alog-rs/proto/rs3" "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "google.golan...
package global import ( "encoding/json" "fmt" "io/ioutil" "os" "path" "sort" "github.com/gofed/symbols-extractor/pkg/parser/alloctable" "github.com/gofed/symbols-extractor/pkg/snapshots" "k8s.io/klog/v2" ) // Table captures list of allocated symbols for each package and its files type Table struct { tables...