text
stringlengths
3.08k
10.4k
package compiler import ( "net/url" "os" "path/filepath" "strings" "github.com/cncd/pipeline/pipeline/frontend" ) // Option configures a compiler option. type Option func(*Compiler) // WithOption configures the compiler with the given option if // boolean b evaluates to true. func WithOption(option Option, b b...
package main import ( "encoding/json" "fmt" "io/ioutil" "log" "net/http" "os" "strconv" "strings" ) type locationAction struct { LocationID string UserID string } type fileAction struct { FileName string } type IFileReader interface { ReadFile(filename string) ([]byte, error) } type FileReader stru...
package main import ( "bufio" "flag" "fmt" "log" "os" "runtime/pprof" "sort" "strconv" "strings" ) type Verbs struct { Verbs []string } type AggregatedValues struct { Values Float32Slice Counts map[string]int Accum float32 } type PercentileValues struct { Percentiles map[int]float32 Count int ...
// 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/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _ = context.Background() _ = fmt...
// 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 app import ( "bytes" "context" "encoding/xml" "fmt" "net/http" "reflect" "strconv" "strings" "time" "github.com/solution9th/S3Adapter/internal/gerror" "github.com/solution9th/S3Adapter/internal/sign" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/haozibi/zlog" ) // mimeType represents vario...
package model_service import ( "fmt" "gfast/app/model/admin/model_fields" "gfast/app/model/admin/model_info" "github.com/gogf/gf/errors/gerror" "github.com/gogf/gf/frame/g" "github.com/gogf/gf/text/gstr" "github.com/gogf/gf/util/gconv" ) // 添加 func AddFieldsSave(req *model_fields.AddReq) error { return model_...
//go:build debug // +build debug /* * Copyright 2018-2021, CS Systemes d'Information, http://csgroup.eu * * 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/l...
package compression import ( "bytes" "compress/bzip2" "compress/flate" "compress/gzip" "compress/lzw" "compress/zlib" "errors" "github.com/ulikunitz/xz" "github.com/ulikunitz/xz/lzma" "io" "io/ioutil" "os" "path/filepath" ) const ( bz2Ext = ".bz2" tbz2Ext = ".tbz2" gzExt = ".gz" tgzExt = ".tg...
package nsqd import ( "bytes" "encoding/binary" "fmt" "hash" "hash/fnv" "io" "math/rand" "time" ) const ( MsgIDLength = 16 minV1ValidMsgLength = MsgIDLength + 8 + 2 // Timestamp + Attempts minV2ValidMsgLength = MsgIDLength + 8 + 2 + 1 + 4 // Timestamp + Attempts+ver+routinghash ) const ( M...
package main import ( "context" "fmt" "os" "strconv" "github.com/open-policy-agent/opa/ast" "github.com/open-policy-agent/opa/rego" "github.com/spf13/cobra" "github.com/pkg/errors" "github.com/infracost/infracost/internal/config" "github.com/infracost/infracost/internal/output" "github.com/infracost/infr...
//+build examples package main import ( "image" "log" "github.com/go-gl/mathgl/mgl32" "github.com/lakal3/vge/vge/forward" "github.com/lakal3/vge/vge/materials/env" "github.com/lakal3/vge/vge/materials/shadow" "github.com/lakal3/vge/vge/vapp" "github.com/lakal3/vge/vge/vasset" "github.com/lakal3/vge/vge/vsce...
/* Copyright 2018 Mirantis 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 distri...
// Copyright (c) 2022 BitMaelum Authors // // 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, publ...
package singlylinkedlist import "fmt" type SinglyLinkedList struct { head *Node tail *Node length int } func NewSinglyLinkedList() *SinglyLinkedList { return new(SinglyLinkedList) } // Insert new value to linkedlist // Return inserted Node // O(1) time, O(1) space func (list *SinglyLinkedList) Append(value ...
package v1alpha1 import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/clientcmd/api" ) // RuleActionType is a type for actions that are supported in a stork rule type RuleActionType string const ( // RuleActionCommand is a command action RuleActionCommand RuleActionType = "command" // Cl...
package cyclopes import ( "context" "strings" "github.com/chromedp/chromedp" "github.com/fatih/color" "github.com/google/uuid" "github.com/konsalex/cyclopes/cmd/cyclopes/adapters" "github.com/spf13/viper" "github.com/pterm/pterm" "github.com/schollz/progressbar/v3" ) // DEVICE The screenshot type type DEVI...
package utils import ( "encoding/hex" "fmt" "regexp" "strconv" "strings" asdbv1beta1 "github.com/aerospike/aerospike-kubernetes-operator/api/v1beta1" "golang.org/x/crypto/ripemd160" corev1 "k8s.io/api/core/v1" ) const ( DockerHubImagePrefix = "docker.io/" // ReasonImagePullBackOff when pod status is Pendi...
// Copyright 2020 The LUCI 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...
package ami import ( "bufio" "context" "fmt" "net" "regexp" "sync/atomic" "time" "github.com/hashicorp/go-multierror" "github.com/pkg/errors" "github.com/wenerme/astgo/ami/amimodels" "go.uber.org/zap" "golang.org/x/sync/errgroup" ) // CustomDialer can be used to specify any dialer, not necessarily // a *...
package main import ( "crypto/tls" "log" "net/http" "os" "path" "strings" "github.com/spf13/viper" gitlab "github.com/xanzy/go-gitlab" "github.com/zaquestion/lab/cmd" "github.com/zaquestion/lab/internal/config" "github.com/zaquestion/lab/internal/git" lab "github.com/zaquestion/lab/internal/gitlab" ) // ...
/* Copyright 2017 The Kubernetes Authors. Modifications copyright 2017 Pusher Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by...
package zone import ( "encoding/xml" "fmt" "github.com/PaloAltoNetworks/pango/util" ) // FwZone is a namespace struct, included as part of pango.Client. type FwZone struct { con util.XapiClient } // Initialize is invoked when Initialize on the pango.Client is called. func (c *FwZone) Initialize(con util.XapiCli...
// Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license" ...
package command import ( "context" "fmt" "github.com/hashicorp/go-multierror" "github.com/urfave/cli/v2" errorpkg "github.com/spansh/s5cmd/error" "github.com/spansh/s5cmd/log" "github.com/spansh/s5cmd/log/stat" "github.com/spansh/s5cmd/storage" "github.com/spansh/s5cmd/storage/url" ) var deleteHelpTemplate...
package main import ( "bytes" "context" "io/ioutil" "log" "net/http" "strings" "time" opentracinglog "github.com/opentracing/opentracing-go/log" "github.com/gin-gonic/gin" "github.com/opentracing/opentracing-go" "google.golang.org/grpc" pb "github.com/yeqown/tracing-practice/api" x "github.com/yeqown/t...
package session import ( "bytes" "encoding/hex" "io" "math/rand" "strings" "testing" "testing/iotest" ) // TestUFormat tests all 6 function compositions. func TestUFormat(t *testing.T) { var golden = []struct { f function name, serial string }{ {bringUp, "STARTDT_ACT", "680407000000"}, {br...
package cli import ( "crypto/ecdsa" "fmt" "github.com/Sinaniya/bazo-miner/crypto" "github.com/Sinaniya/bazo-miner/miner" "github.com/Sinaniya/bazo-miner/p2p" "github.com/Sinaniya/bazo-miner/storage" "github.com/pkg/errors" "github.com/urfave/cli" "log" ) type startArgs struct { dbname string myNodeAdd...
// // Copyright (C) 2020-2021 IOTech Ltd // // SPDX-License-Identifier: Apache-2.0 package requests import ( "encoding/json" "fmt" "testing" "github.com/edgexfoundry/go-mod-core-contracts/v2/v2" "github.com/edgexfoundry/go-mod-core-contracts/v2/v2/dtos" "github.com/edgexfoundry/go-mod-core-contracts/v2/v2/dtos...
// Copyright 2022 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 engineioclient import ( "log" "reflect" "time" "github.com/gorilla/websocket" ) type SendingObj struct { Type string Msg string } // from : https://github.com/shekhei/go-engine.io-client/blob/master/client_test.go type Event struct { Type string Data []byte } var closeErrorType = reflect.TypeOf((*...
package benchmark import ( "encoding/hex" "encoding/json" "math/rand" "strconv" "sync" "time" "github.com/gizo-network/gizo/crypt" "github.com/kpango/glg" "github.com/gizo-network/gizo/core" "github.com/gizo-network/gizo/core/merkletree" "github.com/gizo-network/gizo/job" ) //Engine hold's an array of b...
package paapi5 import ( "bytes" "context" "crypto/hmac" "crypto/sha256" "encoding/hex" "strings" "time" "github.com/goark/errs" "github.com/goark/fetch" ) const ( defaultPartnerType = "Associates" ) //Query interface for Client type type Query interface { Operation() Operation Payload() ([]byte, error) ...
package main import ( "fmt" "github.com/invxp/go-layout-assistant/internal/util/convert" "github.com/invxp/go-layout-assistant/internal/util/io" "github.com/pkg/errors" "io/fs" "io/ioutil" "log" "os" "path/filepath" "runtime" "strings" ) const ( defaultServiceNameLower = "application" defaultServiceNameU...
// 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" "github.com/aws/aws-sdk-go-v2/private/protocol/restjson" ) type DeleteJobExecuti...
/* Copyright 2021 The Crossplane 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 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 calendar provides market calendar, with which you can // check if the market is open at specific point of time. // Though the package is generalized to support different market // calendars, only the NASDAQ is implemented at this moment. // You can create your own calendar if you provide the calendar // json...
package main import ( "encoding/base64" "encoding/json" "fmt" "io/ioutil" "math/rand" "net/http" "strings" "time" ctoai "github.com/cto-ai/sdk-go" ) //TriviaJSON is the response body we get from OpenTDB type TriviaJSON struct { ResponseCode int `json:"response_code"` Results []struct { Category ...
/* Copyright 2021 The Crossplane Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: skyline/v1beta/querier.proto package types import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/query" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" math "math" ) //...
package helloworld import ( "fmt" "io" "math/rand" "sync" "time" context "golang.org/x/net/context" "google.golang.org/grpc/stats" ) // CallType represents one of the gRPC call types: // unary, client streaming, server streaming, bidi type CallType string // Unary is a unary call var Unary CallType = "unary"...
package mongo import ( "fmt" "math" "time" "github.com/kaseat/pManager/models" "github.com/kaseat/pManager/models/currency" "github.com/kaseat/pManager/models/operation" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo/options" ) // AddOperat...
// +build js package webrtc import ( "fmt" "strings" "github.com/gopherjs/gopherjs/js" ) // IceServer ... type IceServer struct { o *js.Object Urls []string `js:"urls"` Username string `js:"username"` Credential string `js:"credential"` CredentialType string `js:"crede...
// Copyright © 2019 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
package commands import ( "bytes" "os" "path" "path/filepath" "text/template" "github.com/spf13/viper" "github.com/ethereum/go-ethereum/node" tmcfg "github.com/tendermint/tendermint/config" cmn "github.com/tendermint/tendermint/libs/common" ) const ( defaultConfigDir = "config" defaultDataDir = "data" ...
/* 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 2021 Adobe. All rights reserved. This file is licensed to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agree...
// Package datafetch contains code that fetch various data, such as transactions, jour«nals, etc. of a company package datafetch import ( "context" "fmt" "net/http" "time" "github.com/oxisto/titan/cache" "github.com/oxisto/titan/model" "github.com/sirupsen/logrus" ) var log *logrus.Entry type DataFetcher int...
/** * Copyright (C) 2015 Red Hat, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
package keyvault /* * You need to set four environment variables before using the app: * AZURE_TENANT_ID: Your Azure tenant ID * AZURE_CLIENT_ID: Your Azure client ID. This will be an app ID from your AAD. * AZURE_CLIENT_SECRET: The secret for the client ID above. * KVAULT: The name of your vault (just the name, ...
package config import ( "bytes" "encoding/json" "errors" "fmt" "net/http" "net/url" "time" ) // Body represents a request body associated with a type. // The type affects the way the content is processed. // If Type == "file", Content is read as a filepath to be resolved. // If Type == "raw", Content is attach...
package main import ( "os" "os/signal" "strconv" "strings" "syscall" "time" "github.com/rs/zerolog" "github.com/rs/zerolog/pkgerrors" "github.com/valyala/fasthttp" "github.com/ip-api/proxy/internal/batch" "github.com/ip-api/proxy/internal/cache" "github.com/ip-api/proxy/internal/fetcher" "github.com/ip-...
package shuttle import ( "github.com/sipt/shuttle/conn" "github.com/sipt/shuttle/log" "github.com/sipt/shuttle/proxy" "github.com/sipt/shuttle/rule" "sync" "sync/atomic" "time" ) const ( RecordStatus = 1 RecordUp = 2 RecordDown = 3 RecordAppend = 4 RecordRemove = 5 RecordStatusActive = "Active"...
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package scanfix import ( "bytes" "errors" "fmt" "strconv" ) // Message is a FIX messages splitter for the Protoscan. type Message struct { BeginString st...
// Copyright 2012 <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 flags import ( "bytes" "fmt" "os" "path" "strings" "unicode/utf8" ) // A Parser provides command line option parsing. It can contain several // option g...
package main import "testing" type RestType struct { field0 int field1 int field2 int field3 int field4 int field5 int field6 int field7 int field8 int field9 int field10 int field11 int field12 int field13 int field14 int field15 int field16 int field17 int field18 int field19 int fiel...
/* Copyright The starlight Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to ...
package proxy import ( "bytes" "context" "encoding/json" "io/ioutil" "net/http" "strings" "github.com/kyma-incubator/compass/components/director/pkg/log" "github.com/form3tech-oss/jwt-go" "github.com/kyma-incubator/compass/components/director/pkg/correlation" "github.com/kyma-incubator/compass/components/g...
package source import ( "fmt" "github.com/broadinstitute/thelma/internal/thelma/charts/dependency" "github.com/broadinstitute/thelma/internal/thelma/charts/publish" "github.com/broadinstitute/thelma/internal/thelma/state/providers/gitops" "github.com/broadinstitute/thelma/internal/thelma/utils/shell" "github.com...
package main import ( "context" "fmt" "io/ioutil" "log" "net/http" "os" "path/filepath" "runtime/debug" cloudtasks "cloud.google.com/go/cloudtasks/apiv2" secretmanager "cloud.google.com/go/secretmanager/apiv1" "github.com/gcp-kit/gcpen" "github.com/gcp-kit/gcpine-gae-example/backend/pkg/config" "github.c...
package rewards import ( "context" "fmt" "time" "github.com/ava-labs/avalanchego/api" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/formatting" avalancheGoAvax "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/avalanchego/vms/platformvm" "github.com/ava...
/* * Copyright 2021 Layotto 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...
package metadata import ( "fmt" "net" "strings" "time" "github.com/Sirupsen/logrus" "github.com/rancher/external-dns/config" "github.com/rancher/external-dns/utils" "github.com/rancher/go-rancher-metadata/metadata" ) const ( metadataUrl = "http://rancher-metadata.rancher.internal/2015-12-19" ) type Metadat...
// Copyright 2021 PairMesh, 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" "reflect" "target/pkg/targetdir" "github.com/spf13/cobra" homedir "github.com/mitchellh/go-homedir" "github.com/mitchellh/mapstructure" "github.com/spf13/viper" ) var cfgFile = "" var version string // Config struct containing different product profiles type Config struct {...
/* Register HTTP API endpoints and handle authorization requirements. Without specifying authorization parameters in the command line, tiedot server does not require any authorization on any endpoint. tiedot supports two authorization mechanisms: - Pre-shared authorization token The API endpoints will require 'Author...
// 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...
// Copyright 2018 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package main import ( "encoding/xml" "fmt" "io/ioutil" "os" "github.com/lestrrat/go-libxml2/parser" "github.com/lestrrat/go-libxml2/xsd" "vnsfmspl" ) const ( STARTING_ID = 4300000 // starting ID for custom Rules ) func ValidateXML(xmlFile *os.File) int { ruleID = STARTING_ID xmlSchema, err := ioutil.Read...
// Copyright 2016 <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 gabi import ( "github.com/go-errors/errors" "github.com/privacybydesign/gabi/big" "github.com/privacybydesign/gabi/gabikeys" "github.com/privacybydesign/ga...
// Copyright 2018 The Cockroach Authors. // // Licensed as a CockroachDB Enterprise file under the Cockroach Community // License (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // https://github.com/cockroachdb/cockroach/blob/master/li...
package SyncTestCaseProcessor import ( "encoding/json" "fmt" "io" "log" "os" "strings" "github.com/Shinz9474/InsightAps/InsightAPI/Logger" "github.com/Shinz9474/InsightAps/InsightAPI/Plugins/CSVHandler" "github.com/Shinz9474/InsightAps/InsightAPI/Plugins/DBConnector" ) type TestCaseSteps_DB struct { StepID...
package main import ( "encoding/json" "sort" ) type PosMap map[string]int //PlyMap is a map[int]float64 type PlyMap map[int]float64 //MarshalJSON marshals to json func (m PlyMap) MarshalJSON() ([]byte, error) { if len(m) < 1 { return json.Marshal([]int{}) } keys := make([]int, 0, len(m)) for k := range m {...
package main import ( "errors" "flag" "fmt" "net" "path/filepath" "strings" "github.com/kolesa-team/http-api-mock/console" "github.com/kolesa-team/http-api-mock/definition" "github.com/kolesa-team/http-api-mock/logging" "github.com/kolesa-team/http-api-mock/match" "github.com/kolesa-team/http-api-mock/noti...
// Package s3 imlements wrappers for AWS S3 service // // Uses the default AWS SDK Credentials; e.g. via the environment // AWS_REGION=region AWS_ACCESS_KEY_ID=key AWS_SECRET_ACCESS_KEY=secret // OR in the AWS SDK credential configurtion ~/.aws/credentials: // // aws_access_key_id = AKID // aws_secret_access_key = SEC...
package admission import ( "encoding/json" "errors" "fmt" log "github.com/sirupsen/logrus" "io/ioutil" admissionv1 "k8s.io/api/admission/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "net/http" ) type PatchOperation struct { Op string `json:"op"` Path string `json:"path"` Value interface{...
package main import ( "context" "errors" "fmt" "io" "os" "github.com/spf13/cobra" "github.com/thediveo/enumflag" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/yaml" ketchv1 "github.com/shipa-corp/ketch/internal/api/v1beta1" "github.com/shipa-corp/ketch/internal/validation" ) const frameworkUpdateHelp = ` ...
// Copyright 2019 The UNICORE Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file // // Author: <NAME> <<EMAIL>> package binarytool import ( "errors" "fmt" "os" "strings" "tools/srcs/binarytool/elf64analyser" u "tools/srcs/common" ...
package vm import ( "fmt" "reflect" u "github.com/araddon/gou" "github.com/lytics/qlbridge/datasource" "github.com/lytics/qlbridge/expr" "github.com/lytics/qlbridge/lex" "github.com/lytics/qlbridge/value" ) var ( SqlEvalError = fmt.Errorf("Could not evaluate sql statement") ) // SqlVm vm is a vm for parsing...
/* * 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...
// SPDX-License-Identifier: Apache-2.0 // Copyright 2022-present Open Networking Foundation package main import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "math" "net" "sync" "testing" ) func TestNewIPPool(t *testing.T) { tests := []struct { name string poolSubnet ...
// Copyright 2019 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
// Code generated by smithy-go-codegen DO NOT EDIT. package rekognition import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/rekognition/types" smithy "github.com/awslabs/smithy-go" "github.com/awslabs/s...
package objx_test import ( "testing" "github.com/firawe/objx" "github.com/stretchr/testify/assert" ) func TestStringTypeString(t *testing.T) { m := objx.Map{ "string": "foo", } assert.Equal(t, "foo", m.Get("string").String()) } func TestStringTypeBool(t *testing.T) { m := objx.Map{ "bool": true, } as...
package tetra3d import ( "strconv" "github.com/kvartborg/vector" ) // PathFollower follows a Path, stepping through the Path spatially to completion. You can use this to make objects that follow a path's positions in // space. type PathFollower struct { Percentage float64 // Percentage is how far along the Path t...
/* Copyright 2017 Loopring Project Ltd (Loopring 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 applicable ...
package main import ( "fmt" "io/ioutil" "os" "path/filepath" "strconv" "strings" "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/cmd/podman/libpodruntime" "github.com/containers/libpod/libpod" "github.com/containers/libpod/pkg/rootless" opentracing "github.com/opentracing/...
package mqpf import ( "fmt" "math" "strings" "sync/atomic" "time" ) // MinLogDuration is the minimum log period for top QPS monitor const MinLogDuration = 1 // seconds // Statistic is a struct for queue performance monitoring data type Statistic struct { loop uint64 msgReceived uint64 handleSucces...
// +build linux_bpf package http import ( "fmt" "os" "path/filepath" "regexp" "strings" "time" "unsafe" ddebpf "github.com/DataDog/datadog-agent/pkg/ebpf" "github.com/DataDog/datadog-agent/pkg/util/log" psfilepath "github.com/DataDog/gopsutil/process/filepath" "github.com/DataDog/gopsutil/process/so" ) /...
/* Copyright 2018 Gravitational, 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, soft...
/* Copyright 2022 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 export import ( "github.com/Rhymond/go-money" "github.com/ed-fx/go-soft4fx/internal/simulator" "github.com/ed-fx/go-soft4fx/internal/symbol" "github.com/stretchr/testify/assert" "testing" "time" ) func bod(t time.Time) time.Time { year, month, day := t.Date() return time.Date(year, month, day, 0, 0, 0...
package config import ( "io/fs" "io/ioutil" "os" "path/filepath" "strings" v1 "github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1" "github.com/rancher/system-agent/pkg/applyinator" "github.com/rancher/wharfie/pkg/registries" "github.com/rancher/wrangler/pkg/data" "github.com/rancher/wrangler/pkg/data/conv...
package spotx import ( "encoding/json" "errors" "fmt" "github.com/PubMatic-OpenWrap/openrtb" "github.com/PubMatic-OpenWrap/prebid-server/adapters" "github.com/PubMatic-OpenWrap/prebid-server/errortypes" "github.com/PubMatic-OpenWrap/prebid-server/openrtb_ext" "net/http" ) type Adapter struct { url string } ...
/* * Copyright 2020 F5 Networks * * 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 adapter import ( "context" "github.com/FlipAppDev/FlipServer/server/internal/domain/model" "github.com/FlipAppDev/FlipServer/server/internal/domain/types" ) type UserSignInRepository interface { Find(ctx context.Context, userID types.UserID) (model.UserSignIn, error) FindByEmail(ctx context.Context, ema...
package matchers import ( "bytes" "encoding/binary" ) var ( TypeDoc = newType("doc", "application/msword") TypeDocx = newType("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document") TypeXls = newType("xls", "application/vnd.ms-excel") TypeXlsx = newType("xlsx", "appl...
package dbBeans import ( "strings" "github.com/kinwyb/go/db" ) //CREATE TABLE `member_status` ( // `status_id` int(11) unsigned NOT NULL AUTO_INCREMENT, // `uid` int(11) NOT NULL DEFAULT '0' COMMENT 'UID', // `reg_ip` char(15) NOT NULL DEFAULT '' COMMENT '注册IP', // `reg_time` timestamp NOT NULL DEFAULT CURRENT...
// Copyright 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 agreed to ...