text
stringlengths
3.08k
10.4k
package storage import ( "fmt" "math" "strings" "github.com/fatih/structs" "github.com/get3w/get3w" "github.com/get3w/get3w/engines/liquid" "github.com/get3w/get3w/pkg/fmatter" "github.com/get3w/get3w/pkg/stringutils" "gopkg.in/yaml.v2" ) // LoadSitePages load pages for current site func (parser *Parser) Lo...
// Copyright 2022 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 IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package flogging import ( "fmt" "io" "os" "sync" "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/flogging/fabenc" zaplogfmt "github.com/sykesm/zap-logfmt" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) ...
package service import ( "context" "errors" "fmt" "net/http" "github.com/ONSdigital/dp-cantabular-filter-flex-api/api" "github.com/ONSdigital/dp-cantabular-filter-flex-api/config" kafka "github.com/ONSdigital/dp-kafka/v3" "github.com/ONSdigital/dp-api-clients-go/v2/identity" "github.com/ONSdigital/dp-health...
package trafficmanager // Copyright (c) Microsoft and contributors. 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 //...
package main import ( "fmt" "math" "os" ) const ( width, height = 600, 320 //画布大小 cells = 100 //单元格的个数 xyrange = 30.0 //坐标轴的范围(-xyrnage..+xyrange) xyscale = width / 2 / xyrange //x或y轴上每个单位长度的像素 zscale = height * 0.4 //z轴上每个单位长度的像素 an...
package checksum import ( // #nosec G505 "crypto/sha1" "fmt" "os" "path/filepath" "sort" "github.com/lets-cli/lets/set" "github.com/lets-cli/lets/util" ) const ( DefaultChecksumKey = "__default_checksum__" DefaultChecksumFileName = "lets_default_checksum" checksumsDir = "checksums" ) var...
package readstress import ( "context" "database/sql" "fmt" "math/rand" "sync" "time" "github.com/codahale/hdrhistogram" "github.com/ngaut/log" "github.com/pingcap/tipocket/pkg/cluster/types" "github.com/pingcap/tipocket/pkg/core" "github.com/pingcap/tipocket/util" ) // CaseCreator is a creator of a read-...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package elasticloadbalancingv2 import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRul...
package ingress import ( "context" "fmt" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" operatorv1 "github.com/openshift/api/operator/v1" "github.com/openshift/cluster-ingress-operator/pkg/manifests" "github.com/openshift/cluster-ingress-operator/pkg/operator/controller" corev1 "k8s.i...
/* * Copyright (C) 2016 Red Hat, Inc. * * 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 Licens...
package mentionbot import ( "github.com/garyburd/go-oauth/oauth" "log" "sort" "sync" "time" ) // Mentioner interface type Mentioner interface { Mention(*Tweet) *string } // Bot type type Bot struct { userID string client *oauth.Client credentials *oauth.Credentials mentioner Mentioner idsStore...
// Copyright (c) Facebook, Inc. and its affiliates. // // 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 applicabl...
package testkit import ( "context" "fmt" "net/http" "time" "contrib.go.opencensus.io/exporter/prometheus" "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/apistruct" "github.com/filecoin-proj...
package sign import ( "bytes" "io/ioutil" "os" "os/exec" "path/filepath" "sort" "testing" "github.com/goreleaser/goreleaser/internal/artifact" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" "github.com/stretchr/testify/assert" ) func TestDescription(t *testing...
// Copyright 2015 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 2019 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 w...
package mongodb import ( "context" "crypto/tls" "encoding/base64" "encoding/json" "errors" "fmt" "net" "net/url" "strconv" "strings" "sync" "time" "github.com/hashicorp/vault/plugins/helper/database/connutil" "github.com/mitchellh/mapstructure" "gopkg.in/mgo.v2" ) // mongoDBConnectionProducer impleme...
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package cas import ( "errors" "fmt" "time" "github.com/bluele/gcache" ariesstorage "github.com/hyperledger/aries-framework-go/spi/storage" "github.com/trustbloc/edge-core/pkg/log" "github.com/trustbloc/orb/p...
package api import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "yunion.io/x/onecloud/pkg/apis" ) const ( ClusterResourceStatusCreating = "creating" ClusterResourceStatusCreateFail = "create_fail" ClusterResourceStatusUpdating = "updating" ClusterResourceStatusUpdateFail = "update_fail" Cluste...
/* * Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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...
package mailer import ( "context" "fmt" "io" "net/textproto" "github.com/gophish/gomail" log "github.com/onvio/gophish/logger" "github.com/sirupsen/logrus" ) // MaxReconnectAttempts is the maximum number of times we should reconnect to a server var MaxReconnectAttempts = 10 // ErrMaxConnectAttempts is thrown...
/* * gomacro - A Go interpreter with Lisp-like macros * * Copyright (C) 2019 <NAME> * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * * inst.go...
// Code generated by gotdgen, DO NOT EDIT. package tdapi import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _...
// // Copyright 2019-2020 Nestybox, 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 ag...
package poly import ( "errors" "regexp" "sort" "strings" "sync" ) type CloneSequence struct { Sequence string Circular bool } type Overhang struct { Length int Position int Forward bool } type Fragment struct { Sequence string ForwardOverhang string ReverseOverhang string } type Enzyme struc...
package main import ( "bytes" "fmt" ) //func Example_one() { func main() { //!+main var x, y IntSet x.Add(1) x.Add(144) x.Add(9) fmt.Println(x.Len()) fmt.Println(x.String()) // "{1 9 144}" y.Add(11) y.Add(22) fmt.Println(y.Len()) fmt.Println(y.String()) // "{11 22}" x.UnionWith(&y) fmt.Println(x.Le...
package main import ( "flag" "fmt" "log" "time" "encoding/json" "github.com/google/gopacket" "github.com/google/gopacket/examples/util" "github.com/google/gopacket/layers" "github.com/google/gopacket/pcap" "github.com/google/gopacket/tcpassembly" ) var iface = flag.String("i", "eth0", "Interface to get pa...
/* * 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 rgetwellknown import ( "errors" "path" "regexp" "strings" ) // PublicServiceHost is the hostname of the public service that is used by // default. In the future this will be the fallback host if a well-known // isn't provided on the root of a domain. const PublicServiceHost = "recorder.merklecounty.com" ...
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License...
package detection import ( "fmt" "path" "sync" "time" "github.com/lazywei/go-opencv/opencv" "github.com/ubuntu/face-detection-demo/appstate" "github.com/ubuntu/face-detection-demo/comm" "github.com/ubuntu/face-detection-demo/datastore" "github.com/ubuntu/face-detection-demo/messages" ) var ( stop chan inte...
package dagpb import ( ipld "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/schema" ) // Code generated go-ipld-prime DO NOT EDIT. type RawNode struct{ x []byte } // TODO generateKindBytes.EmitNativeAccessors // TODO generateKindBytes.EmitNativeBuilder type MaybeRawNode struct { Maybe schema.Maybe...
/* © 2022–present <NAME> <<EMAIL>> (https://haraldrudell.github.io/haraldrudell/) ISC License */ package perrors import ( "errors" "reflect" "github.com/haraldrudell/parl/errorglue" "github.com/haraldrudell/parl/pruntime" ) const e116PackFuncStackFrames = 1 // error116.ErrorData get possible string values asso...
package main import ( "math" "github.com/pkg/errors" "gonum.org/v1/gonum/stat/distuv" "gorgonia.org/tensor" ) type NN struct { hidden, final *tensor.Dense b0, b1 float64 } func New(input, hidden, output int) (retVal *NN) { r := make([]float64, hidden*input) r2 := make([]float64, hidden*output) fillR...
// Copyright 2012 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/ioutil" "os" "path/filepath" "strings" ) var cmdClean = &Command{ UsageLine: "clean [-i] [-r] [-n] [-x] [packages]", S...
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package executor import ( "github.com/33cn/chain33/types" pty "github.com/33cn/plugin/plugin/dapp/issuance/types" ) //Query_IssuanceInfoByID ... f...
package main import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "os" "path/filepath" "strconv" "time" "github.com/spf13/cobra" "github.com/ovh/cds/engine/worker/internal" "github.com/ovh/cds/engine/worker/pkg/workerruntime" "github.com/ovh/cds/sdk" ) func cmdKey() *cobra.Com...
// Copyright 2019 The Go Cloud Development Kit 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 appli...
// Copyright 2020 <NAME> <<EMAIL>>. All rights reserved. // Use of this source code is governed by a MIT style // license that can be found in the LICENSE file. package v1 import ( "context" "sync" v1 "github.com/marmotedu/api/apiserver/v1" metav1 "github.com/marmotedu/component-base/pkg/meta/v1" "github.com/ma...
// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. package task import ( "context" "github.com/opentracing/opentracing-go" "github.com/pingcap/errors" backuppb "github.com/pingcap/kvproto/pkg/brpb" "github.com/pingcap/kvproto/pkg/kvrpcpb" "github.com/pingcap/log" "github.com/spf13/cobra" "github.com/...
// Copyright (C) 2021 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
package fyb import ( "crypto/hmac" "crypto/sha1" "encoding/hex" "errors" "fmt" "io/ioutil" "log" "net/http" "net/http/httputil" "net/url" "strings" "time" ) // Client ... type Client struct { apiKey string apiSecret string httpClient *http.Client throttle <-chan time.Time httpTimeout time....
package initialise import ( "fmt" "io" "os" "os/exec" "path/filepath" "strings" "time" "github.com/flytam/filenamify" "github.com/leaanthony/slicer" "github.com/AlpineAIO/wails/v2/pkg/buildassets" "github.com/AlpineAIO/wails/v2/cmd/wails/internal/commands/initialise/templates" "github.com/leaanthony/cl...
// Licensed to 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. Apache Software Foundation (ASF) licenses this file to you under // the Apache License, Version 2.0 (the "Li...
// Copyright 2019 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 diff implements the Myers diff algorithm. package diff import "strings" // Sources: // https://blog.jcoglan.com/2017/02/17/the-myers-diff-algorithm...
package deployment import ( "fmt" "time" kapi "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/record" kclient "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/runtime" kutil "k8s.io/...
package cmd import ( "fmt" "strings" ) //CircleCIv2 represents a Circle CI build provider (v2) type CircleCIv2 struct{} //ProvideArtifacts - func (provider CircleCIv2) ProvideArtifacts(dockerCompose *DockerCompose, harborCompose *HarborCompose, token string, platform string) ([]*BuildArtifact, error) { if !(plat...
// Copyright (c) 2018 HyperHQ Inc. // // SPDX-License-Identifier: Apache-2.0 // package containerdshim import ( "context" "github.com/containerd/cgroups" "github.com/containerd/typeurl" google_protobuf "github.com/gogo/protobuf/types" vc "github.com/kata-containers/kata-containers/src/runtime/virtcontainers" )...
// Copyright Project Harbor 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 t...
// Copyright 2018 Google, Inc. All rights reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. // afpacket provides a simple example of using afpacket with zero-copy to read // packet data. package main import ( "flag" ...
package collection import ( "fmt" "sort" "strings" "sync/atomic" etcd "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/mvcc/mvccpb" "github.com/pachyderm/pachyderm/src/server/pkg/errutil" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) // Options are the sort options when iterating...
// Code generated by go-bluetooth generator DO NOT EDIT. package obex_agent import ( "sync" "github.com/godbus/dbus/v5" "github.com/muka/go-bluetooth/bluez" "github.com/muka/go-bluetooth/props" "github.com/muka/go-bluetooth/util" ) var Agent1Interface = "org.bluez.obex.Agent1" // NewAgent1 create a new instan...
// Copyright 2022 The Parca 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 w...
package main import ( "database/sql" "encoding/json" "fmt" _ "github.com/go-sql-driver/mysql" "log" "net/http" "regexp" ) // net/http based router type route struct { pattern *regexp.Regexp verb string handler http.Handler } type RegexpHandler struct { routes []*route } func (h *RegexpHandler) Handler...
// Code generated by smithy-go-codegen DO NOT EDIT. package types type AttributeAction string // Enum values for AttributeAction const ( AttributeActionAdd AttributeAction = "ADD" AttributeActionPut AttributeAction = "PUT" AttributeActionDelete AttributeAction = "DELETE" ) type BackupStatus string // Enum...
// Copyright 2016 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 descriptor provides functions for obtaining the protocol buffer // descriptors of generated Go types. // // Deprecated: See the "google.golang.org/pr...
package manager import ( "encoding/json" "github.com/ihaiker/gokit/errors" "github.com/ihaiker/gokit/remoting/rpc" "github.com/ihaiker/sudis/daemon" "github.com/ihaiker/sudis/nodes/cluster" "github.com/ihaiker/sudis/nodes/dao" "strconv" "time" ) type joinedDaemonManger struct { rpc.RpcServer key, address st...
package main import ( "bufio" "fmt" "os" "strconv" ) var ( N, M int plan Board answer [500]Action dx, dy map[string]int dirs [4]string = [4]string{"U", "D", "L", "R"} ) func init() { dx = make(map[string]int) dy = make(map[string]int) dx["D"] = 1 dx["U"] = -1 dy["R"] = 1 dy["L"] = -1 } func rea...
package web import ( "fmt" "net/http" "strings" "time" "github.com/blend/go-sdk/env" "github.com/blend/go-sdk/webutil" ) // Config is an object used to set up a web app. type Config struct { Port int32 `json:"port,omitempty" yaml:"port,omitempty" env:"PORT"` BindAddr ...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package v1 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Creates a new session. A session can be used...
// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package client import ( "crypto/tls" "crypto/x509" "flag" "fmt" "log" "os" "regexp" "strings" "text/template" "time" "golang.org/x/net/context" "googl...
// Copyright 2016-2018, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package secretsmanager import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type GetResourcePolicyInput struct { _ struct{} `type:"structure"` // Specifies the secret that you want to retrie...
package philarios import ( "github.com/wangjohn/quickselect" "github.com/wangjohn/updike/tfidf" ) const ( NumSurroundingWords = 2 ) type WordVector struct { Word string Score float64 } type WordVectorCollection []WordVector func (t WordVectorCollection) Len() int { return len(t) } func (t WordVectorCo...
package reading import ( "bytes" "errors" "fmt" "io" "io/ioutil" "log" "net/http" "path" "strings" "github.com/gin-gonic/gin" "github.com/kapmahc/epub" "github.com/kapmahc/h2o/plugins/nut" "github.com/kapmahc/h2o/web" ) // http://www.cbeta.org/cbreader/help/cbr_toc.htm func (p *Plugin) indexNotesH(l st...
// Copyright 2018 The gVisor 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 aws import ( "fmt" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elastictranscoder" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func TestAccAWSElasticTranscoderPreset_basic(t *testin...
// Package socks implements essential parts of SOCKS protocol. package socks import ( "io" "net" "strconv" ) // SOCKS request commands as defined in RFC 1928 section 4. const ( CmdConnect = 1 CmdBind = 2 CmdUDPAssociate = 3 ) // SOCKS address types as defined in RFC 1928 section 5. const ( AtypIP...
// Copyright 2017 The Chromium 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 crauditcommits import ( "fmt" "strings" "time" ds "go.chromium.org/gae/service/datastore" ) // AuditStatus is the enum for RelevantCommit.S...
package glog import ( "bufio" "fmt" "io" "os" "strings" "sync" log "github.com/golang/glog" ) // Logger is a simple interface that is roughly equivalent to glog. type Logger interface { Is(level int32) bool V(level int32) VerboseLogger Infof(format string, args ...interface{}) Info(args ...interface{}) W...
package main import ( "fmt" "strings" "github.com/dylandreimerink/gobpfld/ebpf" ) type Policy struct { Rules []Rule DefaultAction Action } // Every rule needs to have offsets of headers relative to the start of the frame in order to match the correct // fields. Since the code of a rule must assume it c...
// 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 models import ( "context" "fmt" "github.com/qiniu/qmgo/field" "github.com/qiniu/qmgo/options" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "proj-review/constant" "proj-review/database" "proj-review/log" "proj-review/request" "proj-review/response" "proj-review/utils" "tim...
/** * Tenta DNS Server * * Copyright 2017 Tenta, 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 ap...
package sched import ( "container/list" "fmt" "sync" "time" "github.com/libopenstorage/openstorage/pkg/dbg" ) type TaskID uint64 const ( TaskNone = TaskID(0) numGoRoutines = 10 ) func ValidTaskID(t TaskID) bool { return t != TaskNone } type ScheduleTask func(Interval) type Scheduler interface { // S...
// Copyright 2019 DeepMap, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
package api import ( "github.com/Purnachndar/exnomy-scaffold-dex/backend/models" "github.com/shopspring/decimal" ) type ( BaseReq struct { Address string `json:"address"` } BaseResp struct { Status int `json:"status"` Desc string `json:"desc"` } MarketsReq struct { BaseReq } MarketsResp struc...
package view import ( "fmt" "html/template" "io" "os" "path/filepath" "strings" "sync" "github.com/eknkc/amber" ) // AmberEngine contains the amber view engine structure. type AmberEngine struct { // files configuration directory string extension string assetFn func(name string) ([]byte, error) // for ...
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package blame import ( "errors" "fmt" btss "github.com/binance-chain/tss-lib/tss" mapset "github.com/deckarep/golang-set" "github.com/libp2p/go-libp2p-core/peer" "github.com/akildemir/moneroTss/conversion" "github.com/akildemir/moneroTss/messages" ) func (m *Manager) tssTimeoutBlame(lastMessageType string, p...
package service import ( "fmt" "log" "time" "bufio" "os" b64 "encoding/base64" "encoding/hex" "github.com/paypal/gatt" ) func fromInts(data []int) string { var s string for _, d := range data { if(d < 0) { d+= 256; } hh := fmt.Sprintf("%02x", d ) s+=hh //fmt.Prin...
package swagger import ( "reflect" "strings" ) type TypeDictElement struct { TypeName string Format string } var ( // Dictinary with self-types typeDict = map[string]TypeDictElement{ "Time": { TypeName: "string", Format: "date-time", }, "NullTime": { TypeName: "string", Format: "date-ti...
// Copyright 2015 Keybase, Inc. All rights reserved. Use of // this source code is governed by the included BSD license. package saltpack import ( "bytes" "io" "path/filepath" "runtime" "strings" "testing" "github.com/keybase/go-logging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/requ...
/* Copyright 2019 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 2019 Insolar Technologies GmbH // // 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...
package main import ( "image" "image/draw" "log" "os" "github.com/go-gl/gl/v2.1/gl" "github.com/paulmach/go.geo" ) // NewTexture loads texture from file. func NewTexture(file string) (texture uint32, bounds Rect) { imgFile, err := os.Open(file) if err != nil { log.Fatalf("texture %q not found on disk: %v\n...
package v3 import ( "context" envoy_core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" envoy_types "github.com/envoyproxy/go-control-plane/pkg/cache/types" envoy_cache "github.com/envoyproxy/go-control-plane/pkg/cache/v3" envoy_resource "github.com/envoyproxy/go-control-plane/pkg/resource/v3" "g...
package websocket import ( "context" "gin_websocket/lib/logger" "net/http" "sync" "time" "github.com/gin-gonic/gin" "github.com/gorilla/websocket" jsoniter "github.com/json-iterator/go" ) type customerServiceMethod interface { Close() error SendMsg(msg Message) error } type CustomerServiceClient struct { ...
// 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 a...
package model import ( "github.com/evergreen-ci/evergreen/db" "github.com/mongodb/anser/bsonutil" adb "github.com/mongodb/anser/db" "github.com/pkg/errors" "go.mongodb.org/mongo-driver/bson" ) var ( projectVarIdKey = bsonutil.MustHaveTag(ProjectVars{}, "Id") projectVarsMapKey = bsonutil.MustHaveTag(ProjectVa...
// 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 a...
/* Copyright ArxanFintech Technology Ltd. 2017 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 a...
// Copyright © 2017 The Kubicorn 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 godb import ( "database/sql" "fmt" "github.com/dimonrus/gohelp" "os" "os/exec" "strings" "text/template" "time" ) type DictionaryModel struct { Id int `json:"id"` // Идентификатор значения справочника Type string `json:"type"` // Тип значения справочника Code ...
package lexer import ( "fmt" "regexp" "unicode/utf8" ) var ( charRegex = regexp.MustCompile(`^[a-záéíóúA-ZÁÉÍÓÚñÑ_]$`) numRegex = regexp.MustCompile(`^\d$`) wSpaceRegex = regexp.MustCompile(`^\s$`) ) // Represents the lexer of the programming lenguage type Lexer struct { source string // represent...
// pmm-agent // Copyright 2019 Percona 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 agr...
package main import ( "bufio" "flag" "fmt" "math" "math/rand" "os" "os/exec" "path/filepath" "regexp" "time" ) /* #include <windows.h> #include <tlhelp32.h> static void kill_process(DWORD pid) { PROCESSENTRY32 pe = {0}; pe.dwSize = sizeof(PROCESSENTRY32); HANDLE hSnap = CreateToolhelp32Snapshot(TH...
package sessioninterestmanager import ( "sync" blocks "github.com/ipfs/fs-repo-migrations/ipfs-10-to-11/_vendor/github.com/ipfs/go-block-format" cid "github.com/ipfs/fs-repo-migrations/ipfs-10-to-11/_vendor/github.com/ipfs/go-cid" ) // SessionInterestManager records the CIDs that each session is interested in. t...
/** * Copyright 2014 Comcast Cable Communications Management, 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 applica...