text
stringlengths
3.08k
10.4k
package main import ( "bufio" "flag" "fmt" "github.com/z-ken/media-proxy-server/udp" "io" "log" "net" "net/url" "os" "strconv" "strings" ) func handleFrontendInbound(conn net.Conn, inBoundChannel chan string, outBoundChannel chan string, mappedAddrChannel chan []string) { defer conn.Close() bufferRead...
package trial import ( "fmt" "reflect" "runtime/debug" "strings" "testing" ) var localTest = false type ( // TestFunc a wrapper function used to setup the method being tested. TestFunc func(args ...interface{}) (result interface{}, err error) // CompareFunc compares actual and expected to determine equality...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package metadata import ( "fmt" "os" "strconv" "github.com/docker/infrakit/cmd/infrakit/base" "github.com/docker/infrakit/pkg/cli" "github.com/docker/infrakit/pkg/discovery" logutil "github.com/docker/infrakit/pkg/log" "github.com/docker/infrakit/pkg/rpc/client" metadata_rpc "github.com/docker/infrakit/pkg/r...
package main import ( _ "bufio" "encoding/json" "fmt" "github.com/gorilla/mux" "github.com/twinj/uuid" "io" "io/ioutil" "net/http" "os" "text/template" "strconv" ) type Move struct { // A Move is just a coordinate but if it has the special value (-1, -1) // it represents a skipped move X int Y int } ty...
// Copyright 2022 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 stdlib import ( "fmt" "path/filepath" "github.com/go-git/go-billy/v5/osfs" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/config" "g...
package web import ( "io" "net" "time" "github.com/gorilla/websocket" ) // WSConn describes a websocket connection. type WSConn struct { c *websocket.Conn } // Subprotocol returns the negotiated protocol for the connection. func (c *WSConn) Subprotocol() string { return c.c.Subprotocol() } // Close closes th...
package e2e import ( "context" "flag" "os" "testing" "time" config "github.com/openshift/api/config/v1" imageClient "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" "github.com/openshift/library-go/pkg/image/imageutil" "github.com/pkg/errors" core "k8s.io/api/core/v1" meta "k8s.io/...
/* SPDX-License-Identifier: Apache-2.0 Copyright Contributors to the Submariner 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 http://www.apache.org/licenses/LICENSE-2.0 Unless requ...
package client import ( "context" "crypto/tls" "time" "github.com/ehazlett/stellar" applicationapi "github.com/ehazlett/stellar/api/services/application/v1" clusterapi "github.com/ehazlett/stellar/api/services/cluster/v1" datastoreapi "github.com/ehazlett/stellar/api/services/datastore/v1" eventsapi "github.c...
// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Lice...
package marvel import ( "fmt" "net/http" "time" "github.com/dghubble/sling" ) // StoryService provides methods for querying story information from the API. type StoryService struct { sling *sling.Sling } // NewStoryService returns a new StoryService. func NewStoryService(sling *sling.Sling) *StoryService { re...
// SPDX-License-Identifier: Apache-2.0 // Copyright 2020 Intel Corporation package main import ( "net/http" log "github.com/sirupsen/logrus" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) func getPctiles() []float64 { return []float64{50, 75, 90, 9...
package check_cert import ( "crypto/x509" "errors" "fmt" "time" "github.com/appscode/go/flags" "github.com/appscode/kutil/tools/clientcmd" "github.com/appscode/searchlight/pkg/icinga" "github.com/appscode/searchlight/plugins" "github.com/spf13/cobra" core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pk...
package models import ( "github.com/jinzhu/gorm" "math" "soulfire/pkg/db" "soulfire/utils" "time" ) type Activity struct { Model Title string `json:"title" gorm:"column:title;not null"` Intro string `json:"intro" gorm:"column:intro;not null"` Thumb string `json:"thum...
/* * Copyright (c) 2019. * * Metaprov.com */ package v1alpha1 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) /// BucketName conditions type ReviewConditionType string /// BucketName Condition const ( ReviewReady ReviewConditionType = "Ready" ReviewSaved ReviewConditionType ...
// +build small // Copyright 2018 The WPT Dashboard Project. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package monitor import ( "sync" "testing" "time" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "gith...
/* Copyright 2019 The Jetstack cert-manager 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...
package main // "import github.com/lodastack/registry" import ( "flag" "fmt" "io/ioutil" "os" "os/signal" "strconv" "syscall" "time" "github.com/lodastack/log" "github.com/lodastack/registry/config" "github.com/lodastack/registry/dns" "github.com/lodastack/registry/httpd" "github.com/lodastack/registry/m...
/* MIT License Copyright (c) 2019 <NAME> 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, publish, distri...
package main import ( "encoding/json" "fmt" "html/template" "log" "math" "net/http" "os" "strings" "sync" "github.com/stratoberry/go-gpsd" ) var templates = template.Must(template.ParseFiles("templates/home.html")) func renderTemplate(w http.ResponseWriter, tmpl string) { err := templates.ExecuteTemplate...
package knnc import ( "math" "reflect" "sync" "github.com/crunchypi/ddrop/pkg/mathx" ) /* File contains code for a 'SearchSpace' type, which will be the core keeper of DistancerContainer (interface in this pkg). The intent for this SearchSpace T is to be scannable in a concurrent context. */ // SearchSpace is a...
package site import ( "encoding/json" "fmt" "net/http" "regexp" "time" "github.com/tidwall/buntdb" "golang.org/x/crypto/bcrypt" "xelf.org/daql/ses" ) type UserData struct { Name string Pass string Admin bool Created time.Time Last time.Time } type BuntUserStore struct { *buntdb.DB } func (...
package zero import ( "bytes" "fmt" "reflect" "testing" ) type TestDetailParam struct { ID int } type TestDetailSubStructure struct { ID int Params []TestDetailParam } type TestDetail struct { ID int Detail Detail Data TestDetailSubStructure } type Detail interface{} func TestZero(t *testing.T...
package utils import ( "context" "time" "github.com/flyteorg/flytestdlib/logger" "github.com/flyteorg/flytestdlib/promutils" lru "github.com/hashicorp/golang-lru" "github.com/prometheus/client_golang/prometheus" "k8s.io/apimachinery/pkg/util/wait" ) //go:generate mockery -all -case=underscore // AutoRefreshC...
package image import ( "bytes" "errors" "fmt" "image" "io/ioutil" "optimus/backend/config" "optimus/backend/jpeg" "optimus/backend/png" "optimus/backend/webp" "os" "path" "path/filepath" "github.com/disintegration/imaging" "github.com/muesli/smartcrop" "github.com/muesli/smartcrop/nfnt" "github.com/wa...
// Copyright (c) 2018 The MATRIX Authors // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php package blkreward import ( "math/big" "reflect" "testing" "github.com/MatrixAINetwork/go-matrix/core/matrixstate" "github.com/MatrixAI...
// Copyright (c) 2019 <NAME> // // 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, publish, distri...
package goml import ( "fmt" "math" "math/rand" ) func Rand (a float64, b float64) float64{ return (b-a) * rand.Float64() + a } func Sigmoid (x float64) float64 { return math.Tanh(x) } func Dsigmoid(y float64) float64{ return 1.0 - math.Pow(y, 2) } func Fill (a []float64, val float64){ for i, _ := range ...
package main import ( "flag" "fmt" "log" "os" "os/signal" "runtime/pprof" "strconv" "strings" "sync" cp "tisql/components" "tisql/message" "tisql/model" tidbTools "tisql/utils" "github.com/Shopify/sarama" "github.com/golang/protobuf/proto" ) var ( brokerList = flag.String("brokers", os.Getenv("KAFKA_...
package main import ( "archive/zip" "context" "fmt" "io" "io/fs" "mime/multipart" "net/http" "os" "path" "path/filepath" "runtime" "strings" "time" "github.com/pgaskin/kepubify/v4/kepub" ) const UPLOAD_PATH_WINDOWS = "D:\\" const UPLOAD_PATH_KOBO = "/mnt/onboar...
/* * * 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 request import ( "bytes" "context" "fmt" "io" "io/ioutil" "net/http" "net/url" "time" "github.com/PlanckProject/go-commons/constants" "github.com/PlanckProject/go-commons/logger" "go.uber.org/multierr" ) type httpRequest struct { request *http.Request timeout time.Duration payload []byte heade...
package main import ( "bytes" "context" _ "embed" "encoding/base64" "encoding/json" "fmt" "image/png" "net/http" "regexp" "strconv" "time" "github.com/fiatjaf/hashbow" "github.com/fogleman/gg" "github.com/golang/freetype/truetype" "github.com/itchyny/gojq" "github.com/yudai/gojsondiff" ) //go:embed s...
package niller import ( "errors" "go/ast" "go/token" "go/types" "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/inspect" "golang.org/x/tools/go/ast/inspector" ) const doc = "niller (nil + killer) is a static analysis tool that warns dangerous statement involving nil." // Analyzer is .....
package cmd import ( "crypto/rand" "encoding/json" "errors" "io/ioutil" "os" "time" mesh "github.com/AJGherardi/GoMeshController" "github.com/AJGherardi/HomeHub/model" ) // Network holds all needed data for the operation of the mesh network type Network struct { Store *model.Store Controller ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/filter/listener/http_inspector/v2/http_inspector.proto package envoy_config_filter_listener_http_inspector_v2 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" proto "github.com/golang/protobuf/proto" math "math" ) // Referenc...
// Package collectionfinder parses the Magic The Gathering: Logs, returning user decks. package collectionfinder import ( "bufio" "encoding/json" "fmt" "io" "strconv" "strings" ) const playerCollectionMessage string = "[UnityCrossThreadLogger]<== PlayerInventory.GetPlayerCardsV3" const playerInventoryMessage st...
// Copyright 2020 Coinbase, 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 cookies ///////////////////// import ( "context" "encoding/base64" "encoding/json" "net/http" "time" "github.com/bjorge/friendlyreservations/config" "github.com/bjorge/friendlyreservations/logger" "github.com/gorilla/securecookie" ) type contextKey string // WriterKey is used for writing to cookies...
package expert import ( "errors" "fmt" "math" "time" ) type SymbolInfo struct { Expert *ExpertAdvisorCrypto SymbolName string Lot float64 Synthetic bool BaseAsset *Asset ProfAsset *Asset MinLot float64 MinNotional float64 LotStep float64 } func NewSymbol(expert *ExpertAdviso...
package keeper_test import ( "testing" testkeeper "github.com/tendermint/spn/testutil/keeper" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/stretchr/testify/require" "github.com/tendermint/spn...
// +build !windows package shim import ( "context" "encoding/json" "fmt" "io" "path/filepath" "sync" "syscall" "time" "golang.org/x/sys/unix" "github.com/containerd/console" "github.com/containerd/containerd/identifiers" shimapi "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/fi...
package parse import ( "fmt" "strconv" "strings" "time" "github.com/ctberthiaume/cruisemic/geo" "github.com/ctberthiaume/tsdata" ) // SallyRideParser is a parser for Sally Ride underway feed lines. type SallyRideParser struct { FeedCollection Throttle GeoThermDef } // NewSallyRideParser returns a pointer t...
package http import ( "encoding/json" "log" "net/http" "strings" "github.com/XieXianbin/msg-provider/config" "github.com/XieXianbin/msg-provider/sms/alidayu" "github.com/XieXianbin/msg-provider/sms/aliyun" "github.com/XieXianbin/msg-provider/smtp" "github.com/XieXianbin/msg-provider/wechat/mp/core" "github....
package kyberdao import ( "fmt" "math/big" "strconv" "strings" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/spf13/cobra" "github.com/tranvictor/ethutils" "github.com/tranvictor/jarvis/config" "github.com/tranvictor/jarvis/util" ) func PrintENV() { fmt.Printf("--ENV--------------------------...
package framework import ( "fmt" "log" "time" ) // AutopeeredNetwork is a network consisting out of autopeered nodes. // It contains additionally an entry node. type AutopeeredNetwork struct { *Network // The partitions of which this network is made up of. partitions []*Partition } // AwaitPeering waits until ...
/* Package oplog provides an HTTP Server-Sent Events (SSE) endpoint for real-time replication of the BlobStore. */ package oplog // import "a4.io/blobstash/pkg/oplog" import ( "context" "fmt" "net/http" "sync" "time" "a4.io/blobstash/pkg/blob" "a4.io/blobstash/pkg/config" "a4.io/blobstash/pkg/hub" "github...
package api import ( "fmt" "pandax/apps/resource/entity" "pandax/apps/resource/services" "pandax/base/biz" "pandax/base/ctx" "pandax/base/ginx" "pandax/base/oss" "pandax/base/utils" "time" ) /** * @Description 添加qq群467890197 交流学习 * @Author 熊猫 * @Date 2022/1/13 15:19 **/ type ResOssesApi struct { ResOss...
package manager import ( "fmt" cfn "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/pkg/errors" api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5" iamoidc "github.com/weaveworks/eksctl/pkg/iam/oidc" "github.com/weaveworks/eksctl/pkg/kubernetes" "github.com/weaveworks/eksctl/pkg/spot" ...
// 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 platformclientv2 import ( "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" ) // Createcallrequest type Createcallrequest struct { // PhoneNumber - The phone number to dial. PhoneNumber *string `json:"phoneNumber,omitempty"` // CallerId - The caller id phone number for this outbound ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: hana_sql_exporter.proto package internal 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 ...
package inventoryd import ( "context" "errors" "fmt" "log" "net" ) // lwm2mBootstrap : ブートストラップの管理 type lwm2mBootstrap struct { finishNotify chan int connection *Coap definitions lwm2mObjectDefinitions handler Lwm2mHandler } // Bootstrap : Bootstrap Operation func (lwm2m *lwm2mBootstrap) Bootstrap( ...
package main import ( "fmt" "gioui.org/app" "gioui.org/f32" "gioui.org/font/gofont" "gioui.org/io/system" "gioui.org/layout" "gioui.org/op" "gioui.org/op/paint" "gioui.org/text" "gioui.org/unit" "gioui.org/widget" "gioui.org/widget/material" "github.com/PaesslerAG/gval" "github.com/w-ingsolutions/c/pkg/l...
// Copyright 2016 Netflix, 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 main import ( "errors" "log" "net/http" "net/url" "os" "strconv" "github.com/joho/godotenv" "github.com/linkpoolio/bridges/bridge" ) func init() { godotenv.Load() } // Scorechain is the Scorechain Ethereum API type Scorechain struct { url *url.URL token string } // Opts is the options for the ...
/* * TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available. * Copyright (C) 2017-2021 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. * Yo...
package main import ( "crypto/tls" "errors" "fmt" "io/ioutil" "net/http" "runtime" "time" "github.com/gin-gonic/gin" loghook "github.com/maximecaruchet/logrus-ovh-hook" "github.com/ovh/tat" log "github.com/sirupsen/logrus" "github.com/spf13/viper" userDB "github.com/ovh/tat/api/user" ) // PreCheckUser ...
package odoo import ( "fmt" ) // AccountAnalyticLine represents account.analytic.line model. type AccountAnalyticLine struct { LastUpdate *Time `xmlrpc:"__last_update,omptempty"` AccountId *Many2One `xmlrpc:"account_id,omptempty"` Amount *Float `xmlrpc:"amount,ompte...
// 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...
// +build !race package main import ( "fmt" "github.com/Templum/rabbitmq-connector/pkg/config" "github.com/Templum/rabbitmq-connector/pkg/rabbitmq" "github.com/Templum/rabbitmq-connector/pkg/subscriber" "github.com/streadway/amqp" "log" "os" "sync" "testing" "time" ) var ( connector subscriber.Connec...
package app import ( "fmt" "sync" pluginapi "github.com/mattermost/mattermost-plugin-api" "github.com/mattermost/mattermost-plugin-playbooks/server/bot" "github.com/mattermost/mattermost-server/v6/model" "github.com/mitchellh/mapstructure" "github.com/pkg/errors" ) type channelActionServiceImpl struct { logg...
// Copyright 2016 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 to in ...
package main import ( "flag" "fmt" "github.com/livego/concurrent-map" "github.com/livego/configure" log "github.com/livego/logging" "github.com/livego/protocol/hls" "github.com/livego/protocol/httpflv" "github.com/livego/protocol/httpopera" "github.com/livego/protocol/rtmp" "github.com/livego/protocol/rtmp/r...
package private import ( "encoding/json" "io/ioutil" "vgproj/common/cluster" clusthdl "vgproj/vgrecharge/private/cluster" "vgproj/vgrecharge/private/http" "vgproj/vgrecharge/private/recharge" "vgproj/vgrecharge/public" logger "github.com/panlibin/vglog" "github.com/panlibin/virgo" "github.com/panlibin/virgo...
// Copyright (C) 2020, 2021, Oracle and/or its affiliates. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. package managed import ( "context" "encoding/base64" "math/rand" "github.com/verrazzano/pkg/diff" "github.com/verrazzano/verrazzano-operator/pkg/co...
package main import ( "flag" "os" "testing" componenttest "github.com/ONSdigital/dp-component-test" feature "github.com/ONSdigital/dp-frontend-area-profiles/features" "github.com/chromedp/cdproto/cdp" "github.com/chromedp/chromedp" "github.com/cucumber/godog" "github.com/cucumber/godog/colors" "github.com/s...
package main import ( "os" "strings" "time" "git.enexoma.de/r/smartcontrol/libraries/go-bluetooth.git/api" "git.enexoma.de/r/smartcontrol/libraries/go-bluetooth.git/emitter" "git.enexoma.de/r/smartcontrol/libraries/go-bluetooth.git/linux" log "github.com/sirupsen/logrus" ) var adapterID = "hci0" var dumpAddre...
// Copyright 2019 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any la...
package skelington import ( "bytes" "os" "path/filepath" "regexp" yaml "gopkg.in/yaml.v2" ) // A recursive structure used as a tool for exploring and creating handles. type Level struct { parent *Level depth int sequence *Sequence Tag string Leaf bool Relative bool Number int Percent fl...
/******************************************************************************* * Copyright 2020 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 dnsclub import ( "github.com/hugmouse/doRequest" "time" ) type URL int const ( Latest URL = iota Digest Review Blog Discussions ) var ClubURL = map[URL]string{ Latest: "https://club.dns-shop.ru/club-exp-api/v1/on-air/get-latest/", Digest: "https://club.dns-shop.ru/club-exp-api/...
package main import ( "flag" "fmt" "log" "net" "net/http" "os" "sort" "strings" "text/tabwriter" "time" "k8s.io/kubernetes/pkg/client/restclient" knet "k8s.io/kubernetes/pkg/util/net" "golang.org/x/net/context" "github.com/coreos/etcd/client" ) // borrowed from // https://github.com/openshift/origin/...
package eagle import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( averyBirthday = nook.Birthday{ Day: 22, Month...
package main import ( "fmt" "net/http" "strings" "regexp" "sync" "reflect" "github.com/mattermost/mattermost-server/v5/model" "github.com/mattermost/mattermost-server/v5/plugin" "github.com/pkg/errors" ) type configuration struct { Channel string AllowedUsers string ChannelNoUpdate string } // Clone ...
package child import ( "context" "errors" "fmt" "net/http" "path" "sort" "cloud.google.com/go/storage" "go.skia.org/infra/autoroll/go/revision" "go.skia.org/infra/go/gcs/gcsclient" "go.skia.org/infra/go/skerr" "go.skia.org/infra/go/sklog" "go.skia.org/infra/go/vfs" "google.golang.org/api/option" ) var (...
/* Copyright 2020 Docker Compose CLI authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
package codegen import ( "fmt" "go/types" "reflect" "go.mongodb.org/mongo-driver/bson/bsoncodec" "golang.org/x/tools/go/loader" ) type Strct struct { Name string Fields []Field StructImport string EmbeddedImports map[string]struct{} Skip bool } type Field struct { 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 writing, software distributed under the License ...
// Copyright (c) 2018 NEC Laboratories Europe GmbH. // // Authors: <NAME> <<EMAIL>> // <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.apach...
// @author dreamlu package routers import ( "dnovel/controllers" "dnovel/services" str2 "dnovel/util/cons" "github.com/dreamlu/gt/cache" "github.com/dreamlu/gt/tool/result" "github.com/dreamlu/gt/tool/util/cons" "github.com/gin-gonic/gin" "log" "net/http" "runtime/debug" "strings" ) const prefix = "" var...
package publish import ( "os" "sort" "strings" "path/filepath" "github.com/AlecAivazis/survey/v2" "github.com/deatil/lakego-filesystem/filesystem" "github.com/deatil/lakego-doak/lakego/color" "github.com/deatil/lakego-doak/lakego/publish" "github.com/deatil/lakego-doak/lakego/comm...
package main import ( "encoding/json" "io/ioutil" "log" "net/http" "strconv" "strings" "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/karriereat/dependinger/internal/pkg/database" ) type Dependency struct { ID string `json:"id"` ComponentA string `json:"componentA"` ComponentB...
package main import ( "bytes" "fmt" "os" "spf13/cobra" ) type spaceOptions struct { file string extend int pageState bool unused bool list bool } func newSpaceCommand() *cobra.Command { var options spaceOptions c := &cobra.Command{ Use: "space", Short: "show table space segment and e...
package circleci_mpsr import ( "encoding/xml" "testing" ) func TestProjectFields(t *testing.T) { p := Project{ Name: "bawigga/circleci-feed", Activity: "Sleeping", LastBuildStatus: "Success", LastBuildLabel: "525", LastBuildTime: "2015-02-10T08:30:00.800Z", NextBuildTime: "2015-0...
// // (C) Copyright 2020-2021 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // package common_test import ( "testing" "time" "github.com/daos-stack/daos/src/control/common" "github.com/google/go-cmp/cmp" ) func Test_Common_ParseTime(t *testing.T) { zone := func(hours int) *time.Location...
/* Package textinput implements prompt for a string input that can also be used for secret strings such as passwords. It also offers customizable appreance as well as optional support for input validation and a customizable key map. */ package textinput import ( "fmt" "io" "os" "text/template" tea "github.com/ch...
package main import ( "context" "flag" "os" "time" "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" "github.com/lightstep/lightstep-tracer-go" "github.com/opentracing/opentracing-go" zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing" "github.com/openzipkin/zipkin-go" zipkinhttp "gi...
// Code generated by go-swagger; DO NOT EDIT. package post_mortems // 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...
//A recursive solution is suitable for the types of problems that require you to //support your next result with the outcomes of previous invocations of your function. package challenges_test import ( "fmt" "testing" ) /** Encrypted Words You've devised a simple encryption method for alphabetic strings that shuffl...
package identity import ( "encoding/hex" "testing" "github.com/tendermint/tm-db" "github.com/Oneledger/protocol/storage" "github.com/stretchr/testify/assert" "github.com/Oneledger/protocol/data/chain" "github.com/Oneledger/protocol/data/keys" ) // test setup func setupEthWitnessStore() *WitnessStore { db ...
// Copyright 2016-2019 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 appli...
// Copyright 2017-21 the original author or 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 applicab...
package shuttle import ( "fmt" "time" "log" "github.com/heroku/slog" metrics "github.com/rcrowley/go-metrics" ) // Percentile info for histograms and the like. These 2 arrays need to match // length and positions are relevant to each other. var ( percentiles = []float64{0.75, 0.95, 0.99} percentileNames =...
package config import ( "context" "fmt" "time" bq "cloud.google.com/go/bigquery" "github.com/rs/zerolog/log" "golang.org/x/xerrors" "google.golang.org/api/option" ) type Config struct { Project []Project } type Project struct { ID string Dataset []Dataset } type Dataset struct { ID string ...
package neotransaction import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "encoding/hex" "errors" "math/big" "strings" "github.com/x-contract/neo-go-sdk/neoutils" ) // KeyPair 包含一对ECC加密算法的公私钥对 // 继承了ecdsa.PrivateKey type KeyPair struct { ecdsa.PrivateKey } // HasPrivKey 判断一个KeyPair是否包含私钥,可以用于签名 func (...
package audioio import( "fmt" "errors" "os" "github.com/go-audio/aiff" "github.com/go-audio/audio" ) type AiffReader struct { AudioFile ReadBuffer *audio.IntBuffer NumSampleFrames int Duration float64 decoder *aiff.Decoder fileIo *os.File } type AiffWriter struct { AudioFile WriteBuffer *au...
/* Copyright 2021 CodeNotary, 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 law or agreed to i...
/* * Copyright (c) 2018 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 mime import ( "bytes" "fmt" "io" "io/ioutil" "os" . "github.com/badu/http/hdr" ) // ReadForm parses an entire multipart message whose p...