text
stringlengths
3.08k
10.4k
package comby import ( "bufio" "bytes" "context" "encoding/json" "fmt" "io" "io/ioutil" "os/exec" "strconv" "strings" "syscall" "github.com/pkg/errors" "github.com/inconshreveable/log15" ) const combyPath = "comby" func exists() bool { _, err := exec.LookPath(combyPath) return err == nil } func raw...
package operations import ( "errors" "fmt" "github.com/golang/protobuf/proto" "github.com/jdextraze/go-gesclient/client" "github.com/jdextraze/go-gesclient/messages" "github.com/jdextraze/go-gesclient/tasks" "github.com/satori/go.uuid" "net" "reflect" "sync/atomic" ) type CreateRequestDtoHandler func() prot...
package examples /** * This sample demonstrates how to multipart upload an object concurrently by copy mode * to OBS using the OBS SDK for Go. */ import ( "fmt" "math/rand" "obs" "os" "path/filepath" "time" ) type ConcurrentCopyPartSample struct { bucketName string objectKey string loca...
// Copyright 2020 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package lib import ( "bytes" "context" "crypto/tls" "encoding/json" "errors" "fmt" "io" "io/ioutil" "math/rand" "net/http" "net/url" "os" "strings" "time" "golang.org/x/time/rate" ) const ( // Version of this library Version = "2.0.2" // APIVersion of Vultr APIVersion = "v1" // DefaultEndpoint ...
/* Copyright 2018 Heptio Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
// sms_service_DynamicCreativeService.go package v4 //动态创意片段服务 import () const ( GET_DynCreative = "getDynCreative" GET_ExclusionTypeByCampaignId = "getExclusionTypeByCampaignId" ADD_DynCreative = "addDynCreative" DELETE_DynCreative = "deleteDynCreative" UPDATE_DynCreative ...
// Copyright (c) 2018-2020, Sylabs Inc. All rights reserved. // This software is licensed under a 3-clause BSD license. Please consult the // LICENSE.md file distributed with the sources of this project regarding your // rights to use or distribute this software. package net import ( "bytes" "context" "crypto/sha2...
// Copyright (c) 2018 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distri...
// +build ledger test_ledger_mock package keys import ( "fmt" "testing" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-...
/* Copyright © 2021 <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, software...
// Copyright © 2020 AMIS Technologies // // 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 main import ( . "github.com/mmcloughlin/avo/build" . "github.com/mmcloughlin/avo/operand" . "github.com/mmcloughlin/avo/reg" . "github.com/zeebo/blake3/avo" ) func HashF(c Ctx) { TEXT("HashF", 0, `func( input *[8192]byte, length uint64, counter uint64, flags uint32, key *[8]uint32, out *[32]u...
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package pod import ( "fmt" "math/rand" "github.com/miekg/dns" "github.com/openshift/origin/pkg/diagnostics/types" "k8s.io/apimachinery/pkg/util/sets" ) const ( PodCheckDnsName = "PodCheckDns" txtDP2016 = ` Query to nameserver %s for random subdomain of %s returned an answer, indicating that this domain ...
// Copyright 2014, <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package cwrap import ( "io" "io/ioutil" "log" "os" "path" "path/filepath" "regexp" "runtime" gcc "h12.io/go-gccxml" ) var ( GOPATHs = filepath.SplitList...
package main import ( "bytes" "fmt" "github.com/jawher/mow.cli" "github.com/kr/pretty" "io" "os" ) func main() { os.Exit(realMain()) } func realMain() (exitCode int) { app := cli.App("fuction-demo", "demo for function type") // ---------------------------------------------------------------------------------...
package parsecli import ( "bytes" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net/http" "os" "path/filepath" "runtime" "strings" "testing" "github.com/facebookgo/clock" "github.com/facebookgo/ensure" "github.com/facebookgo/parse" "github.com/facebookgo/testname" ) const ( Version = "3.3....
// Copyright (C) 2021 <NAME>, Inc. // See LICENSE for copying information. package main import ( "flag" "fmt" "io" "net" "os" "syscall" "time" "github.com/go-logr/zapr" "go.uber.org/zap" "go.uber.org/zap/zapcore" "storj.io/utp-go/libutp" "storj.io/utp-go/libutp/utp_file" ) var ( logger *zap.Logger d...
package graphite import ( "bufio" "fmt" "log" "math" "net" "os" "strings" "sync" "time" "github.com/influxdb/influxdb/cluster" "github.com/influxdb/influxdb/meta" "github.com/influxdb/influxdb/tsdb" ) const ( udpBufferSize = 65536 leaderWaitTimeout = 30 * time.Second ) type Service struct { bindA...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
// Copyright 2018 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 text import ( "bytes" "strconv" "strings" "unicode" "unicode/utf16" "unicode/utf8" "github.com/yuansudong/protoc-gen-go/gpb/internal/strs" ) /...
package types import ( "errors" "fmt" "strings" "time" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // CDP is the state of a single collateralized debt position. type CDP struct { ID uint64 `json:"id" yaml:"id"` ...
package auth0 import ( "errors" "net/http" "regexp" "strings" "time" "github.com/apibillme/cache" "github.com/lestrrat-go/jwx/jws" "github.com/lestrrat-go/jwx/jwk" "github.com/spf13/cast" "github.com/valyala/fasthttp" "github.com/lestrrat-go/jwx/jwt" "github.com/tidwall/gjson" ) // reference vars her...
/* * Copyright 2019 the go-netty 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
/* * Copyright 2017 Workiva * 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, s...
package zb import ( "errors" "log" "sync" "github.com/thrasher-/gocryptotrader/common" "github.com/thrasher-/gocryptotrader/currency/pair" "github.com/thrasher-/gocryptotrader/decimal" "github.com/thrasher-/gocryptotrader/exchanges" "github.com/thrasher-/gocryptotrader/exchanges/orderbook" "github.com/thrash...
// 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 jaeger import ( "context" "sync" "time" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "go.opentelemetry.io/otel" corev1 "k8s.io/api/apps/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/util/wait" "sigs.k8s.io/controller-runtime/pkg/client" v1 "github.com/jaeg...
package main import ( "flag" "fmt" "io/ioutil" "os" "strings" "github.com/couchbase/cbauth" c "github.com/couchbase/indexing/secondary/common" "github.com/couchbase/indexing/secondary/dataport" "github.com/couchbase/indexing/secondary/logging" "github.com/couchbase/indexing/secondary/platform" "github.com/...
package calcium import ( "context" "math/rand" "os/signal" "syscall" "time" "github.com/pkg/errors" "github.com/projecteru2/core/log" coretypes "github.com/projecteru2/core/types" "github.com/projecteru2/core/utils" ) // ActiveKey . const ActiveKey = "/selfmon/active" // NodeStatusWatcher monitors the cha...
// Copyright 2018 The ksonnet 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 applica...
// Copyright 2014 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 java // import "golang.org/x/mobile/bind/java" //#cgo LDFLAGS: -llog //#include <android/log.h> //#include <jni.h> //#include <stdint.h> //#include <st...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package ad import ( "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Manages an Application within Azure Active Directory. // // > **NOTE:** The Az...
package dashboard import ( "errors" "fmt" "github.com/broar/chipmusic-cli/pkg/chipmusic" "github.com/gdamore/tcell/v2" "strings" "time" ) const ( TrackControlPlay = "play" TrackControlPause = "pause" TrackControlStop = "stop" TrackControlLoop = "loop" TrackControlSkip = "skip" currentlyPlayingID = "c...
package pquerier import ( "fmt" "strings" "github.com/pkg/errors" "github.com/v3io/v3io-tsdb/pkg/utils" "github.com/xwb1989/sqlparser" ) const emptyTableName = "dual" // ParseQuery Parses an sql query into `tsdb.selectParams` // Currently supported syntax: // select - selecting multiple metrics, aggregations, ...
package bf import ( "bytes" "github.com/nelhage/gojit/amd64" "io" "reflect" "runtime" "testing" ) var helloWorld = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." // http://esolangs.org/wiki/Dbfi var dbfi = ` >>>+[[-]>>[-]++>+>+++++++[<++++>>++<-]++>...
//go:build darwin // +build darwin /* Copyright (c) 2019 Snowflake 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...
package net import ( "github.com/gorilla/websocket" "go.uber.org/zap" "slgserver/log" "slgserver/server/slgserver/conn" "slgserver/server/slgserver/pos" "sync" ) var ConnMgr = Mgr{} var cid int64 = 0 type Mgr struct { cm sync.RWMutex um sync.RWMutex rm sync.RWMutex connCache map[int64]...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _ = ...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-2020 Datadog, Inc. // +build windows package listeners import ( "fmt" "net" "strings" "tes...
// Code generated by smithy-go-codegen DO NOT EDIT. package types type AccessControlRuleEffect string // Enum values for AccessControlRuleEffect const ( AccessControlRuleEffectAllow AccessControlRuleEffect = "ALLOW" AccessControlRuleEffectDeny AccessControlRuleEffect = "DENY" ) // Values returns all known values...
/* Copyright 2016 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...
package audit import ( "encoding/json" "fmt" "io/ioutil" "net/http" "strconv" "strings" "time" "hypercloud-webhook/util" _ "github.com/go-sql-driver/mysql" "github.com/google/uuid" types "k8s.io/apimachinery/pkg/types" "k8s.io/apiserver/pkg/apis/audit" "k8s.io/klog" ) type urlParam struct { Namespace ...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package ecr import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // The ECR Repository data source allows the ARN, Repos...
package controllers import ( "errors" mocksmodels "github.com/oleksandr-chornovol/lets-go-chat/mocks/app/models" mockscache "github.com/oleksandr-chornovol/lets-go-chat/mocks/cache" "github.com/stretchr/testify/assert" "net/http" "net/http/httptest" "testing" "time" "github.com/oleksandr-chornovol/lets-go-ch...
package chat import ( "crypto/rand" "errors" "io" "github.com/keybase/client/go/chat/signencrypt" "github.com/keybase/client/go/libkb" "github.com/keybase/go-crypto/ed25519" ) type Encrypter interface { // EncryptedLen returns the number of bytes that the ciphertext of // size plaintext bytes will be. Encry...
package middleware import ( "bytes" "fmt" "github.com/mholt/binding" "github.com/thoas/picfit/payload" "net/http" "net/url" "regexp" "strings" "github.com/gin-gonic/gin" "github.com/thoas/picfit/constants" "github.com/thoas/picfit/engine" "github.com/thoas/picfit/hash" "github.com/thoas/picfit/image" "...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package main import ( "context" "errors" "fmt" "log" "net/url" "os" "strconv" "strings" "time" "github.com/google/go-github/github" "github.com/k0kubun/pp" "github.com/shomali11/slacker" "golang.org/x/oauth2" ) const retryTimeout = time.Second * 30 var ( Info *log.Logger Error *log.Logger // TODO:...
package main import ( txt_tmpl "text/template" log "github.com/cihub/seelog" "encoding/json" "errors" "html/template" "net/http" "time" "git.gitorious.org/trantor/trantor.git/database" ) type Status struct { BaseURL string FullURL string Search string User string IsAdmin bool Notif []Noti...
package cli import ( "context" "fmt" "math" "sort" "strconv" "time" "github.com/spf13/cobra" "github.com/textileio/textile/v2/api/billingd/pb" hub "github.com/textileio/textile/v2/api/hubd/client" users "github.com/textileio/textile/v2/api/usersd/client" "github.com/textileio/textile/v2/cmd" "github.com/t...
// Code generated by protoc-gen-go. // source: ribproto/openconfig/openconfig.proto // DO NOT EDIT! /* Package openconfig is a generated protocol buffer package. It is generated from these files: ribproto/openconfig/openconfig.proto It has these top-level messages: Device */ package openconfig import proto "githu...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package multichannel import ( cb "github.com/hyperledger/fabric-protos-go/common" "github.com/hyperledger/fabric/bccsp" "github.com/hyperledger/fabric/common/channelconfig" "github.com/hyperledger/fabric/common/ledger/blockledger"...
package converter import ( "encoding/json" "fmt" "io" "io/ioutil" v1 "github.com/K-Phoen/dark/api/v1" grabana "github.com/K-Phoen/grabana/decoder" "github.com/K-Phoen/sdk" "go.uber.org/zap" "gopkg.in/yaml.v3" ) type k8sDashboard struct { APIVersion string `yaml:"apiVersion"` Kind string Metadata ...
package nullitics import ( "errors" "strconv" "strings" "time" ) // Stats is an aggregated data from the various site-related statistics over a // given time period. type Stats struct { Start time.Time Interval time.Duration URIs Frame Sessions Frame Refs Frame Countries Frame Devices Fra...
package mba import ( "math" "testing" ) func TestMba2Trivial(t *testing.T) { m, err := NewMba2([]float64{0, 0}, []float64{10, 10}, []int64{3, 3}, []float64{5, 6}, []float64{7, 8}, []float64{3, 4}, nil) if err != nil { t.Error(err) } defer m.Free() // fmt.Println(m.String()) } func TestMba2KnownValu...
// Copyright 2020-Present VMware, Inc. // SPDX-License-Identifier: Apache-2.0 package image import ( "io" "sort" "strings" "github.com/google/go-containerregistry/pkg/authn" "github.com/google/go-containerregistry/pkg/name" "github.com/pivotal/kpack/pkg/apis/build/v1alpha2" corev1alpha1 "github.com/pivotal/kp...
// 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 ...
/* 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) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package web import ( "fmt" "os" "testing" "github.com/mattermost/mattermost-server/api" "github.com/mattermost/mattermost-server/api4" "github.com/mattermost/mattermost-server/app" "github.com/matte...
package main import ( "context" "fmt" "io" "io/fs" "mime" "os" "path/filepath" "strings" "time" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3/types" ) type Api struct { c *s3.Client } func mai...
package main import ( "github.com/veandco/go-sdl2/sdl" mix "github.com/veandco/go-sdl2/sdl_mixer" ttf "github.com/veandco/go-sdl2/sdl_ttf" ) const SIZE = 128 // Text State text structure type TextEntity struct { Value *string Rect sdl.Rect Texture *sdl.Texture } // stateText States text var stateText = m...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-present Datadog, Inc. //go:build kubeapiserver // +build kubeapiserver package orchestrator i...
/** * Copyright 2019 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...
//---------------------------------------- // 代码由GenlibVcl工具自动生成。 // Copyright © ying32. All Rights Reserved. // //---------------------------------------- package vcl import ( . "github.com/ying32/govcl/vcl/api" . "github.com/ying32/govcl/vcl/types" "unsafe" ) type TComboExItem struct { IObject ...
package main import ( "flag" "os" "strconv" log "github.com/Sirupsen/logrus" ) // codebeat:disable[TOO_MANY_IVARS] type pdnsConfig struct { device string pcapFile string bpf string sensorName string debug bool cpuprofile string quiet bool gcAge string gcInterval string numprocs ...
/* * umoci: Umoci Modifies Open Containers' Images * Copyright (C) 2016-2019 SUSE 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....
package ui import ( "github.com/koho/frpmgr/pkg/config" "github.com/koho/frpmgr/pkg/consts" "github.com/koho/frpmgr/services" "github.com/lxn/walk" . "github.com/lxn/walk/declarative" "os" "path/filepath" ) var stateDescription = map[consts.ServiceState]string{ consts.StateUnknown: "未知", consts.StateStarted...
package services import ( "errors" "github.com/miguelbemartin/vat/models" ) // RatesService handle the rates of vat for the given country code. type RatesService struct{} // NewRatesService creates a new handler for this service. func NewRatesService() *RatesService { return &RatesService{} } // Get will return...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package cloudwatch import ( "context" "fmt" "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" "github.com/aws/aws-sdk-go-v2/private/protocol/query" ) type PutMe...
/** * Copyright 2021 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...
// Code generated by go-swagger; DO NOT EDIT. package system // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "time" "golang.org/x/net/context" "github.com/go-openapi/errors" "github.com/go-openapi/runtime"...
// Copyright 2019 spaGO 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 attention import ( mat "github.com/nlpodyssey/spago/pkg/mat32" "github.com/nlpodyssey/spago/pkg/ml/ag" "sync" ) // QKV groups queries, keys and valu...
/* Copyright 2019 The Vitess 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 message import ( "math/rand" "sort" "sync" "time" "github.com/target/goalert/notification" ) // cmCooldown is the amount of time (minimum) between messages to a particular contact method. const cmCooldown = time.Minute var typePriority = map[Type]int{ TypeVerificationMessage: 1, TypeTestNotification:...
// Copyright 2017 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 applicabl...
// Copyright 2019-present Facebook Inc. All rights reserved. // This source code is licensed under the Apache 2.0 license found // in the LICENSE file in the root directory of this source tree. // Code generated by ent, DO NOT EDIT. package ent import ( "fmt" "strings" "entgo.io/ent/dialect/sql" "entgo.io/ent/e...
package bencode import ( "io" "io/ioutil" ) // A Decoder reads and decodes B values from an input stream. type Decoder struct { r io.Reader buf []byte bufLen int pos int } // Decode decodes B values from an input []byte. func Decode(body []byte) (B, error) { return (&Decoder{ r: nil, //buf: app...
package spider import ( "errors" "regexp" "time" "github.com/jormin/gofetcher/pkg/fetcher" "github.com/jormin/gohelper" ) // 引擎 type Engine struct { // 采集器配置 FetcherCfg FetcherConfig // 解析结果 parseResults chan *ParseResult // 采集器客户端 fetcherClients chan *fetcher.Client // 采集任务 fetchJobs chan *FetchJob //...
// 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...
// Instance of the server. // Copyright © 2015 - <NAME> package server import ( "encoding/json" "log" "math/rand" "net/http" "os" "time" "github.com/boltdb/bolt" "github.com/gorilla/mux" ) const ( LAST_UPLOADED_KEY = "LastUploaded" ) type Server struct { Config Config // Configuration Database *bolt...
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
/* Copyright © 2021 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 or agreed to in writi...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package apigateway 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 POST request to create a usage plan key for adding an existing AP...
// Copyright (c) 2018 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distri...
/** * Copyright 2018 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 required by applicable la...
package server import ( "context" "encoding/json" "errors" "fmt" "io" "net" "time" "crypto/ecdsa" "github.com/it-chain/bifrost" "github.com/it-chain/bifrost/pb" "github.com/it-chain/engine/common/logger" "google.golang.org/grpc" "google.golang.org/grpc/metadata" "google.golang.org/grpc/reflection" ) ...
package main import ( "fmt" "math" "regexp" dto "github.com/prometheus/client_model/go" "github.com/stripe/veneur/v14/sources/openmetrics" ) var ( decodeError = newStatsdCount("veneur.prometheus.decode_errors_total", nil, 1) unknownPrometheusTypeID = statID{"veneur.prometheus.unknown_metric_type_total", nil}...
package proc import ( "github.com/wgroeneveld/gogb/util" "reflect" "strings" ) type register struct { A, B, C, D, E, H, L, F int SP, PC, I, R int } type Z80 struct { Clock, Cycles int Halted bool Reg register } var alu = ALU{} func (cpu *Z80) Nop() int { return 1 } func (cpu *Z80) Halt() int { cpu.Hal...
/* Copyright © 2020 Dell Inc. or its subsidiaries. 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 ...
/***************** Contains the main method of Parking Lot Application *****************/ package main import ( "log" "flag" "os" "fmt" "bufio" "strings" "strconv" parklots "github.com/crizzs/parkinglot/src" ) func main(){ //Parse the flag for either file input or cli inputs flag.Parse() /********* There ...
// // Author:: <NAME> (<<EMAIL>>) // Copyright:: Copyright 2021, Lacework Inc. // License:: Apache License, Version 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://ww...
/* Copyright 2018 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, ...
// argparser Project // Copyright (C) 2021 ALiwoto // This file is subject to the terms and conditions defined in // file 'LICENSE', which is part of the source code. package argparser import ( "errors" "strings" ws "github.com/ALiwoto/StrongStringGo/strongStringGo" ) // Flag is the options passed along with the...
// model file - contains the business logic for calculation of the stock package model import ( "fmt" "log" "time" "github.com/achhapolia10/inventory-manager/opdatabase" ) //Stock struct for the stock data type Stock struct { OBox int `json:"obox"` OPacket int `json:"opack...
package cron import ( "context" "encoding/json" "errors" "fmt" "net/http" "os" "os/signal" "runtime/debug" "sync" "syscall" "time" "github.com/go-kiss/sniper/pkg" "github.com/go-kiss/sniper/pkg/conf" "github.com/go-kiss/sniper/pkg/log" "github.com/go-kiss/sniper/pkg/trace" "github.com/opentracing/open...
package metadata import ( "time" "github.com/romberli/go-util/common" "github.com/romberli/go-util/constant" "github.com/romberli/das/internal/dependency/metadata" ) var _ metadata.MonitorSystem = (*MonitorSystemInfo)(nil) type MonitorSystemInfo struct { metadata.MonitorSystemRepo ID in...
package keeper_test import ( "testing" "time" "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/x/auction/types" ) func SetGetDeleteAuction(t *testing.T) { // setup keeper, create auction tApp :...