text
stringlengths
3.08k
10.4k
package main import ( "crypto/tls" "flag" "fmt" "html/template" "log" "net/http" "os" "regexp" "filippo.io/age" "github.com/osm/flen" "golang.org/x/crypto/acme/autocert" ) // isValidPublicFileID is a regular expression that checks that the given data // is a valid public file id. var isValidPublicFileID =...
package main import ( "bytes" "crypto/rand" "encoding/json" "fmt" "image" "image/png" "io" "io/ioutil" "log" "math/big" "net/http" "os/exec" "strconv" "strings" "golang.org/x/exp/shiny/driver" "golang.org/x/exp/shiny/screen" "golang.org/x/exp/shiny/widget" qrcode "github.com/skip2/go-qrcode" pushe...
package anomalia import ( "errors" "math" "strconv" "strings" ) const minimalPointsInWindows = 50 // Bitmap holds bitmap algorithm configuration. // // The Bitmap algorithm breaks the time series into chunks and uses // the frequency of similar chunks to determine anomalies scores. // The scoring happens by slid...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: hi.proto package msg import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time as...
package tfschema import ( "fmt" "go/build" "log" "os" "path/filepath" "runtime" "strings" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform/plugin/discovery" "github.com/mitchellh/go-homedir" ) // Client represents a set of methods required to get a type definition of // schema from Terraform...
package p2p import ( "net" "sync" "testing" "github.com/stretchr/testify/assert" "github.com/tendermint/tendermint/crypto/ed25519" cmn "github.com/tendermint/tendermint/libs/common" ) // mockPeer for testing the PeerSet type mockPeer struct { cmn.BaseService ip net.IP id ID } func (mp *mockPeer) FlushStop...
// 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package openapi import ( "encoding/json" "fmt" types "github.com/rancher/wrangler/pkg/schemas" "github.com/rancher/wrangler/pkg/schemas/definition" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" ) var ( blacklistFields = map[string]bool{ "kind": true, "apiVersion": true, "metadata"...
// Copyright 2020 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...
// Code generated by smithy-go-codegen DO NOT EDIT. package sns 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" ) // Use this request to ...
/* Package worker provides a way to manipulate concurrent processing. This guarantees all start/restart/stop operation for worker is always thread-safe by using Go channel feature. */ package worker import ( "context" "sync" "time" "github.com/iwataka/mybot/models" ) // WorkerSignal is a signal sent to Worker. /...
// Copyright 2015 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 ag...
// Copyright 2019 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 ag...
//go:build go1.18 package parquet import ( "io" "reflect" ) // GenericWriter is similar to a Writer but uses a type parameter to define the // Go type representing the schema of rows being written. // // Using this type over Writer has multiple advantages: // // - By leveraging type information, the Go compiler ca...
package redis import ( "strings" "sync" "github.com/tidwall/redcon" ) const ( SyntaxErr = "ERR syntax error" InvalidIntErr = "ERR value is not an integer or out of range" WrongTypeErr = "WRONGTYPE Operation against a key holding the wrong kind of value" WrongNumOfArgsErr = "ERR wrong number o...
// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
package main import ( "bytes" "fmt" "go/build" "html/template" "io/ioutil" "log" "net/http" "os" "path" "path/filepath" "strconv" "time" "github.com/antage/eventsource" "github.com/fsnotify/fsnotify" scrapbox "github.com/hhatto/go-scrapbox-parser" rst "github.com/hhatto/gorst" "github.com/shurcooL/gi...
/* * * Copyright 2020 waterdrop 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 ...
package manage import ( "container/list" "context" "runtime" "sync" "time" "github.com/kevinms/leakybucket-go" "github.com/libp2p/go-libp2p-core/control" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" "github.com/multiformats/go-mu...
// Copyright 2017 GRAIL, Inc. All rights reserved. // Use of this source code is governed by the Apache-2.0 // license that can be found in the LICENSE file. package testutil import ( "fmt" "io/ioutil" "os" "path/filepath" "regexp" "runtime" "runtime/debug" "strings" "testing" "v.io/x/lib/gosh" ) // MockT...
package version import ( "sync/atomic" ) // Version is snapshot for current storage metadata includes levels/sst files type Version struct { id int64 // unique id in kv store level numOfLevels int // num of levels fv FamilyVersion ref int32 // current version ref count for using levels []*...
// Copyright (C) 2017 Librato, Inc. All rights reserved. package reporter import ( "time" "github.com/appoptics/appoptics-apm-go/v1/ao/internal/log" ) // BytesBucket is a struct to simulate a bucket. It has two actions: pour // some water into it from the water source, and drain it when it's drainable. // This st...
package main // Connect to the broker, subscribe, and write messages received to a file import ( "encoding/json" "fmt" "os" "os/signal" "syscall" "time" mqtt "github.com/budisugianto/paho.mqtt.golang" ) const ( TOPIC = "topic1" QOS = 1 SERVERADDRESS = "tcp://mosquitto:1883" CLIENTID ...
package tststan import ( "fmt" "time" nats "github.com/nats-io/nats.go" stan "github.com/nats-io/stan.go" "github.com/ory/dockertest" dc "github.com/ory/dockertest/docker" "github.com/huangjunwen/tstsvc" ) var ( // Docker repository. Repository = "nats-streaming" // Default tag. DefaultTag = "0.15.1-lin...
// 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
package chat import ( "errors" "fmt" "net/url" "strings" "github.com/mattermost/platform/model" "github.com/section77/matterbot/logger" ) // Mattermost implements the chat-system interface to use it with the 'mattermost' system type Mattermost struct { client *model.Client4 userID string } // Connect to the...
// Copyright 2020 gorse Project 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 ...
// // Copyright (C) 2019-2021 vdaas.org vald team <<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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by a...
package todos import "time" //=========================================================================== // Top Level Requests and Responses //=========================================================================== // Response contains standard fields that are embedded in most API responses type Response struct...
package gov import ( "fmt" sdk "github.com/osiz-blockchainapp/euro-sdk/types" "github.com/osiz-blockchainapp/euro-sdk/x/gov/types" ) // SubmitProposal create new proposal given a content func (keeper Keeper) SubmitProposal(ctx sdk.Context, content Content) (Proposal, sdk.Error) { if !keeper.router.HasRoute(conte...
package parser import ( "bufio" "bytes" "io" "strings" "github.com/tufanbarisyildirim/gonginx/parser/token" ) //lexer is the main tokenizer type lexer struct { reader *bufio.Reader file string line int column int inLuaBlock bool Latest token.Token } //lex initializes a lexer from ...
// Copyright 2019-2020 go-gtp authors. All rights reserved. // Use of this source code is governed by a MIT-style license that can be // found in the LICENSE file. // Command sgw is a dead simple implementation of S-GW only with GTP-related features. // // S-GW follows the steps below if there's no unexpected events i...
package bloomtree import ( "crypto/sha512" "errors" "fmt" "math" "sort" "github.com/willf/bitset" ) // BloomFilter interface. Requires two methods: // The BitArray method - returns the bloom filter as a bit array. // The Proof method - If the element is in the bloom filter, it returns: // indices, true (where ...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package route53 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" ) // A complex type that contains information about the tags that you want to...
package input import ( "sync" "github.com/muka/go-bluetooth/bluez" "github.com/muka/go-bluetooth/util" "github.com/muka/go-bluetooth/props" "github.com/godbus/dbus" ) var Input1Interface = "org.bluez.Input1" // NewInput1 create a new instance of Input1 // // Args: // - objectPath: [variable prefix]...
// Copyright 2019 Drone IO, 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...
package local import ( "io/ioutil" "os" "path/filepath" "testing" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/tfdiags" "github.com/hashicorp/terraform/addrs" "github.com/hashicorp/terraform/backend" "github.com/hashicorp/terraform/configs/configschema" "github.com/hashicorp/t...
// Copyright 2015 <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 view provides a simple API for formatting dates as strings in a manner that is easy to use in view-models, // especially when using Go templates. package vie...
// Package osrelease provides an "os-release" distribution scanner. package osrelease import ( "archive/tar" "bufio" "bytes" "context" "fmt" "io" "path/filepath" "runtime/trace" "strings" "github.com/knqyf263/go-cpe/common" "github.com/knqyf263/go-cpe/naming" "github.com/rs/zerolog" "github.com/quay/cla...
package box import ( "context" "encoding/json" "net/url" "strings" "time" "github.com/gildas/go-core" "github.com/gildas/go-errors" "github.com/gildas/go-request" ) // Files module type Files struct { *Client api *url.URL } // FileCollection represents a collection of FileEntry type FileCollection struct ...
// 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 state import ( "errors" "fmt" "github.com/hashicorp/consul/types" "github.com/hashicorp/go-memdb" ) var ( // ErrMissingNode is the error returned when trying an operation // which requires a node registration but none exists. ErrMissingNode = errors.New("Missing node registration") // ErrMissingServ...
package sensors import ( "bufio" "bytes" "encoding/binary" "github.com/tinogoehlert/gobuki/utils" ) // BasicSensor Basic core sensor data. type BasicSensor struct { Timestamp uint16 Bumper Bumper Wheels Wheels Cliff Cliff Buttons Buttons ChargeState ChargeState // Voltage of battery ...
// Package owlk8s is a library for monitoring ClusterIP HTTP services with eBPF. package owlk8s import ( "fmt" "os" "github.com/est357/owlk8s/helpers" "github.com/est357/owlk8s/metrics" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes...
/* * 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 a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
package structs // QueryDatacenterOptions sets options about how we fail over if there are no // healthy nodes in the local datacenter. type QueryDatacenterOptions struct { // NearestN is set to the number of remote datacenters to try, based on // network coordinates. NearestN int // Datacenters is a fixed list o...
package hub import ( "os" "path/filepath" "strings" "sync" "time" "github.com/floeit/floe/client" "github.com/floeit/floe/config" "github.com/floeit/floe/event" "github.com/floeit/floe/log" "github.com/floeit/floe/path" "github.com/floeit/floe/store" ) // This file contains all functions that deal with ev...
package main import ( "crypto/sha512" "encoding/hex" "encoding/json" "encoding/xml" "fmt" "html/template" "net" "net/http" "strings" "time" humanize "github.com/dustin/go-humanize" "github.com/julienschmidt/httprouter" ) /* "hasmedia": func(lid, mid string) bool { list, err := FindList(lid) if err !...
// https://github.com/charmbracelet/soft-serve/blob/main/internal/git/git.go package git import ( "errors" "log" "os" "path/filepath" "sort" "sync" "time" "github.com/go-git/go-billy/v5/memfs" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing/object" "github.com/go-git/go-git/v5/plumbing...
// pmm-agent // Copyright 2019 Percona LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
package main // todo // // we need an arbitrarily long trail of pointers to the supernode that a node has previously been contracted into // import ( "fmt" "io/ioutil" "math/rand" "os" "strconv" "strings" "time" ) type Graph struct { Nodes []Node Edges []Edge } type Node struct { Edges []int Label int ...
/* * Copyright 2019 the go-netty project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
package config import ( "fmt" log "github.com/Sirupsen/logrus" "github.com/kube-compose/kube-compose/internal/pkg/util" dockerComposeConfig "github.com/kube-compose/kube-compose/pkg/docker/compose/config" "github.com/pkg/errors" "github.com/uber-go/mapdecode" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/...
package pulseaudio import ( "bytes" "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestParseSinks(t *testing.T) { sinks, err := parseSinks(bytes.NewBufferString(testSinks), logger{}) require.NoError(t, err) if assert.Len(t, sinks, 3) { assert.Equal(t, "nu...
// Copyright 2021 Flamego. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package flamego import ( "bufio" "bytes" "io" "net" "net/http" "net/http/httptest" "testing" "time" "github.com/stretchr/testify/assert" ) func TestRespons...
/* 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, so...
// Copyright 2018 Google LLC All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
// Copyright 2017-2020 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
// Code generated by gotdgen, DO NOT EDIT. package tdapi import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _...
package tenantfetchersvc import ( "context" "fmt" "io/ioutil" "net/http" "time" "github.com/kyma-incubator/compass/components/director/pkg/apperrors" "github.com/kyma-incubator/compass/components/director/pkg/log" tenantEntity "github.com/kyma-incubator/compass/components/director/pkg/tenant" "github.com/pkg...
// 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...
/* * Functions in this file are used to forward syslog messages to the * host and must be quite careful about their own logging. In general * error messages should go via the console log.Logger defined in this * file. */ package main import ( "bytes" "errors" "fmt" "io" "log" "net" "os" "strconv" "strings" ...
package dns import ( "container/list" "strconv" "strings" "v2ray.com/core/common/net" "v2ray.com/core/common/strmatcher" ) func getIPSum(i net.IP) uint32 { return (uint32(i[0]) << 24) | (uint32(i[1]) << 16) | (uint32(i[2]) << 8) | uint32(i[3]) } func getAddress(i uint32) net.Address { ip := make([]byte, 4) ...
// Copyright 2020 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package hwsec import ( "context" "strings" "time" "chromiumos/tast/common/pkcs11" "chromiumos/tast/common/pkcs11/pkcs11test" "chromiumos/tast/c...
/*==================================================================== Copyright 2013 Southfork Security, 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/LICE...
// *** 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 transform import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // This data source supports the "/transform/enco...
// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
// Copyright 2020 The gworker Authors. // SPDX-License-Identifier: BSD-3-Clause package gworker_test import ( "errors" "fmt" "io" "strings" "sync" "testing" ants "github.com/panjf2000/ants/v2" "go.uber.org/zap" "go.uber.org/zap/zapcore" "go.uber.org/zap/zaptest" "github.com/zchee/gworker" ) func TestNew...
// Copyright 2019-present Open Networking Foundation. // // 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...
package api import ( "fmt" "net/http" ) // Metadata provides information to categorize the cards type Metadata struct { Sets []Set `json:"sets"` SetGroups []SetGroup `json:"setGroups"` ArenaIds []int `json:"arenaIds"` Types []Type ...
// Copyright 2018 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...
package database import ( "bytes" "github.com/genjidb/genji/engine" "github.com/genjidb/genji/internal/errors" "github.com/genjidb/genji/internal/stringutil" "github.com/genjidb/genji/internal/tree" "github.com/genjidb/genji/types" "github.com/genjidb/genji/types/encoding" ) var ( // ErrIndexDuplicateValue i...
package drax import ( "fmt" "io" "net" "os" "path/filepath" "strings" "sync" "time" "github.com/Sirupsen/logrus" "github.com/cpuguy83/drax/api" "github.com/cpuguy83/drax/rpc" libkvstore "github.com/docker/libkv/store" "github.com/hashicorp/raft" ) var ( defaultTimeout = 5 * time.Second ) // Cluster is...
package autocomplete import ( "encoding/json" "log" "net/http" "strings" ) const ( danbooruAutocompleteURL = "https://danbooru.donmai.us/tags/autocomplete.json?search[name_matches]=" teianAutocompleteURL = "https://kusubooru.com/suggest/autocomplete?q=" danbooruBoard = "danbooru" teianBoard ...
// // Copyright Coinbase, Inc. All Rights Reserved. // // SPDX-License-Identifier: Apache-2.0 // package bbs import ( "fmt" "github.com/coinbase/kryptology/pkg/core/curves" "github.com/coinbase/kryptology/pkg/signatures/common" "github.com/gtank/merlin" ) // PokSignatureProof is the actual proof sent from a prov...
// Copyright 2019 The LUCI 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...
// Copyright 2020 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...
package joint import ( . "yap/alg" "yap/alg/search" "yap/alg/transition" dep "yap/nlp/parser/dependency/transition" "yap/nlp/parser/disambig" nlp "yap/nlp/types" "yap/util" "fmt" // "log" ) type JointConfig struct { dep.SimpleConfiguration disambig.MDConfig InternalPrevious *JointConfig Last ...
// Copyright 2015 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 ( "archive/zip" "bytes" "flag" "fmt" "io" "io/ioutil" "log" "os" "os/exec" "path" "path/filepath" "runtime" "strings" "time" "github.com/jjeffery/errors" ) const ( lambdaName = "spaproxy" ) var ( initialDir string artifactDir string workDir string goCommand = "go" ) v...
package maps import ( "fmt" "log" "time" "github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azur...
package log import ( "fmt" "io" "os" "path/filepath" "runtime" "strings" llog "github.com/sirupsen/logrus" ) // Level is an alias type to the logger implementaion type Level llog.Level // Hook :nodoc: type Hook llog.Hook // Format :nodoc: type Format uint8 type caller struct { pkg string fn string fi...
package flogo import ( "context" "strings" "encoding/json" "github.com/TIBCOSoftware/flogo-lib/app" "github.com/TIBCOSoftware/flogo-lib/core/action" "github.com/TIBCOSoftware/flogo-lib/core/activity" "github.com/TIBCOSoftware/flogo-lib/core/data" "github.com/TIBCOSoftware/flogo-lib/core/trigger" "reflect" "...
// Copyright (c) 2014 The gomqtt Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required b...
// Code generated by moq; DO NOT EDIT // github.com/matryer/moq package mock import ( "github.com/andviro/redux" "sync" ) var ( lockStoreMockDispatch sync.RWMutex lockStoreMockGetState sync.RWMutex lockStoreMockReplaceReducer sync.RWMutex lockStoreMockSubscribe sync.RWMutex ) // StoreMock is ...
// 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 i...
// Copyright (c) 2018/2019 The DevCo developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package ltc import ( "errors" "fmt" rpc "github.com/ltcsuite/ltcd/rpcclient" "github.com/ltcsuite/ltcd/txscript" "github.com/ltcsuite/ltcd/wire" "github.com/ltcsuit...
package main import ( "log" "os" ) const ( // Horizontal : Horizontal Horizontal = 0 // Vertical : Vertical Vertical = 1 // OnescreenLo : OnescreenLo OnescreenLo = 2 // OnescreenHi : OnescreenHi OnescreenHi = 3 ) type header struct { name [4]byte PGRRomBlocks byte CHARomBlocks byte mapper1 ...
/* Copyright 2021 The KEDA Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
package zigbee2mqttadapter import ( "fmt" "github.com/function61/gokit/stopper" "github.com/function61/hautomo/pkg/hapitypes" "github.com/yosssi/gmq/mqtt" "github.com/yosssi/gmq/mqtt/client" "sync" "time" ) const ( z2mTopicPrefix = "zigbee2mqtt/" ) type MqttPublish struct { Topic string Message string } ...
package pkg import ( "fmt" "golang.org/x/net/http2" "log" "net/http" "os" "strings" "time" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/postgres" "github.com/json-iterator/go" "github.com/natefinch/lumberjack" "github.com/victorspringer/http-cache" "github.com/victorspringer/http-cache/ada...
package infer import ( "bytes" "context" "errors" "image" "io" "sort" tf "github.com/tensorflow/tensorflow/tensorflow/go" "github.com/tensorflow/tensorflow/tensorflow/go/op" // Required to support image decoding. _ "image/jpeg" _ "image/png" ) var ( // ErrValidInputOutputRequired occurs if an invalid In...
package cdslog import ( "context" "crypto/tls" "fmt" "io" "os" "strings" "github.com/rockbears/log" "github.com/sirupsen/logrus" "github.com/ovh/cds/sdk/cdn" "github.com/ovh/cds/sdk/log/hook" ) // Conf contains log configuration type Conf struct { Level string Format ...
package wserest import ( "github.com/openfresh/wse-rest-library-go/entity/application/helper" "github.com/openfresh/wse-rest-library-go/entity/base" ) // Recording is Stream Recorder utility type Recording struct { wowza } // NewRecording creates Recording object func NewRecording(settings *helper.Settings, appNa...
package extauth import ( "net/http" "net/http/httptest" "net/url" "testing" "time" "github.com/caddyserver/caddy/caddyhttp/httpserver" "github.com/stretchr/testify/assert" ) func makePassThru(c []*http.Cookie, h map[string][]string) httpserver.HandlerFunc { return func(w http.ResponseWriter, r *http.Request)...
package main import ( "fmt" "sort" ) // ### strategies // 1. cautious, adversery votes opposite of initial opinion // 2. cautious, adversery votes the contrary of the more popular opinion of the last round // 3. berserk, adversary tries to delay the process by splitting the opinion // 4. berserk, adversary tries t...
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the Li...
package take13 import "fmt" const ( // 持ち駒を打つ 100~115 // 先手飛打 SQ_K1 = Square(100) SQ_R1 = Square(101) SQ_B1 = Square(102) SQ_G1 = Square(103) SQ_S1 = Square(104) SQ_N1 = Square(105) SQ_L1 = Square(106) SQ_P1 = Square(107) SQ_K2 = Squar...
// Copyright (c) 2019 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 2019 Conflux Foundation. All rights reserved. // Conflux is free software and distributed under GNU General Public License. // See http://www.gnu.org/licenses/ package sdk import ( "github.com/Conflux-Chain/go-conflux-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-et...