text
stringlengths
3.08k
10.4k
//Copyright (c) 2013, The Impendulo Authors //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 conditio...
// Copyright © 2019 <NAME> <<EMAIL>>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. package database import ( "database/sql" "fmt" "log" "os" "sync" "github.com/jmoiron/sqlx" ) var ( // Verbose is a global mode, when set at true, it will override ...
package main import ( "encoding/json" "flag" "fmt" "io/ioutil" "log" "net/http" "regexp" "time" ) var ( configFile = flag.String("config_file", "gdddcd.config", "File used to track configuration.") stateFile = flag.String("state_file", "gdddcd.state", "File used to track state.") ipRe = regexp.MustCom...
package dbscan import ( "reflect" "strings" "unicode/utf8" "github.com/pkg/errors" ) type Lexer struct { delim rune compileDelim DriverDelim } func newLexer(delim rune, compileDelim DriverDelim) Lexer { return Lexer{ delim: delim, compileDelim: compileDelim, } } type builder struct { byt...
package handler import ( "fmt" "log" "sync/atomic" "time" "github.com/go-pg/pg/v10" "github.com/go-pg/pg/v10/orm" jsoniter "github.com/json-iterator/go" "github.com/tal-tech/go-stash/stash/config" "github.com/tal-tech/go-stash/stash/filter" "github.com/tal-tech/go-zero/core/collection" "github.com/tal-tech...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/filter/http/dynamo/v2/dynamo.proto package envoy_config_filter_http_dynamo_v2 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if ...
package add import ( "errors" "fmt" "strings" "github.com/itera-io/taikun-cli/api" "github.com/itera-io/taikun-cli/cmd/cmdutils" "github.com/itera-io/taikun-cli/utils/out" "github.com/itera-io/taikun-cli/utils/out/field" "github.com/itera-io/taikun-cli/utils/out/fields" "github.com/itera-io/taikun-cli/utils/...
package logapi import "time" type embbedLoggerBean struct { // define name array , value is field type fieldProps map[string]Field } func (myself *embbedLoggerBean) convertToFields() []Field { var fields = make([]Field, 0) for _, vf := range myself.fieldProps { fields = append(fields, vf) } return fields ...
// Copyright © 2019, 2020 Weald Technology Trading // 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...
// 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 2017 Datadog, Inc. package decoder import ( "regexp" "sync" "time" ) // TRUNCATED is the warnin...
/* Copyright (C) 2019 Synopsys, Inc. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "...
// Copyright ©2018 The Gonum 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 rings import ( "errors" "fmt" "image/color" "gonum.org/v1/plot" "gonum.org/v1/plot/vg" "gonum.org/v1/plot/vg/draw" ) // Blocks implements r...
package cmd import ( "fmt" "io/ioutil" "os" "github.com/spf13/cobra" "gopkg.in/yaml.v2" "github.com/AlecAivazis/survey/v2" markdown "github.com/Maahsome/go-term-markdown" homedir "github.com/mitchellh/go-homedir" "github.com/nathan-fiscaletti/consolesize-go" "github.com/sirupsen/logrus" "github.com/spf13/...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: github.com/micro/examples/helloworld/proto/greeter.proto /* Package greeter is a generated protocol buffer package. It is generated from these files: github.com/micro/examples/helloworld/proto/greeter.proto It has these top-level messages: HelloRequest H...
package main import ( "flag" "fmt" "io/ioutil" "log" "os" "path" "strings" "time" "github.com/bry00/fmutex/mutex" ) const ( FlagRoot = "root" EnvRoot = "FMUTEX_ROOT" FlagId = "id" FlagSilent = "s" FlagPulse = "pulse" FlagRefresh = "refresh" FlagLimit = "limit" FlagTimeout = "timeout...
/* Copyright (C) 2018 Synopsys, Inc. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "...
package services import ( "bytes" "context" "fmt" "github.com/inconshreveable/log15" "github.com/stephane-martin/mailstats/arguments" "github.com/stephane-martin/mailstats/collectors" "github.com/stephane-martin/mailstats/forwarders" "github.com/stephane-martin/mailstats/logging" "github.com/stephane-martin/m...
package table import ( "context" "errors" "fmt" "os" "sync" "time" "github.com/macadmins/osquery-extension/tables/chromeuserprofiles" "github.com/macadmins/osquery-extension/tables/fileline" "github.com/macadmins/osquery-extension/tables/puppet" "github.com/osquery/osquery-go" "github.com/osquery/osquery-g...
package main import ( "bytes" "go/format" "io/ioutil" "log" "os" "os/exec" "path" "path/filepath" "strings" ) // Reads all .js files in the current folder // and encodes them as strings maps in jsFunctions.go func bundleJsFunctions(jsRootDir string) { folders, err := ioutil.ReadDir(jsRootDir) if err != nil...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto package envoy_extensions_filters_listener_tls_inspector_v3 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" proto "github.com/golang/protobuf/proto" math "math" ) // R...
package sqlpp import ( "context" "database/sql" "errors" "reflect" "strconv" "strings" "sync" ) var ( ErrNilRows = errors.New("sqlpp: nil rows") ErrNilScanner = errors.New("sqlpp: nil scanner") ) func NewPostgreSQL(db *sql.DB) *DB { return new(db, true) } func NewMySQL(db *sql.DB) *DB { return new(db,...
package rumour import ( "sort" "sync" ) // State maintains all state type State struct { clusters map[string]*ClusterState } // NewState inits a state. func NewState(clusters []string) *State { if len(clusters) == 0 { clusters = []string{"default"} } sub := make(map[string]*ClusterState, len(clusters)) for ...
// Code generated by smithy-go-codegen DO NOT EDIT. package glacier import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" glaciercust "github.com/aws/aws-sdk-go-v2/service/glacier/internal/customizations" "github.com/aws/aws-sdk-go-v2/service/...
package main import ( "flag" "fmt" "log" "os" "regexp" "strings" "time" "github.com/InVisionApp/tabular" "github.com/briandowns/spinner" "github.com/kyokomi/emoji" ) // ServiceURL URL of the service with trailing / var ServiceURL = "https://dockerimagesave.akiel.dev/" var showAnimations = false func start...
package database import ( "database/sql" "database/sql/driver" "reflect" "time" ) // prepareValues 准备可以被rows.Scan进去数据 的 数据类型指针 func prepareValues(values []interface{}, q *Query, columnTypes []*sql.ColumnType, columns []string) { if q.Schema != nil { for idx, name := range columns { if field := ...
package auth import ( "fmt" "log" "net/http" "os" "strconv" "strings" "time" "github.com/gin-gonic/gin" "github.com/go-redis/redis" "github.com/gofrs/uuid" "github.com/golang-jwt/jwt/v4" "github.com/joho/godotenv" ) type TokenDetails struct { AccessToken string RefreshToken string AccessUuid string...
package params // ResourceType 资源类型 // 添加新资源类型请更新IsValid、init函数 type ResourceType string // resource types const ( ResourceTypeBSN ResourceType = "bsn" ResourceTypeInstance ResourceType = "instance" ResourceTypeDisk ResourceType = "di...
/* * Copyright 2018 The microkube 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 2022 YuWenYu All rights reserved. // Use of this source code is governed by a MIT style // license that can be found in the LICENSE file. package controller import ( "fmt" "github.com/gin-gonic/gin" "github.com/yuw-pot/pot/data" "github.com/yuw-pot/pot/modules/casbin" "github.com/yuw-pot/pot/module...
package shard import ( "errors" "fmt" "hash/fnv" "math" "time" ) var ( // id size is the size of a full ID (in bits) // Note this is out of a maximum of 64 bits idSize int64 = 64 // DateSize is 41 bits // 64 - 23 = 41 dateSize int64 = 41 // shardSize is 10 bits? // 41 - 10 = 31 shardSize int64 = 13 // ...
package keeper import ( "errors" "fmt" "time" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" supplyexported "github.com/cosmos/cosmos-sdk/x/supply/exported" "github.com/cosmos/ethermint/x/faucet/types" ) // Keeper defines the faucet...
// 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 writin...
package main import ( "context" "net/http" "os" "path/filepath" "regexp" "strings" "time" "github.com/go-chi/chi" "github.com/go-pkgz/auth/provider" log "github.com/go-pkgz/lgr" "github.com/go-pkgz/rest" "github.com/go-pkgz/rest/logger" "github.com/go-pkgz/auth" "github.com/go-pkgz/auth/avatar" "githu...
package pathbuilding import "sort" // A TrustGraph is abstractly a directed graph (potentially with cycles). It represents the trust relationship between // entities where are arrow represents a certificate signed by the source entity for the destination entity. A // TrustGraph can also label some edges as "invalid" ...
package core import ( "bytes" "testing" "github.com/stretchr/testify/require" "github.com/thetatoken/theta/common" "github.com/thetatoken/theta/crypto/bls" "github.com/thetatoken/theta/rlp" "github.com/thetatoken/theta/crypto" ) func createTestGuardianPool(size int) (*GuardianCandidatePool, map[common.Addres...
/* Copyright 2018 BlackRock, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
package db import ( "context" "fmt" "github.com/gimmickless/keat-kit-service/internal/domain" "github.com/gimmickless/keat-kit-service/pkg/custom" "github.com/gimmickless/keat-kit-service/pkg/enum" "github.com/uptrace/opentelemetry-go-extra/otelzap" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-dri...
package usernet import ( "context" "fmt" "reflect" "sync" "arhat.dev/abbot-proto/abbotgopb" "arhat.dev/abbot/pkg/constant" "arhat.dev/abbot/pkg/drivers" "arhat.dev/pkg/log" "gvisor.dev/gvisor/pkg/tcpip" "gvisor.dev/gvisor/pkg/tcpip/link/channel" "gvisor.dev/gvisor/pkg/tcpip/network/arp" "gvisor.dev/gvis...
// Copyright 2019 Sorint.lab // // 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 w...
package main import ( "encoding/json" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "strconv" "strings" "time" "github.com/concourse/tracker-resource" "github.com/concourse/tracker-resource/out" "github.com/mitchellh/colorstring" "github.com/xoebus/go-tracker" ) func buildRequest() out.OutRequest { ...
package main import ( "encoding/json" "log" "strings" "time" "github.com/gorilla/websocket" "github.com/shayne/go-streamdeck-sdk" ) type tile struct { context string title string symbol string } type plugin struct { sd *streamdeck.StreamDeck tiles map[string]*tile } type evSdpiCollection struct { ...
package cfg import ( "reflect" "github.com/styczynski/latte-compiler/src/generic_ast" "github.com/styczynski/latte-compiler/src/parser/context" ) type ConstFoldingErrorImpl struct { Message string Source generic_ast.TraversableNode } func (e *ConstFoldingErrorImpl) GetSource() generic_ast.TraversableNode { re...
// Package storage handles in memory storage and searching for time series elements. Multiple goroutines handle search and // storage of time series elements each of which is mapped to a unique key. Keys and associated elements are distributed to // goroutines to reduce lock contention. package storage import ( "cont...
package hindley_milner import ( "fmt" "github.com/styczynski/latte-compiler/src/generic_ast" ) type Namer interface { Name() NameGroup } type NameGroup struct { names []string types map[string]*Scheme hasTypesMap bool } func (g NameGroup) GetNames() []string { return g.names } func (g NameGroup...
package marshaler import ( "encoding/json" "fmt" "io" "io/ioutil" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/mosuka/phalanx/proto" ) const DefaultContentType = "application/json" type Marshaler struct{} func NewMarshaler() *Marshaler { return &Marshaler{} } func (m *Marshaler) ContentT...
package plans import ( "encoding/json" "fmt" "github.com/emqx/kuiper/xsql" "github.com/emqx/kuiper/xstream/api" "github.com/emqx/kuiper/xstream/extensions" "github.com/emqx/kuiper/xstream/nodes" "strconv" ) type SenMLParsePlan struct { Fields xsql.Fields IsAggregate bool SendMeta bool isTest b...
package securityspy import ( "crypto/tls" "encoding/base64" "encoding/xml" "io/ioutil" "net/http" "net/url" "strconv" "strings" "time" "github.com/pkg/errors" ) // GetServer returns an iterface to interact with SecuritySpy. // This is the only exportred function in the library. // All of the other interfac...
package redis import ( "fmt" "strconv" "time" redis2 "github.com/gomodule/redigo/redis" "github.com/json-iterator/go" "github.com/pkg/errors" ) var json = jsoniter.ConfigCompatibleWithStandardLibrary const ( // ZRANGEBYSCORE command ZRANGEBYSCORE = "ZRANGEBYSCORE" // ZREVRANGEBYSCORE command ZREVRANGEBYSC...
// Copyright 2020 The Cohorse Author // // 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...
// 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 a...
/* * Copyright 2017 StreamSets 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...
/* Package main (go-download) takes a JSON configuration of urls, paths and file names and downloads all the files locally */ package main import ( "encoding/json" "fmt" "io" "log" "net/http" "os" "path/filepath" ) //Default package constants const ( defaultDownloadPath = "downloads" ) //file is the default ...
// Copyright 2020 The Monogon Project Authors. // // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2...
package start_manager import ( "context" "fmt" "os/exec" "strings" "syscall" "code.cloudfoundry.org/lager" "github.com/cloudfoundry/galera-init/cluster_health_checker" "github.com/cloudfoundry/galera-init/config" "github.com/cloudfoundry/galera-init/db_helper" "github.com/cloudfoundry/galera-init/os_helper...
package bundle import ( "encoding/json" "fmt" "strings" "testing" "unicode" "github.com/code-ready/crc/pkg/crc/constants" "github.com/code-ready/crc/pkg/crc/logging" "github.com/code-ready/crc/pkg/crc/preset" "github.com/Masterminds/semver/v3" "github.com/stretchr/testify/assert" "github.com/stretchr/test...
/* @Time : 2020/11/5 11:26 上午 @Author : ShadowWalker @Email : <EMAIL> @File : unit_test_tool @Software: GoLand @Description: 单元测试工具 */ package utt import ( "fmt" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" "github.com/offcn-jl/gaea-back-end/comm...
// Copyright 2013 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. // guru: a tool for answering questions about Go source code. // // http://golang.org/s/using-guru // // Run with -help flag or help subcommand for usage inf...
package ingress import ( "context" "fmt" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" operatorv1 "github.com/openshift/api/operator/v1" "github.com/openshift/cluster-ingress-operator/pkg/operator/controller" policyv1beta1 "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/api/err...
// Copyright 2016-2018, Pulumi Corporation. // // 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 (c) 2019 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 agreed to in writing, software...
/* 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) Facebook, Inc. and its affiliates. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. */ package handlers import ( "crypto/rand" "crypto/x509" "crypto/x509/pkix" "encoding/pem" "flag" "fmt" "log" ...
/** * Copyright (c) 2018, <NAME> * 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 * an...
// Copyright (c) 2019, The Emergent 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 main import ( "bufio" "fmt" _ "github.com/emer/etable/etview" // include to get gui views "github.com/goki/gi/gi" "github.com/goki/gi/g...
// Package metriton implements submitting telemetry data to the Metriton database. // // Metriton replaced Scout, and was originally going to have its own telemetry API and a // Scout-compatibility endpoint during the migration. But now the Scout-compatible API is // the only thing we use. // // See also: The old scou...
package app import ( "reflect" "strings" "github.com/rancher/types/apis/management.cattle.io/v3" "github.com/rancher/types/config" "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/apis/meta/v1" ) var driverData = map[string]map[string][]string{ "amazonec2": {"cred": []string{"accessKey"}}, "azure": ...
package controller import ( "fmt" "github.com/golang/glog" apierrs "k8s.io/apimachinery/pkg/api/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/flowcontrol" imageapi "github.com/openshift/origin/pkg/image/apis/image" imageclient "github.com/op...
/* 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, ...
/* Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// nolint: govet package main import ( "github.com/alecthomas/kong" "github.com/7dog123/participle" "github.com/7dog123/participle/lexer" "github.com/alecthomas/repr" ) type Boolean bool func (b *Boolean) Capture(values []string) error { *b = values[0] == "TRUE" return nil } // Select based on http://www.h2da...
package provider import ( "context" "time" "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" bankTypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/boz/go-lifecycle" "github.com/pkg/errors" "github.com/ovrclk/akash/provider/bidengine" "github.com/ovrclk/akash/provide...
// 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...
package gandiv5 import ( "fmt" "io/ioutil" "net/http" "net/http/httptest" "regexp" "testing" "github.com/adi658/cert-manager/log" "github.com/adi658/cert-manager/platform/tester" "github.com/stretchr/testify/require" ) var envTest = tester.NewEnvTest("GANDIV5_API_KEY") func TestNewDNSProvider(t *testing.T)...
// Copyright (C) MongoDB, Inc. 2017-present. // // 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 package ast import ( "fmt" "github.com/mongodb...
// Copyright 2016 VMware, 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 goforit import ( "context" "fmt" "log" "math/rand" "os" "sync" "time" "github.com/DataDog/datadog-go/statsd" ) const statsdAddress = "127.0.0.1:8200" const lastAssertInterval = 5 * time.Minute // An interface reflecting the parts of statsd that we need, so we can mock it type statsdClient interface...
package server import ( "fmt" "io" "net" "os" "strconv" "strings" "time" "github.com/ethereum/go-ethereum/crypto/ecies" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) type loServer struct { controlPort string } var portChan = make(chan string) var protocolChan = make(chan string) var localChan = ...
// Copyright 2017 Drone.IO Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "context" "fmt" "time" "github.com/drone/go-scm/scm" "github.com/drone/go-scm/scm/driver/internal/null" ) type pullService struct ...
// Copyright 2019 CUE 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 ...
// Copyright 2021 Rubrik, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, dist...
/* * Copyright (c) 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 http import ( "bytes" "fmt" "io" "strconv" // TODO : get rid of it "strings" "github.com/badu/http/hdr" "github.com/badu/http/url" ) /...
/* * Copyright 2016 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 applicab...
package dynago import ( "fmt" "strconv" "strings" ) const ( STRING_ATTRIBUTE = "S" STRING_SET_ATTRIBUTE = "SS" NUMBER_ATTRIBUTE = "N" NUMBER_SET_ATTRIBUTE = "NS" BINARY_ATTRIBUTE = "B" BINARY_SET_ATTRIBUTE = "BS" LIST_ATTRIBUTE = "L" MAP_ATTRIBUTE = "M" BOOLEAN_ATTRIBUTE = "BOOL" NULL...
// Code generated by azure-service-operator-codegen. DO NOT EDIT. // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. package v1alpha1api20210401 import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" type StorageAccountsBlobServices_SpecARM struct { //Location: Location to deploy ...
package parser import ( "fmt" "strings" "github.com/porter-dev/porter/api/types" "github.com/porter-dev/porter/internal/helm" "github.com/porter-dev/porter/internal/templater" "github.com/porter-dev/porter/internal/templater/utils" "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/release" "k8s.io/client-go/d...
package main import ( "encoding/json" "fmt" "os" "github.com/touchifyapp/cert-manager-webhook-scaleway/scaleway" corev1 "k8s.io/api/core/v1" extapi "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/re...
package buildlog import ( "fmt" "time" "github.com/golang/glog" kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.c...
package logging import ( "fmt" "io" "log" "os" "strings" "sync" ) // Use this abstraction to ensure thread-safe access to the logger's io.Writer // (which could change at runtime) type loggerWriter struct { sync.RWMutex output io.Writer } func (lw *loggerWriter) SetOutput(output io.Writer) { lw.Lock() defe...
// Code generated by go-swagger; DO NOT EDIT. package trading // 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/...
package service import ( "bytes" "context" "errors" "github.com/google/uuid" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" "io" "log" "github.com/neepoo/pcbook/pb" ) type LaptopServer struct { LaptopStore LaptopStore ImageStore ImageStore RatingStore R...
// Copyright (c) 2016-2018 Tigera, 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 ...
package main import ( "bufio" "flag" "fmt" "io" "log" "net" "os" "golang.org/x/sys/unix" ) // variable definitions var ( server bool = false client bool = false address string = "127.0.0.1" port int = 50000 ) // SMC definitions const ( SMCProtoIPv4 = 0 SMCProtoIPv6 = 1 ) // parse ip addre...
/* Copyright 2017 LinkedIn 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 in writing, s...
package impl import ( "context" "fmt" "time" "github.com/infraboard/mcube/exception" "github.com/infraboard/mcube/types/ftime" "go.mongodb.org/mongo-driver/mongo" "github.com/infraboard/keyauth/app/session" "github.com/infraboard/keyauth/app/token" ) func (s *service) Login(ctx context.Context, tk *token.To...
package golog import ( "fmt" "io" "strconv" "strings" "sync" "time" ) type sliceMode int const ( sliceModeNone sliceMode = 0 sliceModeFirstElem sliceMode = 1 sliceModeSecondElem sliceMode = 2 ) var textFormatterPool sync.Pool type TextFormatter struct { writer io.Writer levels *Levels form...
// Package serve implements the "jig serve" command, serving GRPC // services via an evaluator. package serve import ( "errors" "fmt" "io/fs" "net" "net/http" "os" "strings" "foxygo.at/jig/reflection" "foxygo.at/jig/registry" "foxygo.at/jig/serve/httprule" "golang.org/x/net/http2" "golang.org/x/net/http2/...
package main import ( "bufio" "fmt" "log" "math/bits" "math/rand" "os" "strconv" "strings" "time" ) // the min similarity we're looking for const THRESHOLD = 70 // the cutoff for a single uint64's similarity to be considered const CUTOFF = 15 // the number of bits each vector holds const AMOUNT_OF_BITS = 2...
package serving import ( "encoding/json" "fmt" "os" "strings" "sync" "text/tabwriter" "gopkg.in/yaml.v2" "github.com/kubeflow/arena/pkg/apis/types" "github.com/kubeflow/arena/pkg/apis/utils" log "github.com/sirupsen/logrus" ) var ( errNotFoundServingJobMessage = "Not found serving job %v, please check it...
package config import ( "encoding/json" "errors" "fmt" "os" "os/signal" "syscall" ) type Broker struct { Name string ServiceGenericName string IP string Port int CertFile string KeyFile string AuthExchange string AuthAllExchange s...