text
stringlengths
3.08k
10.4k
// Copyright (c) 2018 <NAME> package main import ( "fmt" "path/filepath" "sort" "strings" "sync" ) func calculateGains(startDate string, endDate string, numAssets int) (float64, float64) { m := make(map[string]float64) totalIn := 0.0 totalOut := 0.0 debugPrint := false for i := 1; i <= numAssets; i++ { ...
// Command rated implements standalone rate-limiting service with an HTTP // interface. // // Its HTTP endpoint accepts requests with non-empty query string used as a key // to check against a limited set of buckets to do token-based rate limiting. // It treats the whole query as-is as a key, so queries "foo=1&bar=2" a...
// Copyright 2022 The CubeFS 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...
/* http://www.apache.org/licenses/LICENSE-2.0.txt Copyright 2015 Intel 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 ...
package buf import ( "errors" "io" ) // Idea: Change this so that the writer can only write infrount of the read pointer once // but can write anywhere behind the Read pointer since the protocol does not need to have // seek access... // Result: not so much... To many edge cases // Idea: compacting buffer // A Re...
package libipvs // IPVS genl commands const ( IPVS_CMD_UNSPEC uint8 = iota IPVS_CMD_NEW_SERVICE // add service IPVS_CMD_SET_SERVICE // modify service IPVS_CMD_DEL_SERVICE // delete service IPVS_CMD_GET_SERVICE // get info about specific service IPVS_CMD_NEW_DEST //add destination IPVS_CMD_SET_DEST //modify de...
/* 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, ...
// Copyright 2017 The WPT Dashboard Project. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package api import ( "encoding/json" "net/http" "strings" "github.com/web-platform-tests/wpt.fyi/shared" ) const nextPageTokenHeaderName = "wp...
package router import ( "bytes" "fmt" "io" "os" "path" "path/filepath" goruntime "runtime" "github.com/golang/glog" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "github.com/openshift/origin/pkg/cmd/...
package views import ( "errors" "fmt" "strings" "time" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/k8s" "github.com/derailed/k9s/internal/perf" "github.com/derailed/k9s/internal/resource" "github.com/derailed/k9s/internal/ui" "github.com/gdamore/tcell" "github.com/rs/zerolog...
package xls2json import ( "encoding/json" "fmt" "strings" "time" "github.com/tealeg/xlsx" ) type sheetJSONMap []map[string]interface{} type Options struct { // 从表格的第几行开始,默认0,即第一行 StartRow int // 自定义表头,对应json中的key,默认为空取表格的第一行 CustomHeaders []string // 跳过表格的第多少行,从0开始 SkipRows []int // 只解析表格中最多多少行,默认无上限 M...
package mqtt_test import ( "context" "crypto/tls" "errors" "fmt" "log" "time" "github.com/pascaldekloe/mqtt" "github.com/pascaldekloe/mqtt/mqtttest" ) // Publish is a method from mqtt.Client. var Publish func(quit <-chan struct{}, message []byte, topic string) error // PublishAtLeastOnce is a method from mq...
package caddytls import ( "bufio" "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "encoding/json" "errors" "fmt" "io" "os" "strings" "github.com/xenolf/lego/acme" ) // User represents a Let's Encrypt user account. type User struct { Email string Registration *acme.RegistrationResource k...
// Copyright 2020 IBM Corp. // SPDX-License-Identifier: Apache-2.0 /* This package defines an interface for managing dynamically allocated S3 buckets. The current implementation manages buckets using Dataset resources. Convention: Dataset resources have the same name as the name of the provisioned bucket. The foll...
package index import ( "github.com/sirupsen/logrus" "github.com/spf13/cobra" "k8s.io/kubectl/pkg/util/templates" "github.com/operator-framework/operator-registry/pkg/containertools" "github.com/operator-framework/operator-registry/pkg/lib/indexer" "github.com/operator-framework/operator-registry/pkg/sqlite" ) ...
// Copyright 2019 OmiseGO Pte Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to...
package analysis import ( "github.com/PaluMacil/ham/experiment" "github.com/PaluMacil/ham/parse" "math" "strings" ) type Preprocessor interface { Process(ex *experiment.Experiment) } type Analysis struct { Name string TrainingSet TrainingSet TestSet TestSet } func (a Analysis) Test(set experiment...
package web import ( "context" "net/http" "os" "os/signal" "path/filepath" "time" "github.com/autograde/quickfeed/internal/rand" "github.com/autograde/quickfeed/web/auth" "github.com/autograde/quickfeed/web/hooks" "github.com/gorilla/sessions" "github.com/labstack/echo-contrib/session" "github.com/labstac...
// Copyright 2017 Publit Sweden AB. All rights reserved. // Handles Publit print order data statuses. // // Print order statuses is used in Publit to communicate the state of the print order. // Whenever a print order changes status it should be communicated to Publit. // // This package contains methods to show, inde...
// 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...
/* * @Author: EagleXiang * @Github: https://github.com/eaglexiang * @Date: 2018-12-23 22:54:58 * @LastEditors: EagleXiang * @LastEditTime: 2019-09-21 14:35:41 */ package cmd import ( "errors" "net" "strings" "github.com/eaglexiang/eagle.tunnel.go/server/protocols/et/comm" "github.com/eaglexiang/go/logger"...
/* * Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. * * The ontology 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, or * (a...
package redlock import ( "crypto/rand" "encoding/base64" "errors" mathrand "math/rand" "sync" "sync/atomic" "time" ) // Adapter defines requirements for redis connection. type Adapter interface { SetNX(key string, val string, expiration time.Duration) (bool, error) Eval(script string, key []string, args ...i...
/* * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * * 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 require...
/* 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 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...
/* Copyright 2015 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
package charts import ( "fmt" "path/filepath" "github.com/blang/semver" "github.com/go-git/go-billy/v5" "github.com/rancher/charts-build-scripts/pkg/filesystem" "github.com/rancher/charts-build-scripts/pkg/helm" "github.com/rancher/charts-build-scripts/pkg/path" "github.com/sirupsen/logrus" ) // Package repr...
package chserver import ( "context" "io" "net/http" "strings" "sync/atomic" "time" "golang.org/x/crypto/ssh" "github.com/jpillora/chisel/share" ) // handleClientHandler is the main http websocket handler for the chisel server func (s *Server) handleClientHandler(w http.ResponseWriter, r *http.Request) { //...
package checker import ( "strings" ) // IsHTMLTagName returns true if the argument is a defined HTML5 tag, case // insensitive. // // Note: In the interest of optimizing for the common case, the argument is // assumed to be lowercase or uppercase. If `name` is mixed case, this function // may return a false negative...
package store import ( "strings" "github.com/docker/swarmkit/api" "github.com/docker/swarmkit/manager/state" memdb "github.com/hashicorp/go-memdb" ) const tableService = "service" func init() { register(ObjectStoreConfig{ Name: tableService, Table: &memdb.TableSchema{ Name: tableService, Indexes: map...
package main import ( "bytes" "fmt" "io/ioutil" "log" "net/http" "sort" "strings" "sync" "github.com/Ullaakut/disgo/style" "github.com/PuerkitoBio/goquery" "github.com/Ullaakut/disgo" "github.com/vbauerster/mpb" "github.com/vbauerster/mpb/decor" ) const dictionaryURL = "https://community.geniusvision.n...
package main import ( "flag" "fmt" "math/rand" "net/http" "os" "time" ) type telemetryControl struct { telemetry bool //indicates whether telemetry data should be sent noDelay bool //whether telemetry data should be sent without any delay p protocol } //checks the user provided device id and retur...
package input import ( "bufio" "bytes" "compress/gzip" "io" "net" "sync" "sync/atomic" "time" "github.com/AdRoll/baker" log "github.com/sirupsen/logrus" ) var TCPDesc = baker.InputDesc{ Name: "TCP", New: NewTCP, Config: &TCPConfig{}, Help: "This input relies on a TCP connection to receive records ...
package reports import ( "encoding/csv" "fmt" "strings" "github.com/nsip/dev-nrt/helper" "github.com/nsip/dev-nrt/records" "github.com/tidwall/gjson" "github.com/tidwall/sjson" ) type SystemItemCounts struct { baseReport // embed common setup capability cfh helper.CodeframeHelper usage itemUsag...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package forecast import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type CreateForecastInput struct { _ struct{} `type:"structure"` // A name for the forecast. // // ForecastName ...
/* Copyright 2020 The Bulward 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...
// 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 main import ( "encoding/csv" "flag" "fmt" "io" "io/ioutil" "log" "os" "strconv" "time" "github.com/elwin/scionFTP/scion" "github.com/elwin/scionFTP/mode" ftp "github.com/elwin/scionFTP/client" ) var ( client = flag.String("local", "", "Local host (including port)") remote = flag.String("remot...
package systems import ( "engo.io/ecs" "engo.io/engo" "errors" "fmt" "github.com/MrTrustworthy/fargo/entities" "github.com/MrTrustworthy/fargo/events" "github.com/MrTrustworthy/fargo/eventsystem" ) type UnitMovementSystem struct { world *ecs.World CurrentUnit *entities.Unit CurrentTarget engo.Poin...
// Copyright 2012 Google, Inc. All rights reserved. // Copyright 2009-2011 <NAME>. 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. package layers import ( "encoding/binary" "fmt" "github.com/google/gop...
// *** 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 mixedreality import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ObjectAnchorsAccount Response. // ...
package link import ( "net" "sync" "sync/atomic" ) // Session. type Session struct { id uint64 server *Server // About network conn net.Conn writer PacketWriter reader PacketReader // About send and receive sendChan chan Message sendPacketChan chan []byte sendBuff []byte sendLock ...
package adblib import ( "github.com/MakeNowJust/heredoc" ) var ( MysqlDoc = heredoc.Doc(` $ mysql Backup table // https://stackoverflow.com/questions/40724046/mysql-gtid-consistency-violation > CREATE TABLE new_table LIKE old_table; > INSERT new_table SELECT * FROM old_table; > ALTER TABLE xx_tab change status pr...
package mage /** * Panther is a scalable, powerful, cloud-native SIEM written in Golang/React. * Copyright (C) 2020 Panther Labs Inc * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundatio...
/** * 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 * distribu...
package main import ( "fmt" "io/ioutil" "os" "text/tabwriter" "github.com/johandry/gics/schematics" ) const ( version = "0.0.1" ) func runSchematicsWorkspaceWithCode() *schematics.Workspace { w := schematics.New("GICS-Demo-with-Code", "", nil) w.SetOutput(os.Stderr) w.AddVar("prefix", "gics-demo", "", ""...
// Copyright 2022 The developer-guy 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...
/* CONS3RT API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) API version: 1.0.0 Contact: <EMAIL> */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package cons3rt import ( "bytes" _context "context" _ioutil "io/i...
package collector import ( "fmt" "net/http" "testing" th "github.com/gophercloud/gophercloud/testhelper" "github.com/gophercloud/gophercloud/testhelper/client" "github.com/prometheus/client_golang/prometheus" ) func TestComputeUpdate(t *testing.T) { th.SetupHTTP() defer th.TeardownHTTP() handleComputeServic...
package retrievalmarketconnector import ( "bytes" "context" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/shared" "github.com/filecoin-project/specs-actors/actors/abi" paychActor "github.com/filecoin-project/spe...
/* 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 main import ( "bytes" "encoding/json" "errors" "flag" "io/ioutil" "log" "net" "net/http" "strconv" "strings" "sync" "sync/atomic" "time" "go.uber.org/zap" ) var replacer = strings.NewReplacer("\n", "") func getConatinerID() (string, error) { b, err := ioutil.ReadFile("/proc/1/cpuset") if err...
// Copyright (c) 2018 <NAME> // // Use of this source code is governed by The MIT License // that can be found in the LICENSE file. package filtering import ( "log" "math" "time" //"reflect" "github.com/iomz/go-llrp" "github.com/looplab/fsm" ) // EngineGenerator produce an engine according to the FSM type Eng...
package models import ( "strconv" "strings" "time" ) const ( ownerTag = "Autorizado(a)" certificateTag = "Certificado" certificatesTag = "Certificados" testDataTag = "Data da prova" inscriptionEndDateTag = "Encerramento das Inscrições" activeInscriptionsTag = "...
package modemmanager import ( "encoding/json" "errors" "fmt" "github.com/godbus/dbus/v5" "time" ) // Paths of methods and properties of ModemTime const ( ModemTimeInterface = ModemInterface + ".Time" /* Methods */ ModemTimeGetNetworkTime = ModemTimeInterface + ".GetNetworkTime" /* Property */ ModemTimePro...
// Copyright (c) 2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
package statefulsets_test import ( "fmt" "math/rand" "code.cloudfoundry.org/eirini/k8s" "code.cloudfoundry.org/eirini/models/cf" "code.cloudfoundry.org/eirini/opi" "code.cloudfoundry.org/lager/lagertest" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/co...
package dns import ( "fmt" "net" "strconv" "strings" "github.com/miekg/dns" "github.com/titan098/go-dns/config" "github.com/titan098/go-dns/logging" ) var log = logging.SetupLogging("dns") // Server is the top-level structure containing a reference to the // dns server that was constructed type Server struct...
/** * Copyright (C) 2015 Red Hat, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
package vaultkv import ( "encoding/json" "fmt" "strconv" "strings" "time" ) const ( //MountTypeGeneric is what the key value backend was called prior to 0.8.0 MountTypeGeneric = "generic" //MountTypeKV is the type string to get a Key Value backend MountTypeKV = "kv" ) //Mount represents a backend mounted at...
// Copyright (C) 2015 Space Monkey, 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 agre...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: dclgenutil/tx.proto package types import ( context "context" fmt "fmt" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" math "math" ) // Reference imports to suppress errors if they are not o...
// Copyright 2017 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 gke contains code for interacting with Google Container Engine (GKE), // the hosted version of Kubernetes on Google Cloud Platform. // // The API is ...
// Copyright 2021 The NATS 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 wr...
/* Copyright 2021 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 process import ( "fmt" "io" "os/exec" "runtime" "sync" "syscall" "time" ) // Stream implements io.ReadWriteCloser around the standard input/output of a // process. It is "closed" by terminating the underlying process. It supports an // optional "kill delay" which tells the Close method to wait (up to t...
// Copyright 2015 tsuru authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package migration provides a "micro-framework" for migration management: // each migration is a simple function that returns an error. All migration // functi...
// Copyright © 2017 The virtual-kubelet 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 la...
package api import ( "mime/multipart" "github.com/pkg/errors" "github.com/diamondburned/arikawa/v2/discord" "github.com/diamondburned/arikawa/v2/utils/json/option" "github.com/diamondburned/arikawa/v2/utils/sendpart" ) const AttachmentSpoilerPrefix = "SPOILER_" // AllowedMentions is a allowlist of mentions fo...
package main import ( "testing" "time" hclog "github.com/hashicorp/go-hclog" "github.com/stretchr/testify/assert" ) func TestSnapshotter(t *testing.T) { conf := DefaultConfig() conf.Snapshot.DeleteThreshold = 14 * 24 * time.Hour redis := NewMockRedisClient() db := NewMockDatabaseClient() snap := &Snapshott...
package stringx import ( "bytes" "crypto/x509" "encoding/pem" "errors" "fmt" "log" "path" "regexp" "strconv" "strings" "unicode" "unsafe" ) var ( compresReg *regexp.Regexp ) // Camel2Case ... func Camel2Case(name string) string { buffer := NewBuffer() for i, r := range name { if unicode.IsUpper(r) {...
// Copyright 2013 <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package smile import ( "fmt" "go/token" "strings" "unicode/utf8" ) // Parse returns an abstract syntax tree corresponding to the given // equation, or an error. f...
/* * Copyright(C) 2020 github.com/hidu All Rights Reserved. * Author: hidu (<EMAIL>) * Date: 2020/4/25 */ package template // asset_remove_above() // asset_include(header.tpl) import ( "bytes" "compress/gzip" "encoding/base64" "flag" "fmt" "io/ioutil" "log" "mime" "net/http" "os" "path" "path/filep...
package main // https://code.visualstudio.com/docs/editor/integrated-terminal in go // Regex in go https://github.com/google/re2/wiki/Syntax // Case insensitive regex in go https://stackoverflow.com/questions/15326421/how-do-i-do-a-case-insensitive-regular-expression-in-go // https://www.regular-expressions.info/refw...
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package ipnshostmetagencmd import ( "context" "crypto/tls" "crypto/x509" "fmt" "net/http" "os" "strconv" "time" shell "github.com/ipfs/go-ipfs-api" "github.com/spf13/cobra" cmdutils "github.com/trustbloc/e...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package kms import ( "context" "time" "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/kms-2014-11-01/ScheduleKeyDeletionRequest type ScheduleKeyDel...
package handler import ( "fmt" "math/rand" "os" "strconv" "time" "unsafe" "github.com/hashicorp/consul/api" "github.com/micro/go-micro/errors" "github.com/micro/go-micro/server" "golang.org/x/net/context" "github.com/unicok/misc/log" proto "github.com/unicok/snowflake-srv/proto/snowflake" ) const ( bac...
package game import ( "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" "github.com/vidar-team/Cardinal/conf" "github.com/vidar-team/Cardinal/internal/db" "github.com/vidar-team/Cardinal/internal/healthy" "github.com/vidar-team/Cardinal/internal/logger" "github.com/vidar-team/Cardinal/locales" "time" ) // C...
package maps import ( "encoding/json" "fmt" "reflect" "sort" "sync" "github.com/yaoapp/kun/interfaces" ) // MapSync alias of MapStrAnySync type MapSync = MapStrAnySync // MapStrSync alias of MapStrAnySync type MapStrSync = MapStrAnySync // StrSync alias of MapStrAnySync type StrSync = MapStrAnySync // StrAn...
// Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license" fil...
//line match.ragel:1 package ragel //line match.ragel:7 //line match.go:12 const match_start int = 1 const match_first_final int = 18 const match_error int = 0 const match_en_main int = 1 //line match.ragel:8 func (r *Stuff) Match(data []byte) bool { cs, p, pe := 0, 0, len(data) //line match.go:27 { c...
package uploader import ( "bytes" "errors" "net/url" "os" "path" "path/filepath" "time" "koding/kites/keygen" "koding/klient/storage" "koding/logrotate" "github.com/boltdb/bolt" "github.com/koding/kite" "github.com/koding/logging" ) var defaultLog = logging.NewCustom("uploader", false) func nonil(err ...
package suggest import ( "fmt" "go/types" "sort" "strings" ) type Candidate struct { Class string `json:"class"` PkgPath string `json:"package"` Name string `json:"name"` Type string `json:"type"` } func (c Candidate) Suggestion() string { switch { case c.Class != "func": return c.Name case stri...
package emoji import ( "fmt" . "github.com/dmolesUC3/emoji/data" "unicode" ) // ZWJ is the Unicode zero-width join character const ZWJ = '\u200d' // ------------------------------------------------------------ // Misc functions // IsEmoji returns true if the specified rune has the (single-character) // Emoji pro...
/* Copyright 2022. 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...
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed unde...
// 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
/* * Cadence - The resource-oriented smart contract programming language * * Copyright 2019-2020 <NAME>, 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....
package public import ( "errors" "fmt" "net/http" "strconv" "sync" "github.com/gin-gonic/gin" zerolog "github.com/rs/zerolog/log" "github.com/rtlnl/phoenix/models" "github.com/rtlnl/phoenix/pkg/cache" "github.com/rtlnl/phoenix/pkg/db" "github.com/rtlnl/phoenix/pkg/logs" "github.com/rtlnl/phoenix/pkg/metr...
package sqlds import ( "context" "database/sql" "encoding/json" "errors" "fmt" "time" "github.com/grafana/grafana-plugin-sdk-go/backend" "github.com/grafana/grafana-plugin-sdk-go/data" "github.com/grafana/grafana-plugin-sdk-go/data/sqlutil" ) // FormatQueryOption defines how the user has chosen to represent...
// Copyright 2021 Chaos Mesh 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 operator import ( "fmt" "github.com/openshift/console-operator/pkg/apis/console/v1alpha1" "github.com/operator-framework/operator-sdk/pkg/sdk" "github.com/sirupsen/logrus" "gopkg.in/yaml.v2" "k8s.io/apimachinery/pkg/api/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"...
package admin import ( "fmt" "runtime" // "strings" "time" _ "github.com/json-iterator/go" "github.com/midoks/imail/internal/app/context" "github.com/midoks/imail/internal/conf" "github.com/midoks/imail/internal/db" "github.com/midoks/imail/internal/task" "github.com/midoks/imail/internal/tools" ) const (...
// 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. // This file implements the compressed encoding of source // positions using a lookup table. package src // XPos is a more compact representation of Pos. type...
package services import ( "time" "github.com/gofrs/uuid" "github.com/transcom/mymove/pkg/appcontext" "github.com/transcom/mymove/pkg/auth" "github.com/transcom/mymove/pkg/models" "github.com/transcom/mymove/pkg/unit" ) //MTOShipmentFetcher is the service object interface for fetching all shipments of a move /...
package main import ( "flag" "fmt" "log" "net/http" "os" "regexp" "strings" "time" "github.com/berrunder/go-tcard" "github.com/go-telegram-bot-api/telegram-bot-api" ) //const token = "" // Bot structure type Bot struct { api *tgbotapi.BotAPI userNums map[int64]string } func main() { var token str...
package packagescompiler import ( "fmt" boshcomp "github.com/cloudfoundry/bosh-agent/agent/compiler" boshblob "github.com/cloudfoundry/bosh-utils/blobstore" bosherr "github.com/cloudfoundry/bosh-utils/errors" boshlog "github.com/cloudfoundry/bosh-utils/logger" bpagentclient "github.com/cppforlife/bosh-provisio...
package git import ( "container/list" "fmt" "sync" "github.com/abhinav/git-pr/gateway" "go.uber.org/multierr" ) // BulkRebaser rebases multiple interdependent branches in a safe way. No // changes are made to existing branches. Callers can commit changes by // retrieving information from RebaseHandles. // // ...
// Package countries - ISO 3166 (ISO3166-1, ISO3166, Digit, Alpha-2 and Alpha-3) countries codes and names (on eng and rus), ISO 4217 currency designators, ITU-T E.164 IDD calling phone codes, countries capitals, UN M.49 regions codes, ccTLD countries domains, IOC/NOC and FIFA letters codes, VERY FAST, NO maps[], NO sl...