text
stringlengths
3.08k
10.4k
/* * ORBIT - Interlink Remote Applications * * The MIT License (MIT) * * Copyright (c) 2020 <NAME> <roland.singer[at]desertbit.com> * Copyright (c) 2020 <NAME> <sebastian[at]desertbit.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documen...
package deprecated import ( "context" "github.com/chirino/graphql" "github.com/chirino/graphql/qerrors" "github.com/chirino/graphql/schema" "github.com/chirino/graphql/internal/validation" "github.com/chirino/graphql/log" "github.com/chirino/graphql/trace" ) // ParseSchema parses a GraphQL schema and attache...
package transcriber import ( "bytes" "encoding/json" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "server/transcriber/recognizers" "server/transcriber/recognizers/gcp" "server/transcriber/utils" "strings" ) var state = State{} // Start ... func Start(encoderPath string, outputPath string, segmentsPath...
package connector import ( "context" "fmt" "io" "log" "net" "strconv" "sync" "time" "github.com/phayes/freeport" "golang.org/x/crypto/ssh" ) var mut sync.Mutex = sync.Mutex{} //CreateTunnel CreateTunnel func CreateTunnel(remoteHost string, remotePort string, username string, password string) int { mut.Lo...
package smartcontract import ( "encoding/binary" "encoding/hex" "fmt" ) type scriptContext struct { Position uint64 Context []byte } // OpCodeData stores opcode with its data. type OpCodeData struct { OpCode byte Data []byte } // DataStack is the stack of opcodes with its data(opcode without data is omitt...
package filepathfilter import ( "path/filepath" "runtime" "strings" "testing" "github.com/stretchr/testify/assert" ) func TestPatternMatch(t *testing.T) { assert.True(t, patternMatch("filename.txt", "filename.txt")) assert.True(t, patternMatch("*.txt", "filename.txt")) assert.False(t, patternMatch("*.tx", "f...
package core import ( "fmt" "net" "gvisor.dev/gvisor/pkg/tcpip" "gvisor.dev/gvisor/pkg/tcpip/buffer" "gvisor.dev/gvisor/pkg/tcpip/header" "gvisor.dev/gvisor/pkg/tcpip/stack" "gvisor.dev/gvisor/pkg/tcpip/transport/udp" "github.com/xjasonlyu/tun2socks/internal/adapter" ) const udpNoChecksum = true type udpHa...
/** * Copyright 2021 Comcast Cable Communications Management, 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 requir...
package main import ( "crypto/md5" "encoding/hex" "flag" "fmt" "io" "log" "os" "os/exec" "path/filepath" "strings" ) var selfName string func main() { selfName = filepath.Base(os.Args[0]) log.SetFlags(log.Lmsgprefix) log.SetPrefix(selfName + ": ") verbose := false vlog := log.New(os.Stdout, selfName+...
package quikk import ( "context" "crypto/hmac" "crypto/sha256" "encoding/base64" "encoding/json" "errors" "fmt" "net/url" "strings" "time" conv "github.com/cstockton/go-conv" "github.com/dostow/rave/api/models" "github.com/go-resty/resty/v2" ) type Attributes struct { Amount int `json:...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package metadata import ( "encoding/json" "errors" "fmt" "io/ioutil" "reflect" "strings" "github.com/hyperledger/fabric/common/flogging" ) var logger = flogging.MustGetLogger("metadata") // fileValidators are used as handler...
// Copyright 2015 FactomProject Authors. All rights reserved. // Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // factomlog is based on github.com/alexcesaro/log and // github.com/alexcesaro/log/golog (MIT License) package main import ( "encoding/hex" "encoding/js...
// Copyright 2020 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package crud import ( "bytes" "context" "encoding/base32" "encoding/base64" "encoding/json" "fmt" "strings" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1client "k8s.io...
package vurixwebapiclient import ( "encoding/json" "fmt" "net" "time" "github.com/parjom/goutil" "github.com/spf13/cast" ) type OptVurixEventReceiver struct { DeviceEvent bool // event SystemEvent bool // system MonitoringEvent bool // monitoring UserLogEvent bool // userlog UserEvent ...
package archiveorg // Time map parser as described and linked at // http://ws-dl.blogspot.com/2013/07/2013-07-15-wayback-machine-upgrades.html. import ( "bufio" "errors" "fmt" "io" "net/http" "regexp" "strings" "time" log "github.com/sirupsen/logrus" ) var ( MementoParseErr = errors.New("malformed input: ...
package datastruct import ( "encoding/binary" "fmt" "io" ) var ( ZipStr06b = 0 << 6 ZipStr14b = 1 << 6 ZipStr32b = 2 << 6 ZipInt16b = 0xc0 | 0<<4 ZipInt32b = 0xc0 | 1<<4 ZipInt64b = 0xc0 | 2<<4 ZipInt24b = 0xc0 | 3<<4 ZipInt8b = 0xfe ZipStrMask = 0xc0 ZipIntMask = 0xd ZipIntImmMin = 0xf1 /* 111100...
package agent import ( "bytes" "fmt" "github.com/hashicorp/raft" "github.com/sharop/service_template_dex/distio/discovery" "github.com/sharop/service_template_dex/distio/log" "github.com/sharop/service_template_dex/distio/server" "github.com/soheilhy/cmux" "go.uber.org/zap" "google.golang.org/grpc" "io" "ti...
package gps import ( "errors" "strconv" "strings" "time" ) var ( errEmptyNMEASentence = errors.New("cannot parse empty NMEA sentence") errUnknownNMEASentence = errors.New("unsupported NMEA sentence type") errInvalidGGASentence = errors.New("invalid GGA NMEA sentence") errInvalidRMCSentence = errors.New("i...
// Code generated by lark_sdk_gen. DO NOT EDIT. package lark import ( "context" ) // GetHelpdeskTicket 该接口用于获取单个服务台工单详情。仅支持自建应用。 // // doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/get func (r *HelpdeskService) GetHelpdeskTicket(ctx context.Context, request *GetHelpdeskTicketReq, opt...
package testserver import ( "bytes" "fmt" "net" "os" "os/exec" "strconv" "time" "gopkg.in/mgo.v2" "gopkg.in/tomb.v2" ) // TestServer controls a MongoDB server process to be used within test suites. // // The test server is started when Session is called the first time and should // remain running for the du...
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of Hubble //go:build !privileged_tests package debug import ( "bytes" "encoding/binary" "fmt" "io" "testing" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/wrapperspb" flowpb "github.com/...
// Copyright (c) 2018-present, NebulaChat Studio (https://nebula.chat). // 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/LI...
package controller import ( "encoding/json" "github.com/ego008/youdb" "github.com/rs/xid" "goyoubbs/lib/qqOAuth" "goyoubbs/model" "goyoubbs/util" "net/http" "strconv" "strings" "time" ) func (h *BaseHandler) QQOauthHandler(w http.ResponseWriter, r *http.Request) { scf := h.App.Cf.Site qq, err := qqOAuth.N...
/* Copyright 2015 <NAME>, courtesy Booking.com 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...
/*** Copyright 2019 Cisco Systems Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
package account import ( "encoding/json" "fmt" "time" "github.com/gidyon/micro/v2/utils/errs" "github.com/gidyon/services/pkg/api/account" "gorm.io/gorm" ) const defaultAccountsTable = "accounts" var accountsTable = "" // Account contains profile information stored in the database type Account struct { Acco...
package gocudnn /* #include <cudnn.h> */ import "C" import ( "runtime" "github.com/dereklstinson/cutil" ) //AlgorithmD holds the C.cudnnAlgorithmDescriptor_t type AlgorithmD struct { descriptor C.cudnnAlgorithmDescriptor_t gogc bool } //Algorithm is used to pass generic stuff type Algorithm C.cudnnAlgori...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package servicecatalog import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type CreateProductInput struct { _ struct{} `type:"structure"` // The language code. // // * en - Engl...
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package platformvm import ( "math/big" ) const secondsPerYear = 31556952 var ( // from 2022 - 01 - 01 , next element for 1 year and end to 2031 - 01 - 01 /* //timestampStakes = [16]uint64{ // 16409952...
package generator import ( "fmt" "sort" "github.com/pkg/errors" mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1" manager_dataplane "github.com/kumahq/kuma/pkg/core/managers/apis/dataplane" mesh_core "github.com/kumahq/kuma/pkg/core/resources/apis/mesh" core_xds "github.com/kumahq/kuma/pkg/core/xds" xds_...
package scipipe import ( "io/ioutil" "os" "strconv" "testing" ) func TestNewProc(t *testing.T) { wf := NewWorkflow("test_wf", 16) p1 := NewProc(wf, "echo", "echo {p:text}") if p1.InParam("text") == nil { t.Error(`p.InParam("text") = nil. want: not nil`) } p2 := NewProc(wf, "cat", "cat {i:infile} > {o:outf...
// Copyright © 2021 The Knative Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
package create import ( "context" "fmt" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" ) const ( executionShort = "Create execution resources" executionLong = ` Creates...
package models import ( "errors" "fmt" "reflect" "strings" "time" "github.com/astaxie/beego/orm" ) //Comments Model type Comments struct { ID int `orm:"column(id);auto" json:"id"` AttachmentMime string `orm:"column(attachment_mime);" json:"attachment_mime,omitempty"` AttachmentUUID stri...
// Copyright 2019 Dolthub, 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 proxy import ( "bytes" "compress/gzip" "encoding/json" "fmt" "io" "io/ioutil" "log" "net/http" "os" "path" "path/filepath" "strings" "time" ) const timeFormatStd string = "2006-01-02 15:04:05" const timeFormatInt string = "20060102150405" // SetInterval interval run func func SetInterval(call fu...
package phidgets /* #cgo CFLAGS: -g -Wall #cgo LDFLAGS: -lphidget22 #include <stdlib.h> #include <phidget22.h> typedef void (*attach_fcn)(PhidgetManagerHandle man, void *ctx, PhidgetHandle channel); void cattach_callback(PhidgetManagerHandle man, void *ctx, PhidgetHandle channel); */ import "C" import ( "errors" "fm...
// Copyright 2015 The Cockroach 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 ag...
/* * Copyright (C) 2019 Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ package verifier import ( "errors" flvr "github.com/intel-secl/intel-secl/v4/pkg/model/wls" "intel/isecl/lib/common/v4/pkg/instance" "intel/isecl/lib/common/v4/validation" "net/url" ) // Verify verifies a manifest against a f...
package main import ( "flag" "fmt" "log" "math/rand" "os" "path/filepath" "runtime" "strconv" "strings" "time" "github.com/fogleman/primitive/primitive" "github.com/nfnt/resize" ) var ( Input string Outputs flagArray Background string Configs shapeConfigArray Alpha int InputSize in...
package cmd import ( "bufio" "encoding/json" "errors" "fmt" "os" "path/filepath" sdk "github.com/cosmos/cosmos-sdk/types" appCmd "github.com/functionx/fx-core/app/cmd" "github.com/functionx/fx-core/app/fxcore" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/...
package screen2d import ( "fmt" "github.com/veandco/go-sdl2/sdl" ) // Drawer represents an item that can be drawn on the screen type Drawer interface { Draw() } // UpdateFunc is the function that will be called during the update phase type UpdateFunc func(ticks uint32, elapsed float32) // DrawFunc is the functi...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "errors" "fmt" "sort" "strings" "github.com/gotd/td/bin" "github.com/gotd/td/tdp" ) // No-op definition for keeping imports. var _ = bin.Buffer{} var _ = context.Background() var _ = fmt.Stringer(nil) var _ = strings.Builder{} var _ = e...
// Copyright The OpenTelemetry 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 ag...
/******************************************************************************* inexpugnable - an esmtp server Copyright (c) 2016 <EMAIL> 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 ...
// This code is available on the terms of the project LICENSE.md file, // also available online at https://blueoakcouncil.org/license/1.0.0. package pg import ( "database/sql" "fmt" "github.com/skynet0590/atomicSwapTool/dex" "github.com/skynet0590/atomicSwapTool/server/db/driver/pg/internal" ) const ( marketsT...
// Copyright 2017 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package integrations import ( "net/http" "net/http/httptest" "path" "testing" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/...
package worker import ( "fmt" "sync" "sync/atomic" ) // Pool is a generic abstraction for a worker pool type Pool[R any] struct { jobs chan JobFunc[R] results chan jobResult[R] opts PoolOpts jobWg sync.WaitGroup resultsWg sync.WaitGroup closed bool launchedRoutines int32 } type jobResul...
/* 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, ...
/* * Copyright (c) 2019 uplus.io */ package uengine import ( "fmt" "github.com/uplus-io/uengine/model" "github.com/uplus-io/ugo/hash" "github.com/uplus-io/ugo/utils" "log" "os" "strings" ) type StoreType uint8 type StoreIterator func(key, data []byte) bool type StoreMetaIterator func(key []byte, meta model....
package logger // import "github.com/demonoid81/moby/daemon/logger" import ( "encoding/binary" "io" "sync" "testing" "time" "github.com/demonoid81/moby/api/types/plugins/logdriver" protoio "github.com/gogo/protobuf/io" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) // mockLoggingPlugin implement...
// Copyright 2016, 2017 <NAME>-Security, Inc // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge,...
package main import ( "github.com/gin-gonic/gin" "log" "github.com/FlowingSPDG/get5-web-go/server/src/api" "github.com/FlowingSPDG/get5-web-go/server/src/db" "github.com/FlowingSPDG/get5-web-go/server/src/grpc" "github.com/gin-contrib/static" "github.com/go-ini/ini" ) // Config Configration Struct for config....
// Copyright 2019-present Open Networking Foundation. // // 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...
/** * Copyright 2019 IBM Corp. * * 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...
/* Copyright 2020 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package a8n import ( "context" "github.com/pkg/errors" "github.com/sourcegraph/sourcegraph/cmd/repo-updater/repos" "github.com/sourcegraph/sourcegraph/internal/a8n" "github.com/sourcegraph/sourcegraph/internal/httpcli" "gopkg.in/inconshreveable/log15.v2" ) // A ChangesetSyncer periodically sync the metadata of...
package chlog import ( "errors" "strings" "github.com/gookit/gitwrap" "github.com/gookit/goutil/strutil" ) var ErrEmptyLogText = errors.New("empty git log text for parse") // LogItem struct type LogItem struct { HashId string // %H %h ParentId string // %P %p Msg string // %s Date string // %...
// Copyright 2019 Polyaxon, 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...
package cmd import ( "fmt" "os" "time" "github.com/gabstv/dbmigrate/pkg/dbmigrate" "github.com/manifoldco/promptui" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/viper" ) var applyCmdDBName string var applyCmdConfirm bool var applyCmdRootPath string func init() { rootCmd.AddCommand(app...
// Copyright 2020 Team 254. All Rights Reserved. // Author: <EMAIL> (<NAME>) package game import ( "github.com/stretchr/testify/assert" "testing" "time" ) var matchStartTime = time.Unix(10, 0) func TestPowerPort(t *testing.T) { var powerPort PowerPort assertPowerPort(t, [3][2]int{}, [3][4]int{}, &powerPort) ...
// Copyright © 2022 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // // 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 // // Unle...
package factomSync import ( "encoding/hex" "fmt" "os" "time" "github.com/AccumulateNetwork/SMT/smt" "github.com/FactomProject/factom" "github.com/PaulSnow/AnchorMaker/database" ) var MS smt.MerkleState // getFactomdHeight() // Return the directory block height in factomd. // NOTE: If factomd is offline or w...
// Copyright 2019 The Chromium 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 import ( "context" "encoding/json" "fmt" "infra/cmd/skylab/internal/site" "io" "time" "github.com/maruel/subcommands" "go.chromium.o...
package gorm import ( "database/sql" "errors" "fmt" "reflect" ) // Define callbacks for querying func init() { DefaultCallback.Query().Register("gorm:query", queryCallback) DefaultCallback.Query().Register("gorm:preload", preloadCallback) DefaultCallback.Query().Register("gorm:after_query", afterQueryCallback)...
// +build windows package winio import ( "bytes" "encoding/binary" "fmt" "runtime" "sync" "syscall" "unicode/utf16" "golang.org/x/sys/windows" ) //sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [tr...
package main import ( "bufio" "bytes" "io" "os/exec" "regexp" "strconv" "strings" "testing" eventstestutils "github.com/demonoid81/moby/daemon/events/testutils" "github.com/sirupsen/logrus" "gotest.tools/v3/assert" ) // eventMatcher is a function that tries to match an event input. // It returns true if t...
package server import ( "bytes" "fmt" "io" "log" "net" "strconv" "sync" "time" "github.com/dosgo/xsocks/comm" "github.com/dosgo/xsocks/comm/socks" "github.com/dosgo/xsocks/param" ) func StartRemoteSocks51(address string) error{ log.SetFlags(log.LstdFlags | log.Lshortfile) l, err := ...
package main import _ "net/http/pprof" import ( "encoding/json" "fmt" "time" "github.com/shirou/gopsutil/cpu" "github.com/shirou/gopsutil/load" "github.com/shirou/gopsutil/mem" ) var myDynamicInfo map[string]interface{} type MeasureConfig struct { CPUblue float64 CPUgreen float64 CPUred float64 SYSLOAD...
package types_test import ( "testing" "github.com/stretchr/testify/require" dbm "github.com/tendermint/tendermint/libs/db" "github.com/tendermint/tendermint/libs/log" "github.com/irisnet/irishub/store" "github.com/irisnet/irishub/types" abci "github.com/tendermint/tendermint/abci/types" ) type MockLogger st...
package request import ( "new_erp_agent_by_go/models/actual" pycompanylist "new_erp_agent_by_go/models/companylist" "new_erp_agent_by_go/models/erp_goods" "new_erp_agent_by_go/models/user" ) type EditGoodsCategory struct { CategoryId int `json:"category_id" valid:"Required" 分类id` CategoryName string `json:...
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package packager import ( "encoding/base64" "encoding/json" "errors" "fmt" "strings" "github.com/btcsuite/btcutil/base58" "github.com/hyperledger/aries-framework-go/pkg/didcomm/common/transport" "github.com...
// Copyright 2014 The Cockroach 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 ag...
// Copyright © 2019 NAME HERE <EMAIL ADDRESS> // // 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 ...
/* Copyright 2017 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 di...
// Copyright 2013 Martini Authors // Copyright 2014 The Web 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 requi...
// Copyright (c) 2017 The Decred developers // Copyright (c) 2018-2019 The Hc developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package database import ( "encoding/hex" "errors" "github.com/HcashOrg/hcAutonomy/hcAutonomyd/api/v1/identity" "github.com/go...
// Copyright 2019 The GoPacket Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file in the root of the source tree. package layers // This file implements the ASF-RMCP header specified in section 3.2.2.2 of // https://www.dmtf.org/site...
/* * This file is part of the KubeVirt project * * 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...
// Copyright 2017 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: keyboardmessage.proto /* Package __protobuf is a generated protocol buffer package. It is generated from these files: keyboardmessage.proto laptopmessage.proto memorymessage.proto processormessage.proto screenmessage.proto storagemessage.proto It has ...
package godisco import ( "encoding/json" "fmt" ) // UserResponse define json response type UserResponse struct { UserBadges []struct { ID int `json:"id"` Granted string `json:"granted_at"` BadgeID int `json:"badge_id"` UserID int `json:"user_id"` GrantedBy int `json:"granted_by_...
// // Modified BSD 3-Clause Clear License // // Copyright (c) 2019 Insolar Technologies GmbH // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted (subject to the limitations in the disclaimer below) provided that // the following conditions a...
package golinters import ( "bufio" "fmt" "os" "os/user" "path/filepath" "regexp" "strings" "sync" "github.com/kisielk/errcheck/errcheck" "github.com/pkg/errors" "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/packages" "github.com/golangci/golangci-lint/pkg/config" "github.com/golangci/golangci...
package models import ( "time" "github.com/google/uuid" ) // Post struct based on posts table in database type Post struct { ID uuid.UUID `db:"id" json:"id"` UserID uuid.UUID `db:"user_id" json:"user_id"` Title string `db:"title" json:"title"` Slug string `db:"slug" json:"slug"...
package types import ( "bytes" "fmt" "io" "strings" "github.com/MakeNowJust/heredoc" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/genericclioptions" ) type concept struct { Name string Abbre...
package soc import ( "errors" "math" "time" "github.com/evcc-io/evcc/api" "github.com/evcc-io/evcc/util" ) const chargeEfficiency = 0.9 // assume charge 90% efficiency // Estimator provides vehicle soc and charge duration // Vehicle SoC can be estimated to provide more granularity type Estimator struct { log ...
package okex // Copyright (c) 2015-2019 Bitontop Technologies Inc. // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. import ( "time" ) type ErrorMsg struct { Code string `json:"code"` Msg string `json:"message"` } type Coin...
package types import ( "encoding/json" "github.com/bytom/bytom/crypto/ed25519/chainkd" bjson "github.com/bytom/bytom/encoding/json" ) type Transaction struct { Tx *string `json:"base_transaction"` Actions []map[string]interface{} `json:"actions"` ReservedDuration ...
// Package stat -- stuff related to ethtool - link control and status // Check out https://github.com/torvalds/linux/blob/master/include/uapi/linux/ethtool.h - see ethtool_link_settings{} struct // C code example -- https://stackoverflow.com/questions/41822920/how-to-get-ethtool-settings package stat import ( "fmt" ...
// Copyright 2016 Pal<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...
package dfservice /* Copyright 2017-2018 Crunchy Data Solutions, 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 o...
// Licensed to LinDB under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. LinDB licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use this file except in compli...
package metadata import ( "encoding/json" "fmt" "strings" "time" log "github.com/Sirupsen/logrus" "github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface" "github.com/aws/aws-sdk-...
package provision import ( "bytes" "fmt" "text/template" "github.com/docker/machine/libmachine/auth" "github.com/docker/machine/libmachine/drivers" "github.com/docker/machine/libmachine/engine" "github.com/docker/machine/libmachine/log" "github.com/docker/machine/libmachine/mcnutils" "github.com/docker/machi...
package httpexpect import ( "bytes" "crypto/tls" "fmt" "io/ioutil" "net" "net/http" "net/http/httptest" "github.com/valyala/fasthttp" ) // Binder implements networkless http.RoundTripper attached directly to // http.Handler. // // Binder emulates network communication by invoking given http.Handler // direct...
// SPDX-License-Identifier: Unlicense OR MIT package kernel // Functions for reading the real time clock of the CMOS. // readCMOSTime reads the CMOS clock and converts it to UNIX time in // seconds. //go:nosplit func readCMOSTime() int64 { waitForCMOS() t := readCMOSTime0() // The CMOS may be updating its time du...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: transfers_result.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...
package cmd import ( "context" "encoding/json" "fmt" "io/ioutil" "net/http" "os" "os/signal" "strings" "time" "github.com/Unbabel/replicant/internal/cmdutil" "github.com/Unbabel/replicant/internal/executor" "github.com/Unbabel/replicant/log" "github.com/Unbabel/replicant/transaction" "github.com/juliens...
// Code generated by smithy-go-codegen DO NOT EDIT. package types type InstanceMetadataEndpointState string // Enum values for InstanceMetadataEndpointState const ( InstanceMetadataEndpointStateDisabled InstanceMetadataEndpointState = "disabled" InstanceMetadataEndpointStateEnabled InstanceMetadataEndpointState =...