text
stringlengths
3.08k
10.4k
package governance import ( "github.com/Oneledger/protocol/data/keys" "github.com/Oneledger/protocol/serialize" "github.com/Oneledger/protocol/storage" "github.com/pkg/errors" ) type ProposalStore struct { state *storage.State szlr serialize.Serializer prefix []byte //Current Store Prefix prefixActive ...
/* Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
// Copyright © 2020 <NAME> <<EMAIL>>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. // sejong is an simple translate library. // it was inspired by ruby's i18n module. package sejong import ( "fmt" "regexp" "strconv" "strings" "github.com/pkg/errors"...
package nolan import ( "fmt" "path/filepath" "github.com/bdkiran/nolan/log" "github.com/bdkiran/nolan/nolan/metadata" "github.com/hashicorp/raft" "github.com/hashicorp/serf/serf" "go.uber.org/zap" ) const ( // StatusReap is used to update the status of a node if we // are handling a EventMemberReap StatusR...
package gamerule import ( "fmt" "github.com/YWJSonic/ServerUtility/attach" "github.com/YWJSonic/ServerUtility/igame" ) // CatAttach ... type CatAttach struct { FreeCount int64 `json:"freecount"` IsLockBet int64 `json:"islockbet"` LockBetIndex int64 `json:"lockbetindex"` } // Rule ... type Rule struct { ...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package anonym import ( "encoding/json" "github.com/IBM/mathlib" "github.com/hyperledger-labs/fabric-token-sdk/token/core/zkatdlog/crypto/common" "github.com/pkg/errors" ) type TypeCorrectnessVerifier struct { PedersenParams []*...
// Copyright (C) 2019-2021 Zilliz. 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 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 compression import ( "context" "database/sql" "time" "github.com/cockroachdb/errors" "github.com/keegancsmith/sqlf" "github.com/sourcegraph/sourcegraph/internal/api" "github.com/sourcegraph/sourcegraph/internal/database/basestore" "github.com/sourcegraph/sourcegraph/internal/database/dbutil" "github...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
/* Copyright 2020–2021 MET Norway 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 di...
// Copyright 2013 <NAME> // Copyright 2016 ego 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 applic...
package matcher import ( "context" "fmt" "os/exec" "regexp" "strings" "time" log "github.com/sirupsen/logrus" "gitlab.com/yakshaving.art/chief-alert-executor/internal" "gitlab.com/yakshaving.art/chief-alert-executor/internal/metrics" ) // New creates a new Matcher with the provided configuration. // // May...
package mbr import ( "bytes" "encoding/binary" "fmt" "io" "github.com/diskfs/go-diskfs/util" ) // Partition represents the structure of a single partition on the disk // note that start and end cylinder, head, sector (CHS) are ignored, for the most part. // godiskfs works with disks that support [Logical Block ...
package ekafka import ( "time" "github.com/segmentio/kafka-go" ) type config struct { // Brokers brokers地址 Brokers []string `json:"brokers" toml:"brokers"` // Debug 是否开启debug模式 Debug bool `json:"debug" toml:"debug"` // Client 用于创建topic等 Client clientConfig `json:"client" toml:"client"` // Producers 多个消费者,用于...
// -*- tab-width: 4; -*- package twtxt import ( "bufio" "fmt" "io/ioutil" "os" "path/filepath" "regexp" "strings" "time" log "github.com/sirupsen/logrus" ) const ( feedsDir = "feeds" ) type Tweeter struct { Nick string URL string } type Tweet struct { Tweeter Tweeter Text string Created time.Ti...
package wysteria_client import ( "errors" "fmt" wyc "github.com/voidshard/wysteria/common" ) // Wrapper around wysteria/common Version object type Version struct { conn *Client data *wyc.Version } // Return the version number associated with this version. // Each version of a given item is numbered starting fro...
// Copyright 2018 ETH Zurich // // 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 wri...
package proxy import ( "net/http" "net/url" "os" "strings" "github.com/pkg/errors" "github.com/stackrox/rox/pkg/errorhelpers" "github.com/stackrox/rox/pkg/sliceutils" "golang.org/x/net/http/httpproxy" ) var ( defaultExcludes = []string{ "*.stackrox", "*.stackrox.svc", "localhost", "localhost.localdo...
package autoapprover_test import ( "io/ioutil" "net" "strings" "testing" "time" "github.com/stretchr/testify/assert" "github.com/telia-oss/cloudconnect" "github.com/telia-oss/cloudconnect/cloudconnectfakes" "github.com/telia-oss/cloudconnect/internal/autoapprover" "github.com/telia-oss/cloudconnect/internal...
/* Copyright 2019 Adevinta */ package main import ( "bytes" "crypto/rand" "encoding/json" "fmt" "io" "io/ioutil" "log" "net/http" "os" "time" stream "github.com/adevinta/vulcan-stream" "github.com/adevinta/vulcan-stream/config" "github.com/gorilla/websocket" ) const ( streamReadTimeout = 30 ) // gene...
// Copyright 2015, Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package gcsbackupstorage implements the BackupStorage interface // for Google Cloud Storage. package gcsbackupstorage import ( "flag" "fmt" "io" "sort" "s...
package websocket_test import ( "context" "log" "net/http" "time" "github.com/yanchenghust/websocket" "github.com/yanchenghust/websocket/wsjson" ) func ExampleAccept() { // This handler accepts a WebSocket connection, reads a single JSON // message from the client and then closes the connection. fn := http...
package main import ( "crypto/subtle" "encoding/json" "io" "io/ioutil" "log" "net/http" "github.com/gorilla/mux" "github.com/CCI-MOC/obmd/internal/driver" ) // request body for the power cycle call type PowerCycleArgs struct { Force bool `json:"force"` } // request body for the set bootdev call type SetBo...
package expanders import ( "context" "fmt" "testing" "github.com/lawrencegripper/azbrowse/internal/pkg/interfaces" "github.com/lawrencegripper/azbrowse/pkg/armclient" "github.com/lawrencegripper/azbrowse/pkg/swagger" ) // Expander is used to open/expand items in the left list panel // a single item can be expa...
package main import ( "encoding/json" "fmt" "os" "strings" "github.com/spf13/cobra" "github.com/docker/cli/cli" commands "github.com/docker/compose/v2/cmd/compose" "github.com/docker/compose/v2/cmd/formatter" "github.com/docker/compose/v2/pkg/api" "github.com/docker/compose/v2/pkg/compose" versionpkg "g...
// *** 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 digitalocean import ( "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Provides a DigitalOcean Cloud Firewall resource. This can be used to ...
/* Copyright 2017 caicloud 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 agreed ...
package zap import ( "Micro_API_Framework/basic" "Micro_API_Framework/basic/config" "go.uber.org/zap" "go.uber.org/zap/zapcore" "github.com/natefinch/lumberjack" "os" "path/filepath" "sync" "fmt" ) var ( l *Logger sp = string(filepath.Separator) err...
/* 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 stim import ( "fmt" "path/filepath" "runtime" "strings" "time" "github.com/PremiereGlobal/stim/pkg/downloader" "github.com/PremiereGlobal/stim/pkg/env" "github.com/PremiereGlobal/stim/pkg/kubernetes" "github.com/PremiereGlobal/vault-to-envs/pkg/vaulttoenvs" ) // EnvConfig represets a environment con...
// Package blockchain is a consumer interface. package blockchain import ( "context" "errors" "fmt" "time" "github.com/sirupsen/logrus" "github.com/Decentr-net/ariadne" "github.com/Decentr-net/decentr/config" communitytypes "github.com/Decentr-net/decentr/x/community/types" operationstypes "github.com/Decen...
package cmd import ( "context" "fmt" "log" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" "github.com/aws/eks-anywhere/pkg/addonmanager/addonclients" "github.com/aws/eks-anywhere/pkg/bootstrapper" fluxclient "github.com/aws/eks-anywhere/pkg/clients/flux" "github.com/aws/eks-anyw...
// MIT License // // Copyright (c) 2020 Lack // // 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,...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
package article import ( "context" "errors" "gochi/logger" "gochi/user" "gochi/utils" "net/http" "strings" "github.com/go-chi/chi/v5" "github.com/go-chi/render" ) var log = logger.New("article") var ErrNotFound = &utils.ErrResponse{HTTPStatusCode: 404, StatusText: "Resource not found."} func ListArticles(w...
package main import ( "bytes" "fmt" "log" "os" "os/exec" "path" "strings" "sync" "github.com/lolopinto/ent/internal/codegen" "github.com/lolopinto/ent/internal/file" "github.com/lolopinto/ent/internal/util" "github.com/pkg/errors" ) // next tag const TAG = "0.0.30" // current node gets latest tag... con...
package commands import ( "context" "encoding/json" "errors" "fmt" "github.com/fatih/color" "github.com/guptarohit/asciigraph" "github.com/jfrog/jfrog-cli-core/v2/plugins/components" "github.com/jfrog/jfrog-client-go/utils/log" "github.com/rdar-lab/JCheck/common" "github.com/rodaine/table" "regexp" "strcon...
package ethnode import ( "context" "strconv" "strings" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/rpc" ) // NodeKind represents the different kinds of node implementations we know about. type NodeKind int const ( Unknown NodeKind = iota // We'll treat unknown as Geth,...
// *** 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 gke import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Provides a Spotinst Ocean GKE import resource. // // ...
/**********************************************************\ | | | hprose | | | | Official WebSite: http://www.hprose.com/ | | ...
// Copyright 2012, 2017 <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 wots implements Winternitz-Lamport-Diffie one-time signature scheme. // // If the hash function is one-way and of sufficient length, the private key is...
// Copyright 2016, RadiantBlue 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 ...
package utils import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/hmac" "crypto/sha1" "encoding/base64" "encoding/binary" "encoding/json" "errors" "github.com/librespot-org/librespot-golang/src/librespot/crypto" "golang.org/x/crypto/pbkdf2" "log" "math/big" "os" ) // BlobInfo is the structure holding ...
// Copyright 2017 Google Inc. // Copyright 2021 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 require...
package main import ( "os" "time" "io/ioutil" "fmt" "strings" "strconv" ) const timeFormat = "15:04:05.999999" type block struct { Hash string Parent string Time time.Time } func createFile(i int) (blkchnFile *os.File) { var err error if blkchnFile, err = os.Create(os.Args[i]); err != nil { os.Stderr....
package docs import ( "fmt" "log" "strings" "github.com/graphql-go/graphql" ) const ( typUndefined = "Undefined" defaultFilename = "documentation" ) func Init(s graphql.Schema, c Config) string { d := &docs{c: c, sOut: &strings.Builder{}, patterns: make([]pattern, 0)} d.run(s.QueryType()) d.run(s.Mutati...
// *** 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 v1beta2 import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Gets a model resource. func LookupModel(ctx *pulumi.Context, arg...
package impl import ( internalMath "francoisgergaud/3dGame/common/math" raycaster "francoisgergaud/3dGame/common/math/raycaster" testworld "francoisgergaud/3dGame/internal/testutils/common/environment/world" testmathhelper "francoisgergaud/3dGame/internal/testutils/common/math/helper" "math" "testing" "github....
package pickrand import ( "fmt" "math/rand" ) // split64 splits the high and low halfs of a 64-bit uint, returning them as // a pair of uint64, e.g., // // var hi, lo uint64 = split64(0x1111111122222222) // fmt.Printf("%016x %016x", hi, lo) // 0000000011111111 0000000022222222 func split64(x uint64) (hi, l...
package main import ( "fmt" "os" "strings" "time" "github.com/atotto/clipboard" "github.com/macroblock/cpbftpchk/xftp" "github.com/macroblock/imed/pkg/zlog/zlog" "github.com/macroblock/imed/pkg/zlog/zlogger" "github.com/macroblock/rawin" ) var ( log = zlog.Instance("main") ftp = xftp.IFtp(ni...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the Li...
package world import ( "database/sql" "github.com/golang/protobuf/proto" "gonet/base" "gonet/db" "gonet/message" "gonet/network" "gonet/rd" "gonet/server/common/cluster" "log" ) type( ServerMgr struct{ m_pService *network.ServerSocket m_pServerMgr *ServerSocketManager m_pActorDB *sql.DB m_Inited boo...
// Copyright 2018 <NAME> // Modifications copyright 2019 <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 ...
// Copyright 2019 ETL 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 ( "fmt" "io/ioutil" "os" "os/exec" "strings" "time" log "github.com/sirupsen/logrus" "github.com/urfave/cli" ) const ( backupBaseDir = "/backup" backupRetries = 4 ) func init() { log.SetOutput(os.Stderr) } func main() { err := os.Setenv("ETCDCTL_API", "3") if err != nil { log.Fat...
// The mackerel package is a API client library for mackerel.io package mackerel import ( "bytes" "context" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net/http" "net/url" "strconv" "sync" "time" ) var defaultBaseURL *url.URL func init() { var err error defaultBaseURL, err = url.Parse("https://ap...
package io import ( "encoding/binary" "io" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) // From TensorFlow `record_writer.cc` comments: // Format of a single record: // uint64 length // uint32 masked crc of length // byte data[length] // uint32 masked crc of data const ( le...
// SPDX-License-Identifier: Apache-2.0 // Copyright (c) 2019 Intel Corporation package k8s_test import ( "context" "fmt" "log" "os/exec" "os/user" "path" "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" cce "github.com/open-ness/native-on-prem/edgecontroller" "github.com/open-ness/native-on-p...
package mixin import ( "context" "encoding/json" "time" ) const ( MessageCategoryPlainText = "PLAIN_TEXT" MessageCategoryPlainPost = "PLAIN_POST" MessageCategoryPlainImage = "PLAIN_IMAGE" MessageCategoryPlainAudio = "PLAIN_AUDIO" MessageCategoryPlainData ...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/costinm/dmesh/dm/istio/envoy_base.proto package istio import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Er...
// MIT License // // Copyright (c) 2020 Lack // // 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 easytcp import ( "github.com/DarthPestilane/easytcp/message" "github.com/google/uuid" "net" "sync" "time" ) // Session represents a TCP session. type Session interface { // ID returns current session's id. ID() interface{} // SetID sets current session's id. SetID(id interface{}) // Send sends the...
// Copyright (c) 2019, NewReleases CLI 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 cmd_test import ( "bytes" "fmt" "io/ioutil" "os" "path/filepath" "strings" "testing" "newreleases.io/cmd/newreleases/cmd" ) ...
// Copyright 2016 <NAME>, Inc. All rights reserved. // Licensed under the Apache License, version 2.0: // http://www.apache.org/licenses/LICENSE-2.0 package nbs import ( "io" "io/ioutil" "os" "path/filepath" "strings" "time" "golang.org/x/sys/unix" "github.com/attic-labs/noms/go/constants" "github.com/atti...
/* Copyright (c) 2018 VMware, 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 t...
// Code generated by go-swagger; DO NOT EDIT. package logs // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "time" "golang.org/x/net/context" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" ...
/* * Banner Bard: Banner-serving discord bot, sire. * * scheduler.go - Tag scheduler. This manages setting the banner to a * tag over time, driving the `shuffle`, `cycle`, and `play` commands * (and their playlist variants). The heart of the scheduler is * StartJob() -- I recommend familiarizing yourself with tha...
/* * Minio Cloud Storage, (C) 2016 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 la...
package main import ( "bytes" "context" "encoding/json" "fmt" "io/ioutil" "net/http" "strings" "testing" "time" "unicode" "github.com/anz-bank/sysl-go/core" "github.com/sethvargo/go-retry" "github.com/stretchr/testify/require" ) const applicationConfig = `--- genCode: upstream: http: basePat...
/* * deprecations.go * * This source file is part of the FoundationDB open source project * * Copyright 2021 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 main import ( "fmt" "io" "net/url" "os" "path" "path/filepath" "strings" "time" "github.com/makeworld-the-better-one/go-gemini" "github.com/schollz/progressbar/v3" ) func handleIOErr(err error, resp *gemini.Response, written int64, path, u string) { if *maxSecs > 0 && strings.HasSuffix(err.Error()...
package models import ( "sort" "strings" ) // Task is a thing that can run on a Machine. // // swagger:model type Task struct { Validation Access Meta Owned Bundled // Name is the name of this Task. Task names must be globally unique // // required: true Name string // Description is a one-line descripti...
// Package cmn provides common low-level types and utilities for all aistore projects /* * Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved. */ package cmn import ( "errors" "fmt" "strings" "time" "github.com/NVIDIA/aistore/cmn/debug" "github.com/dgrijalva/jwt-go" ) const ( AuthAdminRole ...
package limedrv import "C" import ( "encoding/binary" "fmt" "github.com/myriadrf/limedrv/limewrap" "github.com/racerxdl/fastconvert" "runtime" "strings" "unsafe" ) const floatSize = 4 const int16Size = 2 const samplesWait = 100 func cleanString(s string) string { return strings.Trim(s, "\u0000 ") } type cha...
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this fi...
package controller import ( "context" "fmt" topolvmv2 "github.com/alauda/nativestor/apis/topolvm/v2" "github.com/alauda/nativestor/pkg/cluster/topolvm" "github.com/alauda/nativestor/pkg/operator/k8sutil" batch "k8s.io/api/batch/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/...
package collectors import ( "fmt" "strings" "time" "bosun.org/cmd/scollector/conf" "bosun.org/metadata" "bosun.org/opentsdb" ) const ( ifAlias = ".1.3.6.1.2.1.31.1.1.1.18" ifDescr = ".1.3.6.1.2.1.2.2.1.2" ifHCInBroadcastPkts = ".1.3.6.1.2.1.31.1.1.1.9" ifHCInMulticastPkts = ".1....
package mariadb import ( "context" "database/sql" "fmt" "strconv" "strings" "time" _ "github.com/go-sql-driver/mysql" "github.com/pkg/errors" ) type UDPPacket struct { ID, Name, Title, Content string UpdateTime time.Time } type UDPPackets struct { Collection []*UDPPacket } type UDPPacketQu...
package env import ( "bytes" "flag" "fmt" "io/ioutil" "os" "path/filepath" "strconv" "strings" "time" "github.com/eolinker/eosc/log" "github.com/ghodss/yaml" ) const ( envConfigName = "CONFIG" envDataDirName = "DATA_DIR" envPidFileName = "PID_FILE" envSocketDirName = "SOCKET_DIR" ...
// // Copyright (c) 2019-2022 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 ag...
package postgres import ( "database/sql" "fmt" "github.com/pganalyze/collector/state" ) const relationStatsSQLDefaultOptionalFields = "NULL" const relationStatsSQLpg94OptionalFields = "s.n_mod_since_analyze" const relationStatsSQL = ` WITH locked_relids AS (SELECT DISTINCT relation relid FROM pg_catalog.pg_locks...
/* Copyright 2017 <NAME>. 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 ...
package mp4 import ( "encoding/binary" "fmt" "io" "io/ioutil" "os" "testing" "github.com/yapingcat/gomedia/codec" ) type mymp4writer struct { fp *os.File } func newmymp4writer(f *os.File) *mymp4writer { return &mymp4writer{ fp: f, } } func (mp4w *mymp4writer) Write(p []byte) (n int, err error) { retur...
package sport_apply import ( "game_server/easygo" "game_server/easygo/base" "game_server/for_game" "game_server/pb/client_server" "game_server/pb/share_message" "github.com/akqp2019/mgo" "github.com/astaxie/beego/logs" "sync/atomic" "time" "github.com/akqp2019/protobuf/proto" ) type ITEM_ID = int64 type PL...
// SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2019-2022 Intel Corporation package main import ( "fmt" "os" "os/signal" "strconv" "syscall" "time" cz "github.com/CloudNativeDataPlane/cndp/lang/go/tools/pkgs/colorize" tlog "github.com/CloudNativeDataPlane/cndp/lang/go/tools/pkgs/ttylog" flags "git...
package warnlist import ( "fmt" "strings" "time" "unicode/utf8" "github.com/alecthomas/mph" iradix "github.com/hashicorp/go-immutable-radix" ) type Warnlist interface { Add(key string) Contains(key string) bool Close() error Len() int Open() } func NewWarnlist() Warnlist { b := &GoMapWarnlist{} b.Open(...
// gomuks - A terminal Matrix client written in Go. // Copyright (C) 2020 <NAME> // // 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 Foundation, either version 3 of the License, or // (at your opti...
package ami import ( "encoding/json" "regexp" "strconv" "github.com/Blue-Pix/abc/lib/util" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" "github.com/aws/aws-sdk-go/service/ssm/ssmiface" "github.com/spf13/cobra" ) const PATH = "/aws/service/ami-amazon-linux-latest" // flag var ( ve...
// Copyright 2018 <NAME>.A.S. Atos Technologies - Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois, France. // // 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...
package ion import ( "bufio" "fmt" "io" "os" "strconv" "strings" ) type Parser struct { scanner *Scanner err error source string buf struct { tok Token // last read token lit string // last read literal n int // buffer size (max=1) } } func ParseFile(path string) (*Value, error) { fi...
package rstreams import ( "context" "fmt" "time" "github.com/go-redis/redis/v8" "github.com/jhump/protoreflect/desc" "github.com/pkg/errors" "github.com/relistan/go-director" "github.com/sirupsen/logrus" "github.com/batchcorp/plumber/api" "github.com/batchcorp/plumber/backends/rstreams/types" "github.com/...
package main import ( "bufio" "bytes" "container/heap" "fmt" "math" "os" "sort" ) func main() { reader := bufio.NewReader(os.Stdin) tc := readNum(reader) var buf bytes.Buffer for tc > 0 { tc-- n, m, k := readThreeNums(reader) C := readNNums(reader, n) T := readNNums(reader, n) res := solve(n, ...
/* Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR...
// Copyright 2018 the u-root Authors. All rights reserved // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "encoding/json" "html/template" "io/ioutil" "log" "net/http" "github.com/gorilla/mux" "github.com/u-root/u-root/pkg/sos" ) co...
// Copyright 2016 govend. All rights reserved. // Use of this source code is governed by an Apache 2.0 // license that can be found in the LICENSE file. package repos import ( "bytes" "fmt" "os" "os/exec" "path/filepath" "strings" "github.com/govend/govend/deps/vcs" ) // VCS represents a version control syst...
// Package pomsg provides a PO file implementation for Soy message bundles package pomsg import ( "fmt" "io" "io/ioutil" "os" "path" "strconv" "strings" "github.com/robfig/gettext/po" "github.com/robfig/soy/soymsg" "golang.org/x/text/language" ) type provider struct { bundles map[string]soymsg.Bundle } /...
package fourq import ( "fmt" ) // baseFieldElem is an element of the curve's base field, the integers modulo // p=2^127-1. baseFieldElem is always in reduced form. type baseFieldElem [2]uint64 func newBaseFieldElem() *baseFieldElem { return &baseFieldElem{} } func (e *baseFieldElem) String() string { return fmt.S...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: set_mode.proto package model 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 redis import ( "errors" "fmt" "strconv" "strings" ) type ClusterNodeResp struct { id string ip string port uint16 cport uint16 flags string master string pingSent uint64 pongReceived uint64 configEpic uint64 linkState string slots ...