text
stringlengths
3.08k
10.4k
// Copyright (c) 2016 <NAME> // 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...
package statsd import ( "context" "fmt" "math/rand" "sync" "testing" "time" "github.com/ash2k/stager/wait" "github.com/stretchr/testify/assert" "github.com/atlassian/gostatsd" "github.com/atlassian/gostatsd/pkg/stats" ) type testAggregator struct { agrNumber int af *testAggregatorFactory gostats...
// Copyright (c) 2017 <NAME>, Inc. // Use of this source code is governed by the Apache License 2.0 // that can be found in the COPYING file. // Package path contains methods for dealing with key.Paths. package path import ( "strings" "github.com/aristanetworks/goarista/key" ) // New constructs a path from a vari...
package cmd import ( "context" "fmt" "os" "strings" "testing" gcsStorage "cloud.google.com/go/storage" "github.com/oneconcern/datamon/internal/rand" "github.com/oneconcern/datamon/pkg/model" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "google.golang.org/api/option" ) func gene...
package v1 import ( "gorobbs/model" "gorobbs/package/app" "gorobbs/package/logging" "gorobbs/package/rcode" "gorobbs/package/session" post_service "gorobbs/service/v1/post" "os" "strconv" "strings" "github.com/gin-gonic/gin" file_package "gorobbs/package/file" ) func AddPost(c *gin.Context) { //threadId,...
package environment import ( "context" "errors" "fmt" "github.com/dgrijalva/jwt-go" "github.com/fabric8-services/fabric8-common/log" "github.com/fabric8-services/fabric8-tenant/environment/generated" "github.com/fabric8-services/fabric8-tenant/toggles" "github.com/fabric8-services/fabric8-tenant/utils" goajwt...
// // Copyright 2021 <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // package lsp import ( "bufio" "bytes" "context" "fmt" "io" "strings" "sync" "testing" "github.com/arduino/go-paths-helper" "github.com/davecgh/go-spew/...
// Copyright 2016 The go-hep 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 hbook import "sort" // indices for the 2D-binning overflows const ( bngNW int = 1 + iota bngN bngNE bngE bngSE bngS bngSW bngW ) type bin...
/* SPDX-License-Identifier: BSD-3-Clause * Copyright (c) 2019-2022 Intel Corporation. */ package cne import ( "fmt" ) type MACAddress [EtherAddrLen]uint8 type EthernetHeader struct { DAddr MACAddress // Destination address SAddr MACAddress // Source address EtherType uint16 // Frame type } type IP...
package dstate import ( "time" "github.com/jonas747/discordgo" ) func GuildSetFromGuild(guild *discordgo.Guild) *GuildSet { channels := make([]ChannelState, 0, len(guild.Channels)) for _, v := range guild.Channels { channels = append(channels, ChannelStateFromDgo(v)) } roles := make([]discordgo.Role, len(g...
package main import ( "fmt" "io" "os" "strings" "github.com/jhaals/yopass/pkg/yopass" "github.com/spf13/pflag" "github.com/spf13/viper" ) const usageTemplate = ` Yopass - Secure sharing for secrets, passwords and files Flags: %s Settings are read from flags, environment variables, or a config file located a...
// Slog uses logrus and lumberjack to provide a simple logging interface with two main funcs: // Infof(string, ...interface{}) and Errorf(string, ...interface{}) // for logging to stdout and logfile at the same time package slog import ( "fmt" "io" "os" "github.com/natefinch/lumberjack" log "github.com/sirupsen...
// Copyright 2019 Antrea 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 ...
// Copyright © 2016 Asteris, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
package dnsredir import ( "context" "fmt" "github.com/coredns/coredns/plugin" "hash/fnv" "io" "io/ioutil" "math/rand" "net" "net/http" "net/url" "strings" "sync/atomic" "time" ) const pluginName = "dnsredir" var ( pluginVersion = "?" pluginHeadCommit = "?" ) var userAgent = fmt.Sprintf("coredns-%v...
package wego import ( "crypto/tls" "crypto/x509" "github.com/godcong/wego/util" "github.com/json-iterator/go" "golang.org/x/xerrors" ) // NilPropertyProperty ... const NilPropertyProperty = "%T point is null" // SandboxProperty ... type SandboxProperty struct { AppID string AppSecret string MchID str...
// Copyright 2019-present Open Networking Foundation // // Licensed under the Apache License, Configuration 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
package nsqproducer import ( "encoding/json" "fmt" "github.com/nsqio/go-nsq" ) /* NSQProducer is an wrap for go-nsq client producer. It lookups all available nsqd instance and transpond user message to it NOTE : not thread safe */ //Setting variables var ( maxRetryTimes = 1 ) //SetMaxRetryTimes set the retry t...
package go_fast_sort type TimSorter interface { LtEq(i, j int) bool Gt(i, j int) bool Len() int // Move element from position src to position dst shifting all elements // in between. Move(dst int, src int) CopyTemp(start int, end int) // index tmpIdx point to temp storage, indxe idx to regular storage TmpLtEq...
package engine import ( "fmt" "math" "math/cmplx" "github.com/icza/balls-sdl/gfx" "github.com/veandco/go-sdl2/sdl" ) // scene is used to present the world. type scene struct { // r is the Renderer used to paint. r *sdl.Renderer // e is the engine e *Engine } // newScene creates a new scene. func newScene(...
package main import ( "errors" "fmt" "log" "strings" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/Cox-Automotive/alks-go" "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.c...
/* * Copyright © 2020 <NAME> <<EMAIL>> * * 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, pub...
/* * Originally by Komang * Found on https://www.chazzuka.com/2015/03/load-parse-json-file-golang/ */ package main import ( "encoding/json" "fmt" "io/ioutil" "os" "text/template" "sort" ) type Items struct { General GeneralSettings Graphs []Dataholder Tables []Dataholder Ga...
// Copyright 2016 VMware, 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...
/* * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package typed import ( "github.com/dgraph-io/badger" "github.com/salesforce/sloop/pkg/sl...
// Copyright (C) Activision Publishing, Inc. 2017 // https://github.com/Demonware/harbor-analytics // Author: <NAME> // Licensed under the 3-Clause BSD License (the "License"); // you may not use this file except in compliance with the License. package registry import ( "log" "sort" "time" "github.com/demonware/...
package gitlab import ( "github.com/goharbor/harbor/src/lib/log" adp "github.com/goharbor/harbor/src/replication/adapter" "github.com/goharbor/harbor/src/replication/adapter/native" "github.com/goharbor/harbor/src/replication/model" "github.com/goharbor/harbor/src/replication/util" "strings" ) func init() { if...
package logx import ( "github.com/xuzhuoxi/infra-go/mathx" "log" ) type LogLevel uint8 type LogType uint8 const ( LevelAll LogLevel = iota LevelTrace LevelDebug LevelInfo LevelWarn LevelError LevelFatal LevelOff ) const ( //命令行 TypeConsole LogType = iota //基于体积分割的文件日志 TypeRollingFile //基于日期分割的文件日志 T...
package trace import ( "log" "os" "strconv" "sync" "time" ) const _maxLevel = 64 func newTracer(serviceName string, report reporter, cfg *Config) Tracer { // hard code reset probability at 0.00025, 1/4000 cfg.Probability = 0.00025 sampler := newSampler(cfg.Probability) // default internal tags tags := ext...
// Copyright (c) 2021 <NAME> // // This software is released under the MIT License. // https://opensource.org/licenses/MIT package wiz import ( "encoding/json" "fmt" "strings" "github.com/Dadido3/D3iot/light/emission" ) // Product represents a specific WiZ model. // It may contain abilities, limits, profiling a...
package simgo import ( "errors" "flag" "fmt" "io/ioutil" "net/http" "os" "os/signal" "strconv" "sync" "syscall" "github.com/golang/glog" "github.com/gorilla/mux" "github.com/zieckey/dbuf" "github.com/zieckey/goini" "time" ) // The default unis.instance var ...
// Copyright 2015 The Serulian 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 karma implements support for testing Serulian code via the karma testing framework. package karma import ( "bytes" "encoding/json" "fmt" "...
package nano import ( "fmt" "log" "math" "sync/atomic" "time" ) const ( loopForever = -1 ) var ( // default timer backlog timerBacklog = 128 // timerManager manager for all timers timerManager = &struct { incrementID int64 // auto increment id timers map[int64]*Timer // all timer...
// Fetch ElasticSearch cluster status and performance data and store it // into Graphite. package main import ( "bytes" "encoding/json" "flag" "fmt" "io/ioutil" "log" "log/syslog" "net" "net/http" "time" ) import _ "expvar" // DefaultTimeout is connection timeout, in seconds const DefaultTimeout = 5 var (...
/* File Name: Network IPv4 Broadcast.go Copyright: 2021 Peernet s.r.o. Author: <NAME> IPv4 Multicast just sucks (can't use socket bound to 0.0.0.0:PortMain and send to 172.16.58.3:PortMulticast), so we rely on Broadcast instead. */ package core import ( "encoding/hex" "errors" "net" "strconv"...
package jdfc import ( "io/ioutil" "net/url" "os" "path/filepath" "strings" "github.com/complyue/jdfs/pkg/errors" "github.com/complyue/jdfs/pkg/fuse" "github.com/golang/glog" ) // PrepareMountpoint takes an argument for mountpoint, determines the absolute path for the // mountpoint, validate it for JDFS mount...
package tseries import ( "errors" "time" "github.com/alecthomas/units" "github.com/prometheus/prometheus/tsdb" "github.com/urfave/cli" ) const days = 24 * time.Hour type Config struct { ENabled bool `json:",omitempty"` Path string `json:",omitempty"`...
/* Copyright 2020 DevSpace Technologies Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
// Package project handles language execution, package management and configuration for bramble projects. package project import ( "context" "io/fs" "os" "path/filepath" "strings" "github.com/maxmcd/bramble/internal/config" "github.com/maxmcd/bramble/internal/dependency" "github.com/maxmcd/bramble/internal/tr...
package main import ( "flag" "fmt" "log" "os" "sort" "time" "github.com/kiteco/kiteco/kite-go/segment-analysis/internal/tracks" "github.com/kiteco/kiteco/kite-golib/segment/analyze" "github.com/kiteco/kiteco/kite-golib/segment/segmentsrc" chart "github.com/wcharczuk/go-chart" ) var ( // supported platform...
package main import ( "bytes" "encoding/json" "fmt" "log" "strings" "time" "github.com/dc0d/errgo" "github.com/dc0d/persical" "github.com/fatih/color" ) type cmdDefault struct { st *stat out *bytes.Buffer logger *log.Logger } func newCmdDefault(st *stat) *cmdDefault { result := &cmdDefault{ st...
package httputil import ( "encoding/json" "encoding/xml" "errors" "io/ioutil" "net/http" "net/url" "strings" "github.com/mkideal/pkg/option" ) var ( ErrUnableToMarshalForm = errors.New("unable to marshal form") ) const ( charsetUTF8 = "charset=utf-8" MIMEApplicationJSON = "application/j...
// Copyright (c) 2020 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...
package main import ( "bufio" "bytes" "fmt" "os" ) func main() { reader := bufio.NewReader(os.Stdin) n, k := readTwoNums(reader) S, _ := reader.ReadString('\n') solver := solve(n, k, S) q := readNum(reader) var buf bytes.Buffer for q > 0 { q-- tmp, _ := reader.ReadString('\n') ans := solver.Query(len...
// Package httpdebug provides utilities to assist the debugging // of HTTP requests. // // Example usage: // import ( // dbg "github.com/gmlewis/go-httpdebug/httpdebug" // "github.com/google/go-github/v43/github" // "golang.org/x/oauth2" // ) // // ... // ctx := context.Background() // ts := oauth...
package webauthn import ( "crypto/x509" "errors" "fmt" "strings" "github.com/pomerium/webauthn/cose" ) // VerifyPackedAttestationStatement verifies that an AttestationObject's attestation statement is valid according to the // packed verification procedure. func VerifyPackedAttestationStatement( attestationObj...
package gorched import ( tl "github.com/JoelOtter/termloop" "github.com/zladovan/gorched/entities" ) // Round represents one round in the game. // It is responsible for managing state of the round. // It also provides functionality for transitions to next rounds. // Use NewRound to create new instance. // Add it to...
package cluster import ( "fmt" "strings" "github.com/zalando/postgres-operator/pkg/spec" "github.com/zalando/postgres-operator/pkg/util" v1 "k8s.io/api/core/v1" ) // VersionMap Map of version numbers var VersionMap = map[string]int{ "9.5": 90500, "9.6": 90600, "10": 100000, "11": 110000, "12": 120000, ...
/* 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...
package sqlapi import ( "context" "database/sql" "fmt" "log" "net" "os" "strconv" "strings" "time" "github.com/cenkalti/backoff/v4" "github.com/jackc/pgx/v4" "github.com/rickb777/sqlapi/driver" "github.com/rickb777/where/quote" ) // MustConnectEnv is as per ConnectEnv but with a fatal termination on err...
package handlers import ( "net/http" "time" "github.com/baking-bad/bcdhub/internal/bcd" "github.com/baking-bad/bcdhub/internal/bcd/consts" "github.com/baking-bad/bcdhub/internal/bcd/tezerrors" "github.com/baking-bad/bcdhub/internal/bcd/types" "github.com/baking-bad/bcdhub/internal/database" "github.com/baking...
package segmenttree import ( "fmt" "sync" ) // SegmentTreeUpdateFunc receive data of left-child node and right-child node // calculate and return the current node data // it can be implement by user and pass as param when creating segment tree type SegmentTreeUpdateFunc func(leftChildData, rightChildData interface{...
// Copyright (C) 2019-2020 Zilliz. 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 l...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: user_table_started.proto package v1 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 used. var _ = proto.M...
package trackerimport import ( "context" "encoding/base64" "encoding/json" "fmt" "io/ioutil" "net/http" "net/http/httptest" "strings" "testing" "github.com/google/go-github/v33/github" "github.com/stretchr/testify/require" "issues2stories/internal/config" "issues2stories/internal/githubapi" "issues2stor...
package main import ( "fmt" "io" "log" "net/http" "os" "runtime" "github.com/docopt/docopt-go" "github.com/hashicorp/logutils" ) //go:generate echo Let's go bananas! //go:generate go run misc/gen_schemas.go //go:generate ./misc/gen_meta.sh const ( binName = "monkey" binTitle = binName + "/" + binVers...
package mlog import ( "fmt" "io" "github.com/dogmatiq/configkit" "github.com/dogmatiq/iago/must" ) const ( // TransactionIDIcon is the icon shown directly before a transaction ID. It // is a circle with a dot in the center, intended to be reminiscent of an // electron circling a nucleus, indicating "atomicity...
package materialize import ( "context" "io" "testing" "github.com/bradleyjkemp/cupaloy" "github.com/estuary/flow/go/protocols/fdb/tuple" pf "github.com/estuary/flow/go/protocols/flow" "github.com/stretchr/testify/require" ) func TestStreamLifecycle(t *testing.T) { var stream = new(stream) var recvFn = &srvS...
// Copyright 2014 <NAME> // All rights reserved // // Redistribution and use in source and binary forms, with or without // modification, are permitted providing that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the f...
/* Copyright 2019 The HAProxy Ingress Controller Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
// Copyright 2018 The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to...
// Copyright 2012 tsuru 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 app import ( "bytes" "crypto/rand" "fmt" "github.com/fsouza/go-iam" "github.com/globocom/config" "io" "launchpad.net/goamz/aws" "launchpad.net/g...
package bittorrent import ( "errors" "io" "sync" "time" "github.com/i96751414/libtorrent-go" ) const ( piecesRefreshDuration = 500 * time.Millisecond ) type reader struct { mu *sync.Mutex storage libtorrent.StorageInterface torrent *Torrent offset int64 length ...
package execute import ( "context" "fmt" "strings" "sync" "time" "github.com/jjzcru/elk/internal/cli/command/run" "github.com/jjzcru/elk/pkg/engine" "github.com/jjzcru/elk/pkg/primitives/ox" "github.com/jjzcru/elk/pkg/utils" "github.com/spf13/cobra" ) var usageTemplate = `Usage: elk exec [commands] [flag...
/* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
package graphql import ( "regexp" "text/template" "github.com/99designs/gqlgen/codegen" "github.com/99designs/gqlgen/codegen/templates" "github.com/99designs/gqlgen/plugin" "github.com/iancoleman/strcase" "github.com/lolopinto/ent/internal/action" intcodegen "github.com/lolopinto/ent/internal/codegen" "githu...
package util import ( "testing" "time" "github.com/stretchr/testify/assert" ) func TestTimeStartOf(t *testing.T) { // February 3, 2016, 04:05:06 tt := time.Date(2016, time.February, 3, 4, 5, 6, 0, time.UTC) assert.Equal(t, "2016-01-01T00:00:00Z", TimeStartOf(tt, "year").Format(time.RFC3339)) assert.Equal(t, ...
package basestreamseeder import ( "errors" "sync" "sync/atomic" "time" "github.com/Deepchain-foundation/lachesis-base/gossip/basestream" "github.com/Deepchain-foundation/lachesis-base/utils/workers" ) var ( ErrSelectorMismatch = errors.New("session selector mismatch") ErrTooManyChunks = errors.New("too ma...
package kustomize import ( "bytes" "compress/gzip" "context" "encoding/base64" "fmt" "io" "log" "runtime" "strings" k8scorev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" k8svalidation "k8s.io/apimachinery/pkg/api/validation" k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8suns...
package controllers import ( "encoding/json" "strconv" "github.com/astaxie/beego" "github.com/cdle/o2m/models" "github.com/go-playground/locales/zh" ut "github.com/go-playground/universal-translator" "gopkg.in/go-playground/validator.v9" zh_translations "gopkg.in/go-playground/validator.v9/translations/zh" ) ...
package grpc import ( "bytes" "context" "encoding/json" "errors" "fmt" "io" "strings" "sync" "time" "github.com/fullstorydev/grpcurl" "github.com/jhump/protoreflect/grpcreflect" "github.com/rs/zerolog" "github.com/j75689/Tmaster/pkg/endpoint" "github.com/j75689/Tmaster/pkg/graph/model" "google.golang.o...
// Package authmgr provides simple interface for Google oauth2 authentication // for console applications. package authmgr import ( "context" "crypto/sha1" "encoding/hex" "fmt" "io" "io/ioutil" "net/http" "os" "os/exec" "path" "runtime" "github.com/shibukawa/configdir" "golang.org/x/oauth2" "golang.org/...
// SPDX-License-Identifier: Apache-2.0 package npm import ( "crypto/sha256" "fmt" "os/exec" "path/filepath" "strings" "spdx-sbom-generator/internal/helper" "spdx-sbom-generator/internal/models" "spdx-sbom-generator/internal/reader" ) type npm struct { metadata models.PluginMetadata } var ( shrink = ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: model.proto package profile import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile...
// Copyright (c) 2017 <NAME> <<EMAIL>> // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package styles import ( "reflect" "github.com/plandem/xlsx/internal/ml" ) //DefaultDirectStyle is ID for any default direct style than depends on context: // E.g. for cell...
package main import ( "fmt" "os" "strings" "github.com/Masterminds/semver" "github.com/bitrise-io/go-utils/command" "github.com/bitrise-io/go-utils/command/gems" "github.com/bitrise-io/go-utils/command/rubycommand" "github.com/bitrise-io/go-utils/fileutil" "github.com/bitrise-io/go-utils/log" "github.com/bi...
package session import ( "context" "fmt" "sync" "github.com/consensys/orchestrate/pkg/toolkit/app/log" "github.com/consensys/orchestrate/pkg/utils" ethclientutils "github.com/consensys/orchestrate/src/infra/ethclient/utils" "github.com/consensys/orchestrate/src/tx-listener/dynamic" provider "github.com/consen...
/* * Copyright (C) 2020 <NAME> * * 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, Vers...
package lti import ( "github.com/goalbook/goalbook-auth/auth/lti/types" "bytes" "io" "io/ioutil" "encoding/json" "github.com/goalbook/goalbook-auth/auth/lti/Godeps/_workspace/src/github.com/google/go-querystring/query" "github.com/goalbook/goalbook-auth/auth/lti/Godeps/_workspace/src/github.com/gorilla/schema...
package slack import ( "fmt" "strings" "github.com/codeamp/circuit/plugins" "github.com/codeamp/transistor" slack "github.com/lytics/slackhook" log "github.com/codeamp/logger" ) //Slack is a local struct for slack plugin type Slack struct { events chan transistor.Event } func init() { transistor.RegisterPl...
package parser import "github.com/butlermatt/glox/lexer" type Expr interface { Accept(ExprVisitor) (interface{}, error) } type Stmt interface { Accept(StmtVisitor) error } type ArrayExpr struct { Values []Expr } func (a *ArrayExpr) Accept(visitor ExprVisitor) (interface{}, error) { return visitor.VisitArrayExpr...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package tencentcloud_vpc import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Provide a resource to create a VPC subne...
/* copyright 2020 the Goployer 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, sof...
package testing import ( "fmt" "time" "github.com/GoogleCloudPlatform/open-match/config" "github.com/GoogleCloudPlatform/open-match/internal/logging" "github.com/GoogleCloudPlatform/open-match/internal/metrics" "github.com/GoogleCloudPlatform/open-match/internal/pb" "github.com/GoogleCloudPlatform/open-match/i...
package room import ( "game/algorithm" "lib/utils" ) //抢杠胡处理 func (t *Desk) qiangKongHe(seat uint32, card byte) { if t.opt[seat]&algorithm.QIANG_GANG > 0 { msg := res_operate2(seat, t.seat, algorithm.QIANG_GANG, algorithm.QIANG_GANG, uint32(card)) t.broadcast(msg) kongs := t.getKongCards(t.seat) var cs ...
package autoconfig import ( "encoding/json" "fmt" "net/http" "net/http/httptest" "testing" "time" "github.com/launchdarkly/ld-relay/v6/config" "github.com/launchdarkly/ld-relay/v6/internal/core/httpconfig" "github.com/launchdarkly/ld-relay/v6/internal/envfactory" "github.com/launchdarkly/go-test-helpers/v2...
//go:build windows package win import ( "encoding/binary" "unsafe" "github.com/rodrigocfd/windigo/win/co" ) // 📑 https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmap type BITMAP struct { bmType int32 BmWidth int32 BmHeight int32 BmWidthBytes int32 BmPla...
package main import ( "encoding/base64" "fmt" "os" "regexp" "strconv" "time" "github.com/immesys/wave/eapi/pb" logrus "github.com/sirupsen/logrus" ) var log = logrus.New() func init() { log.SetFormatter(&logrus.TextFormatter{FullTimestamp: true, ForceColors: true}) log.SetOutput(os.Stdout) log.SetLevel(l...
package core /** * Copyright 2019 IBM 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...
package model import ( "encoding/json" "errors" xtime "go-common/library/time" "strconv" "strings" ) // EmbedMid is type EmbedMid struct { Mid int64 `json:"mid"` } // PassportSummary is type PassportSummary struct { EmbedMid TelStatus int64 `json:"tel_status"` CountryID int64 `json:"country_id"` Join...
// Package enums helps you find instances when you find cases where you // have not updated code to handle all enums you have. This is not a fully // automated like exhaustive(https://github.com/nishanths/exhaustive) but // rather intended to be used in cases where you might want to apply your own // logic while still ...
// Copyright © 2016 The Things Network // Use of this source code is governed by the MIT license that can be found in the LICENSE file. package broker import ( "bytes" "encoding" "encoding/binary" "math" "reflect" "sync" dbutil "github.com/TheThingsNetwork/ttn/core/storage" "github.com/TheThingsNetwork/ttn/u...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: minter/v1/minter_signer.proto package types import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal va...
package service import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "os" "path/filepath" "strconv" "strings" "time" "github.com/thehaohcm/go-simple-onedrive/enums" "github.com/thehaohcm/go-simple-onedrive/models" "github.com/thehaohcm/go-simple-onedrive/utils" ) var ( bloc...
package goblin import ( "errors" "fmt" "net/http" "regexp" "strings" "sync" ) // Tree is a trie tree. type Tree struct { method map[string]*Node } // Node is a node of tree. type Node struct { label string handler http.Handler children map[string]*Node } // Param is parameter. type Param struct { key...
// Copyright 2021 The Wuffs 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
// Copyright 2018 Capital One Services, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
package retry import ( "context" "math" "math/rand" "time" "github.com/ydb-platform/ydb-go-sdk/v3/internal/errors" "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) // Default parameters used by Retry() functions within different sub packages. const ( fastSlot = 5 * time.Millisecond slowSlot = 1 * time.Second ...
/* Package profiling provides tools for recording frame timings for later analysis. The simplest usage is to construct a profilier at the start of your event loop function and to defer stopping it until the window is closed. Something like: func loop(w *app.Window) error { // log to a CSV file with a rand...