text
stringlengths
3.08k
10.4k
// Package serializer helps GoLang Developers to serialize any custom type to []byte or string. // Your custom serializers are finally, organised. // // Built'n supported serializers: JSON, JSONP, XML, Markdown, Text, Binary Data. // // This package is already used by Iris & Q Web Frameworks. package serializer import...
// Copyright 2018 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package rspace import ( "bytes" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "strconv" "strings" "time" ) // ClientEx abstracts out the http.Client Do() method into an interface // for decorating with resilience patterhs type ClientEx interface { //Do follows the same contract as http.Client.Do() ...
// based on https://github.com/havoc-io/ssh_config // Copyright 2020 The Okteto 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 // /...
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
/* Copyright 2016 All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
package config import ( "fmt" "sync" "github.com/number571/go-peer/cmd/hls/utils" "github.com/number571/go-peer/crypto" ) var ( _ IConfig = &sConfig{} _ iF2F = &sF2F{} _ iOnlineChecker = &sOnlineChecker{} _ iAddress = &sAddress{} _ iBlock = &sBlock{} ) type sConfig struct { ...
/* 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, ...
package integration import ( "fmt" "io/ioutil" "os" "path/filepath" "regexp" "strings" "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/openshift/odo/tests/helper" ) const ( CI_OPERATOR_HUB_PROJECT = "ci-operator-hub-project" ) var _ = Describe("odo service command tests for Opera...
package scanservice import ( "data" "dbservice" "fmt" "layout" "log" "plugins" "settings" "strings" "time" ) type ScanService struct { scanInfo *data.ScanImageInfo prevScan *data.ScanImageInfo isNew bool } func (scan *ScanService) ResultHandling(input string, plugins map[string]plugins.Plugin) { if e...
package main import ( "bufio" "bytes" "context" "flag" "fmt" "os" "os/exec" "regexp" "strings" "sync" "time" "github.com/creack/pty" ) var COMMAND Command func init() { flag.StringVar(&COMMAND.command, "command", "", "full commmand to run") flag.DurationVar(&COMMAND.timeoutDuration, "timeout-duration"...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package iot 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" ) type CreateProvisioningTemplateVersionInput struct { _ struct{} `type:"structu...
package wms130 import ( "encoding/xml" "net/url" "testing" "github.com/pdok/ogc-specifications/pkg/ows" ) func TestGetCapabilitiesType(t *testing.T) { dft := GetCapabilities{} if dft.Type() != `GetCapabilities` { t.Errorf("test: %d, expected: %s,\n got: %s", 0, `GetCapabilities`, dft.Type()) } } func TestP...
package controller import ( "fmt" "time" "github.com/golang/glog" clientset "github.com/solarwinds/appoptics-kubernetes-controller/pkg/client/clientset/versioned" "github.com/solarwinds/appoptics-kubernetes-controller/pkg/client/clientset/versioned/scheme" aoscheme "github.com/solarwinds/appoptics-kubernetes-co...
// Copyright (c) 2014 The SkyDNS Authors. All rights reserved. // Use of this source code is governed by The MIT License (MIT) that can be // found in the LICENSE file. package server import ( "fmt" "net" "os" "strings" "time" "github.com/miekg/dns" ) const ( SCacheCapacity = 10000 RCacheCapacity = 100000 ...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package gamelift import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Represents the input for a request action. type CreateVpcPeeringAuthorizationInput struct { _ struct{} `type:"structure...
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package gjson import ( "fmt" "github.com/gogf/gf/v2/contain...
// Copyright 2020 CUE 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 ...
/* Copyright 2016, <NAME> <<EMAIL>> See the LICENSE file for more details. */ package netpeddler import ( "bytes" "encoding/binary" "fmt" "net" "time" ) // SendablePacket is an interface for packets that can be sent on a connection which // allows client code to make collections of packets that can be sent t...
// Copyright © 2018 <NAME> <<EMAIL>>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. package tpdu import ( "github.com/warthog618/sms/encoding/gsm7" "github.com/warthog618/sms/encoding/semioctet" ) // Address represents a phone number. type Address struc...
package lifecycle import ( "fmt" "io/ioutil" "os" "path/filepath" "sort" "strings" "github.com/BurntSushi/toml" "github.com/pkg/errors" "github.com/buildpacks/lifecycle/api" "github.com/buildpacks/lifecycle/buildpack" "github.com/buildpacks/lifecycle/buildpack/layertypes" "github.com/buildpacks/lifecycle...
/* Copyright The KubeVault 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, softwa...
package send import ( "testing" "github.com/mongodb/grip/level" "github.com/mongodb/grip/message" "github.com/stretchr/testify/suite" ) type JiraSuite struct { opts *JiraOptions suite.Suite } func TestJiraSuite(t *testing.T) { suite.Run(t, new(JiraSuite)) } func (j *JiraSuite) SetupSuite() {} func (j *Jira...
package server import ( "encoding/json" "fmt" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/funkygao/golib/context" "github.com/joeylaker/loadConfig" "log" "math/big" "strconv" "strings" "testing" ) func TestSubstring(t *testing.T) { s := "0x000000000000...
package qhandler_kafka import ( "encoding/json" "fmt" "reflect" "sync" "github.com/zpatrick/go-config" "github.com/confluentinc/confluent-kafka-go/kafka" "github.com/qnib/qframe-types" "github.com/qframe/types/docker-events" "strings" "github.com/qframe/types/plugin" "github.com/qframe/types/metrics" "gi...
package database import ( "fmt" "strconv" "strings" "sync" "time" "gorm.io/gorm" "gorm.io/gorm/logger" "goyave.dev/goyave/v3/config" ) // Initializer is a function meant to modify a connection settings // at the global scope when it's created. // // Use `db.InstantSet()` and not `db.Set()`, since the latter ...
package main import ( "context" "strings" "time" ) const ( defaultBuflen = 64 defaultExpiry = time.Hour * 24 * 7 ) type Update struct { Key string Value string Revision int } type entry struct { value string revision int } type requestGet struct { key string resp chan<- struct { value ...
package types import ( "crypto/tls" "fmt" "io" "net/http" "net/url" "strings" "time" "github.com/docker/distribution/manifest/ocischema" manifestV1 "github.com/docker/distribution/manifest/schema1" manifestV2 "github.com/docker/distribution/manifest/schema2" "github.com/docker/distribution/reference" "git...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: authority.proto package steempb import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf type Autho...
// // Copyright 2020 IBM Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the Business Source License included // in the file licenses/BSL.txt and at www.mariadb.com/bsl11. // // Change Date: 2022-10-01 // // On the date above, in accordance with the Business Source License, use // of this software will be gov...
/* * This file is part of the KubeVirt 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 required by applicable la...
package apply import ( "context" "crypto/tls" "fmt" "io" "net/http" "os" "strings" "time" "github.com/pkg/errors" "github.com/spf13/cobra" kumactl_cmd "github.com/kumahq/kuma/app/kumactl/pkg/cmd" "github.com/kumahq/kuma/app/kumactl/pkg/output" "github.com/kumahq/kuma/app/kumactl/pkg/output/printers" "g...
// MIT License // // Copyright (c) 2020 Ohio Supercomputer Center // // 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,...
// Copyright 2019 eBay Inc. // Primary authors: <NAME>, <NAME>, // <NAME>, and <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 // https://www.apache.org/licenses/...
package ipfsutil import ( "context" "berty.tech/berty/v2/go/pkg/errcode" ds "github.com/ipfs/go-datastore" ipfs_ds "github.com/ipfs/go-datastore" dsync "github.com/ipfs/go-datastore/sync" config "github.com/ipfs/go-ipfs-config" ipfs_core "github.com/ipfs/go-ipfs/core" ipfs_coreapi "github.com/ipfs/go-ipfs/cor...
/* Copyright NetFoundry, 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
package swarm import ( "context" "fmt" conn "github.com/ipfs/fs-repo-migrations/fs-repo-6-to-7/gx/ipfs/QmRvZscvtJhcRJhKPrRqoR76pmsQ8MnCqUjk3FNpm1D8Wa/go-libp2p-conn" iconn "github.com/ipfs/fs-repo-migrations/fs-repo-6-to-7/gx/ipfs/QmToCvh5eJtoDheMggre7b2zeFCJ6tAyB82YVs457cqoUE/go-libp2p-interface-conn" transport...
// *** 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 v20180915 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type CustomImage struct { pulumi.Custom...
package list import ( "bytes" "io/ioutil" "net/http" "regexp" "testing" "github.com/profclems/glab/pkg/iostreams" "github.com/profclems/glab/commands/cmdtest" "github.com/MakeNowJust/heredoc" "github.com/alecthomas/assert" "github.com/google/shlex" "github.com/profclems/glab/api" "github.com/profclems/...
package eosrpc import "github.com/TheBoringDude/go-urljoin" const PRODUCER_API = "producer" // Pause a producer node. func (p *ProducerAPI) Pause() error { return request(p.Client, urljoin.UrlJoin(p.ApiUrl, "pause"), nil, nil) } // Resume a producer node. func (p *ProducerAPI) Resume() error { return request(p.Cl...
// Copyright (c) 2017 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...
//func (x *Table) Next(key Value) (Value, Value) {} //func (x *Table) Length() int {} //func (x *Table) Append(value Value) {} //func (x *Table) Insert(index int, value Value) {} //func (x *Table) Remove(index int) (value Value) {} //func (x *Table) RawGet(key Value) (value Value) {} //func (x *Table) RawGetInt(key int...
package db import ( "encoding/json" ) type Metadata struct { Key string `gorm:"primary_key"` Value *string `gorm:"not null"` } type Block struct { Height int64 `gorm:"primary_key;auto_increment:false"` Timestamp int64 `gorm:"not null;index"` Proposer string `gorm:"not null;index"` BlockHash []byte `g...
package models import( "encoding/json" ) /** * Type definition for Environments7Enum enum */ type Environments7Enum int /** * Value collection for Environments7Enum enum */ const ( Environments7_KVMWARE Environments7Enum = 1 + iota Environments7_KHYPERV Environments7_KSQL En...
package node import ( "fmt" "github.com/kamasamikon/miego/klog" "strings" ) type KNodeManager struct { // // ALL nodes // nodes []*KNode // nodeTypeA <> downstreamNodes // dataReady(n, data) => lbNode := nodeTopoType[n.Type] // // XXX: nm.NodeAdd(node, NodeType, DataFormat, DataType) // "NodeType*hint" =...
package cluster import ( "gonet/actor" "gonet/base" "gonet/network" "gonet/server/common" "math" "reflect" "sync" ) type( //集群包管理 IClusterPacket interface { actor.IActor RegisterServer(int, string, int) SetSocketId(uint32) } //集群客户端 Cluster struct{ actor.Actor m_ClusterMap map[uint32] *network...
// Copyright 2022 The Hugo 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 requiredF by applicable...
package client import ( "net" "os" "strconv" "strings" "sync" "time" "github.com/Yunpeng-J/fabric-protos-go/peer" log "github.com/sirupsen/logrus" "github.com/spf13/viper" ) type Observer struct { d peer.Deliver_DeliverFilteredClient e2eCh chan *Tracker logger *log.Logger mu sync.Mutex re...
package dstask import ( "os" "os/user" "path" "strings" ) var ( GIT_REPO = "~/.dstask/" STATE_FILE = "" // for locally consistent ID numbers. Separate from state so TaskSet can // guarantee coherent save/load IDS_FILE = "" // for CI testing FAKE_PTY = false // populated by linker flags, see do-release.s...
package router import ( "log" "net/http" "strings" "github.com/mhogar/amber/common" "github.com/mhogar/amber/config" "github.com/mhogar/amber/data" "github.com/mhogar/amber/models" "github.com/mhogar/amber/router/handlers" "github.com/google/uuid" "github.com/julienschmidt/httprouter" ) const ( ResponseT...
package eve import ( "delay" "errors" ) const chipidAddr = 0x0C0000 type mmap struct { ramdl int ramcmd int regdlswap int regintflags int regcmdwrite int regtracker int } //emgo:const var eve1 = mmap{ ramdl: 0x100000, ramcmd: 0x108000, // 264 * 4096 regdlswap: 0x102450, regint...
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. package app import ( "context" "fmt" "os" "path/filepath" "sync" "time" "gi...
/* Copyright 2021 The TestGrid 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...
package url import ( "fmt" "os" "strconv" "text/tabwriter" "github.com/openshift/odo/pkg/envinfo" "github.com/openshift/odo/pkg/odo/util/pushtarget" routev1 "github.com/openshift/api/route/v1" "github.com/openshift/odo/pkg/config" "github.com/openshift/odo/pkg/lclient" "github.com/openshift/odo/pkg/log" "...
package config_test import ( "os" "testing" "time" "github.com/rs/zerolog" "github.com/stretchr/testify/require" "github.com/trisacrypto/directory/pkg/trtl/config" ) var testEnv = map[string]string{ "TRTL_MAINTENANCE": "true", "TRTL_BIND_ADDR": ":445", "TRTL_LOG_LEVEL": ...
package testdata import ( "time" "github.com/grokify/go-idmef" ) // ExampleSystemPolicyViolation provides the sample file from // https://datatracker.ietf.org/doc/html/rfc4765#section-7.4 func ExampleSystemPolicyViolation() *idmef.Message { dt, err := time.Parse(time.RFC3339, "2000-03-09T22:18:07-05:00") if err ...
package bbgo import ( "context" "encoding/json" "time" log "github.com/sirupsen/logrus" "github.com/c9s/bbgo/pkg/types" ) // LocalActiveOrderBook manages the local active order books. //go:generate callbackgen -type LocalActiveOrderBook type LocalActiveOrderBook struct { Symbol string Asks, Bids ...
package ovirt import ( "fmt" "io/ioutil" "path/filepath" "regexp" "github.com/go-openapi/swag" "github.com/openshift/assisted-service/internal/common" "github.com/openshift/assisted-service/models" ovirtclient "github.com/ovirt/go-ovirt-client" "github.com/pkg/errors" "gopkg.in/yaml.v2" ) // OvirtConfig co...
// Copyright (c) 2018 Target Brands, 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 a...
// Copyright 2015 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...
package enmime import ( "bufio" "bytes" "fmt" "io" "io/ioutil" ) // This constant needs to be at least 76 for this package to work correctly. This is because // \r\n--separator_of_len_70- would fill the buffer and it wouldn't be safe to consume a single byte // from it. const peekBufferSize = 4096 type boundar...
// 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 events import ( "github.com/MinterTeam/minter-explorer-extender/address" "github.com/MinterTeam/minter-explorer-extender/balance" "github.com/MinterTeam/minter-explorer-extender/coin" "github.com/MinterTeam/minter-explorer-extender/validator" "github.com/MinterTeam/minter-explorer-tools/helpers" "github....
// Package scheduler is a small library that you can use within your application that enables you to execute callbacks (goroutines) after a pre-defined amount of time. GTS also provides task storage which is used to invoke callbacks for tasks which couldn’t be executed during down-time as well as maintaining a history ...
package stream import ( "fmt" "io" "net" "sync" "time" ) // EncryptedStream is an encrypted stream. Data are encrypted before writing to // underlying stream, and are decrypted after reading from underlying stream. type EncryptedStream struct { config *Config stream io.ReadWriter lock sync.RWMutex isClo...
package micro import ( "fmt" "os" "os/signal" "sync" "syscall" "github.com/xxjwxc/public/mylog" "github.com/gmsec/micro/client" "github.com/gmsec/micro/profile" "github.com/gmsec/micro/profile/pprof" "github.com/gmsec/micro/registry" "github.com/gmsec/micro/server" ) // Service is an interface that wraps...
package v1 import ( "fmt" "gin-vue-admin/global" "gin-vue-admin/global/response" "gin-vue-admin/model/es" "gin-vue-admin/model/request" resp "gin-vue-admin/model/response" "gin-vue-admin/service" "gin-vue-admin/utils" "github.com/gin-gonic/gin" "go.uber.org/zap" "strconv" "time" ) const ( INDEX_PREFIX ...
package main import ( "bufio" "encoding/json" "flag" "fmt" "github.com/dcarbone/agentman" "github.com/hashicorp/consul/testutil" "github.com/steakknife/devnull" stdlog "log" "os" "os/signal" "strings" "sync" "syscall" ) var ( quietFlag bool debugFlag bool cmdFlags = flag.NewFlagSet("command"...
package main import ( _ "database/sql" "encoding/json" "errors" "log" "net/http" "strconv" "strings" "time" "github.com/golang-migrate/migrate/v4" "github.com/golang-migrate/migrate/v4/database/mysql" _ "github.com/golang-migrate/migrate/v4/source/file" "github.com/jinzhu/gorm" satori "github.com/satori/...
package main import ( "fmt" "image" "image/color" "image/draw" "strings" "sync" "time" "golang.org/x/image/font" "golang.org/x/image/font/basicfont" "golang.org/x/image/math/fixed" ) // InfoLabel with built-in marquee scroll type InfoLabel struct { text string buffer []byte maxlen int act...
/* Copyright (c) 2017 <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, distribute, sublicen...
// Copyright 2021 Chaos Mesh 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 ( "context" "log" "net" "os" "os/signal" "syscall" "go.uber.org/zap" "github.com/DrmagicE/gmqtt" "github.com/DrmagicE/gmqtt/config" _ "github.com/DrmagicE/gmqtt/persistence" "github.com/DrmagicE/gmqtt/pkg/codes" "github.com/DrmagicE/gmqtt/pkg/packets" "github.com/DrmagicE/gmqtt/serve...
// This file and its contents are licensed under the Apache License 2.0. // Please see the included NOTICE for copyright information and // LICENSE for a copy of the license. package querier import ( "fmt" "sort" "github.com/jackc/pgtype" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/pr...
package conf import ( "github.com/opsgenie/oec/git" "github.com/pkg/errors" "github.com/sirupsen/logrus" "os" "path/filepath" "strings" "time" ) const ( LocalSourceType = "local" GitSourceType = "git" DefaultBaseUrl = "https://api.opsgenie.com" ) var readConfigurationFromGitFunc = readConfigurationFromG...
package graw import ( "encoding/xml" "strings" ) const ( topCellId = "0" rootCellID = "1" ) // GraphModel 默认有一个顶级cell,其他cell parentId指向1 // <mxCell id="0" style=";html=1;" /> // <mxCell id="1" style=";html=1;" parent="0" /> type GraphModel struct { XMLName xml.Name `xml:"mxGraphModel"` Dx int ...
package ofp import ( "bytes" "fmt" "io" "io/ioutil" "github.com/akostrikov/openflow/internal/encoding" ) const ( // NoBuffer used as buffer identifier when there is no buffered packet // associated with the message. NoBuffer uint32 = 0xffffffff ) const ( // PacketInReasonNoMatch is set when there is no mat...
package tds import ( "database/sql" "database/sql/driver" "errors" "fmt" "net/url" "strconv" ) const defaultCharset = "utf8" const defaultTextSize = 32768 // connection Timeout in seconds const defaultLoginTimeout = 20 type connParams struct { host string user string password string cl...
package main import ( "bufio" "fmt" "log" "os" "strconv" "strings" "sync" ) type Intcode struct { pc int64 id int64 mem []int64 err error relBase int64 inChan chan int64 outChan chan int64 } func NewIntcode(mem []int64, in chan int64, out chan int64, id int64) *Intcode { safeMem := ...
package gotiny import ( "reflect" "sync" "time" "unsafe" ) type encEng func(*Encoder, unsafe.Pointer) //编码器 var ( rt2encEng = map[reflect.Type]encEng{ reflect.TypeOf((*bool)(nil)).Elem(): encBool, reflect.TypeOf((*int)(nil)).Elem(): encInt, reflect.TypeOf((*int8)(nil)).Elem(): ...
package biz import ( "context" "encoding/json" "fmt" "goods/internal/domain" "github.com/go-kratos/kratos/v2/errors" "github.com/go-kratos/kratos/v2/log" ) type GoodsRepo interface { CreateGoods(ctx context.Context, goods *domain.Goods) (*domain.Goods, error) GoodsListByIDs(context.Context, ...int64) ([]*dom...
/*- * Copyright (c) 2016, 1&1 Internet SE * Copyright (c) 2016, <NAME> * * Use of this source code is governed by a 2-clause BSD license * that can be found in the LICENSE file. */ package tree import ( log "github.com/Sirupsen/logrus" uuid "github.com/satori/go.uuid" ) // deterministicInheritanceOrder switc...
// package mapper provides a conversion model between naisd and naiserator data types package mapper import ( "fmt" "github.com/nais/migrator/fasit" "github.com/nais/migrator/models/naisd" "github.com/nais/migrator/models/naiserator" log "github.com/sirupsen/logrus" "net/url" ) func autoIngress(deploy naisd.Dep...
/// This implementation of https://github.com/TylerGlaiel/GON /// is super duper simple, not expected for real use case, but to show that /// we can be so much faster than json decoding on Go without effort. /// It doesn't support JSON syntax as GON does promise. /// Also error checks are limited in favour of performan...
package graphiql import ( "html/template" ) type dataTmpl struct { Endpoint string Es6PromiseVersion string FetchVersion string ReactVersion string GraphiQLVersion string } const ( templateName = "graphiql" es6PromiseVersion = "4.2.6" fetchVersion = "2.0.4" reactVersion ...
/* Copyright (C) 2020 Accurics, 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 wr...
package k8s import ( "fmt" "github.com/bwplotka/mimic" "github.com/bwplotka/mimic/abstractions/kubernetes/volumes" "github.com/bwplotka/mimic/encoding" "github.com/go-openapi/swag" "github.com/thanos-io/thanosbench/configs/abstractions/dockerimage" "github.com/thanos-io/thanosbench/configs/abstractions/secret"...
// *** 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 v20191101 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type ViewByScope struct { pulumi.Custom...
package driver import ( "context" "errors" "testing" "time" "github.com/factset/go-drill" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) type mockDrillClient struct { mock.Mock } func (m *mockDrillClient) NewConnection(ctx context.Context) (drill.Conn, error) { args := m.Called(c...
package types import ( "errors" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params" "github.com/cosmos/cosmos-sdk/x/params/subspace" "strings" ) // DefaultParamSpace Default parameter namespace const ( DefaultParamSpace = ModuleName DefaultBondDenom = "ustos" DefaultMatu...
package main import ( "bufio" "log" "os" "testing" ) var metaData, mediaData string var wantData = &album{ album: true, single: false, artID: 255644, title: "album_name_test", artist: "artist_name_test", date: "01 jan 1970", url: "https://gopher.example.com/album/...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: message.proto package pb 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-tim...
/* Copyright NetFoundry, 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
// 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 appl...
package ipfsapi import ( "context" "encoding/json" "fmt" "io" "net/http" "net/url" "strconv" "strings" ) // Client is a client for the IPFS HTTP API. type Client struct { client *http.Client base string } // NewClient returns a new Client created with the given options. func NewClient(options ...ClientOp...
package main import ( "errors" "fmt" "os" "strconv" "strings" "time" "github.com/gookit/color" cli "github.com/urfave/cli/v2" ) type rgb struct { r, g, b int format string } const ( allFmt = "all" rgbFmt = "rgb" hexFmt = "hex" ) var ( version string compiled string = fmt.Sprint(time.Now().Unix()) ...
// Copyright 2015 The Vanadium 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 verror import ( "v.io/v23/vdl" ) func init() { vdl.RegisterNative(WireToNative, WireFromNative) vdl.RegisterNativeAnyType(vdl.WireError{}, (*...
/* * Copyright © 2019 <NAME>. */ package mqe import ( "github.com/sirupsen/logrus" "github.com/streadway/amqp" "time" ) type ( MqClient struct { MqBase mqAll busName string chReconnect chan *consumerPkg chExitExternal chan struct{} } consumerPkg struct { consumerName string queueName...
package dma import ( "log" "github.com/djhworld/gomeboycolor/components" "github.com/djhworld/gomeboycolor/constants" "github.com/djhworld/gomeboycolor/mmu" "github.com/djhworld/gomeboycolor/types" ) const ( NAME string = "HDMA" CGB_HDMA_SOURCE_HIGH_REG types.Word = 0xFF51 CGB_HDMA_SO...