text
stringlengths
10
1.05M
package test import ( "net/http" "github.com/onsi/gomega" ) type RequestMutator struct { MutateRequestInvocations int MutateRequestInputs []*http.Request MutateRequestOutputs []error } func NewRequestMutator() *RequestMutator { return &RequestMutator{} } func (r *RequestMutator) MutateRequest(reques...
// Copyright 2013 The Gorilla WebSocket 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 websocket import ( "encoding/json" "infini.sh/framework/core/global" "infini.sh/framework/core/logger" "infini.sh/framework/core/sta...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package cognitoidentityprovider import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Request to get a signing certificate from Cognito. // Please also see https://docs.aws.amazon.com/goto/We...
package sorting import ( "testing" ) func Test_insertionSort(t *testing.T) { type args struct { items []int } tests := []struct { name string args args }{ { name: "insertion sort test 1 positive 25 items", args:args{items:generateSlice(25)}, }, { name: "insertion sort test 1 positive 100 ite...
package main import "flomo-cli/application" func main() { application.Handle() }
// 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 fluentd import ( "testing" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) func TestFluendConfGenerator(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Fluend Conf Generation") }
/* Copyright 2022 The OpenYurt 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 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 w...
package graph import ( "context" "errors" "log" "regexp" "time" "github.com/itzmeanjan/harmony/app/config" "github.com/itzmeanjan/harmony/app/data" "github.com/itzmeanjan/harmony/app/graph/model" "github.com/itzmeanjan/pubsub" ) var memPool *data.MemPool var pubsubHub *pubsub.PubSub var parentCtx context.Co...
// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.13.0 package datatype import ( "database/sql" "time" "github.com/jackc/pgtype" ) type DtCharacter struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString E sql.NullString } type DtCharacterNotNull struct { A string B s...
package dataapi import ( "sync" ) // Clock - an implementation of a simple string DataItem that changes every second type BaseDataItem struct { sync.RWMutex callbacks map[int]func(item DataItem) id int } func NewBaseDataItem() *BaseDataItem { return &BaseDataItem{ callbacks: make(map[int]func(DataItem)...
// Package core provides an entry point to use V2Ray core functionalities. // // V2Ray makes it possible to accept incoming network connections with certain // protocol, process the data, and send them through another connection with // the same or a difference protocol on demand. // // It may be configured to work wit...
// Copyright 2021 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package tkgpackagedatamodel // PackageAvailableOptions includes fields for package available type PackageAvailableOptions struct { KubeConfig string Namespace string PackageName string AllNamespaces bool ValuesSch...
// Code generated by smithy-go-codegen DO NOT EDIT. package types // Gives a detailed description of the result of an action on each entry in the // request. type BatchResultErrorEntry struct { // An error code representing why the action failed on this entry. // // This member is required. Code *string // The...
// Code generated by astool. DO NOT EDIT. package typelike import ( "fmt" vocab "github.com/go-fed/activity/streams/vocab" "strings" ) // Indicates that the actor likes, recommends or endorses the object. The target // and origin typically have no defined meaning. // // Example 22 (https://www.w3.org/TR/activitys...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: rpcproto/manager_service.proto // Copyright (c) 2018 Donovan Solms / MiningHQ. Licensed under the MIT license. // See LICENSE in the root of this repository for details. package rpcproto import ( fmt "fmt" proto "github.com/golang/protobuf/proto" context...
package server import ( "github.com/pojol/gobot/database" "github.com/pojol/gobot/factory" ) type Response struct { Code int Msg string Body interface{} } // file.list type behaviorInfo struct { Name string Update int64 Status string Tags []string Desc string } type BehaviorListRes struct { Bots [...
// Copyright 2019 the orbs-network-go authors // This file is part of the orbs-network-go library in the Orbs project. // // This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. // The above notice should be included in all copies or substantial portion...
// 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 elasticloadbalancing import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Resource Type definition for AW...
package slack import ( "encoding/json" "errors" ) // Block Objects are also known as Composition Objects // // For more information: https://api.slack.com/reference/messaging/composition-objects // BlockObject defines an interface that all block object types should // implement. // @TODO: Is this interface needed?...
package cmd import ( "os" "strings" "github.com/spf13/cobra" ) // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ Use: "awsup", Short: "awsup is a transpiler for authoring AWS CloudFormation templates", Long: longAppDescription, } func Execute() { if e...
package config // DBCfg cfg for database connect type DBCfg struct { Address string `json:"address"` User string `json:"user"` Password string `json:"password"` Database string `json:"database"` } // ChainCfg cfg for chain connect type ChainCfg struct { Host string `json:"host"` Port int `json:"port"` }...
// SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org> // // SPDX-License-Identifier: Apache-2.0 package endpoint import ( "context" "sync" epapi "github.com/onosproject/onos-api/go/onos/e2sub/endpoint" "github.com/onosproject/onos-e2sub/pkg/store/endpoint" "github.com/onos...
package decredmaterial import ( "gioui.org/layout" "gioui.org/unit" "gioui.org/widget" ) type ClickableList struct { layout.List theme *Theme clickables []*widget.Clickable selectedItem int DividerHeight unit.Value } func (t *Theme) NewClickableList(axis layout.Axis) *ClickableList { return &Cli...
// Code generated by go-swagger; DO NOT EDIT. // Copyright 2017-2020 Authors of Cilium // SPDX-License-Identifier: Apache-2.0 package admissionregistration_v1 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "ne...
// Copyright 2019-present Facebook // // 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 ...
package smd import ( "errors" "fmt" "log" "math" "os" "time" "github.com/gonum/floats" "github.com/gonum/matrix/mat64" ) // TransferType defines the type of Lambert transfer type TransferType uint8 // Longway returns whether or not this is the long way. func (t TransferType) Longway() bool { switch t { ca...
// Copyright (c) 2017 Marc René Arns. All rights reserved. // Use of this source code is governed by a MIT // license that can be found in the LICENSE file. /* Package smfreader provides a reader of Standard MIDI Files (SMF). Usage import ( "gitlab.com/gomidi/midi/smf/smfreader" . "gitlab.com/gomidi/midi/midime...
// Package openapi3gen generates OpenAPIv3 JSON schemas from Go types. package openapi3gen import ( "encoding/json" "math" "reflect" "strings" "time" "github.com/getkin/kin-openapi/jsoninfo" "github.com/getkin/kin-openapi/openapi3" ) // CycleError indicates that a type graph has one or more possible cycles. t...
// Copyright (c) 2015-2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package ffldb import ( "bytes" "encoding/binary" "fmt" "os" "path/filepath" "runtime" "sort" "sync" "github.com/pkt-cash/pktd/btcutil/er" "github.com/pkt-cas...
package types import ( clienttypes "github.com/cosmos/ibc-go/modules/core/02-client/types" "github.com/cosmos/ibc-go/modules/core/exported" ) var _ exported.Header = (*Header)(nil) func (h *Header) ClientType() string { return ClientType } func (h *Header) GetHeight() exported.Height { return clienttypes.Height...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: steammessages_unified_base.steamclient.proto package unified import ( fmt "fmt" proto "github.com/golang/protobuf/proto" protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor" math "math" ) // Reference imports to suppress errors if they are not...
package stats import ( "regexp" ) var wordRegex = regexp.MustCompile("[A-Za-z0-9_']+") var sentenceRegex = regexp.MustCompile("[ \t\r\n\v\f]*[.?!]+[ \t\r\n\v\f]*") var endingRegex = regexp.MustCompile("([^laeiouy]es|ed|[^laeoiuy]e)$") var staringYRegex = regexp.MustCompile("^y") var vowelRegex = regexp.MustCompile...
/* * 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 ...
package QueryType type QueryType uint16 var ( UNKNOWN QueryType = 0 A QueryType = 1 ) func QueryTypeToInt(QT QueryType) uint16 { if QT == A { return 1 } return uint16(UNKNOWN) } func IntToQueryType(Int uint16) QueryType { if Int == 1 { return A } return UNKNOWN }
package trade import ( "net/url" "github.com/bububa/opentaobao/model" ) /* 生服购后预约单外部发起变更 APIRequest taobao.life.reservation.item.order.change 生服购后预约单外部发起变更,例如改期、取消。目前体检场景,用户会直接联系ISV改期/取消,因此开放给ISV这块的能力 */ type TaobaoLifeReservationItemOrderChangeRequest struct { model.Params // 淘宝主单号 tradeNo ...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package v20210601preview import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type PrivateEndpointConnection st...
// Copyright 2020-2022 Buf Technologies, 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...
package structpbenc_test import ( "fmt" "testing" structpb "github.com/karantin2020/structpbenc" "github.com/stretchr/testify/assert" pb "google.golang.org/protobuf/types/known/structpb" ) func ExampleDecode() { src := &pb.Struct{ Fields: map[string]*pb.Value{ "null": {Kind: &pb.Value_NullValue{}}, "...
package transfer import ( "testing" "github.com/github/git-lfs/config" "github.com/stretchr/testify/assert" ) func TestCustomTransferBasicConfig(t *testing.T) { path := "/path/to/binary" cfg := config.NewFrom(config.Values{ Git: map[string]string{"lfs.customtransfer.testsimple.path": path}, }) m := Configu...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package metadata import ( "fmt" "runtime" common "github.com/hyperledger/fabric/common/metadata" ) // package-scoped variables // Package version var Version string = common.Version // package-scoped constants // Program name ...
package gform import ( "github.com/Kethsar/w32" ) type ProgressBar struct { W32Control } func NewProgressBar(parent Controller) *ProgressBar { pb := new(ProgressBar) pb.init(parent) pb.SetSize(200, 25) return pb } func (this *ProgressBar) init(parent Controller) { this.W32Control.init(...
/* * Copyright 2020 The Yorkie Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
/* Copyright 2020 The Flux CD 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 Unless required by applicable law or agreed to in writing...
/* Copyright 2017 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
package definition type Rule struct { Key string `json:"key" yaml:"key"` Value Value `json:"value" yaml:"value"` Length Length `json:"length" yaml:"length"` Generator *Generator `json:"generator" yaml:"generator"` Use *Use `json:"use" yaml:"use"` }
package messenger import ( "reflect" "testing" "time" ) func Test_parseSetTimeCommand(t *testing.T) { loc, err := time.LoadLocation("UTC") if err != nil { t.Fatal(err) } tests := []struct { name string msg string want time.Time wantErr bool }{ {"basic", "14:00", time.Date(0, 1, 1, 14, 0...
// Copyright 2016 The Linux 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 applicable law or agre...
package migrations import ( "context" "database/sql" "github.com/operator-framework/operator-registry/pkg/registry" ) const AssociateApisWithBundleMigrationKey = 6 // Register this migration func init() { registerMigration(AssociateApisWithBundleMigrationKey, bundleApiMigration) } // This migration moves the l...
package actions import ( "context" "fmt" "math" "net/http" "net/url" "testing" "github.com/go-chi/chi" "github.com/benjaminchencobinhood/stellar/services/horizon/internal/ledger" "github.com/benjaminchencobinhood/stellar/services/horizon/internal/test" "github.com/benjaminchencobinhood/stellar/services/hori...
// 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 2022 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 w...
package main import "fmt" func main() { var number float64 fmt.Print("Enter any decimal point number: ") fmt.Scan(&number) fmt.Print("Truncated form:") print(int64(number)) }
package outscale import "github.com/blushft/go-diagrams/diagram" type storageContainer struct { path string opts []diagram.NodeOption } var Storage = &storageContainer{ opts: diagram.OptionSet{diagram.Provider("outscale"), diagram.NodeShape("none")}, path: "assets/outscale/storage", } func (c *storageContainer)...
// Code generated by counterfeiter. DO NOT EDIT. package operationsfakes import ( "net/http" "sync" ) type FakeHttpClient struct { DoStub func(*http.Request) (*http.Response, error) doMutex sync.RWMutex doArgsForCall []struct { arg1 *http.Request } doReturns struct { result1 *http.Response r...
// Copyright 2019 Yunion // // 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...
// // Last.Backend LLC CONFIDENTIAL // __________________ // // [2014] - [2019] Last.Backend LLC // All Rights Reserved. // // NOTICE: All information contained herein is, and remains // the property of Last.Backend LLC and its suppliers, // if any. The intellectual and technical concepts contained // herein are prop...
package snapshot import ( "os" "testing" "github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1" menv "github.com/openebs/maya/pkg/env/v1alpha1" v1_storage "k8s.io/api/storage/v1" ) func TestGetCreateCASTemplate(t *testing.T) { sc := &v1_storage.StorageClass{} sc.Annotations = make(map[string]string) tests :=...
package clusterf import ( "fmt" "github.com/qmsk/clusterf/config" "github.com/qmsk/clusterf/ipvs" "net" "syscall" ) type Dest struct { ipvs.Dest } func configServiceBackend(ipvsService ipvs.Service, backend config.ServiceBackend, routes Routes, options IPVSOptions) (*ipvs.Dest, error) { ipvsDest := ipvs.Dest{...
package sentry import ( "testing" "github.com/stretchr/testify/assert" ) func ExampleMessage() { cl := NewClient() cl.Capture( // You can either use just a simple message Message("this is a simple message"), ) cl.Capture( // Or you can provide formatting entries as you would with // fmt.Sprintf() cal...
// 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...
package morse // alphaNumToMorse is a mapping of Alpha numeric characters to Morse code var alphaNumToMorse = map[string]string{ "A": ".-", "B": "-...", "C": "-.-.", "D": "-..", "E": ".", "F": "..-.", "G": "--.", "H": "....", "I": "..", "J": ".---", "K": "-.-", "L": ".-..", "M": "--", "N": ...
// Copyright 2015 CoreOS, 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...
package vra import ( "testing" "github.com/johandry/log" "github.com/kraken/ui" "github.com/liferaft/kubekit/pkg/provisioner/config" "github.com/stretchr/testify/assert" ) var ( tUI = ui.New(false, log.NewDefault()) version = "1.0" ) func TestNew(t *testing.T) { type args struct { envConfig map[string...
package main import ( "fmt" "github.com/AllenDang/simhash" ) func main() { s1 := "Golang - mapping an variable length array to a string" s2 := "Golang - mapping an variable length array to a struct" likeness := simhash.GetLikenessValue(s1, s2) fmt.Println("Likeness:", likeness) }
/* Copyright © 2020 Amazon.com, Inc. or its affiliates. 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 applic...
package network type Iagent interface { NewIagent() Iagent // 拷贝构造器 Close() // 关闭 Start(Iconn) // 启动 GetUserData() interface{} // 获取用户数据 SetUserData(data interface{}) // 设置用户数据 }
package oauth2 import ( "errors" "io/ioutil" "net/http" "net/url" "reflect" "strconv" "strings" "testing" phttp "github.com/coreos/go-oidc/http" ) func TestResponseTypesEqual(t *testing.T) { tests := []struct { r1, r2 string want bool }{ {"code", "code", true}, {"id_token", "code", false}, {"c...
// Copyright 2016 the Go-FUSE 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 fuse import ( "fmt" "log" "math" "os" "path" "path/filepath" "runtime" "strconv" "strings" "sync" "syscall" "time" "unsafe" ) const ...
package tachart import ( "fmt" "strings" "github.com/sosnovski/go-tachart/charts" "github.com/sosnovski/go-tachart/opts" ) type line struct { nms []string valsArr [][]float64 nc int ci int dp int } func NewLine(name string, vals []float64) Indicator { return &line{ nms: []string{n...
package jobs import ( "bytes" "html/template" "net/http" "net/http/httptest" "reflect" "testing" "time" _ "embed" "github.com/dghubble/go-twitter/twitter" "github.com/xarantolus/spacex-hop-bot/scrapers" "github.com/xarantolus/spacex-hop-bot/util" ) type TestTweetingClient struct { tweetedTweetText stri...
/* Copyright (c) 2019 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
// Licensed to Elasticsearch B.V. under one or more agreements. // Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. // Code generated from specification version 7.4.1: DO NOT EDIT package esapi import ( "context" "net/http"...
//Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. //Licensed under the Universal Permissive License (UPL) Version 1.0 as shown at http://oss.oracle.com/licenses/upl. package command import ( "testing" "github.com/teramoby/speedle-plus/api/pms" "github.com/teramoby/speedle-plus/testutil" "g...
/* Copyright 2019 The CloudDB 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 writ...
package onvif import ( "github.com/golang/glog" "strings" ) var deviceXMLNs = []string{ `xmlns:tds="http://www.onvif.org/ver10/device/wsdl"`, `xmlns:tt="http://www.onvif.org/ver10/schema"`, } // GetInformation fetch information of ONVIF camera func (device Device) GetInformation() (DeviceInformation, error) { /...
// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package erc20 import ( "errors" "math/big" "strings" ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.c...
package cmd import ( "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "httpreq", Short: "Make HTTP requests to JSON APIs using YAML and JSON", Long: `Make HTTP requests to APIs that expect JSON inputs using a YAML configuration. The payload should be written as a multiline string.`, } // Execute ....
/******************************************************************************* * Copyright 2018 Dell 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/licen...
package main import ( "encoding/json" "fmt" "log" "../../graphql/cards" "github.com/graphql-go/graphql" ) func main() { // grab our schema schema, err := cards.Setup() if err != nil { panic(err) } // Query query := ` { cards(value: "A"){ value suit } } ` params := graphql.Params{Sch...
// Copyright 2021 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 ...
/* * Live * * 直播服务源站所有接口 * */ package model import ( "encoding/json" "strings" ) // Request Object type DeleteTranscodingsTemplateRequest struct { Domain string `json:"domain"` AppName string `json:"app_name"` } func (o DeleteTranscodingsTemplateRequest) String() string { data, _ := json.Marshal(o) ret...
// Copyright 2017 The Grafeas Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
// NOTE: THIS API IS UNSTABLE RIGHT NOW AND WILL GO MOSTLY PRIVATE SOON. package neutrino import ( "bytes" "container/list" "fmt" "math" "math/big" "sync" "sync/atomic" "time" "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.c...
package consent import ( "context" "net/http" "net/url" "strconv" "strings" "sync" "time" "github.com/driver005/oauth/config" "github.com/ory/x/errorsx" "github.com/ory/x/sqlcon" "github.com/gorilla/sessions" "github.com/pborman/uuid" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com...
package testhelpers import ( "fmt" "math/rand" "sort" "time" log "github.com/sirupsen/logrus" "github.com/apache/thrift/lib/go/thrift" "github.com/twitter/scoot/common/dialer" "github.com/twitter/scoot/scheduler/api/thrift/gen-go/scoot" "github.com/twitter/scoot/scheduler/client" ) // Creates a CloudScootC...
// Copyright 2014 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. // Issue 8148. A typedef of an unnamed struct didn't work when used // with an exported Go function. No runtime test; just make sure it // compiles. package ...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package v1 import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Specifies the audit configuration for a service. The configuration de...
/* Copyright (c) 2020 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
// *** 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 streamanalytics import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure" "github.com/pulumi/pulumi/sd...
// 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...
// Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Code generated file. DO NOT EDIT. // Package logging provides access to the Stackdriver Logging API. // // This package is DEPRECATED. Use package cloud.google.com/go/logging instea...
package cmd import ( "errors" "fmt" "os" "sptlrx/cookie" "github.com/muesli/coral" ) var clearCmd = &coral.Command{ Use: "clear", Short: "Clear saved cookie", RunE: func(cmd *coral.Command, args []string) error { err := cookie.Clear() if err == nil { fmt.Println("Cookie have been cleared.") } els...
// Copyright 2019 Yunion // // 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 cmd import ( "apim-rest-client/comm" "apim-rest-client/constants" "apim-rest-client/dcr" "apim-rest-client/persist" "apim-rest-client/token" "bytes" "flag" "fmt" "io/ioutil" "net/http" "os" ) type APIOptions struct { API string Method string Resource string Headers *FlagMap ...
package websocket import ( "encoding/json" "time" "github.com/peterzernia/lets-fork/utils" ) func setParty(p Party) error { rdb := utils.GetRDB() jsn, err := json.Marshal(p) if err != nil { return err } rdb.Set("party:"+*p.ID, string(jsn), time.Hour) if err != nil { return err } return nil } func g...
package client type message struct { name string signature string types []*typ } type typ struct { name string version int methods []message events []message } var displayMeta = &typ{ name: "wl_display", version: 1, methods: []message{ {"sync", "n", []*typ{callbackMeta}}, {"get_registry", "...
package analysis import ( "io/ioutil" "strconv" "testing" "github.com/bradleyjkemp/cupaloy" "github.com/john-nguyen09/phpintel/internal/lsp/protocol" "github.com/stretchr/testify/assert" ) func TestNestedArgumentList(t *testing.T) { data, err := ioutil.ReadFile("../cases/nestedArgs.php") if err != nil { pa...
package pkg import ( _context "context" "github.com/wondenge/go-fineract/pkg/models" _ioutil "io/ioutil" _nethttp "net/http" _neturl "net/url" ) // Linger please var ( _ _context.Context ) // SelfSpmApiService SelfSpmApi service type SelfSpmApiService service /* FetchAllSurveys Method for FetchAllSurveys * @...