text
stringlengths
3.08k
10.4k
package help import ( "database/sql/driver" "errors" "fmt" "sort" "strings" "github.com/conku/admin" "github.com/conku/gorm" "github.com/conku/qor" "github.com/conku/qor/resource" ) var Global = "dashboard" type QorHelpEntry struct { gorm.Model Title string Categories Categories Body string ...
// Copyright 2020 Insolar Network Ltd. // All rights reserved. // This material is licensed under the Insolar License version 1.0, // available at https://github.com/insolar/insolar/blob/master/network/LICENSE.md. package profiles import ( "sync" "time" "github.com/insolar/insolar/insolar" "github.com/insolar/in...
package main //TODO: either split units out of ingredient.go and into their own file, or at //least implement a way to add conversions between volume units (ie: cups to //teespoons) and weight units (grams to lbs), as well as be able to add custom //conversions between a specific weight unit and a specific volume unit...
/* Copyright 2020. 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 distributed un...
package component import ( "fmt" "github.com/golang/glog" "github.com/openshift/odo/pkg/component" componentlabels "github.com/openshift/odo/pkg/component/labels" "github.com/openshift/odo/pkg/log" "github.com/openshift/odo/pkg/odo/genericclioptions" "github.com/openshift/odo/pkg/secret" svc "github.com/opens...
package resource import ( "errors" "fmt" "strconv" "time" "github.com/shurcooL/githubv4" ) type StatusFilter struct { Context string State string } // Source represents the configuration for the resource. type Source struct { Repository string `json:"repository"` AccessT...
package provider import ( "context" "errors" "fmt" "net/url" "reflect" "strings" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) var statusPageResourceSchema = map[string]*schema.Schema{ "id": { Description: "The ID of this Status Page Res...
package middleware // Ported from Go-Chi's middleware, source: // https://github.com/go-chi/chi/tree/master/middleware import ( "bytes" "context" "log" "net/http" "os" "runtime" "time" ) var ( // LogEntryCtxKey is the context.Context key to store the request log entry. LogEntryCtxKey = &contextKey{"LogEntry...
// Package discord is an interface to Discord's IPC. // // Discord exposes an IPC interface over a UNIX domain socket; this is // documented (with a reference implementation) at: // https://github.com/discord/discord-rpc/blob/master/documentation/hard-mode.md // // Discord's IPC messages consist of a header and payload...
//+build linux /* * Copyright (c) 2020 Baidu, 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 applicabl...
// Package mlablocatev2 implements m-lab locate services API v2. This // API currently only allows you to get servers for ndt7. Use the // mlablocate package for all other m-lab tools. package mlablocatev2 import ( "context" "encoding/json" "errors" "fmt" "net/http" "net/url" "regexp" "github.com/ooni/probe-c...
// Code generated by GoVPP's binapi-generator. DO NOT EDIT. // source: binapis/vpp1908/.vppapi/plugins/stn.api.json /* Package stn is a generated VPP binary API for 'stn' module. It consists of: 4 messages 2 services */ package stn import ( "bytes" "context" "io" "strconv" api "git.fd.io/govpp.git/api" ...
// Code generated by smithy-go-codegen DO NOT EDIT. package ec2 import ( "context" "fmt" 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/ec2/types" smithy "github.com/awslabs/smithy-go" "github.com/awslabs/smithy-go/...
package monitoring import ( "context" "fmt" "io" "io/ioutil" "net/http" "net/url" "regexp" "strings" "time" "github.com/ncarlier/apimon/pkg/config" "github.com/ncarlier/apimon/pkg/logger" "github.com/ncarlier/apimon/pkg/model" "github.com/ncarlier/apimon/pkg/output" "github.com/ncarlier/apimon/pkg/rule"...
// Copyright 2019 eBay Inc. // Primary authors: <NAME>, <NAME>, // <NAME>, and <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 // https://www.apache.org/licenses/...
// Copyright 2013 The Prometheus 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 model import ( "errors" "fmt" "log" hProtocol "github.com/stellar/go/protocols/horizon" "github.com/stellar/kelp/support/utils" ) // Asset is typed and enlists the allowed assets that are understood by the bot type Asset string // this is the list of assets understood by the bot. // This string can be ...
package ext import ( "fmt" "github.com/g4s8/gitstrap/context" "github.com/google/go-github/github" "log" ) type badge struct { alt string img string link string } func (b *badge) markdown() string { return fmt.Sprintf("[![%s](%s)](%s)", b.alt, b.img, b.link) } func (b *badge) byName(n string, ctx *context...
// Copyright 2020 The Fuchsia 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 serial import ( "bufio" "context" "errors" "io" "io/ioutil" "log" "net" "os" "time" ) // ErrNetClosing comes from the stdlib, but is not...
package syntax import "testing" func TestStrJoin(t *testing.T) { t.Parallel() AssertCodesEvalToSameValue(t, `""`, `//seq.join(",",[])`) AssertCodesEvalToSameValue(t, `"this is a test" `, `//seq.join(" ",["this", "is", "a", "test"])`) AssertCodesEvalToSameValue(t, `"this"`, `//seq.join(",",["this"])`) AssertCod...
/* * 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 ...
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/chen-mou/gf. package gdb_test import ( "fmt" "github.com/chen-mou/gf/...
/* Copyright (c) 2021 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...
package gospinner import ( "errors" "fmt" "io" "os" "strings" "sync" "time" ) var ( // default colors for the application defaultColor = FgHiCyan defaultSuccessColor = FgHiGreen defaultFailColor = FgHiRed defaultWarnColor = FgHiYellow ) // Spinner is a representation of the animation itself ...
package main import ( "context" "errors" "flag" "fmt" "log" "sync" "time" "gitlab.com/gitlab-org/gitaly/v14/internal/praefect/config" "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb" "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" ) type ( virtualStorage string gitalyStorage ...
// +build service package github import ( "encoding/json" "fmt" "github.com/ImpactInsights/valuestream/eventsources" "github.com/ImpactInsights/valuestream/tracers" "github.com/stretchr/testify/assert" "io/ioutil" "net/http" "net/url" "os" "testing" ) var baseURL string var githubPath string var urlEnvVar...
package fileobserver import ( "bytes" "crypto/sha256" "encoding/hex" "fmt" "io" "os" "sync" "time" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/klog" ) type pollingObserver struct { interval time.Duration reactors map[string][]ReactorFn files map[string]fileHashAndState reactorsMutex sync.RWMutex ...
// Copyright 2020 Antrea 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 ingester import ( "fmt" "sort" "sync" "testing" "time" "github.com/cortexproject/cortex/pkg/chunk" "github.com/cortexproject/cortex/pkg/ring" "github.com/cortexproject/cortex/pkg/util/flagext" "github.com/grafana/loki/pkg/chunkenc" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/commo...
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright(c) 2019 Wind River Systems, Inc. */ package interfaces import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/pagination" inventoryv1 "github.com/gophercloud/gophercloud/starlingx/inventory/v1" ) // Defines common system defined int...
package main import ( "encoding/json" "errors" "flag" "fmt" "io/ioutil" "net" "net/http" "os" "path/filepath" "strings" "github.com/open-horizon/edge-sync-service-client/client" "github.com/open-horizon/edge-utilities/logger" "github.com/open-horizon/edge-utilities/logger/log" ) var ( help = ...
package progress import ( "context" "io" "sort" "sync" "time" "github.com/pkg/errors" ) // Progress package provides utility functions for using the context to capture // progress of a running function. All progress items written contain an ID // that is used to collapse unread messages. type contextKeyT stri...
// Package fcall wraps the ffi and dlopen packages to provide easy access to foreign function calls from Go Code. package fcall import ( "fmt" "github.com/cookieo9/goffi/dlopen" "github.com/cookieo9/goffi/ffi" "reflect" ) // Flags passed to OpenLibrary. type OpenFlag dlopen.Flag var ( LAZY = OpenFlag(dlopen.LAZ...
package rosarygen import ( "bufio" "fmt" "io" "log" "strconv" "strings" "github.com/pelletier/go-toml" ) type Generator struct { Prayers map[string]*Prayer Mysteries map[string]*Mystery Groups map[string]*Group Structures map[string]*Structure Options *Options } // NewGenerator creates and lo...
// Code generated by smithy-go-codegen DO NOT EDIT. package cognitoidentityprovider 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/cognitoidentityprovider/types" smithy "github.com/awslabs/smithy-go...
// Package to parse and validate a Swagger JSON document into Go struct. package model import ( "encoding/json" "errors" "fmt" "gopkg.in/validator.v2" "reflect" "strings" ) var ( validSchemes []string = []string{ "http", "https", "ws", "wss", } validFormats []string = []string{ "int32", "int64", ...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the Li...
// Copyright 2019 dfuse Platform 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 agre...
package aad // Copyright (c) Microsoft and contributors. 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 ...
package importing import ( "bytes" "context" "io/ioutil" "math/rand" "testing" "time" "github.com/stretchr/testify/require" "github.com/textileio/powergate/v2/ffs" "github.com/textileio/powergate/v2/ffs/api" it "github.com/textileio/powergate/v2/ffs/integrationtest" itmanager "github.com/textileio/powergat...
// Copyright (c) 2019 <NAME>. All rights reserved. // Use of this source code is governed by the MIT License // that can be found in the LICENSE file. // Package backoff provides a Fibonacci backoff implementation. package backoff import ( "context" "sync" "time" ) const ( // DefaultInterval is the default inter...
package client import ( "context" "strconv" "sync" "time" log "github.com/sirupsen/logrus" "google.golang.org/grpc" "github.com/G-Research/armada/internal/armada/api" "github.com/G-Research/armada/internal/client/domain" "github.com/G-Research/armada/internal/client/util" "github.com/G-Research/armada/inte...
/* * Copyright 2020 Intel Corporation, 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 consul2dogstats import ( "os" "os/signal" "sort" "strings" "syscall" "time" log "github.com/Sirupsen/logrus" consul "github.com/hashicorp/consul/api" "github.com/zorkian/go-datadog-api" ) type Collector struct { datadogClient datadogClient collectInterval time.Duration lockKey ...
// Package hk provides mechanism for registering cleanup // functions which are invoked at specified intervals. /* * Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved. */ package hk import ( "container/heap" "fmt" "os" "os/signal" "syscall" "time" "github.com/NVIDIA/aistore/3rdparty/atomic" "...
// Copyright 2015 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package git import ( "bytes" "context" "fmt" "io" "os" "os/exec" "strings" "time" ) // Command contains the name, arguments and environment variable...
package setup import ( "fmt" "github.com/caos/orbos/mntr" "github.com/caos/orbos/pkg/kubernetes" "github.com/caos/orbos/pkg/kubernetes/k8s" "github.com/caos/orbos/pkg/kubernetes/resources/job" "github.com/caos/orbos/pkg/labels" "github.com/caos/zitadel/operator" "github.com/caos/zitadel/operator/helpers" "gi...
// Copyright 2021 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package mysql_test import ( "context" "database/sql" "testing" "time" "github.com/alfathaulia/ca_ecommerce_api/domain" "github.com/alfathaulia/ca_ecommerce_api/user/repository" userMysqlRepo "github.com/alfathaulia/ca_ecommerce_api/user/repository/mysql" "github.com/sirupsen/logrus" "github.com/stretchr/test...
/* * 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 ...
// Copyright 2018 The Go Cloud 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Lice...
// Copyright 2017 Istio 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 i...
package models import ( "fmt" "time" "github.com/Qihoo360/wayne/src/backend/common" ) const ( TableNameApp = "app" ) type appModel struct{} type App struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` Namespace *Namespace `...
// Package ginlogrus provides a logging middleware to get // https://github.com/sirupsen/logrus as logging library for // https://github.com/gin-gonic/gin. It can be used as replacement for // the internal logging middleware // http://godoc.org/github.com/gin-gonic/gin#Logger. // // Derived on https://github.com/zaland...
package validate import ( "errors" "fmt" "regexp" "strconv" "strings" "time" "unicode/utf8" ) var ( // from http://w3c.github.io/html-reference/datatypes.html#form.data.emailaddress emailReg = regexp.MustCompile("^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$") mobileEasyReg ...
package client import ( "fmt" "math/rand" "time" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/clock" ) // appError codes const ( GlobalFailure = "FAILED" JSONUnmarshalError = "JSONUNMARSHALERROR" DefaultRetries = 20 NoRetries = 0 ) t...
package wallet import ( "encoding/json" "errors" "io" "os" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm" ) const ( // The current version of neo-go wallet implementations. walletVersion = "1.0" ) // Wallet represents a NEO (NEP-2, ...
/* Authentication Server Usage: $ go run auth-server.go [aserver UDP ip:port] [fserver RPC ip:port] [secret] Example: export GOPATH=<PROJECT_DIRECTORY> cd PROJECT_DIRECTORY go run src/aserver/auth-server.go localhost:16210 localhost:16806 2016 */ package main import ( "clientServerUtils" "encoding/json" "fmt" "...
package test import ( "fmt" "log" "testing" f "github.com/tsiemens/gmail-tools/filter" ) func TestCheckDelims(t *testing.T) { okStrs := []string{ "", "()", "{}", "(xx)", "zz (xx) yy", "(x ())", "(x ({({x})} () ))(){(y)}", } notOkStrs := []string{ "(", "{", ")", "}", "((})", "(()", ...
package twitch_chat import ( "fmt" "net/url" "strings" "github.com/gorilla/websocket" ) type Message struct { // Username of user sending message Username string // Actual chat message Message string // if the user is subscriber or not Subscriber string // id of user sending message UserId string // tim...
// Copyright 2021 IBM 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 agreed to...
package pipeline import ( "sync" "sync/atomic" "time" "github.com/Jeffail/benthos/v3/lib/log" "github.com/Jeffail/benthos/v3/lib/metrics" "github.com/Jeffail/benthos/v3/lib/processor" "github.com/Jeffail/benthos/v3/lib/response" "github.com/Jeffail/benthos/v3/lib/types" "github.com/Jeffail/benthos/v3/lib/uti...
package vera import ( "encoding/json" "sync" ) // Vera class struct hold info about one user // Vera object has reference to all Controller childs it creates. type Vera struct { Username string Password string Identity IdentityJSON // NOTE Identity expires in 24 hrs AccountID string SessionToken...
package client import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/http/httputil" "strings" ) const ( gandiEndpoint = "https://api.gandi.net/v5/" ) // Gandi is the handle used to interact with the Gandi API type Gandi struct { apikey string endpoint string sharingID string debug bo...
package resolution import ( "path" "path/filepath" "strings" "github.com/vknabel/lithia/ast" "github.com/vknabel/lithia/world" ) type ModuleResolver struct { // each root contains multiple packages externalImportRoots []string // defaults to Potfile defaultPackageName string manifestName string ma...
package ansi import ( "fmt" "io" "os" "runtime" "time" "github.com/briandowns/spinner" "github.com/logrusorgru/aurora" "github.com/tidwall/pretty" "golang.org/x/crypto/ssh/terminal" ) var darkTerminalStyle = &pretty.Style{ Key: [2]string{"\x1B[34m", "\x1B[0m"}, String: [2]string{"\x1B[30m", "\x1B[0m"},...
// Copyright 2019-present 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 agr...
package resources import ( "errors" "finala/collector" "finala/collector/aws/common" "finala/collector/aws/register" "finala/collector/config" awsClient "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/pricing" log "github.com/sirupsen/logrus" ) // E...
package recache import ( "compress/flate" "sync" "time" ) var ( // Registry of all created caches. Require cacheMu to be held for access. cacheMu sync.RWMutex caches = make([]*Cache, 1) // Global deflate compression level configuration. // // Can only be changed before the first Cache is constructed and mu...
//go:build !clionly package main import ( _ "embed" "log" "os" "strings" "sync" "github.com/sqweek/dialog" "github.com/webview/webview" ) var w webview.WebView // Faq is the HTML for the FAQ page. //go:embed faq.html var Faq string // HTML is the HTML for the main page. //go:embed modpack.html var HTML str...
package cook import ( "fmt" "io/ioutil" "os" "reflect" "testing" "github.com/cozees/cook/pkg/cook/ast" "github.com/cozees/cook/pkg/cook/parser" "github.com/cozees/cook/pkg/cook/token" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type integrateTestCase struct { name string...
// Copyright (c) 2011-2017, HL7, Inc & The MITRE Corporation // 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, ...
/* * Copyright 2019 The Sugarkube 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 agre...
package models import ( "fmt" "github.com/prymitive/karma/internal/slices" ) // Filter holds returned data on any filter passed by the user as part of the query type Filter struct { Text string `json:"text"` Name string `json:"name"` Matcher string `json:"matcher"` Value string `json:"value"` Hits ...
package socketio import ( "code.google.com/p/go.net/websocket" "fmt" "net/http" "regexp" "strings" "sync" ) var ( uriRegexp = regexp.MustCompile(`^(.+?)/(1)(?:/([^/]+)/([^/]+))?/?$`) ) type Config struct { HeartbeatTimeout int ClosingTimeout int NewSessionID func() string Transports *Transport...
/* * umoci: Umoci Modifies Open Containers' Images * Copyright (C) 2016, 2017, 2018 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/LIC...
package main import ( "flag" "fmt" proto2 "github.com/gogo/protobuf/proto" //p `github.com/golang/protobuf/proto` "sdkeji/go_mqtt/proto" "sync" "time" //导入mqtt包 MQTT "github.com/eclipse/paho.mqtt.golang" ) // var f MQTT.MessageHandler = func(client MQTT.Client, msg MQTT.Message) { fmt.Printf("TOPIC: %s\n", ...
package handler import ( "bytes" "fmt" "strconv" "strings" "text/template" tb "gopkg.in/telebot.v3" "github.com/indes/flowerss-bot/internal/bot/chat" "github.com/indes/flowerss-bot/internal/bot/session" "github.com/indes/flowerss-bot/internal/config" "github.com/indes/flowerss-bot/internal/model" ) type S...
// Copyright 2020 MatrixOrigin. // // 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 Vector Creations 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 applicable law or agre...
/* * 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 config_test import ( "strings" "testing" "magma/orc8r/cloud/go/services/metricsd/prometh...
package main import ( "bufio" "fmt" "io" "log" "os" "sort" "strconv" "strings" "time" ) func main() { f, err := os.Open("input.txt") if err != nil { log.Fatal(err) } defer f.Close() //Print the result fmt.Println(processInput(f)) } type reaction struct { name string outputCount int inputN...
/* Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package jsonld import ( "bytes" "encoding/json" "errors" "fmt" "io" "io/fs" "github.com/piprate/json-gold/ld" "github.com/hyperledger/aries-framework-go/pkg/common/log" "github.com/hyperledger/aries-framew...
package sqlds import ( "errors" "fmt" "regexp" "strings" "time" ) var ( // ErrorBadArgumentCount is returned from macros when the wrong number of arguments were provided ErrorBadArgumentCount = errors.New("unexpected number of arguments") ) // MacroFunc defines a signature for applying a query macro // Query ...
// Copyright 2017 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 traceparser import ( "math" "sort" ) // mud is an updatable mutator utilization distribution. // // This is a continuous distribution of duration ov...
package ghost import ( "bufio" "encoding/json" "errors" "fmt" "github.com/NICEXAI/ghost/parser" "math/rand" "os" "strconv" "strings" "sync" "github.com/NICEXAI/ghost/util" "github.com/fatih/color" ) const rangeTag = "// @Tag %v_%v" type Template struct { builder strings.Builder } func (t *Template) S...
package model import ( "encoding/json" "errors" "fmt" "strings" "sync/atomic" "time" "github.com/bojand/ghz-web/config" "github.com/jinzhu/gorm" ) // Detail represents a run detail type Detail struct { Model Run *Run `json:"-"` // Run id RunID uint `json:"runID" gorm:"type:integer REFERENCES runs(id)"`...
package main import ( "encoding/json" "errors" "flag" "fmt" "os" "os/signal" "strconv" "strings" "sync" "syscall" "time" ) // A CLI interface to a Shifter. // // If statsfilename is supplied, a stats aggregator goroutine is created which collects // statistics on statsinterval and writes the totals since t...
/* Copyright AppsCode Inc. and Contributors 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 commands import ( "database/sql" "errors" "fmt" "github.com/heimdalr/gtfs" "github.com/spf13/cobra" "gorm.io/driver/sqlite" "gorm.io/gorm" "gorm.io/gorm/logger" "log" "strings" "time" ) const ( // statement to remove all agencies not like a given name delAgencyStmt = ` DELETE FROM agencies WHER...
// Copyright 2021 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 agree...
//<developer> // <name><NAME></name> // <email><EMAIL></email> // <wx>superexc</wx> // <qqgroup>128148617</qqgroup> // <url>https://jsq.ink</url> // <role>pku engineer</role> // <date>2019-03-16 20:02:52</date> //</624461725902573568> package main import ( "bufio" "bytes" "encoding/json" "fm...
package coapmq import ( "errors" "log" "time" "github.com/dustin/go-coap" ) type subConnection struct { channel chan string clientCon *coap.Conn } type Client struct { msgIndex uint16 serAddr string subList map[string]subConnection } // Create a pubsub client for CoAP protocol // It will connect to se...
// Pipe - A small and beautiful blogging platform written in golang. // Copyright (c) 2017-present, b3log.org // // Pipe is licensed under Mulan PSL v2. // You can use this software according to the terms and conditions of the Mulan PSL v2. // You may obtain a copy of Mulan PSL v2 at: // http://license.coscl.or...
package keycloakoidc import ( "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "strings" v32 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3" "github.com/rancher/rancher/pkg/auth/providers/oidc" "github.com/sirupsen/logrus" ) //account defines properties an account in keycloak has type ac...
// Copyright 2011 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 ldap import ( "fmt" "github.com/mavricknz/asn1-ber" ) const ( ModAdd = 0 ModDelete = 1 ModReplace = 2 ModIncrement = 3 ) var ModMap ...
/* * Copyright 2017 XLAB d.o.o. * * 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 reconcilers import ( "context" "fmt" "strings" "github.com/3scale/3scale-operator/pkg/common" "github.com/go-logr/logr" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/discovery" "k8s.io/client-go/tools/record" "sigs.k8s.io/c...
// Package tilegraphics implements a graphics rendering using small tiles. This // is especially useful for devices with a slow bus to the display, like screens // driven over SPI. // // Instantiate an Engine object using NewEngine and draw objects on it. The // objects can be changed and moved after creation. These ch...