text
stringlengths
3.08k
10.4k
package kaniko import ( "encoding/base64" "encoding/json" "errors" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "regexp" "strings" "time" tags "github.com/drone-plugins/drone-docker" "github.com/drone-plugins/drone-plugin-lib/drone" "github.com/sirupsen/logrus" ) type authConfig struct { Auths map...
package config_test import ( "flag" "fmt" "os" "testing" "time" "github.com/cuigh/auxo/byte/size" "github.com/cuigh/auxo/config" "github.com/cuigh/auxo/test/assert" ) func initManager() *config.Manager { m := config.New("app") m.AddFolder("./samples") return m } func TestFindFile(t *testing.T) { m := in...
// Copyright 2015 ikawaha // // 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 main import ( "math/rand" "os" "log" "fmt" "bufio" "strconv" "strings" "github.com/logrusorgru/aurora" ) func calculateSpeed(speed int, burn int, gravity int) int { return speed + gravity - burn } func help() { fmt.Print("Lunar Lander version 1.1\n") fmt.Print("Made by <NAME> and <NAME>\n\n") fmt...
// SPDX-License-Identifier: Unlicense OR MIT package main_test import ( "context" "image" "io" "os" "os/exec" "path/filepath" "runtime" "sync" "time" "golang.org/x/image/draw" ) // Wine is tightly coupled with X11 at the moment, and we can reuse the same // methods to automate screenshots and clicks. The ...
package events import ( "errors" "fmt" "net/http" "regexp" "strconv" "strings" "time" "github.com/jinzhu/gorm" "github.com/kirsle/blog/models/contacts" "github.com/kirsle/golog" ) // DB is a reference to the parent app's gorm DB. var DB *gorm.DB // UseDB registers the DB from the root app. func UseDB(db *...
package boomer import ( "crypto/tls" "fmt" "io" "io/ioutil" "net/http" "net/url" "os" "os/signal" "stressengineio/engineio2" "strings" "sync" "time" ) type result struct { err error statusCode int duration time.Duration contentLength int64 } type Boomer struct { // Request is the r...
package alicloud import ( "strconv" "strings" "time" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/aliyun/aliyun-datahub-sdk-go/datahub" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/h...
package mlpack /* #cgo CFLAGS: -I./capi -Wall #cgo LDFLAGS: -L. -lmlpack_go_kernel_pca #include <capi/kernel_pca.h> #include <stdlib.h> */ import "C" import "gonum.org/v1/gonum/mat" type KernelPcaOptionalParam struct { Bandwidth float64 Center bool Degree float64 KernelScale float64 NewDimensio...
package bxh_lite import ( "context" "io/ioutil" "math/rand" "testing" "time" "github.com/cbergoon/merkletree" "github.com/golang/mock/gomock" "github.com/meshplus/bitxhub-kit/crypto" "github.com/meshplus/bitxhub-kit/crypto/asym/ecdsa" "github.com/meshplus/bitxhub-kit/storage/leveldb" "github.com/meshplus/b...
package main import ( "bytes" "context" "encoding/json" "errors" "fmt" "github.com/2se/dolphin/cmd/serverexample/user" "github.com/2se/dolphin/pb" "github.com/golang/protobuf/ptypes" "github.com/sirupsen/logrus" "google.golang.org/grpc" "io/ioutil" "net" "net/http" "sync" "time" ) type AppInfo struct {...
package bundle import ( "strings" "time" "fmt" "github.com/pkg/errors" "github.com/sirupsen/logrus" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" ) //go:generate mockery -name=bundleSyncer -output=automock -outpkg=automock -cas...
package api import ( "context" "fmt" "net/http" "time" "github.com/Foundato/kelon/pkg/constants/logging" "github.com/Foundato/kelon/configs" "github.com/Foundato/kelon/pkg/api" "github.com/gorilla/mux" "github.com/pkg/errors" ) type restProxy struct { pathPrefix string port int32 configured bool ...
// Copyright 2017-18 <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 yelp import ( "bufio" "encoding/json" "errors" "log" "math/rand" "os" "strconv" "time" "github.com/dvasilas/proteus/proteus_client" ) // Object ... type Object struct { Key string Bucket string Md map[string]string } type review struct { Stars int `json:"stars"` Votes votes...
// Copyright 2022 <NAME>. All rights reserved. // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. // ba bench against a base commit. package main import ( "context" "errors" "flag" "fmt" "io/ioutil" "os" "os/exec" "strconv" "strings" "time"...
/* Copyright 2021 The Predictive Horizontal Pod Autoscaler 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...
package config import ( "encoding/json" "fmt" "io/ioutil" "net/http" "strings" "time" "github.com/ghodss/yaml" "github.com/gojek/fiber" fiberHTTP "github.com/gojek/fiber/http" "github.com/gojek/fiber/types" ) // DefaultHTTPClientTimeout defines the default http client timeout to use, // if it is not suppli...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package kms import ( "context" "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/EncryptRequest type EncryptInput struct { _ struct{} ...
package fs import ( "fmt" "io" "log" "os" "strconv" "syscall" "os/user" "github.com/st3iny/tarfs/internal/archive" "bazil.org/fuse" "bazil.org/fuse/fs" "golang.org/x/net/context" ) func MountAndServe(archivePath string, mountpoint string, debug bool) error { if debug ...
package wallet import ( "database/sql" "fmt" "log" "time" _ "github.com/lib/pq" ) //////////////////////////////////////////////////////////////////////////////// // DBTrans represents an active interface to a database in one transaction. All // actions are collected by transaction and has to be written by com...
package main /* # check-elb-health-sdk # # DESCRIPTION: # This plugin checks the health of an Amazon Elastic Load Balancer in a given region. # # OUTPUT: # plain-text # # PLATFORMS: # MAC OS # # USAGE: # ./check-elb-health-sdk --aws_region=region # ./check-elb-health-sdk --aws_region=region --elb_name=my-elb...
/* * Copyright 2020 Huawei Technologies Co., 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...
package main import ( "flag" "fmt" "io/ioutil" "os" "strconv" "strings" "time" "github.com/golang/glog" "github.com/mitchellh/go-homedir" core_v1 "k8s.io/api/core/v1" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachin...
/* Copyright 2016 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 dis...
package core import ( "fmt" "os" "strings" "time" "github.com/roryq/til-prompt/pkg/markdown" "github.com/charmbracelet/bubbles/textinput" "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/kennygrant/sanitize" ) type Model struct { focusIndex int inputs []textinput.M...
// Package address provides primitives for generating and validating addresses (with and without checksum). package address import ( "bytes" "strings" "github.com/iotaledger/iota.go/checksum" . "github.com/iotaledger/iota.go/consts" "github.com/iotaledger/iota.go/encoding/b1t6" "github.com/iotaledger/iota.go/ke...
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package main import ( "bytes" "fmt" "io" ioutil "io/ioutil" "log" "net/http" "os" "strings" "time" "github.com/dutchcoders/go-clamd" ) var opts map[string]string func init() { log.SetOutput(ioutil.Discard) } func home(w http.ResponseWriter, r *http.Request) { switch r.Method { case "GET": isAuthoriz...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: room.proto package libhuestacean import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This i...
package prefab import ( "errors" gDoc "github.com/fsouza/go-dockerclient" "github.com/satori/go.uuid" "os" "strconv" "net" "time" "strings" ) var ( dockCli *gDoc.Client runId string ) func init() { var err error dockCli, err = gDoc.NewClientFromEnv() if err != nil { panic("Failed to connect to dock...
// Copyright 2021 Confluent 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 applica...
package geolite2v2 import ( "encoding/csv" "errors" "io" "log" "strconv" "strings" "github.com/m-lab/annotation-service/iputils" ) var ( ipNumColumnsGlite2 = 10 ) // GeoIPNode defines IPv4 and IPv6 databases type GeoIPNode struct { iputils.BaseIPNode LocationIndex int // Index to slice of locations Posta...
// <NAME> - yep the variable, etc naming in here is meant as a "tongue in cheek" // collection of D&D nerdyness. package dungeonclient import ( "bufio" "encoding/json" "fmt" "io/ioutil" "log" "net/url" "os" "strings" "time" "github.com/gorilla/websocket" ) var fileName string var dungeonMasterMode = false...
package gridgen import ( "encoding/gob" "fmt" "image" "image/color" "os" "path" "github.com/llgcode/draw2d/draw2dimg" "github.com/mrfuxi/digit/common" "gopkg.in/cheggaaa/pb.v1" ) const ImageSize = 28 const imageCutOff = 5 type GridInfo struct { Fragment FragmentType FragmentSuper FragmentSuperType ...
package main import ( "context" "encoding/csv" "fmt" "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/s3" "github.com/aws/aws-sdk-go/service/s3/s3manager" log "g...
package sinks import ( "context" "fmt" "net/url" "strconv" "time" "github.com/olivere/elastic/v7" "github.com/pytimer/kube-events-watcher/events" corev1 "k8s.io/api/core/v1" "k8s.io/klog" ) var ( defaultIndexName = "kube-events" ) type ElasticsearchSink struct { client *elastic.Client entryChanne...
package main import ( "context" "fmt" "os" "sync" "github.com/containerd/containerd/images" "github.com/containerd/containerd/reference" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/sirupsen/logrus" "github.com/spf13/cobra" "oras.land/oras-go/pkg/artifact" "oras.land/oras-go/pkg/c...
package cql import ( "fmt" "strings" "testing" "github.com/stretchr/testify/require" ) func TestParseCql(t *testing.T) { var res interface{} var err error tcs := []string{ "IDX.CREATE orders SCHEMA type ENUM", "IDX.CREATE orders SCHEMA object UINT64 price UINT32 number UINT32 date UINT64", "IDX.CREATE o...
/* * Copyright 2019 National Library of 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...
// This command performs automated checks according to the task description of the first practice work // in the software architecture course. // See https://kpi-architecture-course.appspot.com/ package main import ( "context" "encoding/json" "flag" "fmt" "io" "log" "net/http" "os" "os/exec" "time" git "gi...
package service import ( "encoding/base64" "encoding/json" "fmt" "time" "github.com/golang/protobuf/proto" "github.com/micro/go-micro/server" std "github.com/PKUJohnson/solar/std" stdc "github.com/PKUJohnson/solar/std/common" ivkreflect "github.com/PKUJohnson/solar/std/toolkit/reflect" "golang.org/x/net/con...
package psutil import ( "context" "fmt" "github.com/shirou/gopsutil/disk" "github.com/overmindtech/overmind-agent/sources/util" "github.com/overmindtech/sdp-go" ) type DiskSource struct{} // Type is the type of items that this returns (Required) func (s *DiskSource) Type() string { return "disk" } // Descri...
package main import ( "bufio" "encoding/csv" "flag" "fmt" "io" "os" "strconv" "strings" "time" "unicode/utf8" ) import ( "github.com/pkg/errors" ) var CSVNORM_VERSION = "0.0.1" var CSVNORM_USAGE = "Usage: csvnorm [-input_timezone INPUT_TIMEZONE] [-output_timezone OUTPUT_TIMEZONE] [-help] [-version]" func...
package flag import ( "errors" "fmt" "os" "reflect" "strconv" "strings" "time" ) // ErrHelp is provided to identify when help is being displayed. var ErrHelp = errors.New("providing help") // Process compares the specified command line arguments against the provided // struct value and updates the fields that...
package internal import ( "container/list" ) func newDeviceBuddyMemoryState(log2pagesize uint64) DeviceMemoryState { return &deviceBuddyMemoryState{ log2PageSize: log2pagesize, } } // A deviceBuddyMemoryState implements DeviceMemoryState as a buddy allocator type deviceBuddyMemoryState struct { initFlag bool ...
package main import ( "fmt" "os" "sort" "strings" ) var ( commands = make(map[string]string) commandKeys []string ) func commandsInit() { commands = make(map[string]string) // Commands commands["connect"] = "connect \n\t for developer playing\n" commands["disconnect"] = "disconnect \n\t for developer...
/* 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, ...
/* (c) 2019, Blender Foundation * * 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, publish, * ...
package nks import ( "errors" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var testIstioAwsCluster = Cluster{ Name: "Test AWS Cluster Go SDK " + GetTicks(), Provider: "aws", MasterCount: 1, MasterSize: "t2.medium", ...
// Code generated by https://github.com/gagliardetto/anchor-go. DO NOT EDIT. package serumgo import ( "encoding/binary" "errors" ag_binary "github.com/gagliardetto/binary" ag_solanago "github.com/gagliardetto/solana-go" ag_format "github.com/gagliardetto/solana-go/text/format" ag_treeout "github.com/gagliardet...
package s3 import ( "errors" "path" "regexp" "strings" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/s3" "github.com/c2fo/vfs/v6" "github.com/c2fo/vfs/v6/utils" ) // Location implements the vfs.Location interface specific to S3 fs. type Location struct { fileSystem *FileSystem ...
package csource import ( "fmt" "strings" "github.com/pkg/errors" "github.com/valyala/fasthttp" "admini.dev/admini/app" "admini.dev/admini/app/controller" "admini.dev/admini/app/controller/cutil" "admini.dev/admini/app/lib/schema" "admini.dev/admini/app/lib/schema/model" "admini.dev/admini/app/source" "adm...
package smd import ( "fmt" "strings" "time" "github.com/soniakeys/meeus/planetposition" ) const ( // AU is one astronomical unit in kilometers. AU = 1.49597870700e8 ) // CelestialObject defines a celestial object. // Note: globe and elements may be nil; does not support satellites yet. type CelestialObject st...
// Copyright (c) 2020 DistAlchemist // // This software is released under the MIT License. // https://opensource.org/licenses/MIT package db import ( "encoding/binary" "sort" "sync/atomic" "github.com/DistAlchemist/Mongongo/config" ) // ColumnFamily definition type ColumnFamily struct { ColumnFamilyName strin...
package main import ( "bytes" "encoding/hex" "flag" "fmt" "log" "os" "strconv" "strings" ) var Debug bool = false const applicationDescription = "Binary File Splitting" var buildVersion = "dev" // this will be set to the last version on build (see Makefile) func lookupSequence(buffer []byte, sequence []byt...
package recurly import ( "encoding/xml" "fmt" "net" ) type ( // BillingService handles all interaction with the billing info portion // of the recurly API. BillingService struct { client *Client } // Billing represents billing info for a single account on your site Billing struct { XMLName xml....
package auth_test import ( "encoding/base64" "errors" "fmt" "io/ioutil" "net/http" "net/http/cookiejar" "net/http/httptest" uri "net/url" "testing" "ktkr.us/pkg/gas" "ktkr.us/pkg/gas/auth" "ktkr.us/pkg/gas/db" ) var testclient *http.Client func init() { jar, err := cookiejar.New(nil) if err != nil { ...
package common const ( InstanceId = "InstanceId" InstanceType = "InstanceType" GoPSUtilProcDirEnv = "HOST_PROC" MinTimeDiff = 50 * 1000 // We assume 50 micro-seconds is the minimal gap between two collected data sample to be valid to calculate delta ClusterNameKey = "ClusterName" NodeNameKey ...
package pingscan import ( "bufio" "context" "fmt" "github.com/alecthomas/units" "github.com/lavalamp-/ipv666/internal/logging" "github.com/spf13/viper" "golang.org/x/net/icmp" "golang.org/x/net/ipv6" "golang.org/x/time/rate" "net" "os" "sync/atomic" "time" ) func processReplies(conn *ipv6.PacketConn, out...
package azure import ( "fmt" "regexp" "github.com/infracost/infracost/internal/resources" "github.com/infracost/infracost/internal/schema" "github.com/shopspring/decimal" ) // PostgreSQLFlexibleServer struct represents Azure PostgreSQL Flexible Server resource. // // Resource information: https://docs.microsoft...
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package utils import ( "context" "math/rand" "reflect" "sync/atomic" "time" ) type PeriodicTask struct { interval time.Duration mailbox *Mailbox taskFn func(ctx context.Context) chStop chan struct{} chDone chan struct{} i int } func NewPeriodicTask(interval time.Duration, taskFn func(ctx con...
/* Apache v2 license * Copyright (C) <2019> Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ package sensor import ( "database/sql" "fmt" "github.com/edgexfoundry/go-mod-core-contracts/models" "github.com/intel/rsp-sw-toolkit-im-suite-inventory-service/app/config" "github.com/intel/rsp-sw-toolkit-...
package async import ( "context" "fmt" "sync" "time" ) var ( one sync.Once input chan *cmd output chan *batchCmd groupDic map[string]*group ) type CacheProvider interface { Put(string, interface{}, interface{}) error Get(string, interface{}) (interface{}, error) } func init() { groupDic = make(...
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package gcbench import ( "fmt" "regexp" "strconv" "strings" "time" ) type GCTrace []GCCycle type GCCycle struct { // N is the 1-based index of this GC ...
package tea import ( "encoding/hex" "fmt" "strings" ) var n = 6 func byte2str(bytes []byte) string { return string(bytes[:]) } func str2byte(str string) []byte { return []byte(str) } func en(v []uint32, k []uint32, rounds int) []uint32 { var sum uint32 = 0 var delta uint32 = 0x9e3779b9 var y = v[0] var z ...
package util import ( "bytes" "context" "crypto/tls" "crypto/x509" "fmt" "io/ioutil" "net" "net/http" "os" "strings" "testing" "time" "k8s.io/api/core/v1" ) // CheckRotation validates that pre- and post-rotation servers and clients can communicate in a // trusted fashion. func CheckRotation(t *testing.T...
// Code generated by entc, DO NOT EDIT. package ent import ( "fmt" "strings" "time" "entgo.io/ent/dialect/sql" "github.com/stegoer/server/ent/image" "github.com/stegoer/server/ent/schema/ulid" "github.com/stegoer/server/ent/user" ) // Image is the model entity for the Image schema. type Image struct { conf...
package main import ( "fmt" "log" "time" ttlcache "github.com/ReneKroon/ttlcache/v2" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/route53" ) type Route53 struct { svc *route53.Route53 changes []*route53Change hostedZoneID *string ...
package text import ( "io" "io/ioutil" "net/http" "os" "strings" "time" "github.com/zllovesuki/b/app" "github.com/zllovesuki/b/box" "github.com/zllovesuki/b/response" "github.com/zllovesuki/b/service" "github.com/go-chi/chi/v5" "github.com/pkg/errors" "go.uber.org/zap" ) const ( prefix = "t-" ) type ...
/* Tencent is pleased to support the open source community by making Blueking Container Service available. Copyright (C) 2019 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...
package qlog import ( "bytes" "fmt" "os" "strconv" "sync" "time" ) var ( entryPool *sync.Pool bufferPool *sync.Pool bytesPool *sync.Pool ) const ( fieldsLen = 10 messageLen = 256 timeLen = 32 ) func init() { entryPool = &sync.Pool{ New: func() interface{} { return new(Entry) }, } bytesPo...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package main import ( "context" "encoding/json" "flag" "os" "strings" "github.com/pkg/errors" "github.com/sirupsen/logrus" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" ) /...
// Copyright (c) 2019 <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 naads import ( "bytes" "fmt" "log" "net" "os" "time" "github.com/thetannerryan/cap" ) var ( startSignature = []byte("<alert") // byte sequence ...
// Copyright (c) 2012-2014 <NAME>, https://menteslibres.net/xiam // // 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, ...
package main import ( "encoding/json" "fmt" "io/ioutil" "net" "strconv" "strings" "github.com/spf13/cobra" "github.com/lxc/lxd/shared/api" ) /* #define _GNU_SOURCE #include <errno.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <unistd.h> e...
/** * Created by GoLand. * User: 姜伟 * Date: 2020/1/2 0002 * Time: 13:09 */ package wx import ( "crypto/tls" "strconv" "time" "github.com/a07061625/gompf/mpf" "github.com/a07061625/gompf/mpf/mpcache" "github.com/a07061625/gompf/mpf/mpconstant/errorcode" "github.com/a07061625/gompf/mpf/...
package abios import ( "encoding/json" "fmt" "log" "net/url" "time" "github.com/gobuffalo/uuid" "github.com/gorilla/websocket" . "github.com/PatronGG/abios-go-sdk/structs" ) // Custom status codes sent by the server for the 'close' command. // The websocket standard (RFC6455) allocates the // 4000-4999 rang...
// Copyright 2018 The casbin 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 a...
// Copyright (C) 2017 Librato, Inc. All rights reserved. package opentracing import ( "encoding/binary" "encoding/json" "io" "strconv" "strings" "github.com/appoptics/appoptics-apm-go/v1/ao" "github.com/appoptics/appoptics-apm-go/v1/ao/internal/reporter" ot "github.com/opentracing/opentracing-go" ) const ( ...
package ipaddress import "math/big" import "fmt" type ResultPrefix interface { IsOk() bool IsErr() bool Unwrap() *Prefix UnwrapErr() *string } type Prefix struct { Num uint8 IpBits *IpBits Netmask big.Int Vt_from func(prefix *Prefix, n uint8) ResultPrefix } type PrefixError struct { Err *string } fun...
package ping import ( "fmt" "os" "time" "github.com/terassyi/gotcp/pkg/interfaces" "github.com/terassyi/gotcp/pkg/logger" "github.com/terassyi/gotcp/pkg/packet/ethernet" "github.com/terassyi/gotcp/pkg/packet/icmp" ippacket "github.com/terassyi/gotcp/pkg/packet/ipv4" "github.com/terassyi/gotcp/pkg/proto" "gi...
package migemo import ( "math" "math/bits" ) // BitVector は、RankやSelectの計算が高速なビット配列 type BitVector struct { words []uint64 sizeInBits uint32 lb []uint32 sb []uint16 } // NewBitVector は、BitVectorを初期化する func NewBitVector(words []uint64, sizeInBits uint32) *BitVector { if (sizeInBits+63)/64 ...
package main // #include <errno.h> // #include <poll.h> // #include <stdio.h> // #include <stdlib.h> // #include <sys/inotify.h> // #include <unistd.h> // #include <sys/poll.h> // // // int fspoll(int fd){ // struct pollfd fds[1]; // fds[0].fd = fd; // fds[0].events = POLLIN; // int n = poll(fds, 1, 100); /...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.12.4 // source: fuzzy.proto package fuzzy import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) c...
// Package conf contains configuration structures used to setup the SDK package conf import ( "crypto/tls" "errors" "fmt" "os/user" "path" "strings" impressionlistener "github.com/splitio/go-client/splitio/impressionListener" "github.com/splitio/go-toolkit/datastructures/set" "github.com/splitio/go-toolkit/l...
/* Copyright 2018 the Velero 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 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, ...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.18.1 // source: api/status.proto package api import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" )...
package blockchain import ( "encoding/json" "fmt" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" "github.com/singnet/snet-daemon/config" "github.com/singnet/snet-daemon/ipfsutils" log "github.com/sirupsen/logrus" "io/ioutil" "math/big" "strings" ) const IpfsPrefix = "ipfs://" type Service...
package uuid import ( "bytes" "encoding/hex" "fmt" ) func FromBytes(input []byte) (u UUID, err error) { err = u.UnmarshalBinary(input) return } // FromBytesOrNil returns UUID converted from raw byte slice input. // Same behavior as FromBytes, but returns a Nil UUID on error. func FromBytesOrNil(input []byte) UU...
package jwk import ( "crypto/rsa" "encoding/json" "errors" "math/big" "github.com/ericyan/jwk/internal/base64url" ) // RSAPublicKey represents an RSA public key, which contains // algorithm-specific parameters defined in RFC7518, Section 6.3.1. // // RSAPublicKey implements the Key interface. type RSAPublicKey ...
// Code generated by entc, DO NOT EDIT. package ent import ( "context" "errors" "fmt" "time" "github.com/facebookincubator/ent/dialect/sql/sqlgraph" "github.com/facebookincubator/ent/schema/field" "github.com/minskylab/collecta/ent/answer" "github.com/minskylab/collecta/ent/question" "github.com/minskylab/c...
package main import ( "encoding/json" "fmt" "github.com/fatih/color" "io/ioutil" "log" "math/rand" "net/http" "net/url" "os" "os/exec" "os/signal" "strings" "syscall" "time" "flag" ) var cyan = color.New(color.FgCyan) var cyanBold = cyan.Add(color.Bold) var m = make(map[int]int) // IDs as key var pat...
package collector import ( "sync" "time" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/log" ) const metric_namespace = "frr" var ( frrTotalScrapeCount = 0.0 frrTotalErrorCount = 0 frrLabels = []string{"collector"} frrDesc = map[string]*prometheus.Desc{...
// Copyright 2015 flannel 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 gin - GIN 기반의 Routing 기능 제공 패키지 package gin import ( "net/http" "strings" "github.com/cloud-barista/cb-apigw/restapigw/pkg/config" "github.com/cloud-barista/cb-apigw/restapigw/pkg/core" "github.com/cloud-barista/cb-apigw/restapigw/pkg/logging" cors "github.com/cloud-barista/cb-apigw/restapigw/pkg/mid...
/* Copyright © 2020 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 agreed to in writing, software...