text
stringlengths
3.08k
10.4k
package cmd import ( "fmt" "log" "os" "strings" "time" "github.com/araddon/dateparse" "github.com/charmbracelet/glamour" "github.com/fatih/color" "github.com/rsteube/carapace" "github.com/spf13/cobra" "github.com/spf13/viper" gitlab "github.com/xanzy/go-gitlab" "github.com/zaquestion/lab/internal/action"...
package main import ( "container/heap" "fmt" ) // A PriorityQueue implements heap.Interface (Golang standard library) type PriorityQueue struct { items []Vertex index map[Vertex]int // value to index priority map[Vertex]int // value to priority } func (pq *PriorityQueue) Len() int { return len(pq.items) ...
package events import ( "fmt" "math/rand" "sync" "sync/atomic" "time" "github.com/sirupsen/logrus" ) // RetryingSink retries the write until success or an ErrSinkClosed is // returned. Underlying sink must have p > 0 of succeeding or the sink will // block. Retry is configured with a RetryStrategy. Concurrent...
// Copyright (c) 2016 OpenM++ // This code is licensed under the MIT license (see LICENSE.txt for details) package config import ( "errors" "strconv" "strings" "github.com/openmpp/go/ompp/helper" ) /* NewIni read ini-file content into map of (section.key)=>value. It is very light and able to p...
// Copyright 2017 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package codecommit 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/codecommit-2015-04-13/GetMergeCommitInput type GetMergeCommitI...
package lwm2m // ref http://openmobilealliance.org/tech/profiles/LWM2M.xsd import ( "embed" "encoding/xml" "errors" "log" "os" "strings" "sync" ) //go:embed definition/*.xml var regDefaultDir embed.FS var ( _reg *Registry _reg_lock sync.Mutex ) type Registry struct { Objs map[uint16]*ObjectDefinitio...
package sdk import ( "bytes" "database/sql/driver" "encoding/json" "fmt" "text/template" "time" "github.com/ovh/venom" "github.com/ovh/cds/sdk/interpolate" ) //const const ( EmailUserNotification = "email" JabberUserNotification = "jabber" VCSUserNotification = "vcs" EventsNotification = "event"...
package gocloc import ( "bufio" "fmt" "io" "os" "strings" "unicode" ) // ClocFile is collecting to line count result type ClocFile struct { Code int32 `xml:"code,attr" json:"code"` Comments int32 `xml:"comment,attr" json:"comment"` Blanks int32 `xml:"blank,attr" json:"blank"` Name string `xml:"...
// Copyright 2015 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. // run runs the docs tests found in this directory. package main import ( "bytes" "flag" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "regexp" "ru...
package cli import ( goflags "flag" "fmt" "os" "text/template" ) // Output the common output of the cli app, defaults to os.Stdout var Output = os.Stdout // the output is the same for all Apps, atm. // Printf like fmt.Printf but prints on the Output func Printf(format string, args ...interface{}) { fmt.Fprintf...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: bilocation.proto package internal 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 ...
package main import ( "bytes" "context" "encoding/json" "fmt" "github.com/emqx/kuiper/pkg/api" "image/jpeg" "image/png" "io/ioutil" "os" "path/filepath" "strings" "time" ) type imageSink struct { path string format string maxAge int maxCount int cancel context.CancelFunc } func (m *imageSi...
package utils import ( "compress/gzip" "fmt" "github.com/dotmesh-oss/dotmesh/pkg/types" log "github.com/sirupsen/logrus" "io" "net/http" "os" "strings" "time" ) func Out(s ...interface{}) { stringified := []string{} for _, item := range s { stringified = append(stringified, fmt.Sprintf("%v", item)) } s...
package systests import ( "testing" "golang.org/x/net/context" keybase1 "github.com/keybase/client/go/protocol/keybase1" "github.com/stretchr/testify/require" ) func findMember(user *smuUser, members []keybase1.TeamMemberDetails) *keybase1.TeamMemberDetails { for _, member := range members { if member.Userna...
// Copyright 2022 LINE Corporation // // LINE Corporation licenses this file to you 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 requ...
// A MapEntry stores certificates valid for a specific (wildcard-)domain and possibly the root of a tree for subdomains package tclient import ( "bytes" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/rsa" "crypto/x509" "crypto/x509/pkix" "fmt" "github.com/robinburkhard/rainsdeleg/cyrill-k/trustflex/c...
/* * Copyright (C) 2018 Dolan 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...
package httpcache import ( "bufio" "bytes" "encoding/base64" "io" "io/ioutil" "log" "net/http" "net/http/httputil" "os" "path/filepath" "time" ) // Response Header name and values const ( XCacheHeader = "X-Mmbros-Cache" XCacheMiss = "MISS" XCacheExpired = "EXPIRED" XCacheHit = "HIT" ) // MaxAg...
package main import ( "bufio" "context" "fmt" "log" "math/rand" "os" "time" "github.com/cockroachdb/cockroach-go/v2/crdb/crdbgorm" "github.com/google/uuid" "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/schema" ) // Account is our model, which corresponds to the "accounts" table type Account stru...
// +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12,!gtk_3_14 // Supports building with gtk 3.16+ /* * Copyright (c) 2013-2014 Conformal Systems <<EMAIL>> * * This file originated from: http://opensource.conformal.com/ * * Permission to use, copy, modify, and distribute this software for any * purpose with or withou...
/* Copyright 2020 <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, software distribut...
/* 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, softwa...
package flagit import ( "encoding/json" "flag" "log" "os" "reflect" "strings" "testing" "time" ) type SampleStruct struct { Int int Timestamp time.Time Float float64 String string } func TestSampleStructFlagging(t *testing.T) { ss := SampleStruct{} fs := FlagIt(&ss) expTime := time.Now() ...
// Copyright 2016 <NAME>, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
// Copyright 2022 <NAME>, <NAME>, <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 agre...
package containermetrics import ( "os" "sync/atomic" "time" "code.cloudfoundry.org/clock" loggingclient "code.cloudfoundry.org/diego-logging-client" "code.cloudfoundry.org/executor" "code.cloudfoundry.org/lager" "github.com/cloudfoundry/sonde-go/events" ) var megabytesToBytes int = 1024 * 1024 type StatsRep...
/* * Copyright 2021-2022 <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 ...
package odoo import ( "fmt" ) // AccountAnalyticAccount represents account.analytic.account model. type AccountAnalyticAccount struct { LastUpdate *Time `xmlrpc:"__last_update,omptempty"` Active *Bool `xmlrpc:"active,omptempty"` Balance *Float `xmlrpc:"b...
package lookup import ( "bytes" "encoding/binary" "fmt" "hash" "hash/fnv" ) // Table is the interface for interacting with a lookup table. type Table interface { // GetOrCreateID is an idempotent method for creating or retrieving an unique // shortened identifier for the provided binary value. GetOrCreateID(s...
package main import ( "fmt" "net/http" "net/http/cookiejar" "strings" "github.com/PuerkitoBio/goquery" "github.com/gotodown/gospider" "github.com/zhshch2002/goreq" ) // BaseDownloader is default downloader of goribot type BaseDownloader struct { Client *http.Client } func NewBaseDownloader() *BaseDownloader...
/* Copyright © 2020 <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 to in writing, softw...
// Package makezero provides a linter for appends to slices initialized with non-zero length. package makezero import ( "bytes" "fmt" "go/ast" "go/printer" "go/token" "go/types" "log" "regexp" ) // a decl might include multiple var, // so var name with decl make final uniq obj. type uniqDecl struct { varName...
// Copyright 2019 <NAME>. All rights reserved. // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. package gnet import ( "container/heap" "sync" "sync/atomic" ) // LoadBalancing represents the the type of load-balancing algorithm. type LoadBalancing int const ...
package executor import ( "fmt" "os" "os/user" "strconv" "syscall" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/helper" "github.com/opencontainers/runc/libcontainer/cgroups" cgroupFs "github.com/opencontainers/runc/libcontainer/cgroups/fs" lconfigs "github.com/opencontainers/r...
package comSqliteServer import ( "fmt" "flag" "net" "net/http" "strconv" "time" // "log" "os" // "io/ioutil" // "strings" // "database/sql" "path/filepath" // . "dao" // . "server" . "router" . "control" . "model" tag "tag" // util "util" ) var instance *ComSqliteServer; type ComSqliteSe...
package main import ( "crypto/tls" "database/sql" "flag" "html/template" "net/http" "net/url" "strings" "time" "github.com/alexedwards/scs/mysqlstore" "github.com/alexedwards/scs/v2" _ "github.com/go-sql-driver/mysql" "github.com/saied74/toychat/pkg/broker" "github.com/saied74/toychat/pkg/centerr" "gith...
package route // See http://golang.org/pkg/go/build/ import ( "bufio" "fmt" "io" "log" "net" "os/exec" "strconv" "strings" "rib-old/util" ) const ( S_NEW = 0 S_ERASED = 1 S_NONE = 2 ) func (r1 Route) Equal(r2 Route) bool { return r1.PrefixLen == r2.PrefixLen && r1.Metric == r2.Metric && r1.Ne...
// Copyright 2022 <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 writ...
package sqlmodel import ( "bytes" "fmt" "go/ast" "go/parser" "go/token" "strings" "text/template" "github.com/tal-tech/go-zero/core/stringx" "github.com/tal-tech/go-zero/tools/goctl/api/spec" "github.com/tal-tech/go-zero/tools/goctl/util" ) var ( commonTemplate = ` var ( {{.modelWithLowerStart}}FieldName...
// Code generated by transpiler. DO NOT EDIT. /** * Go Video Downloader * * Copyright 2019 Tenta, 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.or...
// Copyright 2021 NetApp, Inc. All Rights Reserved. package api import ( "context" "fmt" "runtime/debug" "strings" . "github.com/netapp/trident/logger" ) //////////////////////////////////////////////////////////////////////////////////////////// /// _____________________ /// | <<Inter...
package membership import ( "encoding/json" "fmt" "math" "strconv" "strings" "sync" "sync/atomic" "time" "github.com/samuel/go-zookeeper/zk" "github.com/segmentio/ksuid" log "github.com/sirupsen/logrus" ) type zkMemberPool struct { zk *zk.Conn host string path string id string createdNod...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: wsmsg.proto package wsmsg 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-ti...
package branchmanager import ( "github.com/iotaledger/hive.go/marshalutil" "github.com/iotaledger/hive.go/objectstorage" ) // ConflictMember represents the relationship between a Conflict and its Branches. Since a Conflict can have a // potentially unbounded amount of conflicting Consumers, we store this as a separ...
package overloader import ( "sync" "sync/atomic" "testing" "time" "github.com/henrylee2cn/erpc/v6" "github.com/stretchr/testify/assert" ) type Home struct { erpc.CallCtx } func (h *Home) Test(arg *map[string]string) (map[string]interface{}, *erpc.Status) { return map[string]interface{}{ "arg": *arg, }, n...
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use ...
package download import ( "errors" "io" "net/http" "os" "path/filepath" "github.com/MakeNowJust/heredoc" "github.com/cli/cli/v2/api" "github.com/cli/cli/v2/internal/ghrepo" "github.com/cli/cli/v2/pkg/cmd/release/shared" "github.com/cli/cli/v2/pkg/cmdutil" "github.com/cli/cli/v2/pkg/iostreams" "github.com/...
package security // Copyright (c) Microsoft and contributors. 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 // // Un...
// Copyright 2021 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 sqlteescan import ( "database/sql/driver" "encoding/hex" "fmt" "strings" "sync" "time" ) var pool = sync.Pool{New: func() interface{} { return n...
package draw import ( "encoding/json" "os" "testing" "github.com/egon12/decstree" "github.com/stretchr/testify/assert" ) const question = ` { "i": "level", "k": "level", "a": [ { "i": "a1_4", "v": "4", "r": "alber" }, { "i": "a1_5", "v": "5", "r": "bobby" }, { "i": "a1_6", "v": "6", "n": { "i": "job...
package siga import ( "bytes" "context" "crypto/hmac" "crypto/sha256" "crypto/sha512" "encoding/hex" "encoding/json" "fmt" "hash" "io" "net/http" "strconv" "strings" "time" "github.com/e-gov/SiGa-Go/https" "github.com/e-gov/SiGa-Go/https/httpsutil" "github.com/pkg/errors" ) // httpClient on SiGa poo...
package main import ( "fmt" "net/http" "runtime" "strings" "time" // stats - core "github.com/sniperkit/colly/plugins/data/collection/stats" // stats - collectors "github.com/sniperkit/colly/plugins/data/collection/stats/httpstats" // stats - remote clients "github.com/sniperkit/colly/plugins/data/collec...
package main import ( "bytes" "context" "fmt" "os" "strings" "text/template" "cloud.google.com/go/container/apiv1" "cloud.google.com/go/resourcemanager/apiv3" "github.com/Masterminds/sprig" "google.golang.org/api/iterator" resourcemanagerpb "google.golang.org/genproto/googleapis/cloud/resourcemanager/v3" ...
package obscrypt import ( "crypto/ecdsa" "crypto/elliptic" "errors" "math/big" ) var secp256r1 *curveParam func initsecp256r1Param() { secp256r1 = &curveParam{elliptic.CurveParams{Name: "secp256r1"}} secp256r1.P, _ = new(big.Int).SetString("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 1...
/* Copyright 2021 The Operating System Manager 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 agr...
package types import ( "bytes" "reflect" "github.com/pkg/errors" log "github.com/sirupsen/logrus" ) func toDocElements(elements []interface{}) ([]DocElement, error) { result := make([]DocElement, len(elements)) for i, element := range elements { element, ok := element.(DocElement) if !ok { return nil, e...
/* For license and copyright information please see LEGAL file in repository */ package mediatype import "../protocol" var ( ABW = New("application/x-abiword").SetFileExtension("abw"). SetDetail(protocol.LanguageEnglish, "AbiWord document", "", "", "", "", []string{}) ARC = New("application/octet-stream").SetFil...
// 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 ...
package main import ( "bytes" "fmt" "image/color" "io" "log" "math" "net/http" "net/url" "strconv" ) const ( defaultWidth = 600 defaultHeight = 320 cells = 100 // number of cells xyrange = 30.0 // range (-xyrange..+xyrange) angle = math.Pi / 6 // angle of x axis and...
// Copyright 2015 <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 writi...
package commands_test import ( "cf" . "cf/commands" "cf/configuration" "cf/errors" "fmt" "github.com/codegangsta/cli" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" testapi "testhelpers/api" testassert "testhelpers/assert" testcmd "testhelpers/commands" testconfig "testhelpers/configuration" testre...
package main import ( "bytes" "encoding/csv" "fmt" "path/filepath" "regexp" "strconv" "strings" ) var ( numberValuePattern = regexp.MustCompile("^[0-9]+\\.?[0-9]*$") boolValuePattern = regexp.MustCompile("^(TRUE|FALSE)$") csvColumnPattern = regexp.MustCompile("^[^0-9.]+(\\.[^.]+)*$") ) // CSVColumn rep...
// Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA // // 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...
/* Copyright 2018 The OpenEBS Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package rafted import ( "github.com/hhkbp2/go-hsm" cm "github.com/hhkbp2/rafted/comm" ev "github.com/hhkbp2/rafted/event" logging "github.com/hhkbp2/rafted/logging" ps "github.com/hhkbp2/rafted/persist" "github.com/hhkbp2/testify/assert" "testing" "time" ) type GenHSMBackendFunc func( ...
package s3site import ( "fmt" "io/ioutil" "log" "net/http" "path/filepath" "strings" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/s3" "github.com/hashicorp/terraform/helper/schema" ) // Part size for multipart uploads const partSize int64 = 1024 * 1024 * 5 func resourceSite() *...
// 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 ...
package main import ( "fmt" "log" "math" "time" "github.com/anonutopia/gowaves" "github.com/bykovme/gotrans" "gorm.io/gorm" ) // KeyValue model is used for storing key/values type KeyValue struct { gorm.Model Key string `sql:"size:255;uniqueIndex"` ValueInt uint64 `sql:"type:int"` ValueStr string `sq...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: mesh/v1alpha1/traffic_permission.proto package v1alpha1 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 _ = mat...
// Copyright © 2018 <NAME> <<EMAIL>>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. package sar import ( "encoding/binary" "sync" "github.com/warthog618/sms/encoding/tpdu" ) // Segmenter segments a large outgoing message into the set of Submit TPDUs /...
package vcfgo import ( "bytes" "testing" ) // This is the example header from section 1.1 of the VCFv4.3 specification // document at: https://samtools.github.io/hts-specs/VCFv4.2.pdf var VCFv4_2eg = `##fileformat=VCFv4.2 ##fileDate=20090805 ##source=myImputationProgramV3.1 ##reference=file:///seq/references/1000Ge...
// Package zookeeper contains the logic for using Zookeeper as a config source. // Currently globbing only works if it is a suffix to the path. package zookeeper import ( "errors" "fmt" "hash/crc64" "path/filepath" "reflect" "sort" "strings" "time" "github.com/samuel/go-zookeeper/zk" "github.com/signalfx/de...
package socket_deprecated import ( "context" "net" "time" "github.com/bigdot123456/golib4db/socket" "errors" "fmt" "github.com/bigdot123456/golib4db/logs" ) type TcpClient struct { socketError chan *socket.Error //连接错误队列 addr string //服务器地址 sctx context.Context //conte...
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not...
package core import ( "sync" "testing" "github.com/google/uuid" "github.com/jrapoport/gothic/core/audit" "github.com/jrapoport/gothic/core/context" "github.com/jrapoport/gothic/models/auditlog" "github.com/jrapoport/gothic/models/types" "github.com/jrapoport/gothic/models/types/key" "github.com/jrapoport/got...
package bobgit import ( "bufio" "bytes" "fmt" "io/fs" "os" "path/filepath" "strings" git "github.com/go-git/go-git/v5" "github.com/benchkram/bob/bobgit/status" "github.com/benchkram/bob/pkg/bobutil" "github.com/benchkram/bob/pkg/cmdutil" "github.com/benchkram/errz" ) // Status executes `git status -porc...
// 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 by applicable law or agreed to in writi...
package widget import ( "image/color" "strconv" "fyne.io/fyne/v2" "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/data/binding" "fyne.io/fyne/v2/internal/cache" col "fyne.io/fyne/v2/internal/color" "fyne.io/fyne/v2/internal/widget" "fyne.io/fyne/v2/theme" ) type progressRenderer struct { widget.BaseRenderer bac...
package xmlsec import ( "errors" "unsafe" ) /* #include <xmlsec/xmlsec.h> #include <xmlsec/xmltree.h> #include <xmlsec/xmlenc.h> #include <xmlsec/xmldsig.h> #include <xmlsec/errors.h> #include <xmlsec/crypto.h> #include <xmlsec/nodeset.h> #include <libxml/list.h> void xmlSecFindNodes(const xmlListPtr found, const ...
/* * 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 ...
// Package riotclientv4 provides the Riot API client for API version v4 package riotclientv4 import ( "fmt" "io/ioutil" "net/http" "strings" "sync" "time" "github.com/sirupsen/logrus" "git.abyle.org/hps/alolstats/config" "git.abyle.org/hps/alolstats/logging" riotclientrl "git.abyle.org/hps/alolstats/riotc...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package mirbft import ( pb "github.com/IBM/mirbft/mirbftpb" ) // Actions are the responsibility of the library user to fulfill. // The user receives a set of Actions from a read of *Node.Ready(), // and it is the user's responsibili...
// Copyright 2021 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package publish import ( "path/filepath" "strings" "github.com/pkg/errors" "github.com/spf13/afero" "gopkg.in/yaml.v2" "github.com/vmware-tanzu/tanzu-framework/apis/cli/v1alpha1" "github.com/vmware-tanzu/tanzu-framewor...
package rs485 import ( "math" . "github.com/volkszaehler/mbmd/meters" ) func init() { Register("ABB", NewABBProducer) } type signedness int const ( unsigned signedness = iota signed ) type ABBProducer struct { Opcodes } func NewABBProducer() Producer { /*** * http://datenblatt.stark-elektronik.de/Energi...
package main import ( "bufio" "encoding/base64" "encoding/json" "fmt" "io" "io/ioutil" "mime/multipart" "net/http" "os" "runtime" "time" "github.com/unixvoid/glogger" "golang.org/x/crypto/sha3" "gopkg.in/redis.v5" ) // the `json:""` is so we can have fields without capital letters type CValue struct { ...
package auditor import ( "net/http" "code.cloudfoundry.org/lager" "github.com/concourse/concourse/atc" ) //go:generate counterfeiter . Auditor func NewAuditor( EnableBuildAuditLog bool, EnableContainerAuditLog bool, EnableJobAuditLog bool, EnablePipelineAuditLog bool, EnableResourceAuditLog bool, EnableSys...
// SPDX-License-Identifier: Unlicense OR MIT // Package input implements drivers for virtio input devices. package input import ( "bytes" "errors" "fmt" "unsafe" "eliasnaur.com/unik/kernel" "eliasnaur.com/unik/virtio" ) type Device struct { Name string dev *virtio.Device cfg *config r *virtio.Reader b...
package app import ( "fmt" "os" "os/exec" "os/signal" "syscall" "time" log "github.com/Sirupsen/logrus" "github.com/codegangsta/cli" "github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hironobu-s/swiftfs/config" "github.com/hironobu...
// Copyright 2020 Drone.IO Inc. All rights reserved. // Use of this source code is governed by the Blue Oak Model License // that can be found in the LICENSE file. // +build !windows package compiler import ( "context" "encoding/json" "io/ioutil" "os" "testing" "{{ Module }}/engine" "{{ Module }}/engine/reso...
// // Last.Backend LLC CONFIDENTIAL // __________________ // // [2014] - [2019] Last.Backend LLC // All Rights Reserved. // // NOTICE: All information contained herein is, and remains // the property of Last.Backend LLC and its suppliers, // if any. The intellectual and technical concepts contained // herein are prop...
package slb import ( . "aliyun-openapi-go-sdk/core" "strconv" ) type DescribeLoadBalancersRequest struct { RpcRequest OwnerId int ResourceOwnerAccount string ResourceOwnerId int ServerId string LoadBalancerId string AddressType string InternetChargeType string ...
/* * Copyright (C) 2017-2018 GIG Technology NV 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 ...
/* Copyright 2014 The Perkeep Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
package commands import ( "asura/src/database" "asura/src/handler" "asura/src/utils" "asura/src/utils/rinha" "context" "fmt" "sort" "firebase.google.com/go/db" "github.com/andersfylling/disgord" ) func init() { handler.Register(handler.Command{ Aliases: []string{"rank", "top", "tops"}, Run: run...
package proxy import ( "encoding/hex" "net" "strings" "github.com/go-logr/logr" "github.com/insomniacslk/dhcp/dhcpv4" "github.com/insomniacslk/dhcp/iana" ) // UserClass is DHCP option 77 (https://www.rfc-editor.org/rfc/rfc3004.html). type UserClass string // clientType is from DHCP option 60. Normally on PXEC...
package fsm import ( "context" "reflect" "github.com/filecoin-project/go-statemachine" "golang.org/x/xerrors" ) // EventProcessor creates and applies events for go-statemachine based on the given event list type EventProcessor interface { // Event generates an event that can be dispatched to go-statemachine fro...
// Copyright (c) 2017, <NAME> <<EMAIL>> // See LICENSE for licensing information package interp import ( "bytes" "context" "fmt" "io" "os" "runtime" "strings" "testing" "time" "mvdan.cc/sh/syntax" ) var modCases = []struct { name string exec ModuleExec open ModuleOpen src string want string }{ { ...
package main import ( "bytes" "crypto/sha256" "fmt" "math" "math/rand" "os" "os/user" "regexp" "strconv" "strings" "time" ) // UserHome builds path with user home path func UserHome(s ...string) string { user, err := user.Current() if err != nil { panic(err) } dir := user.HomeDir if len(s) == 0 { ...
// Copyright Fuzamei Corp. 2018 All Rights Reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package common import ( "crypto/rand" "crypto/sha256" "encoding/hex" "fmt" "io" "math/big" "github.com/33cn/chain33/common/crypto/sha3" "golang.org/x/cr...