text
stringlengths
3.08k
10.4k
package idetcd import ( "bytes" "context" "encoding/json" "net" "strconv" "strings" "text/template" "time" "github.com/coredns/coredns/core/dnsserver" "github.com/coredns/coredns/plugin" etcdcv3 "github.com/coreos/etcd/clientv3" "github.com/mholt/caddy" ) const ( defaultEndpoint = "http://localhost:237...
package watchdog import ( "fmt" "github.com/pkg/errors" "io/ioutil" "os" "os/exec" "strings" "sync" "syscall" "time" "unsafe" . "golang.org/x/sys/unix" "github.com/go-logr/logr" ) const ( watchdogsFolder = "/dev" watchdogPrefix = "watchdog" ) var ( watchdogDevice = os.Getenv("WATCHDOG_PATH") ) // ...
package main import ( "bufio" "errors" "fmt" "io/ioutil" "net/http" "os" "path/filepath" "strings" "time" "github.com/schollz/cowyo/encrypt" "github.com/schollz/lumber" "github.com/urfave/cli" ) var debug bool var log *lumber.ConsoleLogger var version string func main() { run() ...
package centrifuge import ( "encoding/json" "io" "net/http" "sync" "time" "github.com/centrifugal/centrifuge/internal/proto" "github.com/igm/sockjs-go/sockjs" ) const ( transportSockJS = "sockjs" // We don't use specific close codes here because our connections // can use other transport that do not have ...
package ingestservice /* Copyright 2018 Crunchy Data Solutions, 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...
package form import ( "bytes" "encoding/json" "fmt" "reflect" "strings" "unicode/utf8" ) // Form represents a form that may be sent to a Submitter. The three types of forms, custom forms, menu forms // and modal forms implement this interface. type Form interface { json.Marshaler SubmitJSON(b []byte, submitte...
// Code generated by qtc from "remark_template.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. //line remark_template.qtpl:1 package markdown //line remark_template.qtpl:1 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line remark_template.qtpl:1 var ( _...
package main // Test integration of gkvlite with go-slab, using gkvlite's optional // ItemAddRef/ItemDecRef() callbacks to integrate with a slab memory // allocator. import ( "bytes" "fmt" "math/rand" "os" "testing" "github.com/cbehopkins/gkvlite" ) func TestSlabStore(t *testing.T) { fname := "tmp.test" os....
package main import ( "context" "errors" "fmt" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "math/rand" "time" ) type DatabaseBoard struct { Collection mongo.Collection Client mongo.Client...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: flow/legacy/entities/block_header.proto package entities import ( fmt "fmt" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" math "math" ) // Reference imports to suppress errors if they are not otherwise ...
package phases import ( "fmt" "path/filepath" "strings" log "github.com/sirupsen/logrus" "github.com/flanksource/konfigadm/pkg/types" "github.com/flanksource/konfigadm/pkg/utils" ) var Packages types.AllPhases = packages{} type packages struct{} func (p packages) ApplyPhase(sys *types.Config, ctx *types.Sys...
// Copyright 2017 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
package loader import ( "bytes" "fmt" "github.com/zoidbergwill/hdrhistogram" "io" "io/ioutil" "log" "net/http" "net/url" "strings" "sync/atomic" "time" "github.com/SamBarker/go-wrk/util" ) const ( USER_AGENT = "go-wrk" ) type LoadCfg struct { duration int //seconds goroutines int t...
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed unde...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: msgs.proto package main import proto "github.com/golang/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 // This is a compi...
// This file is part of bitrot, a bitrot scrubber in Go // http://github.com/marcopaganini/bitrot // (C) Dec/2014 by <NAME> <<EMAIL>> package main import ( "crypto/md5" "flag" "fmt" "io" "os" "os/user" "path/filepath" "github.com/marcopaganini/logger" ) // BuildVersion is filled by go build -ldflags during ...
package core import ( "fmt" "math/bits" "time" ) const Int64MostSigBitSet = 0x8000000000000000 // Convert a board coordinate as a string - such as f6 or b2 - // into a position into a 64-length array. func CoordinateToPos(coordinate string) int { file := coordinate[0] - 'a' rank := charToDigit(coordinate[1]) - ...
package main import ( "bytes" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "os" "strconv" dueros "github.com/dueros/bot-sdk-go/bot" "github.com/dueros/bot-sdk-go/bot/directive/display" "github.com/dueros/bot-sdk-go/bot/directive/display/template" "github.com/dueros/bot-sdk-go/bot/model" ) var CODE_...
package v1 import ( "bytes" "image" "net/http" "net/http/httptest" "os" "testing" "time" "github.com/gavv/httpexpect/v2" "github.com/gofrs/uuid" "github.com/leandro-lugaresi/hub" "go.uber.org/zap" "github.com/traPtitech/traQ/repository" "github.com/traPtitech/traQ/router/extension" "github.com/traPtite...
// 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 bot import ( "bufio" "fmt" "io" "net/http" "os" "os/signal" "regexp" "strconv" "strings" "syscall" "time" "vrc_bot/vrcapi" "github.com/bwmarrin/discordgo" log "github.com/sirupsen/logrus" "github.com/spf13/viper" ) func Init() { //dg, err := discordgo.New("Bot " + viper.GetString("discordbot....
package tunnels import ( "crypto/tls" "encoding/binary" "io" "log" "net" "sync" "time" "github.com/vikingo-project/vsat/utils" "github.com/vmihailenco/msgpack" ) type Con struct { net.Conn rwm *sync.RWMutex } func (c *Con) ReadPacket() (action uint8, data []byte, err error) { if err = binary.Read(c, bin...
/* Copyright 2021, Pure Storage 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, s...
package builtin_test import ( "context" "testing" "time" "github.com/google/uuid" "github.com/modernice/goes/aggregate" "github.com/modernice/goes/aggregate/repository" "github.com/modernice/goes/codec" "github.com/modernice/goes/command/builtin" "github.com/modernice/goes/command/cmdbus" "github.com/modern...
package machinehandler import ( "bytes" "context" "io/ioutil" "net/http" "strings" "testing" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" ) // fakeMachineRoundTripper helps to constru...
package main import "fmt" import "strings" import "io/ioutil" import "runtime/debug" import "path/filepath" import "github.com/prataprc/goparsec" import "github.com/bnclabs/golog" import "github.com/tn47/goledger/dblentry" import "github.com/tn47/goledger/api" import "github.com/tn47/goledger/reports" func dofirstpa...
package main import ( "bufio" "flag" "fmt" "io" golog "log" "os" "strconv" "sync" quic "github.com/lucas-clemente/quic-go" "github.com/netsec-ethz/scion-apps/lib/scionutil" scionlog "github.com/scionproto/scion/go/lib/log" "github.com/scionproto/scion/go/lib/snet" "github.com/scionproto/scion/go/lib/snet...
/* * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * Copyright 2020-present Open Networking Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://w...
/* Copyright 2015 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 dsdl import ( "fmt" "log" "os" "path" "time" "github.com/davidmanzanares/dsd/types" ) // RunConf is the Runner's configuration type RunConf struct { Args []string HotReload bool OnSuccess RunReaction OnFailure RunReaction Polling time.Duration } // DefaultPolling for Run when RunConf.Polli...
// +build go1.7 package structor_test import ( "os" "strings" "testing" "github.com/apaxa-go/eval" "github.com/stretchr/testify/assert" "github.com/nikolay-turpitko/structor" "github.com/nikolay-turpitko/structor/el/go-el" "github.com/nikolay-turpitko/structor/funcs/goquery" funcs_os "github.com/nikolay-tu...
package redis import ( "context" "fmt" "sync" "time" "github.com/go-redis/redis/v7" ibatch "github.com/benthosdev/benthos/v4/internal/batch" "github.com/benthosdev/benthos/v4/internal/batch/policy" "github.com/benthosdev/benthos/v4/internal/bloblang/field" "github.com/benthosdev/benthos/v4/internal/bundle" ...
package routing import ( "net" "sync" "testing" "time" "github.com/stretchr/testify/assert" "github.com/vishvananda/netlink" ) var ( testRoutes = map[string]string{ "192.168.0.1": "192.168.0.0/24", "10.255.0.1": "10.255.0.0/16", } _, testAddRouteIPNet, _ = net.ParseCIDR("192.168.1.0/24") testAddRouteR...
/* * Copyright IBM Corporation 2021 * * 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 o...
package beatnik // Parser of text format. import ( "fmt" "regexp" "strconv" "strings" ) var ( hitToken = regexp.MustCompile("^\\(?([0-9A-Z]+(?:\\+*|-*)" + "(?:,[0-9A-Z]+(?:\\+*|-*))*)((?:\\.*|~*)>?)\\)?$") noteToken = regexp.MustCompile("^([0-9A-Z]+)(\\+*|-*)$") waitToken = regexp.MustCompile("^(?...
// Copyright 2022 TiKV Project Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
package main import ( "log" "math/rand" "regexp" "strings" "time" "github.com/dghubble/go-twitter/twitter" "github.com/dghubble/oauth1" "github.com/spf13/viper" ) const trendlen int8 = 50 const usa int64 = 23424977 const hashtag string = "#" const emptyString string = "" const ellipses string = "…" const has...
package rtsp import ( "bufio" "context" "crypto/md5" "fmt" "log" "net" "strconv" "strings" "github.com/jonas-koeritz/actioncam/libipcamera" ) // Server implements the RTSP protocol to serve a H.264 stream type Server struct { localIP string localPort int listener net.Listener remoteRTPPor...
//Date: 2018/8/22 下午3:19 // //Description: package gconf import ( "fmt" "github.com/pkg/errors" "os" "reflect" "strings" "time" ) type Configer interface { String(key string) string Strings(key string) []string Int(key string) (int, error) Int64(key string) (int64, error) Bool(key string) (bool, error) Fl...
package gosql import ( "strconv" "strings" ) //UpdateBuilder create new instance of UpdateBuilder. //It allows to create UPDATE sql statements. func UpdateBuilder() *updateBuilder { u := updateBuilder{} u.calcfields = make(map[string]string) u.conditionGroups = make(map[int]conditionGroup) u.initEnv() return &...
// Copyright (c) 2019 Open2b Software Snc. All rights reserved. // https://www.open2b.com // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package compiler import ( "github.com/open2b/scriggo/ast" ) // isTypeGuard reports whether node is a switch type guard, a...
package main import ( "encoding/json" "errors" "fmt" "net/http" "net/url" "strconv" "github.com/peteraba/d5/lib/german/entity" "github.com/peteraba/d5/lib/mongo" "github.com/peteraba/d5/lib/repository" "github.com/peteraba/d5/lib/server" "github.com/peteraba/d5/lib/util" mgo "gopkg.in/mgo.v2" "gopkg.in/m...
// Copyright 2021 hardcore-os Project Authors // // Licensed under the Apache License, Version 2.0 (the "License") // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
package gcp import ( "context" "fmt" "io/ioutil" "maker/internal/utils" "time" container "cloud.google.com/go/container/apiv1" credentials "cloud.google.com/go/iam/credentials/apiv1" "github.com/pkg/errors" "google.golang.org/api/option" containerpb "google.golang.org/genproto/googleapis/container/v1" cred...
// Package transport provides streaming object-based transport over http for intra-cluster continuous // intra-cluster communications (see README for details and usage example). /* * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. */ package transport_test import ( "fmt" "io" "io/ioutil" "net/http" ...
package main import ( "bytes" "context" "encoding/json" "errors" "flag" "fmt" "io" "io/ioutil" "log" "net/http" "net/url" "os" "path" "strings" "time" "github.com/mattn/go-isatty" ) const usageMsg = ` Usage: t [input text] or echo [input text] | t option: -v --version: show version t translates ...
// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 package main import ( "bytes" "encoding/json" "fmt" "io/ioutil" "strings" "time" "git.curoverse.com/arvados.git/sdk/go/arvados" "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" ) ...
package main import ( "errors" "fmt" "strings" ) const UnknownKindError = "unknown kind" // DocNode is a node in the final generated reference document. // For example this would be a single DocNode: // ``` // - `global` ((#v-global)) - Holds values that affect multiple components of the chart. // ``` type DocNod...
package sscommon import ( "context" "os" "os/exec" "os/signal" "path/filepath" "strings" "syscall" "github.com/ActiveState/cli/internal/failures" "github.com/ActiveState/cli/internal/locale" "github.com/ActiveState/cli/internal/logging" "github.com/ActiveState/cli/internal/osutils" ) var ( // FailExecCmd...
package drawing import ( "image" "image/color" "github.com/golang/freetype/truetype" ) // StackGraphicContext is a context that does thngs. type StackGraphicContext struct { current *ContextStack } // ContextStack is a graphic context implementation. type ContextStack struct { Tr Matrix Path *...
/* Copyright 2017 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 jobs import ( "encoding/json" "fmt" "github.com/gofiber/fiber/v2" "github.com/gregdel/pushover" "log" "os" "github.com/marcus-crane/gunslinger/models" ) var ( currentToken models.Token AudioPlaybackStatus models.Audio ) const ( SlackStatusEndpoint = "https://slack.com/api/users.profile.set"...
package token import ( "errors" "fmt" ag_binary "github.com/gagliardetto/binary" ag_solanago "github.com/gagliardetto/solana-go" ag_format "github.com/gagliardetto/solana-go/text/format" ag_treeout "github.com/gagliardetto/treeout" ) // Revokes the delegate's authority. type Revoke struct { // [0] = [WRITE] ...
package templateutils import ( "fmt" "reflect" "strings" "unicode/utf8" "github.com/Masterminds/goutils" "github.com/gosimple/slug" "github.com/pkg/errors" "arhat.dev/dukkha/third_party/gomplate/conv" gompstrings "arhat.dev/dukkha/third_party/gomplate/strings" ) var stringsNS = &_stringsNS{} type _strings...
package mattermost import ( "context" "fmt" "reflect" "time" "github.com/mattermost/mattermost-operator/pkg/resources" mmv1beta "github.com/mattermost/mattermost-operator/apis/mattermost/v1beta1" batchv1 "k8s.io/api/batch/v1" "github.com/go-logr/logr" "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" ...
package entities import ( "fmt" "reflect" "sync/atomic" "github.com/yasshi2525/RushHour/auth" "github.com/yasshi2525/RushHour/config" ) // ZERO emphasis it is zero value. const ZERO uint = 0 // Model represents data structure type Model struct { Players map[uint]*Player Residences map[uint]*Residence Com...
package ssocks6 import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/md5" "crypto/rand" "crypto/sha1" "encoding/binary" "errors" "io" "net" "os" "sync" "time" "golang.org/x/crypto/chacha20poly1305" "golang.org/x/crypto/hkdf" ) type SSConn struct { net.Conn key []byte rc cipher.AEAD rctr []byt...
package pubnub import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "github.com/sprucehealth/pubnub-go/pnerr" "github.com/sprucehealth/pubnub-go/utils" ) var emptyPNCreateUserResponse *PNCreateUserResponse const createUserPath = "/v1/objects/%s/users" type createUserBuilder struct { opt...
package pg import ( "testing" "github.com/stretchr/testify/require" ) func TestParse1(t *testing.T) { rs, err := Parse(`let x= "fsas" `) //require.No t.Logf("%+v", rs) t.Log(err) } func TestParse2(t *testing.T) { rs, err := Parse(`let answersCount = 201`) t.Logf("%+v", rs) t.Log(err) } func TestFuncNoPar...
package gogh import ( "bytes" "fmt" "go/parser" "go/printer" "go/token" "io" "os" "strconv" "strings" ) type straceType struct { line int strace string } // Renderer a special renderer to take care of go code rendering type Renderer struct { buf bytes.Buffer defaultCtx interface{} // lines an...
package fornitego import ( "fmt" "log" "net/http" "net/url" "strings" "sync" "time" ) // Session holds connection information regarding a successful authentication with an Epic account to Epic's API. Will // hold a Client to use for interfacing with said API, and retain information about our authenticated sess...
package secp256k1 import ( "errors" "github.com/cronokirby/saferith" ) // fieldBytes is the number of bytes in our encoding of a field element. const fieldBytes = 32 // p is the modulus for the field used in secp256k1. var p *saferith.Modulus // pDiv2 is (p - 1) / 2, useful for checking if a value has a square r...
// _ _ // __ _____ __ ___ ___ __ _| |_ ___ // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ // \ V V / __/ (_| |\ V /| | (_| | || __/ // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| // // Copyright © 2016 - 2021 SeMI Technologies B.V. All rights reserved. // // CONTACT: <EMAIL>...
package oidc import ( "encoding/json" "fmt" "net/http" "net/url" "strings" jwt "github.com/dgrijalva/jwt-go" "github.com/gorilla/sessions" uuid "github.com/satori/go.uuid" ) // Google represents an OpenID Connect client for http://accounts.google.com type Google struct { ClientID string ClientSecret st...
package main import ( "fmt" "io/ioutil" "net/http" "net/url" "strconv" "strings" "time" "github.com/rs/zerolog" "github.com/rs/zerolog/hlog" ) // ProxyHandler forwards the GET/OPTIONS/HEAD request (everything after the // root, use http.StripPrefix if not the base) to the URL and query params // passed in t...
package orm import ( "reflect" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" ) var _ Indexable = &table{} // table is the high level object to storage mapper functionality. Persistent // enti...
/* * Copyright (c) 2015-2020 by MemSQL. 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...
// Context package defines primitives for generic context handling during execution. package context import ( "encoding/json" "fmt" sdkCtx "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/wire" "github.com/cosmos/cosmos-sdk/x/auth" authctx "github.com/cosmos/cosmos-sdk/x/auth/client/co...
/* Copyright 2021 The Katanomi 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 main import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "os" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/...
/* * keyring.go - Add/remove encryption policy keys to/from kernel * * Copyright 2019 Google LLC * Author: <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 * * h...
package main import ( "bytes" "database/sql" "encoding/json" "fmt" "io" "net/http" "os" "github.com/mattn/go-sqlite3" "github.com/lxc/lxd" "github.com/lxc/lxd/shared" ) type resp struct { Type lxd.ResponseType `json:"type"` Status string `json:"status"` StatusCode shared...
package soundcloud // User Object (http://developers.soundcloud.com/docs/api/reference#token) type User struct { //---- Included in mini-representation Id uint64 *SubUri *SubPermalink Username string AvatarUrl string `json:"avatar_url"` //---- Not included in mini-representation Country string...
package search import ( "fmt" "sort" "strings" "time" log "github.com/Sirupsen/logrus" "github.com/pkg/errors" "gopkg.in/olivere/elastic.v6" "github.com/Bnei-Baruch/archive-backend/cache" "github.com/Bnei-Baruch/archive-backend/consts" "github.com/Bnei-Baruch/archive-backend/utils" ) type FilterValue stru...
package main import ( "flag" "fmt" "log" "math" "github.com/barnex/fftw" "github.com/barnex/matrix" "github.com/mumax/3cl/data" "github.com/mumax/3cl/httpfs" "github.com/mumax/3cl/oommf" ) func mainSpatial() { // time points Nt := flag.NArg() if Nt < 2 { log.Fatal("need at least 2 inputs") } go loa...
// Package spec provides functions for building a flux.Spec from different sources (e.g., string, AST). // It is intended for internal use only. package spec import ( "context" "errors" "fmt" "time" "github.com/influxdata/flux" "github.com/influxdata/flux/ast" "github.com/influxdata/flux/interpreter" "github....
package compliance import ( "context" "os" "testing" "time" "github.com/golang/protobuf/ptypes" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/chef/automate/api/external/secrets" "github.com/chef/automate/components/automate-gateway/api/compliance/reporting" "github....
// Copyright 2021 FerretDB 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 skipfilter import ( "fmt" "runtime" "sync" "sync/atomic" "github.com/MauriceGit/skiplist" "github.com/RoaringBitmap/roaring/roaring64" "github.com/hashicorp/golang-lru" ) // SkipFilter combines a skip list with an lru cache of roaring bitmaps type SkipFilter struct { i uint64 idx map[interface...
package gatt import "encoding/binary" // l2capWriter helps create l2cap responses. // It is not meant to be used with large writes. // TODO: benchmark the number of allocs here. // Reduce by letting WriteByte, WriteUint16, etc. // extend b/chunk and write into it directly. type l2capWriter struct { mtu int b ...
package ytdl import ( "time" ) type YtdlVideo struct { UploadDate string `json:"upload_date"` UploadDateForReal time.Time // you need to manually set this since the value in the API doesn't include the time Extractor string `json:"extractor"` Series interface{} `json:"se...
// Code generated by entc, DO NOT EDIT. package ent import ( "fmt" "strings" "time" "github.com/empiricaly/recruitment/internal/ent/admin" "github.com/facebook/ent/dialect/sql" ) // Admin is the model entity for the Admin schema. type Admin struct { config `json:"-"` // ID of the ent. ID string `json:"id,om...
package completion import ( "bytes" "fmt" "io" "os" "github.com/spf13/cobra" "github.com/iftechio/jki/pkg/factory" ) func NewCmdCompletion(f factory.Factory) *cobra.Command { rootCmd := &cobra.Command{ Use: "completion", Short: "Output shell completion code for the specified shell (bash or zsh).", } ...
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this fi...
// Code generated by go-swagger; DO NOT EDIT. package client // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/str...
package logger import ( "fmt" "io" "log" "os" "sync/atomic" ) var logSequenceID uint64 func init() { logSequenceID = 0 } /** Levels */ // Level defines a logging level used in BasicLogger type Level int // Following levels are supported in BasicLogger const ( DEBUG Level = iota INFO WARNING ERROR CRIT...
package recovery import ( "bytes" "fmt" "github.com/shipengqi/example.v1/apps/cli/pkg/log" "io/ioutil" "os" "runtime" ) var ( unknown = []byte("???") dot = []byte(".") slash = []byte("/") ) const ( reset = "\033[0m" ) func Recovery(code int) { if err := recover(); err != nil { stack := stack2(3) ...
package err import ( "runtime" ) const ( FAILURE = iota - 1 SUCCESS // sanity purpose EDOM ERANGE EFAULT EINVAL EFAILED EFACTOR ESANITY ENOMEM EBADFUNC ERUNAWAY EMAXITER EZERODIV EBADTOL ETOL EUNDRFLW EOVRFLW ELOSS EROUND EBADLEN ENOTSQR ESING EDIVERGE EUNSUP EUNIMPL ECACHE ETABLE ENOPRO...
/* * Copyright 2019, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
package eightsetmap import "testing" func TestSets(t *testing.T) { all := []uint64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} evens := []uint64{2, 4, 6, 8, 10, 12, 14, 16} odds := []uint64{1, 3, 5, 7, 9, 11, 13, 15} fibs := []uint64{1, 2, 3, 5, 8, 13} efibs := []uint64{2, 8} ofibs := []uint64{1, 3, ...
package command import ( "errors" "fmt" "os" "path/filepath" "strings" "github.com/urfave/cli/v2" ) const syncCopyFrom = "copyfrom" const syncCopyTo = "copyto" type sync struct { usage map[string]string aliases map[string]string description map[string]string } func getSyncPath(path string) strin...
// 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...
package platformclientv2 import ( "time" "github.com/leekchan/timeutil" "encoding/json" "strconv" "strings" ) // Script type Script struct { // Id - The globally unique identifier for the object. Id *string `json:"id,omitempty"` // Name Name *string `json:"name,omitempty"` // VersionId VersionId *strin...
package marudor import ( "context" "fmt" "net/url" "strconv" "strings" "time" ) // HafasService serve the marudor hafas api type HafasService struct { client *APIClient } // HafasArrival ressource type HafasArrival struct { Platform string `json:"platform"` ScheduledTime int64 `json:"scheduledTime"` ...
// Copyright © 2018 <NAME> <<EMAIL>> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
package sgc7game import ( "io/ioutil" jsoniter "github.com/json-iterator/go" sgc7plugin "github.com/zhs007/slotsgamecore7/plugin" ) type symbolWeightReels struct { SetType1 int `json:"settype1"` SetType2 int `json:"settype2"` Symbol int `json:"symbolid"` R1 int `json:"r1"` R2 int `json:"r2"` R...
package main import ( "bytes" "fmt" "html/template" "io/ioutil" "log" "net" "net/http" "net/http/httputil" "net/url" "os" "os/exec" "runtime" "strings" "time" ) func serveGopherJS(port int, srcRoot string, module ...string) error { if len(srcRoot) == 0 || srcRoot[0] != '/' { srcRoot = "/" + srcRoot ...
package mutation_count_playground_test import ( "context" "strings" "testing" "cloud.google.com/go/spanner" ) const StoringIndexTable = "MeasureWithStoring" func TestMeasureStoringIndex_Insert(t *testing.T) { ctx := context.Background() sc := createClient(ctx, t) empty := make(map[string]interface{}) withS...
// Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA // // 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...
package internal import ( "fmt" "io" "math" "reflect" "strconv" "github.com/tada/catch" "github.com/tada/dgo/dgo" ) // CheckAssignableTo checks if the given type t implements the ReverseAssignable interface and if // so, returns the value of calling its AssignableTo method with the other type as an // argumen...