text
stringlengths
3.08k
10.4k
package connector import ( "errors" "fmt" "github.com/garyburd/redigo/redis" cook_log "gitlab.niceprivate.com/golang/cook/log" cook_util "gitlab.niceprivate.com/golang/cook/util" "math/rand" "time" ) type RedisConnWrapper struct { Conn redis.Conn } type RedisConf struct { Addrs []string TestInterval time....
// +build integration // // Copyright (c) 2020 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...
/* 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, ...
// Copyright 2020-2021 Dolthub, 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...
/* Copyright 2021 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 IBM Corp. 2018 All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package endorser import ( "fmt" "sync" pb "github.com/Yunpeng-J/fabric-protos-go/peer" endorsement "github.com/Yunpeng-J/HLF-2.2/core/handlers/endorsement/api" endorsement3 "github.com/Yunpeng-J/HLF-2.2/core/handlers/endors...
// Copyright 2016 <NAME> <ericw at xmtp dot net> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
package events import ( "context" "sync" /* Merge "[FAB-15637] Release note for shim logger removal" */ "github.com/filecoin-project/go-state-types/abi" "golang.org/x/xerrors" "github.com/filecoin-project/lotus/chain/types" ) type tsCacheAPI interface { ChainGetTipSetByHeight(context.Context, abi.ChainEpoch, t...
// // Copyright (c) 2016 by <NAME>. All Rights Reserved. // package jo import ( "strings" "testing" "github.com/stretchr/testify/assert" ) // Creates things we need in every test. func newAPITest() (*API, *testHandlers, *HTTPFunctionalTest) { api := NewAPI() handlers := newTestHandlers() ht := NewHTTPFunction...
// Copyright 2020 The Swarm 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 swarm contains most basic and general Swarm concepts. package swarm import ( "bytes" "encoding" "encoding/hex" "encoding/json" "errors" "fm...
package edgegrid import ( "bytes" "crypto/hmac" "crypto/sha256" "encoding/base64" "fmt" "io/ioutil" "net/http" "os" "strings" "time" "github.com/go-ini/ini" homedir "github.com/mitchellh/go-homedir" uuid "github.com/satori/go.uuid" ) // Akamai {OPEN} EdgeGrid Authentication Service type AuthService stru...
package blob_test import ( "testing" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "nimona.io/pkg/blob" "nimona.io/pkg/context" "nimona.io/pkg/crypto" "nimona.io/pkg/object" "nimona.io/pkg/objectmanager" "nimona.io/pkg/objectmanagermock" "nimona.io/pkg/peer" "nimona.io/pkg/resolver"...
// Copyright 2015 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
package vtestapp import ( "errors" "github.com/lakal3/vge/vge/vk" "github.com/lakal3/vge/vge/vmodel" "github.com/lakal3/vge/vge/vscene" "io" "io/ioutil" "os" "path/filepath" ) type MainImage struct { Image *vk.Image Desc vk.ImageDescription Root vscene.Scene Camera vscene.Camera pool *vk.MemoryPoo...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.19.4 // source: player.proto package pb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) con...
// Consumer service accpets logs and other events from queue, validates, // and pushes to index and persistance storage. package consumer import ( "context" "encoding/json" "errors" "log" "os" "os/signal" "regexp" "strings" "sync" "time" "github.com/logvoyage/logvoyage/models" "github.com/logvoyage/logvoy...
// Copyright © 2020 <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...
/* Copyright 2018 Gravitational, 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, soft...
/************************************************************************* * Copyright 2017 Gravwell, Inc. All rights reserved. * Contact: <<EMAIL>> * * This software may be modified and distributed under the terms of the * BSD 2-clause license. See the LICENSE file for details. **********************************...
package file_loader import ( "context" "errors" "fmt" "io" "log" "os" "time" "github.com/karimra/gnmic/loaders" "github.com/karimra/gnmic/types" "github.com/karimra/gnmic/utils" "github.com/prometheus/client_golang/prometheus" "gopkg.in/yaml.v2" ) const ( loggingPrefix = "[file_loader] " watchInterval ...
package bitcoindclient import ( "errors" "net/http" "sync" "sync/atomic" "github.com/joakimofv/sanity" zmq "github.com/pebbe/zmq4" ) const ( MAJOR_VERSION = 23 DefaultSubChannelBufferSize = 2 DefaultRpcUriPath = "/" ) var ( ErrRpcDisabled = errors.New("RPC disabled (RpcAddres...
package main import ( "context" "fmt" "os" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/cluster" "github.com/spf13/cobra" appsv1client "k8s.io/client-go/kubernetes/typed/ap...
/** * Copyright 2020 Appvia Ltd <<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 ...
package resource import ( "context" "time" "github.com/fabric8-services/fabric8-auth/errors" "github.com/fabric8-services/fabric8-auth/gormsupport" "github.com/fabric8-services/fabric8-auth/log" "github.com/goadesign/goa" "github.com/jinzhu/gorm" "github.com/satori/go.uuid" "fmt" errs "github.com/pkg/erro...
// Copyright 2013 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 main import ( "bytes" "crypto/x509" "encoding/pem" "fmt" "io/ioutil" "os" "os/exec" "os/user" "path/filepath" "sync" ) var debugDarwinRoots ...
package storage import ( "fmt" "github.com/EnnioRC/influxdb/models" "github.com/EnnioRC/influxdb/tsdb" "go.uber.org/zap" ) type responseWriter struct { stream Storage_ReadServer res *ReadResponse logger *zap.Logger err error // current series sf *ReadResponse_SeriesFrame ss int sz int // estimated...
package util import ( "crypto/tls" "crypto/x509" "fmt" "io/ioutil" "net" "github.com/lxc/lxd/shared" "github.com/lxc/lxd/shared/logger" ) // InMemoryNetwork creates a fully in-memory listener and dial function. // // Each time the dial function is invoked a new pair of net.Conn objects will // be created usin...
//go:build !windows // +build !windows package preflight import ( "fmt" "os" "path/filepath" "runtime" "syscall" "github.com/code-ready/crc/pkg/crc/cache" "github.com/code-ready/crc/pkg/crc/constants" "github.com/code-ready/crc/pkg/crc/logging" crcpreset "github.com/code-ready/crc/pkg/crc/preset" "github.c...
package configure import ( "fmt" "os" ) // Checker is the interface which external checkers must comply to. In the configure // implementation, if one Checker fails the next one in the stack should be called. type Checker interface { // Setup initializes the Checker Setup() error // Int attempts to get an int va...
// This example shows how to broadcast messages efficiently using Chord spanning // tree. Naive broadcast (push) algorithm requires each node to send and receive // the same message O(logN) times. This can be reduced to K times but it's still // bandwidth inefficient. // Using spanning tree structure this can be great...
/* Copyright (c) 2019 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package api import ( "context" "encoding/json" "fmt" "net" "net/http" "os" "path" "github.com/gorilla/mux" "github.com/pkg/errors" "github.com/vmware/octant/internal/cluster" "github.com/vmware/octant/internal/...
package simplepath import ( "math" "testing" "github.com/stretchr/testify/assert" "github.com/fonero-project/fonero-golang/services/horizon/internal/db2/core" "github.com/fonero-project/fonero-golang/services/horizon/internal/test" "github.com/fonero-project/fonero-golang/xdr" ) func TestOrderBook(t *testing....
// Code generated by the Pulumi SDK Generator DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticloadbalancingv2 import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Resource Type definition for AWS::ElasticLoadBalancing...
// Copyright 2020 <NAME>. All rights reserved. // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. package internaltest import ( "errors" "fmt" "os" "os/exec" "path/filepath" "runtime" "strconv" "strings" "sync" ) // PanicwebOutput returns t...
/* * Copyright (c) 2021 THL A29 Limited, a Tencent company. All rights reserved * * This source code file is licensed under the MIT License, you may obtain a copy of the License at * * http://opensource.org/licenses/MIT * */ package registerdiscover import ( "context" "crypto/tls" "fmt" "strings" "sync" ...
/* * Copyright 2020, Offchain Labs, 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...
package domain import ( "time" "errors" "github.com/it-chain/it-chain-Engine/common" "strconv" pb "github.com/it-chain/it-chain-Engine/legacy/network/protos" ) type Block_Status int const ( Status_BLOCK_UNCONFIRMED Block_Status = 0 Status_BLOCK_CONFIRMED Block_Status = 1 ) type Block struct { Header ...
package runtime import ( "errors" "io" "strings" "sync" "time" "github.com/micro/go-micro/runtime/package" "github.com/micro/go-micro/runtime/process" proc "github.com/micro/go-micro/runtime/process/os" "github.com/micro/go-micro/util/log" ) type runtime struct { sync.RWMutex // used to stop the runtime ...
package payloads import ( "errors" "reflect" "testing" "github.com/stretchr/testify/assert" "github.com/France-ioi/AlgoreaBackend/app/formdata" "github.com/France-ioi/AlgoreaBackend/app/payloadstest" ) func TestPayloads_ParseMap(t *testing.T) { var tests = []struct { name string raw map[string...
// Copyright (c) 2021 Terminus, 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 agree...
// Copyright 2016 The Cockroach Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
// Copyright 2018 the u-root 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 main import ( "context" "crypto/tls" "crypto/x509" "encoding/pem" "errors" "fmt" "io" "io/ioutil" "log" "net" "net/http" "os" "strconv"...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016 Datadog, Inc. // Package mocktracer provides a mock implementation of the tracer used in testin...
package ndau // ----- ---- --- -- - // Copyright 2019 Oneiro NA, Inc. All Rights Reserved. // // Licensed under the Apache License 2.0 (the "License"). You may not use // this file except in compliance with the License. You can obtain a copy // in the file LICENSE in the source distribution or at // https://www.apac...
package main import ( "encoding/json" "flag" "fmt" "github.com/rawoke083/rilt/rpweb/models" "github.com/rawoke083/rilt/rpweb/storage" _"github.com/rawoke083/rilt/rpweb/repos" "github.com/rawoke083/rilt/rpweb/api" "github.com/zenazn/goji" "github.com/zenazn/goji/web" "log" "net/http" _"strconv" "runtime...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package monitoring import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Manages a [Log Profile](https://docs.microsoft...
// 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 models import ( "encoding/json" "fmt" "strings" "time" "github.com/smartcontractkit/chainlink/utils" "go.uber.org/multierr" null "gopkg.in/guregu/null.v3" ) // AssignmentSpec represents a specification of work to be given to an oracle // this consists of an Assignment and a Schedule type AssignmentSpe...
package rabbitmq_vcs import ( "fmt" "net/http" "net/http/httptest" "testing" "github.com/influxdata/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "io/ioutil" ) func TestRabbitMQGeneratesMetrics(t *testing.T) { ts := httptest.NewServer(http.Handl...
/* Copyright 2020 Weaveworks. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you ...
// 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 writi...
package service import ( "context" "encoding/json" "sync" "time" "go-common/app/job/main/coin/conf" "go-common/app/job/main/coin/dao" "go-common/app/job/main/coin/model" accrpc "go-common/app/service/main/account/api" arcrpc "go-common/app/service/main/archive/api/gorpc" coinrpc "go-common/app/service/main/...
package provider import ( "encoding/json" "errors" "fmt" "regexp" "runtime" "time" "github.com/Dreamacro/clash/adapter" C "github.com/Dreamacro/clash/constant" types "github.com/Dreamacro/clash/constant/provider" "gopkg.in/yaml.v2" ) const ( ReservedName = "default" ) type ProxySchema struct { Proxies ...
package cache import ( "context" "testing" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" "github.com/miekg/dns" ) func TestResponseWithDNSSEC(t *testing.T) { // We do 2 queries, one where we want non-dnssec and one with dnssec and...
package assocentity import ( "math" "github.com/ndabAP/assocentity/v6/internal/iterator" "github.com/ndabAP/assocentity/v6/tokenize" ) type direction int var ( posDir direction = 1 negDir direction = -1 ) // Do returns the entity distances func Do(tokenizer tokenize.Tokenizer, psd tokenize.PoSDetermer, entiti...
/* * 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...
package httpClient import ( "bytes" "crypto/tls" "crypto/x509" "io/ioutil" "log" "net" "net/http" "net/url" "strings" "time" ) var ( DefaultMaxIdleConns = 100 DefaultMaxIdleConnsPerHost = 100 DefaultRequestTimeout = 10000 * time.Millisecond ) // Client http request very simple type Client st...
package teastats import ( "encoding/json" "fmt" "github.com/iwind/TeaGo/lists" "github.com/iwind/TeaGo/logs" "github.com/iwind/TeaGo/types" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" "sync" ) // 排行计算 type Rank struct { size int top map[string]int buffer ...
// 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 agree...
package headscale import ( "fmt" "strings" "github.com/fatih/set" "inet.af/netaddr" "tailscale.com/tailcfg" "tailscale.com/util/dnsname" ) const ( ByteSize = 8 ) const ( ipv4AddressLength = 32 ipv6AddressLength = 128 ) // generateMagicDNSRootDomains generates a list of DNS entries to be included in `Route...
/* * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2019-Present Datadog, Inc. */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO N...
/* Package redis implements an asgi channel layer that works with redis. */ package redis import ( "fmt" "log" "strings" "github.com/ostcar/geiss/asgi" msgpack "gopkg.in/vmihailenco/msgpack.v2" "github.com/garyburd/redigo/redis" uuid "github.com/satori/go.uuid" ) // Sets the time in seconds that Receive() w...
package engine // Magnetocrystalline anisotropy. import ( "github.com/mumax/3/cuda" "github.com/mumax/3/data" ) // Anisotropy variables var ( Ku1, Ku2 ScalarParam // uniaxial anis constants Kc1, Kc2, Kc3 ScalarParam // cubic anis constants AnisU, AnisC1, AnisC2 VectorParam //...
package controllers import ( "fmt" "github.com/labstack/echo/v4" "github.com/labstack/gommon/log" "net/http" "os" "os/user" "sigs.k8s.io/kustomize/api/filesys" "sigs.k8s.io/kustomize/api/krusty" "text/template" ) type kustType struct { User string `json:"username" form:"username" query:"username"` Pas...
package gitserver import ( "fmt" "io/ioutil" "log" "net/http" "net/url" "os" "os/exec" "path/filepath" "regexp" "strings" "github.com/projectatomic/atomic-enterprise/pkg/generate/git" ) var lazyInitMatch = regexp.MustCompile("^/([^\\/]+?)/info/refs$") // lazyInitRepositoryHandler creates a handler that w...
package appId import ( "fmt" "github.com/hashicorp/vault/helper/salt" "github.com/hashicorp/vault/logical" "github.com/hashicorp/vault/logical/framework" ) func Factory(conf *logical.BackendConfig) (logical.Backend, error) { b, err := Backend(conf) if err != nil { return nil, err } return b.Setup(conf) } ...
package cmd import ( "context" "flag" "fmt" "os" "path" "time" "github.com/cloudspannerecosystem/harbourbridge/conversion" "github.com/cloudspannerecosystem/harbourbridge/internal" "github.com/google/subcommands" ) // DataCmd struct with flags. type DataCmd struct { source string sourceProfile ...
// Code generated by go-swagger; DO NOT EDIT. package devices // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/...
package discovery_test import ( "io" "io/ioutil" "net/http" "net/http/httptest" "os" "testing" "github.com/philips-software/go-hsdp-api/ai" "github.com/philips-software/go-hsdp-api/iam" "github.com/stretchr/testify/assert" ) var ( muxIAM *http.ServeMux serverIAM *httptest.Server muxIDM *http.ServeM...
// Copyright 2018 The Cockroach Authors. // // Use of this software is governed by the Business Source License included // in the file licenses/BSL.txt and at www.mariadb.com/bsl11. // // Change Date: 2022-10-01 // // On the date above, in accordance with the Business Source License, use // of this software will be gov...
// Copyright 2015-present, Cyrill @ <EMAIL> and the CoreStore contributors // // 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 // // Unles...
package core6502 type CPUMemory interface { Peek(addr uint16) uint8 Poke(addr uint16, val uint8) PeekWord(addr uint16) uint16 PokeWord(addr uint16, val uint16) } type CPURegisters interface { Flag(mask uint8) bool Flags() uint8 RegA() uint8 RegX() uint8 RegY() uint8 RegSP() uint8 RegPC() uint16 SetFlag(ma...
package main import ( "fmt" "os" "os/user" "path/filepath" "runtime" "time" _ "net/http/pprof" "github.com/Sirupsen/logrus" "gopkg.in/urfave/cli.v1" "github.com/hashgraph/babble/crypto" "github.com/hashgraph/babble/net" "github.com/hashgraph/babble/node" "github.com/hashgraph/babble/proxy" aproxy "git...
// Copyright 2020 Nokia // Licensed under the BSD 3-Clause License. // SPDX-License-Identifier: BSD-3-Clause package platformres import ( "fmt" kubelib2 "github.com/nokia/industrial-application-framework/consul-operator/libs/kubelib" "github.com/nokia/industrial-application-framework/consul-operator/pkg/k8sdynamic...
package genetics import ( "fmt" "sort" "github.com/inlined/rand" ) const ( stochasticUniversalSampling = "StochasticUniversalSampling" rankedSelection = "RankedSelection" tournamentSelection = "TournamentSelection" ) // NaturalSelection is an interface to pick the selection method. // A Na...
package aws import ( "context" "fmt" "os" "os/signal" "sync" "syscall" "time" "github.com/cloudskiff/driftctl/pkg/parallel" "github.com/sirupsen/logrus" tf "github.com/cloudskiff/driftctl/pkg/terraform" "github.com/aws/aws-sdk-go/aws/session" "github.com/eapache/go-resiliency/retrier" "github.com/hashi...
// Apache Kafka kafkatest VerifiableProducer implemented in Go package main /** * Copyright 2016 Confluent 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.o...
/* 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, soft...
/** * Copyright (c) 2017 eBay Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Copyright 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 ...
package transformation import ( "errors" "fmt" "strings" "unsafe" "github.com/apache/arrow/go/v8/arrow" "github.com/apache/arrow/go/v8/arrow/array" "github.com/apache/arrow/go/v8/arrow/cdata" "github.com/apache/arrow/go/v8/arrow/memory" "google.golang.org/protobuf/types/known/timestamppb" "github.com/feast...
package binary import ( "crypto/rand" "encoding/binary" "reflect" "unsafe" ) func xorQ(a, b []byte, c []byte) { // MAGIC *(*uint64)(unsafe.Pointer((*reflect.SliceHeader)(unsafe.Pointer(&c)).Data)) = *(*uint64)(unsafe.Pointer((*reflect.SliceHeader)(unsafe.Pointer(&a)).Data)) ^ *(*uint64)(unsafe.Pointer((*ref...
// Tideland Go Network - HTTP Extensions - Unit Tests // // Copyright (C) 2020 <NAME> / Tideland / Oldenburg / Germany // // All rights reserved. Use of this source code is governed // by the new BSD license. package httpx_test // import "tideland.dev/go/net/httpx_test" //-------------------- // IMPORTS //-----------...
package main import ( "flag" "fmt" "log" "github.com/marianogappa/chart/format" ) type chartType int type scaleType int type colorType int const ( undefinedChartType chartType = iota pie bar line scatter ) const ( linear scaleType = iota logarithmic ) const ( defaultColor colorType = iota legacyColor ...
// Code generated by MockGen. DO NOT EDIT. // Source: github.com/m3db/m3/src/m3em/os/exec/types.go // 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 ...
package src // RequestStruct : Requests via the Websocket Interface type RequestStruct struct { // Commands to xTeVe Cmd string `json:"cmd,required"` // User DeleteUser bool `json:"deleteUser,omitempty"` UserData map[string]interface{} `json:"userData,omitempty"` // Mapping EpgMapping map[...
package cmd import ( "bytes" "fmt" "log" "os" "regexp" "runtime" "strconv" "strings" "text/template" "github.com/pkg/errors" "github.com/spf13/cobra" gitconfig "github.com/tcnksm/go-gitconfig" gitlab "github.com/xanzy/go-gitlab" "github.com/zaquestion/lab/internal/git" lab "github.com/zaquestion/lab/in...
package ui import ( "fmt" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/model" "github.com/derailed/tview" "github.com/gdamore/tcell" ) const ( defaultPrompt = "%c> [::b]%s" defaultSpacer = 4 ) var _ PromptModel = (*model.CmdBuff)(nil) var _ Suggester = (*model.CmdBuff)(nil) var...
package builder import ( "bytes" "fmt" "text/template" "github.com/falcosecurity/driverkit/pkg/kernelrelease" ) // TargetTypeCentos identifies the Centos target. const TargetTypeCentos Type = "centos" func init() { BuilderByTarget[TargetTypeCentos] = &centos{} } // centos is a driverkit target. type centos st...
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not...
package main import ( "io/ioutil" "log" "os" "github.com/c-ardinal/Nodens/core" "github.com/c-ardinal/Nodens/system/cthulhu" "github.com/bwmarrin/discordgo" ) // configFile デフォルト設定ファイルパス var configFile = "SystemConfig.json" // handleFuncStruct コマンドハンドラテーブル用構造体 type handleFuncStruct struct { system string ...
// Copyright 2020 New Relic Corporation. All rights reserved. // SPDX-License-Identifier: Apache-2.0 // An application that illustrates how to instrument jmoiron/sqlx with DatastoreSegments // // To run this example, be sure the environment varible NEW_RELIC_LICENSE_KEY // is set to your license key. Postgres must be...
package goapi import ( "context" "fmt" "io" "net/http" "strings" "time" "github.com/machinebox/graphql" "github.com/sisatech/goapi/pkg/objects" ) // MachinesManager provides access to 'Machine' APIs type MachinesManager struct { c *Client environment *Repository } // WithEnvironment .. func (m *...
package keycloak import ( "encoding/json" "fmt" "log" "reflect" "strconv" "strings" ) type IdentityProviderConfig struct { Key string `json:"key,omitempty"` HostIp string `json:"hostIp,omitempty"` UseJwksUrl ...
// Copyright 2021 VMware, Inc. // SPDX-License-Identifier: BSD-2-Clause package mover import ( "archive/tar" "errors" "fmt" "io" "io/fs" "log" "os" "path" "path/filepath" "strings" ) type tarFileWriter struct { *tar.Writer io.WriteCloser } func newTarFileWriter(tarFile string) (*tarFileWriter, error) { ...
package jsonfile import ( "bytes" "context" "errors" "io" "os" "time" "github.com/alibaba/pouch/daemon/logger" "github.com/fsnotify/fsnotify" "github.com/sirupsen/logrus" ) type newUnmarshalFunc func(r io.Reader) func() (*logger.LogMessage, error) var watchFileTimeout = 200 * time.Millisecond // followFi...
package suite // // Some kind of cookie jar... // import ( "net/http" "net/url" "strings" "sync" "time" ) const ( NO_TOPLEVEL_DOMAIN = iota SAME_OR_SUBDOMAIN STRICT_SAME_DOMAIN ) // All cookies in the jar have a efective domain of the form ".www.domain.org" // type CookieJar struct { cookies []*http.Cookie...
package PZP26 import ( "fmt" "regexp" "strconv" "strings" ) type QueryNode struct { Name string Rename string Terms TermNode Fields []QueryNode AllFields bool GoesToRoot bool Index string /* Rename string `json:"-"` Terms TermNode `json:"-"` Fields []QueryNode...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...