text
stringlengths
3.08k
10.4k
// 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...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: proto/rpc.proto package rpc import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-...
package main import ( "crypto/tls" "fmt" "io/ioutil" "log" "net/http" "net/http/cookiejar" "net/url" "strconv" "strings" "time" "golang.org/x/net/publicsuffix" ) type DracType int const ( DRAC4 = 4 DRAC5 = 5 DRAC6 = 6 DRAC7 = 7 DRAC8 = 8 UNKNOWN = -1 ) func getDracType(host string, user string, p...
package models import ( "encoding/json" "github.com/libsv/go-bn/internal/util" "github.com/libsv/go-bt/v2" "github.com/libsv/go-bt/v2/bscript" "github.com/libsv/go-bt/v2/sighash" ) // Output model. type Output struct { BestBlock string Confirmations uint32 Coinbase bool *bt.Output } // NodeJSON r...
package beacon import ( "context" "errors" "fmt" "github.com/protolambda/ztyp/codec" "github.com/protolambda/ztyp/tree" . "github.com/protolambda/ztyp/view" ) func (spec *Spec) ProcessAttesterSlashings(ctx context.Context, epc *EpochsContext, state *BeaconStateView, ops []AttesterSlashing) error { for i := ran...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: data_credential_service.proto package connectors import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" math "math" ) // ...
package cui import ( "strconv" "github.com/kyai/gocui" ) var keyboard = []struct { viewname string key interface{} mod gocui.Modifier handler func(*gocui.Gui, *gocui.View) error }{ {"", gocui.KeyCtrlC, gocui.ModNone, quit}, {ViewData, gocui.KeyArrowLeft, gocui.ModNone, switchKeys}, {ViewKeys, goc...
package base import ( "bytepower_room/base/log" "fmt" "time" "github.com/go-redis/redis/v8" ) type RedisClusterConfig struct { Addrs []string `yaml:"addrs"` Connection connectionConfig `yaml:",inline"` } func (config RedisClusterConfig) check() error { if len(config.Addrs) == 0 { return fmt.Er...
// Copyright 2016 <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 writing, ...
// Copyright (c) 2017 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...
// Copyright © 2018 <NAME> <<EMAIL>> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
package aws import ( "fmt" "log" "os" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ecs" "gopkg.in/yaml.v3" ) type Service struct { Name string `yaml:"na...
package rankdb import ( "sort" "strings" ) const ( IndexTypeHash = iota IndexTypeRedBlackTree ) type IndexerHash struct { IdxHash map[string]*OneIndexer } func NewIndexerHash() *IndexerHash { return &IndexerHash{IdxHash: make(map[string]*OneIndexer)} } // Indexer 实现了从sort set value中提取字段作为索引 type Indexer stru...
package main import ( "bytes" "encoding/json" "fmt" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "...
package gitlab import ( "fmt" "strconv" "sync" "github.com/pkg/errors" "github.com/strongdm/comply/internal/model" "github.com/xanzy/go-gitlab" ) const ( cfgDomain = "domain" cfgToken = "token" cfgRepo = "repo" ) var prompts = map[string]string{ cfgDomain: "Fully Qualified GitLab Domain", cfgToken: "...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package compute import ( "github.com/pulumi/pulumi/sdk/go/pulumi" ) // An HttpsHealthCheck resource. This resource defines a template for how // ...
// Copyright 2018 Authors of Cilium // // 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 l10n import ( "fmt" "reflect" "github.com/jinzhu/gorm" "github.com/itech-eng/qor/utils" ) func beforeQuery(scope *gorm.Scope) { if IsLocalizable(scope) { quotedTableName := scope.QuotedTableName() quotedPrimaryKey := scope.Quote(scope.PrimaryKey()) _, hasDeletedAtColumn := scope.FieldByName("delet...
package main import ( "encoding/json" "fmt" "net/url" "os" "os/signal" "strings" "time" logger "github.com/blendle/go-logger" "github.com/blendle/pg2kafka/eventqueue" "github.com/confluentinc/confluent-kafka-go/kafka" "github.com/lib/pq" "github.com/pkg/errors" "go.uber.org/zap" ) var ( topicNamespace ...
//go:build btclive // +build btclive // Since at least one live test runs for an hour, you should run live tests // individually using the -run flag. All of these tests will only run with the // 'btclive' build tag, specified with the -tags flag. // // go test -v -tags btclive -run UTXOStats // -----------------------...
package cluster import ( "fmt" "net" "os/exec" "github.com/Sirupsen/logrus" utilwait "k8s.io/apimachinery/pkg/util/wait" kapi "k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/tools/cache" "github.com/openshift/origin/pkg/util/netutils" ) // StartClusterMaster runs a subnet IPAM and a controller that watches...
package routedhost import ( "context" "fmt" "time" host "gx/ipfs/QmaSxYRuMq4pkpBBG2CYaRrPx2z7NmMVEs34b9g61biQA6/go-libp2p-host" inet "gx/ipfs/QmNa31VPzC561NWwRsJLE7nGYZYuuD2QfpK2b1q9BK54J1/go-libp2p-net" pstore "gx/ipfs/QmPgDWmTmuzvP7QE5zwo1TmjbJme9pmZHNujB2453jkCTr/go-libp2p-peerstore" logging "gx/<KEY>" lg...
package secret import ( "bytes" "errors" "fmt" "github.com/viant/toolbox" "github.com/viant/toolbox/cred" "github.com/viant/toolbox/storage" "github.com/viant/toolbox/url" "os" "path" "strings" "sync" ) //represents a secret service type Service struct { interactive bool baseDirectory string cache ...
package component import ( "encoding/json" v1 "k8s.io/api/apps/v1" "github.com/redhat-developer/odo/pkg/kclient" "github.com/redhat-developer/odo/pkg/localConfigProvider" "github.com/redhat-developer/odo/pkg/service" devfileParser "github.com/devfile/library/pkg/devfile/parser" "github.com/redhat-developer/o...
// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use th...
/* Copyright 2019 The Kruise 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...
// Copyright (c) 2018 Cisco and/or 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 app...
/* Package gbytes provides a buffer that supports incrementally detecting input. You use gbytes.Buffer with the gbytes.Say matcher. When Say finds a match, it fastforwards the buffer's read cursor to the end of that match. Subsequent matches against the buffer will only operate against data that appears *after* the ...
package internal import ( "context" "errors" "sync" log "github.com/sirupsen/logrus" "github.com/sand8080/goxecutor/task" ) // ErrNoRootsInGraph no root tasks in graph error var ErrNoRootsInGraph = errors.New("no root tasks in graph") // ErrTaskWaitingParents task without parents in graph error var ErrTaskWai...
package base // Copyright 2020 The GoVision Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use 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 clui import ( xs "github.com/huandu/xstrings" term "github.com/nsf/termbox-go" ) /* CheckBox control. It can be two-state one(on and off) - it is default mode - or three-state. State values are 0=off, 1=on, 2=third state */ type CheckBox struct { BaseControl state int allow3state bool onChange fu...
package web import ( "net/http" "path/filepath" "reflect" "time" "github.com/kdada/tinygo/connector" "github.com/kdada/tinygo/log" "github.com/kdada/tinygo/meta" "github.com/kdada/tinygo/router" "github.com/kdada/tinygo/session" "github.com/kdada/tinygo/template" ) // 参数类型方法 type ParamTypeFunc func(context...
package injector import ( "fmt" "strconv" "strings" "github.com/openservicemesh/osm/pkg/constants" ) // iptablesOutboundStaticRules is the list of iptables rules related to outbound traffic interception and redirection var iptablesOutboundStaticRules = []string{ // Redirects outbound TCP traffic hitting OSM_PRO...
package handler import ( "fmt" "net/http" "strconv" "strings" "time" "github.com/gorilla/mux" "github.com/nspcc-dev/neofs-s3-gw/api" "github.com/nspcc-dev/neofs-s3-gw/api/layer" "go.uber.org/zap" ) type conditionalArgs struct { IfModifiedSince *time.Time IfUnmodifiedSince *time.Time IfMatch s...
// -*- Mode: Go; indent-tabs-mode: t -*- // // Copyright (C) 2018 Canonical Ltd // Copyright (C) 2018-2021 IOTech Ltd // // SPDX-License-Identifier: Apache-2.0 package service import ( "context" "regexp" "sync" "github.com/edgexfoundry/go-mod-bootstrap/v2/di" "github.com/edgexfoundry/go-mod-core-contracts/v2/cl...
// Copyright (c) 2021 Terminus, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
package tappx import ( "encoding/json" "fmt" "net/http" "net/url" "strconv" "strings" "text/template" "time" "github.com/mxmCherry/openrtb/v15/openrtb2" "github.com/prebid/prebid-server/adapters" "github.com/prebid/prebid-server/config" "github.com/prebid/prebid-server/errortypes" "github.com/prebid/preb...
package cmd import ( "fmt" "github.com/smira/aptly/deb" "github.com/smira/aptly/query" "github.com/smira/commander" "github.com/smira/flag" "sort" "strings" ) func aptlySnapshotPull(cmd *commander.Command, args []string) error { var err error if len(args) < 4 { cmd.Usage() return commander.ErrCommandErro...
package main import ( "bytes" "fmt" "io/ioutil" "net" "net/http" "os" "strings" "time" "github.com/rightscale/rsc/cmd" "github.com/rightscale/rsc/httpclient" "github.com/rightscale/rsc/log" "gopkg.in/alecthomas/kingpin.v2" // phoney reference to make Godep pull this in for the code generators _ "github...
/* Copyright 2018 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
package job import ( "context" "fmt" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/zrepl/zrepl/daemon/logging/trace" "github.com/zrepl/zrepl/config" "github.com/zrepl/zrepl/daemon/logging" "github.com/zrepl/zrepl/daemon/snapper" "github.com/zrepl/zrepl/endpoint" "git...
// Copyright 2021 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 daemon import ( "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "regexp" "strings" "text/template" ) // systemVRecord - standard record (struct) for linux systemV version of daemon package type bsdRecord struct { name string description string dependencies []string } // Standard service ...
package main //go:generate go run generate_reference_docs.go import ( "html/template" "io/ioutil" "log" "os" "path/filepath" "strings" "github.com/gogo/protobuf/proto" plugin_gogo "github.com/gogo/protobuf/protoc-gen-gogo/plugin" plugin_go "github.com/golang/protobuf/protoc-gen-go/plugin" "github.com/pkg/e...
// Copyright 2021 CloudJ Company Limited. All rights reserved. package apps import ( "cloudiac/portal/consts" "cloudiac/portal/consts/e" "cloudiac/portal/libs/ctx" "cloudiac/portal/models" "cloudiac/portal/models/forms" "cloudiac/portal/services" "cloudiac/utils" "cloudiac/utils/logs" "fmt" "github.com/pkg/...
package shootOperations import ( "encoding/binary" "fmt" "net" "sort" ) type SubnetGenerator struct { baseCIDR string lastSubnet string } /** Generates a new subnet generator. Requires a base subnet (baseCIDR) where all generated subnets will lie in sng := NewsubnetGenerator("10.250.0.0/16") blockedCIDRs :=...
// Package v2 contains common functions for creating identity-based resources // for use in acceptance tests. See the `*_test.go` files for example usages. package v2 import ( "testing" "github.com/dynuc/gophercloud" "github.com/dynuc/gophercloud/acceptance/tools" "github.com/dynuc/gophercloud/openstack/identity/...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: vtctldata.proto /* Package vtctldata is a generated protocol buffer package. It is generated from these files: vtctldata.proto It has these top-level messages: ExecuteVtctlCommandRequest ExecuteVtctlCommandResponse */ package vtctldata import proto "git...
// Copyright 2016 CoreOS, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
package websockets import ( "fmt" "hash/fnv" "net/http" "strconv" "time" "github.com/charmbracelet/lipgloss" "github.com/craftamap/hobbit-tracker/hub" "github.com/craftamap/hobbit-tracker/middleware/authtocontext" "github.com/craftamap/hobbit-tracker/middleware/requestcontext" "github.com/craftamap/hobbit-t...
// 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 main import ( "context" "encoding/json" "fmt" "io" "os" "strings" "github.com/gogo/protobuf/proto" "github.com/olekukonko/tablewriter" "go.gazette.dev/core/broker/client" pb "go.gazette.dev/core/broker/protocol" "go.gazette.dev/core/consumer" pc "go.gazette.dev/core/consumer/protocol" "go.gazette...
// Code generated by smithy-go-codegen DO NOT EDIT. package types // Contains an array. type ArrayValue interface { isArrayValue() } // An array of arrays. type ArrayValueMemberArrayValues struct { Value []ArrayValue } func (*ArrayValueMemberArrayValues) isArrayValue() {} // An array of Boolean values. type Arra...
/* Copyright 2020 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwa...
// Copyright 2020 Northern.tech AS // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
package ports import ( "context" "fmt" "github.com/QOSGroup/cassini/event" "github.com/QOSGroup/cassini/log" "github.com/QOSGroup/cassini/restclient" "github.com/QOSGroup/cassini/types" "github.com/QOSGroup/qbase/txs" tctypes "github.com/tendermint/tendermint/rpc/core/types" ) func init() { builder := func(...
// The MIT License // // Copyright (c) 2021 Temporal Technologies Inc. All rights reserved. // // 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 limit...
package types import ( "fmt" "strings" ) const ( // AccessLogKeep is the keep string value AccessLogKeep = "keep" // AccessLogDrop is the drop string value AccessLogDrop = "drop" // AccessLogRedact is the redact string value AccessLogRedact = "redact" ) // TraefikLog holds the configuration settings for the ...
package main import ( "context" "errors" "math" "net/url" "github.com/vmware/govmomi" "github.com/vmware/govmomi/view" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" //"github.com/vmware/govmomi/object" )...
package cache import "container/list" // LFUNoTS holds the cache struct type LFUNoTS struct { // list holds all items in a linked list frequencyList *list.List // holds the all cache values cache Cache // size holds the limit of the LFU cache size int // currentSize holds the current item size in the list ...
// Copyright 2020 The jackal 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...
package accumulator import ( "crypto/sha256" "fmt" "math/rand" ) // Hash : type Hash [32]byte // Prefix, for printfs func (h Hash) Prefix() []byte { return h[:4] } // Mini : func (h Hash) Mini() (m MiniHash) { copy(m[:], h[:12]) return } // MiniHash : type MiniHash [12]byte // HashFromString : func HashFrom...
// Copyright (c) 2017 Cisco and/or 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...
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package myanimelist import ( "fmt" "net/http" "net/url" "strconv" "time" ) type Forum struct { mal *MAL } // ForumBoards return list of all forum's categories. func (f *Forum) Boards() (*ForumCategories, error) { method := http.MethodGet path := "./forum/boards" data := url.Values{} var categories = &For...
/* Copyright 2018 The pdfcpu 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, softwar...
/* Copyright The containerd 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...
package receiver import ( "bytes" "fmt" "io" "net" "strings" "sync/atomic" "time" "github.com/lomik/go-carbon/points" "github.com/Sirupsen/logrus" ) // UDP receive metrics from UDP socket type UDP struct { out chan *points.Points exit chan bool graphPrefix string met...
/* Copyright 2020 Gravitational, 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 writing, soft...
// Copyright 2020 The Okteto 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 gorose import ( "database/sql" "fmt" ) // TAGNAME ... var TAGNAME = "gorose" // IGNORE ... var IGNORE = "-" type cluster struct { master []*sql.DB masterSize int slave []*sql.DB slaveSize int } // Engin ... type Engin struct { config *ConfigCluster driver string prefix string dbs *cl...
/* * database.go * * This source file is part of the FoundationDB open source project * * Copyright 2013-2018 Apple Inc. and the FoundationDB project 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...
package gojq import ( "bytes" "fmt" "math" "math/big" "sort" "strconv" "unicode/utf8" ) // Marshal returns the jq-flavored JSON encoding of v. // // This method only accepts limited types (nil, bool, int, float64, *big.Int, // string, []interface{} and map[string]interface{}) because these are the // possible ...
// Copyright (C) 2014 <NAME> <<EMAIL>> // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. package nlp import ( "fmt" "math/rand" "strings" "github.com/sarifsystems/sarif/pkg/mlearning" ) type PosTagger struct { Perceptron *mlearning.Perceptron } func Ne...
/* Copyright 2020 The cert-manager Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
package html import ( "io" "strings" "github.com/go-faster/errors" "golang.org/x/net/html" "github.com/gotd/td/telegram/message/entity" "github.com/gotd/td/tg" ) type htmlParser struct { tokenizer *html.Tokenizer builder *entity.Builder stack stack attr map[string]string opts Options } f...
// Copyright (c) 2013 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 or at // https://developers.google.com/open-source/licenses/bsd. package lint import ( "bytes" "go/parser" "go/printer" "go/token" "io/ioutil" "pat...
/* Copyright 2021 Cortex Labs, 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 writing, softwa...
//go:build debug // +build debug package gojq import ( "fmt" "io" "os" "strconv" "strings" ) var ( debug bool debugOut io.Writer ) func init() { if out := os.Getenv("GOJQ_DEBUG"); out != "" { debug = true if out == "stdout" { debugOut = os.Stdout } else { debugOut = os.Stderr } } } type c...
// Copyright 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" file ...
// Copyright 2018 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
package model import ( "crypto/sha1" "database/sql" "fmt" pathlib "path" "reflect" "strconv" "sync" "github.com/konveyor/controller/pkg/logging" "github.com/konveyor/mig-controller/pkg/settings" _ "github.com/mattn/go-sqlite3" ) // Shared logger. var Log *logging.Logger // Application settings. var Settin...
package influx import ( "flag" "io" "net/http" "runtime" "sync" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmagent/common" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmagent/remotewrite" "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promp...
package log_kafka import ( "encoding/json" "errors" "fmt" "io" "os" "strconv" "syscall" "time" "github.com/caddyserver/caddy/v2" "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile" "github.com/cenkalti/backoff/v4" "github.com/segmentio/kafka-go" "go.uber.org/zap" "golang.org/x/net/context" ) func i...
// +build daemon package main import ( "crypto/tls" "fmt" "io" "os" "path/filepath" "time" "github.com/Sirupsen/logrus" apiserver "github.com/docker/docker/api/server" "github.com/docker/docker/autogen/dockerversion" "github.com/docker/docker/cliconfig" "github.com/docker/docker/daemon" "github.com/docke...
// Copyright (c) 2019 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...
/* * MinIO Client (C) 2020 MinIO, 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 agr...
// this file is obsolete // signature option should instead be addded to digest.go package main import ( "encoding/hex" "flag" "fmt" "io/ioutil" "os" "os/user" "strings" "syscall" "golang.org/x/crypto/ssh/terminal" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common...
/* Merlin is a post-exploitation command and control framework. This file is part of Merlin. Copyright (C) 2019 <NAME> Merlin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or a...
/* Copyright 2018 Google Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
// Copyright 2020 The Swarm 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 postage import ( "bytes" "errors" "fmt" "github.com/newswarm-lab/new-bee/pkg/crypto" "github.com/newswarm-lab/new-bee/pkg/storage" "github.co...
package shadow_os import "os" var Pkg = make(map[string]interface{}) var Ctor = make(map[string]interface{}) func init() { Pkg["Args"] = os.Args Pkg["Chdir"] = os.Chdir Pkg["Chmod"] = os.Chmod Pkg["Chown"] = os.Chown Pkg["Chtimes"] = os.Chtimes Pkg["Clearenv"] = os.Clearenv Pkg["Create"] = os.Create Pkg["Dev...
package main import ( "bytes" "database/sql" "encoding/json" "fmt" "log" "net/http" "os" "strconv" "time" "github.com/gorilla/mux" "github.com/lib/pq" "github.com/nimezhu/nbdata" "github.com/rs/cors" ) var dbmem map[string]*AnnotationMapValue var dbindex map[string]*BinIndexMap var db *sql.DB const App...
// Copyright 2017 Drone.IO 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 gitea import ( "context" "code.gitea.io/sdk/gitea" "github.com/jenkins-x/go-scm/scm" ) type organizationService struct { client *wrapper } func (s...
// Package clrand implements CPU-local random number generators. These may be // used simultaneously by many goroutines without significant cache contention. // // This package is based on golang.org/x/exp/rand and uses the PCG generator // from that package. This package also provides a rand.Source to be used with // ...
package day16 import ( "fmt" "regexp" "strconv" "strings" filereader "github.com/jblashki/aoc-filereader-go" ) const name = "Day 16" const inputFile = "./day16/tickets" // RunDay runs Advent of Code Day 16 Puzzle func RunDay(verbose bool) { var aResult int var bResult int var err error if verbose { fmt....
package rate import ( "context" "sync" "sync/atomic" "time" "github.com/bluekaki/pkg/errors" "github.com/go-redis/redis/v7" "go.uber.org/zap" "golang.org/x/time/rate" ) var _ Limiter = (*limiter)(nil) const ( prefix = "bluekaki-ratelimiter:" defaultTickerInterval = time.Millisecond * 300 )...
// 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 complicated import ( "fmt" "github.com/Juminiy/my_go_lib/my_algo/algo_base/algo_basic" "github.com/Juminiy/my_go_lib/my_algo/algo_base/data_struct/simple" "math" "reflect" ) const ( immutableBalanceFactor = 1 outOfBoundsBalanceFactor1 = 2 outOfBoundsBalanceFactor2 = -2 maxBin = ...
package region /* * 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 * ...