text
stringlengths
3.08k
10.4k
package daikin import ( "fmt" "net" "time" "github.com/golang/glog" ) var wantFlags = net.FlagUp | net.FlagBroadcast | net.FlagMulticast const ( udpQueryPayload = "DAIKIN_UDP/common/basic_info" ) // Option is an option type to pass to NewNetwork. type Option func(*DaikinNetwork) // InterfaceOption configures...
/* Copyright 2021. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed un...
// Copyright ©2015 The Gonum 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 optimize import ( "math" "gonum.org/v1/gonum/mat" ) const maxNewtonModifications = 20 var ( _ Method = (*Newton)(nil) _ localMethod = (...
package mog import ( "context" "fmt" "testing" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" ) type m bson.M // for brevity type Location struct { Id string `bson:"_id" json:"id"` LocationName string `bson:"location_name" json:"l...
// Package decrypt // Created by Teocci. // Author: <EMAIL> on 2021-Aug-12 package decrypt import ( "crypto/aes" "crypto/cipher" "crypto/des" "crypto/hmac" "crypto/sha1" "crypto/sha256" "encoding/asn1" "github.com/teocci/go-chrome-cookies/core/throw" "github.com/teocci/go-chrome-cookies/logger" "golang.org...
package rightscale import ( "log" "strings" "time" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-rightscale/rightscale/rsc" ) // Example: // // resource "rightscale_server" "web_server" { // name = "web_server" // deployment_href = "/api/deployments/1234" ...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-present Datadog, Inc. // Portions of this code are taken from the gopsutil project // https://g...
// Copyright 2022 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 main import ( "flag" "fmt" "os" "time" "lino-network/goflv_z" "lino-network/golog_z" rtmp "lino-network/gortmp_z" ) const ( programName = "RtmpPublisher" version = "0.0.1" ) var ( url *string = flag.String("URL", "rtmp://video-center.alivecdn.com/AppName/StreamName?vhost=live.gz-app.co...
// Package edgecluster implements edge cluster mutation required by the GraphQL transport layer package edgecluster import ( "context" "errors" "fmt" "strings" "github.com/decentralized-cloud/api-gateway/services/graphql/types" "github.com/decentralized-cloud/api-gateway/services/graphql/types/edgecluster" edg...
package hitomi import ( "encoding/binary" "encoding/json" "errors" "fmt" "io/ioutil" "log" "net/http" "net/url" "regexp" "strconv" "strings" "github.com/gan-of-culture/get-sauce/request" "github.com/gan-of-culture/get-sauce/static" "github.com/gan-of-culture/get-sauce/utils" ) type img struct { Hash ...
package dnsServer import ( "context" "errors" "fmt" "net" "os/exec" "strings" "sync" "time" "github.com/zerops-io/zcli/src/nettools" "github.com/miekg/dns" ) var ( lo0IP = net.ParseIP("127.0.0.99") ) type Handler struct { lock sync.RWMutex address net.IP forwardAddress []net...
package tests import ( "fmt" "io/ioutil" "os" "path/filepath" "strconv" "strings" "testing" "github.com/pkg/errors" "github.com/stretchr/testify/require" "github.com/jenkins-x/jx/v2/pkg/util" "github.com/stretchr/testify/assert" ) // AssertFileContains asserts that a given file exists and contains the g...
package seatbelt import ( "errors" "net/http" "github.com/gorilla/sessions" "github.com/rs/zerolog/log" ) // ErrKeyNotFound occurs when trying to access a value for a key that doesn't // exist in the session map. var ErrKeyNotFound = errors.New("value not found for key in session") // A Session is a cookie-back...
// Copyright 2017 Istio 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 i...
package session import ( "net/http" gorilla "github.com/gorilla/sessions" ) // keys used internal to specific implementations of different interfaces. const ( sessionKey = "trails-session-gorilla" // used by Service userSessionKey = sessionKey + "-user" // used by Session ) // The Sessionable wraps meth...
package cmd import ( "fmt" "github.com/openshift/windows-machine-config-bootstrapper/tools/windows-node-installer/pkg/cloudprovider" "github.com/spf13/cobra" ) var ( // awsInfo contains information for aws Cloud provider awsInfo struct { // imageID is the AMI image-id to be used for creating Virtual Machine ...
// Copyright 2019 Anapaya Systems // // 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 history import ( "context" "encoding/csv" "fmt" "github.com/xyths/hs" . "github.com/xyths/hs/logger" "github.com/xyths/qtr/cmd/utils" "github.com/xyths/qtr/gateio" "github.com/xyths/qtr/types" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "log" "os" "time" ) type Config s...
package core import ( "math/rand" "net" "sync" "sync/atomic" "time" "github.com/ShangRui-hash/ksubdomain/gologger" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/google/gopacket/pcap" ) type SendDog struct { ether EthTable dns []string handle *pca...
package encoder import ( "encoding/json" "fmt" "io" "io/ioutil" "os" "strings" "cuelang.org/go/cue" ) var jf io.Writer = ioutil.Discard func init() { // prepdump() } func prepdump() { var err error jf, err = os.OpenFile("dump.json", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0755) if err != nil { panic(err)...
package statemachine_test import ( "fmt" "github.com/stackdump/gopetri/statemachine" "github.com/stretchr/testify/assert" "testing" ) func TestCounterMachine(t *testing.T) { _, s := statemachine.LoadPnmlFromFile("../examples/counter.xml") t.Run("load machine ", func(t *testing.T) { s.Init() if len(s.Transi...
// // Copyright 2017 <NAME> -- All rights reserved. // https://github.com/MalinYamato // // MIT License // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the abov...
package engine import ( "crypto/sha256" "encoding/base64" "fmt" "path/filepath" "strings" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/config" "github.com/go-git/go-git/v5/plumbing" "github.com/argoproj/gitops-engine/pkg/cache" "github.com/argoproj/gitops-engine/pkg/utils/kube" "github.com/b...
package sql import ( "context" "database/sql" "fmt" "strings" "sync" "time" "github.com/jmoiron/sqlx" "github.com/spaceuptech/helpers" _ "github.com/denisenkom/go-mssqldb" // Import for MsSQL _ "github.com/go-sql-driver/mysql" // Import for MySQL _ "github.com/lib/pq" // Import for postgr...
/* Copyright IBM Corp. 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 applicable law or ag...
package controller import ( "errors" "fmt" "io/ioutil" "net" "os" "os/exec" "strconv" "syscall" "time" "github.com/caicloud/canary-release/proxies/nginx/config" "github.com/caicloud/canary-release/proxies/nginx/template" "github.com/mitchellh/go-ps" log "github.com/zoumo/logdog" "k8s.io/apimachinery/pk...
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. package cef import ( "net" "strconv" "time" "github.com/pkg/errors" "github....
package client_relay_test // // Copyright (c) 2019 ARM Limited. // // SPDX-License-Identifier: MIT // // 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 ...
package dbspgraph import ( "context" "sync" "github.com/enesanbar/workspace/projects/linkrus/pkg/bspgraph" "github.com/enesanbar/workspace/projects/linkrus/pkg/bspgraph/message" "github.com/enesanbar/workspace/projects/linkrus/pkg/dbspgraph/job" "github.com/enesanbar/workspace/projects/linkrus/pkg/dbspgraph/pro...
// Copyright 2021 The PipeCD 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...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package codebuild import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type ListBuildsForProjectInput struct { _ struct{} `type:"structure"` // During a previous call, if there are more than...
package function import ( "context" "testing" "github.com/src-d/gitbase" "github.com/stretchr/testify/require" fixtures "gopkg.in/src-d/go-git-fixtures.v3" "gopkg.in/src-d/go-mysql-server.v0/sql" "gopkg.in/src-d/go-mysql-server.v0/sql/expression" ) func TestHistoryIdx(t *testing.T) { require.NoError(t, fixtu...
// Copyright 2020 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 wrapper import ( "bytes" "crypto/rand" "crypto/sha256" "sort" "testing" "github.com/lazyledger/lazyledger-core/types/consts" "github.com/lazyledger/nmt" "github.com/lazyledger/rsmt2d" "github.com/stretchr/testify/assert" ) func TestPushErasuredNamespacedMerkleTree(t *testing.T) { testCases := []str...
package parse import ( "strings" "unicode" "unicode/utf8" ) // token represents a unit of information found in an IDL file. type token struct { t int // The tokens on the form T_XXX defined in the parser. Mandatory. v string // Any additional token value for strings, integers and floats. May be an empty strin...
package config import ( "fmt" "github.com/joho/godotenv" "github.com/mariusor/go-littr/internal/log" "os" "path" "strconv" "strings" "time" ) type Configuration struct { HostName string Name string TimeOut time.Duration ListenPort ...
package main import ( "errors" "fmt" "io/ioutil" "log" "math" "net/http" "time" "github.com/antonholmquist/jason" ) // VTBASEURL define the VirusTotal API endpoint for hash requesting const VTBASEURL = "https://www.virustotal.com/api/v3/files/" // USERAGENT defines an existing UA instead of Golang one const...
package schema import ( "database/sql/driver" "fmt" "golang.org/x/net/context" "github.com/lytics/qlbridge/expr" "github.com/lytics/qlbridge/value" ) var ( // ErrNotFound is error expressing sought item was not found. ErrNotFound = fmt.Errorf("Not Found") // ErrNotImplemented this feature is not implemented...
package task import ( "satomempool/loader" "satomempool/logger" "satomempool/model" "satomempool/store" "satomempool/task/parallel" "satomempool/task/serial" "satomempool/utils" "sync" "time" "go.uber.org/zap" ) type Mempool struct { BatchTxs []*model.Tx // 所有Tx Txs map[string]bool // 所有Tx Skip...
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use ...
package extension import ( "context" "fmt" "sync" "time" "github.com/33cn/chain33/common/log/log15" p2ptypes "github.com/33cn/chain33/system/p2p/dht/types" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/peer" pubsub "github.com/libp2p/go-libp2p-pubsub" ) var log = log15.New("modul...
package pgt import ( "math/rand" "github.com/elgs/gostrgen" . "github.com/robert-zaremba/checkers" . "gopkg.in/check.v1" ) type StringSuite struct{} func (suite *StringSuite) TestStringsContainsAllSorted(c *C) { var s, subset Strings // 1. Check empty slices c.Assert(s.ContainsAllSorted(nil), IsTrue) c.Ass...
/* Copyright 2015 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
package main import ( "encoding/csv" "fmt" "github.com/shopspring/decimal" "os" "strings" ) var readScoreCsvPath = "/Users/champ/Downloads/epoch4_total.csv" var readFeeCsvPath = "/Users/champ/Downloads/epoch4.csv" var writeCsvPathBsc = "/Users/champ/Downloads/2021.12.13epoch4BscProportion.csv" var writeCsvPathA...
package deploy import ( "bytes" "fmt" "os" goexec "os/exec" "strings" "time" "github.com/k14s/kapp-controller/pkg/apis/kappctrl/v1alpha1" "github.com/k14s/kapp-controller/pkg/exec" ) const ( // TODO not a great way to determine whether // kapp found changes and started to apply them applyOutputMarker = " ...
package duitx // Original code from github.com/mjl-/duit // // Copyright 2018 <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 limi...
package msg import ( "bytes" "context" "errors" "io" "net/textproto" ) // Attributes represent the key-value metadata for a Message. type Attributes map[string][]string // from https://golang.org/src/net/http/header.go#L62 func (a Attributes) clone() Attributes { a2 := make(Attributes, len(a)) for k, vv := ra...
/* * Copyright 2019, EnMasse authors. * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). */ package keycloak import ( gocloak "github.com/Nerzal/gocloak/v3" userv1beta1 "github.com/enmasseproject/enmasse/pkg/apis/user/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis...
package client import ( "context" "crypto/tls" "crypto/x509" "errors" "fmt" "net" "net/http" "os" "path/filepath" "strings" "time" "gitlab.com/gitlab-org/labkit/correlation" "gitlab.com/gitlab-org/labkit/log" "gitlab.com/gitlab-org/labkit/tracing" ) const ( socketBaseUrl = "http://unix" u...
package rpc import ( "context" "crypto/tls" "crypto/x509" "fmt" "net" "time" "github.com/evergreen-ci/aviation" "github.com/evergreen-ci/cedar" "github.com/evergreen-ci/cedar/rpc/internal" "github.com/evergreen-ci/certdepot" "github.com/evergreen-ci/gimlet" "github.com/mongodb/grip" "github.com/mongodb/g...
package calc24 import ( "fmt" "log" "math/rand" "sort" "time" ) type Game struct { Secret Question } type Question struct { A, B, C, D int } type Secret struct { Ans string Winer string } func (this Game) CalcAnswer(quenum []int) (answer string, ifResult bool) { ifResult = true a := quenum[0] b := q...
package pacttesting import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "os" "path/filepath" "syscall" "time" "github.com/giantswarm/retry-go" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "github.com/spf13/viper" ) type MockServer struct { Port int BaseURL string Consumer s...
package sysctl import ( "blog/conf" "blog/model" "image" _ "image/gif" "image/jpeg" _ "image/png" "io" "os" "path" "runtime" "strings" "time" "github.com/labstack/echo/v4" "github.com/nfnt/resize" "github.com/zxysilent/utils" _ "golang.org/x/image/bmp" ) // StatusGoinfo doc // @Tags status-状态信息 // @S...
package main import ( "encoding/json" "github.com/fsouza/go-dockerclient" "io/ioutil" "log" "net/http" "os" "strings" "time" ) const ( kSumologicCategoryLabel = "com.sumologic/sourceCategory" kSumologicSourceLabel = "com.sumologic/sourceName" kKubernetesPodName = "io.kubernetes.pod.name" ...
package repository import ( "core" "log" . "model" ) const ( // CQL statement for adding message addMessage = `INSERT INTO chat_message (mid, chat_id, sender, sid, payload) VALUES (now(), ?, ?, ?, ?)` // CQL statement for retrieving message retrieveMessages = `SELECT mid, payload, dateOf(mid) as date FROM cha...
package haproxy import ( "fmt" "regexp" "strings" templaterouter "github.com/openshift/router/pkg/router/template" ) const ( // listMapHeader is the header added if required to the "show map" // output from haproxy, so that we can parse the CSV output. // Note: This should match the CSV tags used in mapListEn...
package batterymanage import ( orm "go-admin/global" "go-admin/models" "go-admin/tools" "time" ) type Bms_statusInfoLog struct { Bms_statusInfoLogId int `json:"bms_statusInfoLogId" gorm:"size:10;primary_key;AUTO_INCREMENT"` Dtu_uptime time.Time `json:"dtu_uptime"` Pkg_id string `json:"pkg_id" gorm:"s...
package rpcx import ( "context" "fmt" "path/filepath" "testing" "github.com/meshplus/bitxhub-kit/crypto/asym" "github.com/meshplus/bitxhub-model/constant" "github.com/meshplus/bitxhub-model/pb" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" ) func TestChainClient_SubscribeAudit(t *testing....
package sdf import ( "fmt" "time" "unicode/utf8" "github.com/macroblock/sdf/pkg/event" "github.com/veandco/go-sdl2/sdl" ) // - const ( InputAny = 0 // tInput = iota InputAccept = sdl.SCANCODE_KP_ENTER InputCancel = sdl.SCANCODE_ESCAPE InputSelect = sdl.SCANCODE_TAB InputUp = sdl.SCANCODE_UP InputD...
package config import ( "context" "fmt" "os" "sort" "strings" "sync" "time" "github.com/garyburd/redigo/redis" "github.com/sirupsen/logrus" "github.com/honeycombio/samproxy/config/redimem" ) // RedisPeerFileConfig uses a FileConfig for everything except getting Peers. // Peers are negotiated via redis. ty...
// Copyright 2020 The 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...
package main import ( "encoding/binary" "fmt" "net" "reflect" "testing" ) // GO111MODULE=off CGO_ENABLED=0 go test const MagicCookie uint32 = 0x2112A442 const MethodBinding uint16 = 0x001 type StunHeader struct { // 20 bytes Type uint16 // 2 bytes Length uint16 // 2 bytes MessageCookie u...
package main import ( "fmt" "bytes" "os" "errors" "time" "net" ) func Task_Ping(M *Main, S *State, TD *Task_Data) (bool) { Debug("Task_Ping:Entered\n") if os.Getuid() != 0 || len(TD.Policy.Params) == 0 { return false } truth := false found := false for _,param := range TD.Policy.Params { Debug("PI...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package cloudwatchlogs import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" "github.com/aws/aws-sdk-go-v2/private/protocol/jsonrpc" ) type Associ...
package excelize import ( "fmt" "path/filepath" "testing" "github.com/stretchr/testify/assert" ) func TestAddTable(t *testing.T) { f, err := prepareTestBook1() if !assert.NoError(t, err) { t.FailNow() } err = f.AddTable("Sheet1", "B26", "A21", `{}`) if !assert.NoError(t, err) { t.FailNow() } err = f...
package service import ( "context" "encoding/json" "errors" "fmt" "io" "time" "github.com/jinzhu/gorm" "github.com/sirupsen/logrus" "github.com/kmpp/pkg/constant" "github.com/kmpp/pkg/db" "github.com/kmpp/pkg/dto" "github.com/kmpp/pkg/logger" "github.com/kmpp/pkg/model" "github.com/kmpp/pkg/repository"...
package client_test import ( "bytes" "crypto/sha1" "crypto/sha256" "crypto/sha512" "fmt" "testing" "github.com/google/go-tpm-tools/client" "github.com/google/go-tpm-tools/internal" "github.com/google/go-tpm-tools/internal/test" "github.com/google/go-tpm/tpm2" "github.com/google/go-tpm/tpmutil" ) var exten...
package main import ( "flag" "fmt" "log" "os" "os/signal" "strings" "syscall" "github.com/contactless/wb-rules/wbrules" "github.com/contactless/wbgong" "github.com/alexcesaro/statsd" ) var version = "unknown" const ( DRIVER_CLIENT_ID = "rules" DRIVER_CONV_ID = "wb-rules" ENGINE_CLIENT_ID = "wb-rules...
// Code generated by the Pulumi SDK Generator DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package macie import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Macie CustomDataIdentifier resource schema typ...
/* Copyright 2020 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 or agreed to in writing, soft...
// Code generated by smithy-go-codegen DO NOT EDIT. package ec2 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/ec2/types" "github.com/awslabs/smithy-go/middleware" smithyhttp "github.com/awslabs/sm...
// Scry Info. All rights reserved. // license that can be found in the license file. package gserver import ( "net/http" "reflect" "strings" "github.com/gin-gonic/gin" "github.com/improbable-eng/grpc-web/go/grpcweb" "go.uber.org/zap" "google.golang.org/grpc" "github.com/scryinfo/dot/dot" "github.com/scryi...
/* For license and copyright information please see LEGAL file in repository */ package dos import ( "bytes" "compress/gzip" "io" "mime" goos "os" "../../codec" "../../minify" "../../protocol" ) // File store some data about a file! type File struct { metadata fileMetaData parentDirectory *FileDire...
/* Copyright (c) 2009 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the followin...
/* For license and copyright information please see LEGAL file in repository */ package http import ( "strings" "../protocol" ) // header is represent HTTP header structure! type header struct { headers map[string][]string valuesPool []string // shared backing array for headers' values } func (h *header) in...
package tradingdb2 import ( "context" "fmt" "strconv" "strings" "time" "github.com/360EntSecGroup-Skylar/excelize/v2" jsoniter "github.com/json-iterator/go" excel "github.com/zhs007/adacore/excel" tradingpb "github.com/zhs007/tradingdb2/tradingpb" tradingdb2utils "github.com/zhs007/tradingdb2/utils" "go.ub...
package api import ( "encoding/json" "errors" "fmt" "net/http" "reflect" "strings" ) // This is the main interface returned to user // It routes the Resources and Methods // and can be used with the Go's net/http standard library type Router interface { ServeHTTP(http.ResponseWriter, *http.Request) Methods()...
package main import ( "flag" "fmt" "io/ioutil" "log" "os" "path/filepath" "strconv" "strings" "text/template" "time" "github.com/fatih/color" "github.com/gomarkdown/markdown" ) // Page holds all the information we need to generate a new // HTML page from a text file on the filesystem. type Page struct { ...
package tasks /* Copyright 2013 <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...
package jwt import ( "time" "github.com/lestrrat-go/jwx/jwa" "github.com/lestrrat-go/jwx/jwk" "github.com/lestrrat-go/jwx/jws" "github.com/lestrrat-go/option" ) type Option = option.Interface // GlobalOption describes an Option that can be passed to `Settings()`. type GlobalOption interface { Option globalOp...
// Copyright (c) 2018 Uber 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...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _ = context.Background() _ = fmt...
package types /** TFSignatureDef defines the signature of supported computations in the TensorFlow graph, including their inputs and outputs. It is the internal model representation for the SignatureDef defined in the TensorFlow repository [tensorflow/core/protobuf/meta_graph.proto] */ import ( "errors" "fmt" "git...
package midi import ( "time" "github.com/emicklei/melrose/core" "github.com/emicklei/melrose/midi/transport" "github.com/emicklei/melrose/notify" ) type OutputDevice struct { id int stream transport.MIDIOut defaultChannel int echo bool timeline *core.Timeline } func NewOutputDevice...
/* Copyright 2021. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed un...
// SPDX-FileCopyrightText: 2021 <NAME> <https://aasg.name> // // SPDX-License-Identifier: AGPL-3.0-only package snowweb import ( "errors" "io" "io/fs" "net/http" "os" "strings" "time" "git.sr.ht/~aasg/snowweb/internal/nix" "github.com/kevinpollet/nego" "github.com/rs/zerolog/log" ) // A NixStorePathServer...
package checkpoint import ( "path/filepath" "strings" "github.com/golang/glog" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" ) var ( // podSerializer is an encoder ...
package feishu // DivCardContent 内容模块 type DivCardContent struct { // Text 单个文本展示,和fields至少要有一个 Text *Text // Fields 多个文本展示,和text至少要有一个 Fields []*Field // Extra 附加的元素展示在文本内容右侧。可附加的元素包括 Image , Button , SelectMenu , Overflow , DatePicker Extra Message } // NewDivCardContent crete DivCardContent func NewDivCardC...
package rsync import ( "bytes" "math/rand" "testing" ) type RandReader struct { rand.Source } func (rr RandReader) Read(sink []byte) (int, error) { var tail, head int buf := make([]byte, 8) var r uint64 for { head = min(tail+8, len(sink)) if tail == head { return head, nil } r = (uint64)(rr.Int63...
// Code generated by go-swagger; DO NOT EDIT. package reconciliation // 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 "gith...
// Copyright 2020 MatrixOrigin. // // 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 buckets import ( "io/ioutil" "math" "path/filepath" "time" "github.com/xmn-services/rod-network/domain/memory/buckets" "github.com/xmn-services/rod-network/domain/memory/buckets/files" "github.com/xmn-services/rod-network/domain/memory/buckets/files/chunks" "github.com/xmn-services/rod-network/domain/...
package grpc import ( "context" "crypto/tls" "errors" "fmt" "net/url" "strconv" "strings" "time" escrowpb "github.com/tron-us/go-btfs-common/protos/escrow" exchangepb "github.com/tron-us/go-btfs-common/protos/exchange" guardpb "github.com/tron-us/go-btfs-common/protos/guard" hubpb "github.com/tron-us/go-b...
package gateway import ( "context" "crypto/tls" "net" "github.com/gofiber/fiber/v2" "github.com/hashicorp/go-plugin" "github.com/prometheus/client_golang/prometheus" "github.com/rancher/opni-monitoring/pkg/capabilities" "github.com/rancher/opni-monitoring/pkg/config" "github.com/rancher/opni-monitoring/pkg/c...
// 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...
// Copyright 2021 Google LLC 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...
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
// Package preprocess performs preparsing filtering and modification of a // scientific-name. package preprocess import ( "bytes" "io" "regexp" "strings" "unicode" ) var hybridCharRe1 = regexp.MustCompile(`(^)[Xx](\p{Lu})`) var hybridCharRe2 = regexp.MustCompile(`(\s|^)[Xx](\s|$)`) var notesRe = regexp.MustComp...
package accesscontrol import ( "context" "testing" "github.com/grafana/grafana/pkg/models" "github.com/stretchr/testify/assert" ) func TestResolveKeywordScope(t *testing.T) { tests := []struct { name string user *models.SignedInUser permission Permission want Permission wantErr bo...