text
stringlengths
3.08k
10.4k
// Code generated by go-swagger; DO NOT EDIT. package trading // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/...
/* Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
package identity import ( "time" "github.com/fox-one/mixin-sdk" ) // Authorization Authorization type Authorization struct { ID uint64 `json:"id"` UserID uint64 `json:"user_id"` AppID uint32 `json:"app_id"` Provider AuthProviderTypeEnum `json:"provid...
/* Copyright 2019 The Skaffold 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 log /* This go file centralizes log messages (in different levels) so we have them all in one place. Although having the names of the consts as the error code (i.e CAKC001) and not as a descriptive name (i.e WriteAccessTokenError) can reduce readability of the code that raises the error, we decided to do s...
package blade import ( "encoding/json" "fmt" "os" "strings" "time" "github.com/jamethy/saw/config" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" "github.com/fatih/color" ) // A...
package database import ( "context" "database/sql" "time" "github.com/jmoiron/sqlx" "github.com/volatiletech/null" ) type ( Master interface { Exec(query string, args ...interface{}) (sql.Result, error) // ExecContext use master database to exec query ExecContext(ctx context.Context, query string, args ...
package data import ( "fmt" "github.com/Junvary/gin-quasar-admin/GQA-BACKEND/global" "github.com/Junvary/gin-quasar-admin/GQA-BACKEND/model/system" "go.uber.org/zap" "gorm.io/gorm" "time" ) var SysConfigBackend = new(sysConfigBackend) type sysConfigBackend struct{} var sysConfigBackendData = []system.SysConfi...
// Copyright 2021 The Mellium Contributors. // Use of this source code is governed by the BSD 2-clause // license that can be found in the LICENSE file. package muc import ( "encoding/xml" "math" "strconv" "time" "mellium.im/xmlstream" ) type historyConfig struct { maxStanzas *uint64 maxChars *uint64 seco...
package client import ( "context" "fmt" "io" "sync" "sync/atomic" "github.com/go-ocf/cloud/grpc-gateway/pb" ) // DeviceOnlineHandler handler of events. type DeviceOnlineHandler = interface { HandleDeviceOnline(ctx context.Context, val *pb.Event_DeviceOnline) error SubscriptionHandler } // DeviceOfflineHandl...
package config import ( "github.com/NYTimes/gizmo/server" "github.com/cbsinteractive/transcode-orchestrator/db/redis/storage" logging "github.com/fsouza/gizmo-stackdriver-logging" "github.com/kelseyhightower/envconfig" "github.com/zsiec/pkg/tracing" ) // Config is a struct to contain all the needed configuration...
// Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "io" "log" "os" "os/exec" "sync" "syscall" "time" ) // There are several complications here: // // * The process may start...
// Copyright 2018 <NAME> <<EMAIL>>. All rights reserved. Use of this source code is // governed by the Apache-2.0 license that can be found in the LICENSE file. package checks import ( "errors" "fmt" "golang.org/x/sys/windows/registry" ) func init() { availableChecks["registry"] = RegistryKeyCheckerFromArgs ...
/* Copyright 2018 The Service Fabrik 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 writi...
package main import ( "bufio" "encoding/json" "encoding/xml" "flag" "fmt" "io" "os" "sort" "strings" "time" "github.com/kubernetes-incubator/service-catalog/tools/gotest2junit/pkg/api" ) type Record struct { Package string Test string Time time.Time Action string Output string Elapsed float...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package hub import ( "encoding/json" "linker-fan/gal-anonim-server/server/models" "log" "strconv" "time" "github.com/gorilla/websocket" ) const ( // Max wait time when writing message to peer writeWait = 10 * time.Second // Max time till next pong from peer pongWait = 60 * time.Second // Send ping interva...
package container import ( "fmt" "net" "time" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "github.com/weaveworks/ignite/pkg/constants" "github.com/weaveworks/ignite/pkg/util" "k8s.io/apimachinery/pkg/util/wait" ) /* ip r list src 172.17.0.3 ip addr del "$IP" dev eth0 ip link add name br0 type ...
package sources import ( "crypto/sha256" "fmt" "io" "io/ioutil" "net/http" "net/url" "os" "path" "path/filepath" "regexp" "sort" "strings" lxd "github.com/lxc/lxd/shared" "github.com/pkg/errors" "gopkg.in/antchfx/htmlquery.v1" "github.com/lxc/distrobuilder/shared" ) type opensuse struct { common } ...
package admission import ( "context" "encoding/json" "fmt" "io/ioutil" "net/http" configuration "github.com/kong/kubernetes-ingress-controller/pkg/apis/configuration/v1" "github.com/sirupsen/logrus" admission "k8s.io/api/admission/v1" corev1 "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" ...
// Package webhook provides the handlers and customization points for implementing a K8s webhook // for authentication and authorization using Athenz. package webhook import ( "context" "crypto/tls" "fmt" "log" "net/http" "os" "time" authn "k8s.io/api/authentication/v1beta1" authz "k8s.io/api/authorization/v...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package imports import ( "runtime" "sync" "github.com/src-d/imports" _ "github.com/src-d/imports/languages/all" // register the supported languages "gopkg.in/src-d/go-git.v4" gitplumbing "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/go-git.v4/plumbing/object" "gopkg.in/src-d/go-git.v4/utils/merkletrie" ...
// 指定された JavaScript を読み出し、 package main import ( "fmt" "math" "github.com/robertkrimen/otto" ) const ( varInterval = "interval" varNumSample = "n" varFunction = "f" varAnswer = "answer" ) func runJS(jsFilePath string) (err error) { // otto の初期化と JavaScript ファイルから必要な項目の読み出し vm, jsF, interval, n, err ...
package contentful import ( "bytes" "encoding/json" "fmt" "strconv" ) // AssetsService service type AssetsService service // File model type File struct { Name string `json:"fileName,omitempty"` ContentType string `json:"contentType,omitempty"` URL string `json:"url,omitempty"` ...
// 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
package endpoints import ( "encoding/json" "fmt" "strings" workloadutil "github.com/rancher/rancher/pkg/controllers/user/workload" "github.com/rancher/types/apis/core/v1" "github.com/rancher/types/apis/extensions/v1beta1" managementv3 "github.com/rancher/types/apis/management.cattle.io/v3" "github.com/rancher...
package margaid import ( "math" "strconv" "time" "github.com/erkkah/margaid/svg" ) // Ticker provides tick marks and labels for axes type Ticker interface { label(value float64) string start(axis Axis, series *Series, steps int) float64 next(previous float64) (next float64, hasMore bool) } // TimeTicker retu...
package server // //Copyright 2018 Telenor Digital AS // //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 ...
// ------------------------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // -----------------------------------------------------------------...
package logwatchtest import ( "fmt" "io/ioutil" "math/rand" "os" "strconv" "strings" "testing" "time" fswatch "github.com/pandafw/pango-fswatch" "github.com/pandafw/pango/iox" "github.com/pandafw/pango/log" ) const ( LOGCONF1 = ` { "async": ASYNC, "format": "text:%l %S %F() - %m%n%T", "level": { "*"...
package application import ( "fmt" "io/ioutil" "strings" "sync" "testing" "time" "k8s.io/apimachinery/pkg/labels" "k8s.io/api/core/v1" "github.com/kyma-project/kyma/tests/application-operator-tests/test/testkit" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/...
package checkpoint import ( "context" "errors" "fmt" "io" "io/ioutil" "github.com/golang/snappy" "github.com/oasisprotocol/oasis-core/go/common/cbor" "github.com/oasisprotocol/oasis-core/go/common/crypto/hash" "github.com/oasisprotocol/oasis-core/go/storage/mkvs" db "github.com/oasisprotocol/oasis-core/go/...
package csvtools import "reflect" type Record interface { CSVKey() interface{} CSVGroups() []Group CloneEmptyRecord() Record } type Group interface { SetVal(r Record, val interface{}) Val(r Record) interface{} ValIsEmpty(r Record) bool List(r Record) []interface{} SetList(r Record, values []interface{}) } t...
package tcp import ( "container/heap" "github.com/YaoZengzeng/yustack/seqnum" ) // receiver holds the state necessary to receive TCP segments and turn them // into a stream of bytes type receiver struct { ep *endpoint rcvNxt seqnum.Value // rcvAcc is the one beyond the last acceptable sequence number. That i...
// Copyright (c) 2018 <NAME> // Copyright © 2019 Arrikto Inc. All Rights Reserved. package main import ( "context" "crypto/rand" "crypto/tls" "crypto/x509" "encoding/json" "fmt" "net/http" "net/url" "path" "path/filepath" "strings" log "github.com/sirupsen/logrus" "golang.org/x/oauth2" "k8s.io/apiserv...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/nnqq/td/bin" "github.com/nnqq/td/tdp" "github.com/nnqq/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _ = context.Background() _ = fmt...
/* -------------------------------------------------------------------------- */ /* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may ...
/* Copyright The Guard 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, software d...
package main import ( "crypto/rand" "encoding/base64" "flag" "fmt" "io" "log" "net/url" "os" "os/signal" "strings" "syscall" "time" "github.com/Howard0o0/go-shadowsocks2/tinylog" "github.com/shadowsocks/go-shadowsocks2/core" "github.com/shadowsocks/go-shadowsocks2/socks" ) var config struct { Verbose...
/* 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...
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
package agent import ( "archive/tar" "bytes" "compress/gzip" "fmt" "io" "io/ioutil" "log" "math/rand" "net/http" "net/rpc" "os" "os/exec" "path/filepath" "strings" heiko_rpc "github.com/heiko-io/heiko/internal/rpc" ) func Start() { fmt.Println("Hello from the agent!") jobs := new(heiko_rpc.RpcContro...
package memcache // This package implements the util/singleton interface, on top of a memcache client lib. import( "bytes" "encoding/gob" "fmt" "io" "net" "time" "golang.org/x/net/context" // Use a forked version of bradfitz's lib, so that we can pass in a dialer func mclib "github.com/skypies/gomemcache/m...
package actions import ( "fmt" "io" "sync/atomic" "time" "github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/common" "github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/fscommon" "github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/fslocal" "github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/fsnil"...
package routingtable import ( "fmt" "code.cloudfoundry.org/bbs/models" "code.cloudfoundry.org/lager" tcpmodels "code.cloudfoundry.org/routing-api/models" "code.cloudfoundry.org/routing-info/tcp_routes" ) type EndpointKey struct { InstanceGUID string Evacuating bool } func (key *EndpointKey) String() string...
package main import ( "fmt" "log" "net/http" "path" "strconv" "strings" zim "github.com/akhenakh/gozim" "github.com/blevesearch/bleve" ) const ( ArticlesPerPage = 16 ) func cacheLookup(url string) (*CachedResponse, bool) { if v, ok := cache.Get(url); ok { c := v.(CachedResponse) return &c, ok } retu...
// 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 app import ( "context" "io" "net/http" "strings" "time" "github.com/felixge/httpsnoop" "github.com/pkg/errors" "github.com/target/goalert/config" "github.com/target/goalert/graphql" "github.com/target/goalert/permission" "github.com/target/goalert/util/log" ) type _reqInfoCtxKey string const reqI...
// Copyright 2020 SEQSENSE, 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 ...
/* Sniperkit-Bot - Status: analyzed */ // Copyright 2015-2016, Cyrill @ Sch<EMAIL> and the CoreStore contributors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apa...
package report import ( "database/sql" "fmt" "strconv" "strings" "sistemas-a3/backend-reports/database" ) type ProductReport struct { ID uint64 Name string Quantity uint64 } type MaterialRest struct { RawMaterialId uint64 Name string Quantity uint64 } type raw_material struct { ...
// Copyright 2021 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package blockwriter import ( "context" "database/sql" "fmt" "math/rand" "strings" "sync" "time" "github.com/google/uuid" "github.com/juju/errors" "github.com/ngaut/log" "github.com/pingcap/tipocket/pkg/cluster/types" "github.com/pingcap/tipocket/pkg/core" "github.com/pingcap/tipocket/util" ) const bloc...
// Copyright 2020-Present VMware, Inc. // SPDX-License-Identifier: Apache-2.0 package clusterstore_test import ( "fmt" "testing" "github.com/pivotal/kpack/pkg/apis/build/v1alpha2" corev1alpha1 "github.com/pivotal/kpack/pkg/apis/core/v1alpha1" "github.com/pivotal/kpack/pkg/client/clientset/versioned/fake" "gith...
package graphsync import ( "context" "github.com/ipfs/go-graphsync" "github.com/ipfs/go-graphsync/requestmanager/asyncloader" "github.com/ipfs/go-graphsync/ipldbridge" gsmsg "github.com/ipfs/go-graphsync/message" "github.com/ipfs/go-graphsync/messagequeue" gsnet "github.com/ipfs/go-graphsync/network" "github...
// Copyright (c) 2021 Terminus, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
// Copyright (C) 2019 <NAME>, Inc. // See LICENSE for copying information. package macaroon import ( "encoding/binary" "errors" ) type fieldType int const ( fieldEOS fieldType = 0 fieldLocation fieldType = 1 fieldIdentifier fieldType = 2 fieldVerificationID fieldType = 4 fieldSignature ...
package httpevents import ( "context" "net/http" "net/http/httptest" "testing" "github.com/segmentio/events/v2" "github.com/segmentio/events/v2/eventstest" ) type writer struct { http.ResponseWriter writeHeader int } func (w *writer) WriteHeader(status int) { w.writeHeader++ w.ResponseWriter.WriteHeader(s...
package cmd import ( "bytes" "fmt" "log" "os" "path/filepath" "strings" "text/template" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment/container/containerd" "github.com/spf13/cobra" ) var nerdctlCmdArgs st...
package resources import ( "path/filepath" "testing" "image" "io" "io/ioutil" "os" "runtime" "strings" "github.com/gohugoio/hugo/langs" "github.com/gohugoio/hugo/modules" qt "github.com/frankban/quicktest" "github.com/gohugoio/hugo/cache/filecache" "github.com/gohugoio/hugo/helpers" "github.com/gohugo...
/* Copyright (c) 2018 Bitnami 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 dis...
package http import ( "strings" "github.com/Major818/n9e/v4/src/models" "github.com/gin-gonic/gin" ) func treeUntilLeafGets(c *gin.Context) { me := loginUser(c) ret, err := models.UserPermNodes(me) dangerous(err) query := queryStr(c, "query", "") if query == "" { // 没有搜索条件,直接返回即可 renderData(c, ret, nil...
// Copyright © 2017 <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 cache import ( "context" "crypto/md5" "fmt" "net/http" "strings" "sync" "sync/atomic" "time" "go-common/library/ecode" "go-common/library/log" bm "go-common/library/net/http/blademaster" "go-common/library/net/http/blademaster/middleware/cache/store" ) const ( _degradeInterval = 60 * 10 _degrad...
package output import ( "bytes" "encoding/gob" "errors" "fmt" "io" "log" "net/http" "os" "strconv" "strings" "time" "github.com/benchttp/runner/ansi" "github.com/benchttp/runner/config" "github.com/benchttp/runner/output/export" "github.com/benchttp/runner/requester" ) // make export functions mockabl...
package main import ( "fmt" "github.com/alecthomas/kong" "github.com/pkg/errors" "net" "regexp" ) var tunExp = regexp.MustCompile("tun[0-9]+") var tapExp = regexp.MustCompile("tap[0-9]+") var hostExp = regexp.MustCompile( "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*" + "([a-zA-Z0-9]|[a-zA-Z0-9]...
package pluginapi import ( "io/ioutil" "path/filepath" "github.com/blang/semver" "github.com/mattermost/mattermost-server/v5/model" "github.com/mattermost/mattermost-server/v5/plugin" "github.com/mattermost/mattermost-server/v5/utils" "github.com/pkg/errors" ) type ensureBotOptions struct { ProfileImagePath ...
package jsoniter import ( "errors" "io" "reflect" "sync/atomic" "unsafe" ) type Config struct { IndentionStep int MarshalFloatWith6Digits bool SupportUnexportedStructFields bool Tag string } type frozenConfig struct { indentionStep int decoderCache unsafe.P...
package main import ( "encoding/json" "flag" "fmt" "google.golang.org/cloud/compute/metadata" "gopkg.in/mgo.v2/bson" "io" "log" "net/http" "os" "time" ) var config Config var Debug bool var gce bool var Password string var quit chan struct{} var Servers map[MailSender]bool var emailRegex string = "\\b[a-zA-...
package gen import ( "fmt" "go/ast" "strings" "github.com/go-clang/bootstrap/clang" ) // Enum represents a generation enum. type Enum struct { IncludeFiles IncludeFiles Name string CName string CNameIsTypeDef bool Receiver Receiver Comment string UnderlyingType string It...
package framework import ( "flag" "fmt" "reflect" "strings" "testing" ) var fEnv = flag.String("env", "", "name of the environment executing against") var fProvider = flag.String("env.provider", "", "cloud provider for which environment is executing against") var fOS = flag.String("env.os", "", "operating system...
package api import ( "bytes" "context" "encoding/base64" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "sort" "strings" "time" "github.com/fullstorydev/grpcurl" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/jhump/protoreflect/desc" "google.golang.org/grpc" "go...
package human import ( "encoding/json" "fmt" "testing" "time" yaml "gopkg.in/yaml.v3" ) func TestTimeParse(t *testing.T) { now := time.Now() end := now.Add(1 * time.Second) for _, test := range []struct { in string out Duration }{ {in: "now", out: 0}, {in: "1ns ago", out: -Nanosecond}, {in: "1µ...
// Copyright 2021 Dolthub, 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...
// Code generated by smithy-go-codegen DO NOT EDIT. package databasemigrationservice import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/databasemigrationservice/types" "github.com/awslabs/smithy-go/midd...
// Copyright (c) 2018 The Jaeger 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 agree...
package main import ( "fmt" "log" "os" "path" "strings" "time" . "github.com/fogleman/fauxgl" "github.com/nfnt/resize" cutter "github.com/pschou/go-cutter" ) const ( aa = 4 width = 1024 height = 1024 near = 1 far = 10 ) var ( eye = V(3, 3, 3) center = V(0, 0, 0) up = V(0, 0, 1) a...
package build import ( "fmt" "os" "path/filepath" "regexp" "strings" "github.com/apex/log" "github.com/otiai10/copy" "github.com/tarantool/cartridge-cli/cli/common" "github.com/tarantool/cartridge-cli/cli/context" "github.com/tarantool/cartridge-cli/cli/docker" "github.com/tarantool/cartridge-cli/cli/proj...
/* Copyright 2020 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, ...
// Copyright 2015 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 rio import ( "compress/flate" "compress/gzip" "compress/zlib" "io" ) // A Compressor takes data written to it and writes the compressed form ...
/* Copyright 2021 The Crossplane 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, ...
/* Copyright 2019 The Knative 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, soft...
package cmd import ( "fmt" "os" "strconv" "github.com/olekukonko/tablewriter" "github.com/spf13/cobra" "github.com/yann0917/dedao-dl/cmd/app" "github.com/yann0917/dedao-dl/utils" ) var ( cType string classID int articleID int bookID int compassID int topicID string ) var courseTypeCmd = &cob...
package event import ( "bytes" "encoding/binary" "fmt" "io" "sort" "time" "go.etcd.io/bbolt" ) const ( // TimestampLength is the length in bytes it takes to serialize a // timestamp with nanosecond precision. TimestampLength = 8 ) var ( // Big endian is the preferred byte order, due to cursor scans over ...
package main import ( "bufio" "encoding/json" "fmt" "io/ioutil" "log" "os" "path/filepath" "runtime" "sort" "strings" "time" "github.com/jdockerty/easyarchive/internal/glacierupload" "github.com/jdockerty/easyarchive/internal/md5calc" "github.com/jdockerty/easyarchive/internal/zipdir" ) const ( runnin...
// Code generated by smithy-go-codegen DO NOT EDIT. package databasemigrationservice import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/databasemigrationservice/types" smithy "github.com/awslabs/smithy-...
// Copyright © 2020 Weald Technology Trading // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
package pg2mysql import ( "database/sql" "errors" "fmt" "os" "strings" ) type Migrator interface { Migrate() error } func NewMigrator(src, dst DB, truncateFirst bool, watcher MigratorWatcher) Migrator { return &migrator{ src: src, dst: dst, truncateFirst: truncateFirst, watcher: ...
package models import ( "testing" "time" "github.com/alpacahq/marketstore/v4/models/enum" "github.com/stretchr/testify/assert" "github.com/alpacahq/marketstore/v4/utils" ) func TestFromTradesFieldExcludes(t *testing.T) { t.Parallel() // Given a set of trades including ones with condition // which should be ...
package spiffeid_test import ( "encoding/json" "fmt" "net/url" "testing" "github.com/spiffe/go-spiffe/v2/spiffeid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestTrustDomainFromString(t *testing.T) { assertOK := func(t *testing.T, in string, expected spiffeid.TrustDomai...
package main import ( "log" "net/http" "os" "strings" "sync" "time" "git.curoverse.com/arvados.git/sdk/go/arvadosclient" "git.curoverse.com/arvados.git/sdk/go/auth" "git.curoverse.com/arvados.git/sdk/go/httpserver" ) type authHandler struct { handler http.Handler clientPool *arvadosclient.ClientPool s...
// Copyright 2015 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// Copyright © 2017-2019 The OpenEBS 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 o...
package space import ( "context" "encoding/json" "errors" "net/http" "strconv" "github.com/factly/vidcheck/config" "github.com/factly/vidcheck/model" "github.com/factly/vidcheck/util" "github.com/factly/x/errorx" "github.com/factly/x/loggerx" "github.com/factly/x/meilisearchx" "github.com/factly/x/middlew...
package deribit import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "regexp" "strings" "time" "github.com/canselcik/go-deribit/models" "github.com/go-openapi/runtime" ) const rpcVersion = "2.0" var forceSliceKeys = []string{"channels"} // RPCRequest is what we send to the remo...
package overrides import ( "context" "fmt" "io" "time" "github.com/cortexproject/cortex/pkg/util/runtimeconfig" "github.com/cortexproject/cortex/pkg/util/services" "github.com/prometheus/client_golang/prometheus" "gopkg.in/yaml.v2" ) // TenantLimits is a function that returns limits for given tenant, or // n...
package secp256k1 import ( "encoding/hex" "math/big" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "chainlink/core/services/signatures/cryptotest" ) var numFieldSamples = 10 var observedFieldElts map[string]bool func init() { observedFieldElts = make(map[string]bool) ...
/* * <NAME> 221454 */ package rails import ( "fmt" "math/rand" "strconv" "strings" "sync" ) const ( TRAIN_BREAK_PROBABILITY = 0.02 ) type TrainSlice []*Train type RepairTeamSlice []*RepairTeam // Route is a slice of Turntable pointers that represents cycle in railroad. type Route TurntableSlice // Train st...