text
stringlengths
3.08k
10.4k
package sealing import ( "context" "io" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" logging "github.com/ipfs/go-log/v2" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" padreader "github.com/filecoin-project/go-padreader" statemachine "git...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package rds 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/rds-2014-10-31/ModifyDBClusterParameterGroupMessage type ...
package delete import ( "encoding/json" "testing" "github.com/nlopes/slack" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "github.com/infracloudio/botkube/pkg/config" "github.com/infracloudio/botkube/pkg/no...
package kubeapply import ( "context" "errors" "fmt" "os" "path/filepath" "sort" "strings" "syscall" "time" "github.com/datawire/ambassador/v2/pkg/k8s" "github.com/datawire/dlib/derror" "github.com/datawire/dlib/dexec" "github.com/datawire/dlib/dlog" ) // errorDeadlineExceeded is returned from YAMLCollec...
package main import ( "encoding/json" "fmt" "log" "os" "runtime" "sort" "sync" "time" "unicode" "github.com/alexflint/go-arg" "github.com/kiteco/kiteco/kite-golib/fileutil" "github.com/kiteco/kiteco/kite-golib/pipeline" "github.com/kiteco/kiteco/kite-golib/pipeline/aggregator" "github.com/kiteco/kiteco/...
package resource_test import ( "testing" "github.com/derailed/k9s/resource" "github.com/derailed/k9s/resource/k8s" m "github.com/petergtz/pegomock" "github.com/stretchr/testify/assert" "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestStsListAccess(t *testing.T) { ns := "blee" l ...
package console import ( "bytes" "testing" "github.com/stretchr/testify/assert" ) // TestTableGeneration asserts that printing of table table data matches the expected format. func TestTableGeneration(t *testing.T) { tcs := []struct { name string table *Table expected string }{ { name: "witho...
/* * Copyright (c) 2017, MegaEase * 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 ap...
package engines import ( "os" "plugin" "strings" "sync" "github.com/webability-go/xcore/v2" "github.com/webability-go/xamboo/cms/engines/assets" "github.com/webability-go/xamboo/cms/engines/language" "github.com/webability-go/xamboo/cms/engines/library" "github.com/webability-go/xamboo/cms/engines/redirect"...
package tests_test import ( "encoding/json" "fmt" "time" corev1 "k8s.io/api/core/v1" k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/scheme" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" testscore "kubevirt.io/kubevirt/tests" "github.com/kubevirt/cluster-network-addon...
// Copyright (C) 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 t...
package main /* Copyright (c) IBM Corporation 2022 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 dgraph_ldap import ( "time" "github.com/json-iterator/go" "fmt" ) type NodeType uint const ( TypeDocument NodeType = iota TypeFile TypeUser TypeGroup TypeTag ) type Node interface { GetChildren() error } type nodeBase struct { // DGraph uid UID uint64 `db:"uid" client:"uid,omitempty"` // globa...
package timer import ( "container/list" "sync" "sync/atomic" "time" ) const ( TVR_BITS = 8 TVN_BITS = 6 TVR_SIZE = 1 << TVR_BITS // 256 TVN_SIZE = 1 << TVN_BITS // 64 TVR_MASK = TVR_SIZE - 1 // 255 1111 1111 TVN_MASK = TVN_SIZE - 1 // 63 0011 111...
package structs import ( "net" "github.com/elsevier-core-engineering/replicator/notifier" ) // Config is the main configuration struct used to configure the replicator // application. type Config struct { // BindAddress is the TCP IP address which Replicator will bind to for both // HTTP and RPC. BindAddress st...
// Copyright for portions of this fork are held by [<NAME>, 2016] // as part of the original go-datastore project. All other copyright for this // fork are held by [DAOT Labs, 2020]. All rights reserved. Use of this source // code is governed by MIT license that can be found in the LICENSE file. package namespace_test...
// Copyright 2021 - 2022 Matrix Origin // // 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...
// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Lice...
package judge import ( "context" "io" "github.com/si9ma/KillOJ-common/sandbox" "github.com/go-redis/redis" "github.com/si9ma/KillOJ-common/kredis" "github.com/si9ma/KillOJ-common/mysql" "github.com/jinzhu/gorm" "github.com/RichardKnop/machinery/v1" "github.com/si9ma/KillOJ-common/tracing" "github.com/si...
// Package ecm implements the elliptic curve method of factorization and was originally written // by <NAME> and distributed under a Public Domain license from his Github here: // https://github.com/randall77/factorlib package ecm import ( "context" "fmt" "log" "time" "github.com/jbarham/primegen" "github.com/...
//Copyright (C) Microsoft Corporation. All rights reserved. //Licensed under the MIT License. See LICENSE-CODE in the project root for license information. package main import ( "context" "flag" "fmt" "os" "os/signal" "strings" "time" "github.com/Azure/Avere/src/go/pkg/azure" "github.com/Azure/Avere/src/go/p...
package main import ( "database/sql" "fmt" "net/url" "strconv" "strings" "time" _ "github.com/denisenkom/go-mssqldb" _ "github.com/godror/godror" _ "github.com/lib/pq" "github.com/pkg/errors" log "github.com/sirupsen/logrus" ) const ( queryTmpl = ` WITH latest AS ( SELECT broker_id, MAX(time...
/* * Copyright (c) 2020 Devtron Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
package ui import ( "fmt" "git.kirsle.net/go/render" "git.kirsle.net/go/ui/theme" ) // SelectBox is a kind of MenuButton which allows choosing a value from a list. type SelectBox struct { MenuButton name string // Configurables after SelectBox creation. AlwaysChange bool // always call the Change event, eve...
package odoo import ( "fmt" ) // AccountInvoiceReport represents account.invoice.report model. type AccountInvoiceReport struct { LastUpdate *Time `xmlrpc:"__last_update,omptempty"` AccountAnalyticId *Many2One `xmlrpc:"account_analytic_id,omptempty"` AccountId *Many2One ...
package quoter import ( "context" "fmt" "github.com/gorilla/websocket" "github.com/pinealctx/neptune/jsonx" "github.com/pinealctx/neptune/ulog" "github.com/pinealctx/restgo" "go.uber.org/atomic" "go.uber.org/zap" "strconv" "strings" "sync" "time" ) type Quoter struct { cryptoIDs []int prices *sync.Ma...
package bot import ( "github.com/jonas747/dstate" "github.com/jonas747/yagpdb/common" "github.com/jonas747/yagpdb/master" "github.com/jonas747/yagpdb/master/slave" "github.com/sirupsen/logrus" "os" "runtime/debug" "sync" "sync/atomic" "time" ) // Slave implementation type SlaveImpl struct { lastTimeFreedMe...
package cmd import ( "context" "fmt" "strings" "time" "github.com/packethost/pkg/log" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" "github.com/tinkerbell/tink/client" "github.com/tinkerbell/tink/cmd/tink-worker/internal" pb "github.com/tinkerbell/tink/...
// Copyright (c) 2018, The GoKi 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 girl import ( "strings" "sync" "github.com/goki/gi/gist" ) var ( // faceNameCache is a cache for fast lookup of valid font face names give...
package konfig import ( "errors" "fmt" "sync" "time" "github.com/prometheus/client_golang/prometheus" ) // ErrNoLoaders is the error returned when no loaders are set in the config and Load is called var ErrNoLoaders = errors.New("No loaders in config") // Loader is the interface a config loader must implement ...
package server import ( "bufio" "bytes" "errors" "io" "log" "net" "os" "strings" "toykv/config" "toykv/store" "github.com/siddontang/goredis" ) var ( // ErrParams param error ErrParams = errors.New("ERR params invalid") // ErrRespType response type invalid ErrRespType = errors.New("ERR resp type inv...
package secio import ( "crypto/subtle" "errors" "fmt" // may replace by std/crypto in future btcec "github.com/btcsuite/btcd/btcec" mol "github.com/driftluo/tentacle-go/secio/mol" ) type secp256k1PrivateKey btcec.PrivateKey type secp256k1PublicKey btcec.PublicKey // from molecule generate code const typeID =...
package query import ( "database/sql/driver" "errors" "fmt" "github.com/asdine/genji/database" "github.com/asdine/genji/document" "github.com/asdine/genji/sql/scanner" ) // SelectStmt is a DSL that allows creating a full Select query. type SelectStmt struct { TableName string WhereExpr Expr Or...
package main import ( "fmt" "log" "net" "strconv" "time" "github.com/bwmarrin/discordgo" "github.com/rumblefrog/go-a2s" ) const ( timeFormat = "2 Jan 2006 15:04:05 -0700" ) type queryError struct { description string err error } func (e queryError) Error() string { return fmt.Sprintf(e.descripti...
/* Copyright 2014 Google 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 in ...
// Unless explicitly stated otherwise all files in this repository are licensed // under the MIT License. // This product includes software developed at Guance Cloud (https://www.guance.com/). // Copyright 2021-present Guance, Inc. // Package sink contains sink implement package sink import ( "fmt" "strings" "sync...
package database import ( "context" "database/sql" "fmt" "sync" "time" "github.com/go-gorp/gorp" "github.com/lib/pq" "github.com/ovh/cds/sdk" "github.com/ovh/cds/sdk/log" ) // DBConnectionFactory is a database connection factory on postgres with gorp type DBConnectionFactory struct { DBDriver stri...
/////////////////////////////////////////////////////////////////////// // Copyright (c) 2017 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 /////////////////////////////////////////////////////////////////////// package vcenter import ( "context" "encoding/json" "fmt" "reflect" "string...
package groups import ( "context" "fmt" "github.com/go-logr/logr" "github.com/kubeflow/internal-acls/google_groups/pkg/api/v1alpha1" admin "google.golang.org/api/admin/directory/v1" "google.golang.org/api/googleapi" settingsSdk "google.golang.org/api/groupssettings/v1" "net/http" "strings" ) type GroupSyncer...
// Copyright 2018 The TigLabs raft 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...
// Copyright 2021 NetApp, Inc. All Rights Reserved. package installer import ( "fmt" log "github.com/sirupsen/logrus" "github.com/netapp/trident/cli/cmd" k8sclient "github.com/netapp/trident/cli/k8s_client" ) func (i *Installer) UninstallTrident() error { // 1. preview CSI Trident --> uninstall preview CSI T...
// 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...
package autopeering import ( "fmt" "hash/fnv" "net" "github.com/pkg/errors" "github.com/multiformats/go-multiaddr" "github.com/gohornet/hornet/pkg/p2p/autopeering" "github.com/iotaledger/hive.go/autopeering/discover" "github.com/iotaledger/hive.go/autopeering/peer" "github.com/iotaledger/hive.go/autopeeri...
package consul import ( "crypto/rand" "encoding/base64" "errors" "fmt" "time" "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" "github.com/go-kit/kit/sd" gokitconsul "github.com/go-kit/kit/sd/consul" "github.com/go-kit/kit/util/conn" "github.com/hashicorp/consul/api" "github.com/xmidt-org/web...
package operator import ( "context" "errors" "fmt" "os" "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/google/go-jsonnet" "github.com/grafana/agent/pkg/operator/assets" "github.com/grafana/agent/pkg/operator/clientutil" "github.com/grafana/agent/pkg/operator/config" apps_v1 "k8s.io/api/a...
// Copyright 2019 The Kanister 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 2015-2019 Bleemeo // // bleemeo.com an infrastructure monitoring solution in the Cloud // // 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...
// Copyright 2021 The Periph Authors. 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. package sgp30 import ( "context" "encoding/binary" "errors" "log" "strconv" "sync" "time" "periph.io/x/conn/v3" "periph.io/x/conn/...
package packager import ( "archive/tar" "fmt" "io" "io/ioutil" "os" "os/exec" "path/filepath" "strings" "github.com/docker/app/internal" "github.com/pkg/errors" ) // ExtractedApp represents a potentially extracted application package type ExtractedApp struct { OriginalAppName string AppName strin...
package execwatcher import ( "context" "fmt" "os" "os/exec" "sync" "time" "github.com/google/shlex" "github.com/choria-io/go-choria/aagent/util" "github.com/choria-io/go-choria/aagent/watchers/event" "github.com/choria-io/go-choria/aagent/watchers/watcher" iu "github.com/choria-io/go-choria/internal/util"...
package nosql import ( "context" "encoding/json" "sync" "time" "github.com/pkg/errors" "github.com/smallstep/certificates/acme" "github.com/smallstep/nosql" ) // Mutex for locking ordersByAccount index operations. var ordersByAccountMux sync.Mutex type dbOrder struct { ID string `js...
// Copyright 2012-2018 the u-root Authors. All rights reserved // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // bzImage is used to modify bzImage files. // It reads the image in, applies an operator, and writes a new one out. // // Synopsis: // bzImage [cop...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package iot import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" ) // The input to the RegisterCertificate operation. type RegisterCertificateInpu...
/* * Copyright (c) 2017, Vipshop, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions ...
// Copyright 2021 Allstar 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 wr...
package berf import ( "context" "io" "os" "os/signal" "sync" "sync/atomic" "syscall" "time" "github.com/bingoohuang/gg/pkg/osx" "github.com/bingoohuang/gg/pkg/ss" "github.com/bingoohuang/gg/pkg/thinktime" ) type Requester struct { goroutines int n int verbose int duration time.Duration ...
package sql // The grammar for SQLite is used mostly without any additions. A // number of unused productions will be removed, however. //go:generate antlr -Dlanguage=Go -Werror -Xexact-output-dir -long-messages -o parser SQLiteLexer.g4 SQLiteParser.g4 import ( "fmt" "strconv" "strings" "github.com/antlr/antlr4/...
package v3 import ( "bytes" "context" "errors" "log" "net" "sync" "github.com/itzmeanjan/tseep/op" "github.com/xtaci/gaio" pool "gopkg.in/thejerf/gomempool.v1" ) type Server struct { Addr string Listener net.Listener WatcherCount uint Watchers map[uint]*watcher KV map[op.Key]o...
// 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...
package cliaws import ( "context" "fmt" "github.com/alexflint/go-arg" "github.com/aws/aws-sdk-go/service/ec2" "github.com/nathants/cli-aws/lib" "math/rand" "strings" ) func init() { lib.Commands["ec2-new"] = ec2New lib.Args["ec2-new"] = ec2NewArgs{} } type ec2NewArgs struct { Name string `arg:"...
package cmd import ( "encoding/json" "fmt" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/tidwall/gjson" "io/ioutil" "os" "path/filepath" "strings" ) type componentDef struct { Path string `json:"path"` } func (c *Clusters) addItem(item Cluster) Clusters { c.Cluster = append(c.Cluster, i...
package pool import ( "errors" "fmt" "net" "sync" "time" ) // CloseConnReason describes why does the pool close a connection type CloseConnReason string const ( ConnUnusable CloseConnReason = "unusable" ConnTimeout CloseConnReason = "timeoutToGet" PoolFull CloseConnReason = "poolFull" PoolClosed Clos...
package vector import ( "testing" "github.com/stretchr/testify/assert" "github.com/Fantom-foundation/lachesis-base/hash" "github.com/Fantom-foundation/lachesis-base/inter/dag" "github.com/Fantom-foundation/lachesis-base/inter/dag/tdag" "github.com/Fantom-foundation/lachesis-base/inter/pos" "github.com/Fantom-...
package toxlsx import ( "github.com/360EntSecGroup-Skylar/excelize" "fmt" "io" ) type Title struct { Name string SubTitles []string } func NewTitle(title string) Title { return Title{Name: title} } func NewTitleWithSubTitles(title string, subTitles []string) Title { return Title{ Name: title, SubTitles: ...
package MitchDefinedTypes import ( "fmt" "github.com/bhbosman/CodeGenerators/mitchgenerator/interfaces" ) type mitchTypeInformation struct { mitchByte *MitchByte mitchDate *MitchDate mitchTime *MitchTime mitchPrice04 *MitchPrice04 mitchPrice08 *MitchPrice08 mitchUInt08 *MitchUInt08 mitchUInt16 *Mi...
package deromerchant import ( "bytes" "encoding/hex" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "strings" "time" ) // Client is a struct that holds all the information needed to perform a request to the DERO Merchant REST API. // Client also has methods that make use of such information to ...
// Package api contains an API client and types for cross-service communication. package api import ( "fmt" "time" "github.com/sourcegraph/go-lsp/lspext" xlang_lspext "github.com/sourcegraph/sourcegraph/xlang/lspext" ) // RepoID is the unique identifier for a repository. type RepoID int32 // RepoName is the nam...
package util import ( "bytes" "crypto/aes" "crypto/cipher" "encoding/base64" "encoding/json" "fmt" "github.com/pkg/errors" "math/big" "strings" ) const ( modulus = "00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280104e0312ecbda92557c9387...
package cli import ( "encoding/json" "fmt" "sort" "time" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" tmjson "github.com/tendermint/tendermint/libs/json" tmtypes "github.com/tendermint/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-...
package gitnotify import ( "errors" "fmt" "html/template" "net/http" "os" "sort" "github.com/gorilla/mux" "github.com/markbates/goth" "github.com/markbates/goth/gothic" "github.com/markbates/goth/providers/github" "github.com/markbates/goth/providers/gitlab" "github.com/sairam/kinli" ) // Authentication ...
package utils import ( "fmt" "mime" "net/mail" "net/smtp" "time" log "github.com/Sirupsen/logrus" "twreporter.org/go-api/models" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ses" ) // EmailStrategy define...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: records/redis.proto package records 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 ...
// The ncrpc package layers client-server and server-client // RPC interfaces on top of netchan. package ncrpc import ( "code.google.com/p/rog-go/ncnet" "errors" "fmt" "io" "log" "net" "net/rpc" "netchan" "sync" ) type Server struct { Exporter *netchan.Exporter RPCServer *rpc.Server mu sync.Mutex ...
package pixiv import ( "crypto/md5" "encoding/hex" "fmt" "io" "time" "github.com/dghubble/sling" ) const ( clientID = "MOBrBDS8blbauoSck0ZfDbtuzpyT" clientSecret = "<KEY>" clientHashSecret = "<KEY>" authHosts = "https://oauth.secure.pixiv.net/" ) //BasePixiv struct type BasePixiv struct...
package relations import ( "bytes" "errors" "fmt" "net/http" "net/http/httptest" "testing" "github.com/gorilla/mux" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) type test struct { name string req *http.Request cypherDriverMock *cypherDriverMock statu...
package uuid import ( "crypto/md5" "crypto/rand" "crypto/sha1" "encoding/binary" "encoding/hex" "errors" "fmt" "hash" "net" "regexp" "sync" "time" ) const ( // Difference in 100-nanosecond intervals between UUID epoch (October 15, 1582) and Unix epoch (January 1, 1970). epoch = 122192928000000000 Vari...
/* Copyright 2018 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, softwar...
/* Licensed to Elodina Inc. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance ...
package eval import ( "context" "fmt" "io" "os" "os/exec" "os/signal" "strings" "syscall" "github.com/jmoiron/sqlx" "github.com/pkg/errors" "github.com/elpinal/coco3/ast" "github.com/elpinal/coco3/token" ) func New(in io.Reader, out, err io.Writer, db *sqlx.DB) *Evaluator { return &Evaluator{ in: ...
package engine import ( "log" "sync" ) // ActivePhrase is a currently active MIDI phrase type ActivePhrase struct { phrase *Phrase clickSoFar Clicks nextnote *Note pendingNoteOffs *Phrase } // ActivePhrasesManager manages ActivePhrases type ActivePhrasesManager struct { ActivePhrasesMutex...
// Copyright 2016 Google 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...
package printer import ( "encoding/json" "errors" "fmt" "io" "io/ioutil" "os" "strings" "time" "github.com/briandowns/spinner" "github.com/fatih/color" "github.com/gocarina/gocsv" "github.com/lensesio/tableprinter" "github.com/mattn/go-isatty" ) var IsTTY = isatty.IsTerminal(os.Stdout.Fd()) || isatty.Is...
// Copyright (c) DataStax, 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 sdl /* #include "sdl_wrapper.h" #if (SDL_VERSION_ATLEAST(2,0,6)) #if defined(_WIN32) #include <SDL2/SDL_vulkan.h> #else #include <SDL_vulkan.h> #endif #else //!SDL_VERSION_ATLEAST(2,0,6) #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; #if defined(__LP64__) || defined(_WIN64) || defined(...
package mount_field import ( "bytes" "errors" "go/ast" "go/format" "go/parser" "go/token" "io/ioutil" "path" "strconv" "strings" "golang.org/x/tools/imports" ) type structMounter struct { fileSet *token.FileSet astFile *ast.File data []byte structPath string structName string object ...
package command import ( "fmt" "strings" "github.com/hashicorp/terraform/backend" "github.com/hashicorp/terraform/command/arguments" "github.com/hashicorp/terraform/command/views" "github.com/hashicorp/terraform/tfdiags" ) // RefreshCommand is a cli.Command implementation that refreshes the state // file. type...
package logs import "math" type FieldType uint8 const ( FieldTypeUnknown FieldType = iota FieldTypeAny FieldTypeString FieldTypeByte FieldTypeBool FieldTypeInt FieldTypeUint FieldTypeFloat64 FieldTypeFloat32 ) type Field struct { Key string Type FieldType Int int64 String string Value interfa...
package nightfall import ( "bytes" "context" "io" "net/http" "strconv" "sync" "time" "github.com/google/uuid" ) // ScanPolicy contains configuration that describes how to scan a file. Since the file is scanned asynchronously, // the results from the scan are delivered to the provided webhook URL. The scan co...
package main import ( "encoding/json" "net" "net/http" "time" "github.com/dgrijalva/jwt-go" router "github.com/gorilla/mux" "github.com/journeymidnight/yig/api" "github.com/journeymidnight/yig/helper" "github.com/journeymidnight/yig/iam" "github.com/journeymidnight/yig/iam/common" "github.com/journeymidnig...
// Package encrypted provides a simple, secure system for encrypting data // symmetrically with a passphrase. // // It uses scrypt derive a key from the passphrase and the NaCl secret box // cipher for authenticated encryption. package encrypted import ( "crypto/rand" "encoding/json" "errors" "fmt" "io" "golang...
package main import ( "math/rand" "github.com/misterikkit/automata/horizon" ) func Controller(rows int, moveToNext func(), done func()) horizon.Script { return func(self horizon.Object, e horizon.Event) { head := self.Wires()["head"] switch e.Name { case "worldStart": self.Send(self, "computeEWBegin", ni...
package holidays func init() { registerHolidayDataSource("de", holidaysDENational{}) registerHolidayDataSource("de-bb", holidaysDEBB{}) registerHolidayDataSource("de-be", holidaysDEBE{}) registerHolidayDataSource("de-bw", holidaysDEBW{}) registerHolidayDataSource("de-by", holidaysDEBY{}) registerHolidayDataSourc...
package lib import ( "errors" "path/filepath" "strings" "os" "fmt" "github.com/saturn4er/go-parse-types" "gopkg.in/ini.v1" ) var ControllerTypeName = "Controller" var ControllerPkgName = "gone" var ControllerPkgPath = "github.com/go-one/gone" type ApplicationConfig struct { BuildPath string Contr...
package actionlint import ( "fmt" "net/url" "strconv" "strings" ) // RuleAction is a rule to check running action in steps of jobs. // https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses type RuleAction struct { RuleBase cache *LocalActionsCache } // NewRuleActio...
package main import ( "bufio" "fmt" "io/ioutil" "math/rand" "os" "strconv" "strings" "time" ) // getState will get the game state safe for concurrency func getState() State { Mutex.RLock() state := GameState Mutex.RUnlock() return state } // setState will set the game state safe for concurrency func setS...
/* Copyright The Finder2D 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, software di...
package demodcore import ( "github.com/racerxdl/segdsp/dsp" "github.com/racerxdl/segdsp/eventmanager" "log" "math" ) type FMDemod struct { sampleRate float64 outputRate uint32 firstStage *dsp.FirFilter secondStage *dsp.FloatFirFilter signalBw float64 deviation float32 quadDe...
// Code generated by go-swagger; DO NOT EDIT. package week // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-...
package models import ( "github.com/astaxie/beego/orm" "strconv" "strings" "time" "tokensky_bg_admin/conf" ) // OtcEntrustOrderQueryParam 用于查询的类 type OtcEntrustOrderQueryParam struct { BaseQueryParam Phone string `json:"phone"` //手机号 模糊查询 //发布时间 StartTime int64 `json:"startTime"` //开始时间 EndTime int64 `j...
/* Copyright 2019 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...