text
stringlengths
3.08k
10.4k
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use ...
// Copyright 2020 Anapaya Systems // // 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 2020 The Chromium OS 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 wilco import ( "context" "encoding/json" "time" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/empty" "chromium...
package classify import ( "bufio" "bytes" "errors" "image" "io/ioutil" "math" "os" "path" "path/filepath" "sort" "strings" "github.com/disintegration/imaging" "github.com/photoprism/photoprism/pkg/txt" tf "github.com/tensorflow/tensorflow/tensorflow/go" ) // TensorFlow is a wrapper for tensorflow low-l...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT package seh1 import ( "github.com/aws/amazon-cloudwatch-agent/metric/distribution" "log" "math" ) // // https://code.amazon.com/packages/MetricAgent/trees/mainline/--/src/amazon/monitoring/metric/agent/distributi...
package nemesis import ( "context" "errors" "math/rand" "strings" "time" chaosv1alpha1 "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" "github.com/ngaut/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/pingcap/tipocket/pkg/cluster" "github.com/pingcap/tipocket/pkg/core" ) // timeChaosLevels ...
// +build !baremetal,!js // Portions copyright 2009 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 os import ( "io" "syscall" ) func init() { // Mount the host filesystem at the root directory. This is what most...
package xmpp import ( "bufio" "context" "encoding/xml" "errors" "fmt" "io" "strings" "time" "github.com/michaelhenkel/go-xmpp/stanza" "nhooyr.io/websocket" ) const maxPacketSize = 32768 const pingTimeout = time.Duration(5) * time.Second var ServerDoesNotSupportXmppOverWebsocket = errors.New("the websocke...
package initialize import ( "bytes" "context" "fmt" "io" "os" "os/exec" "github.com/gobuffalo/packr" "github.com/rotisserie/eris" "github.com/solo-io/gloo-mesh/codegen/helm" "github.com/solo-io/gloo-mesh/pkg/common/defaults" "github.com/solo-io/gloo-mesh/pkg/common/version" "github.com/solo-io/gloo-mesh/p...
package ui import ( "fmt" "github.com/sirupsen/logrus" "github.com/wagoodman/dive/dive/filetree" "strconv" "strings" "github.com/dustin/go-humanize" "github.com/jroimartin/gocui" "github.com/lunixbochs/vtclean" ) // DetailsController holds the UI objects and data models for populating the lower-left pane. Sp...
package proc import ( "container/list" "github.com/PuerkitoBio/goquery" "tesou.io/platform/poem-parent/poem-api/common/base" "github.com/hu17889/go_spider/core/common/page" "github.com/hu17889/go_spider/core/pipeline" "github.com/hu17889/go_spider/core/spider" "strconv" "strings" "tesou.io/platform/poem-paren...
// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
// Copyright 2020 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
// 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 cmd import ( "fmt" "log" "os" "strconv" "github.com/XeroAPI/xoauth/pkg/config" "github.com/XeroAPI/xoauth/pkg/connect" "github.com/XeroAPI/xoauth/pkg/tokens" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "xoauth", Short: "🔒 XOAuth – Get yourself some OAuth2 tokens", Long: ` 🔒 X...
package init import ( "context" "fmt" "io" "io/ioutil" "os" "path/filepath" "syscall" dfv1 "github.com/argoproj-labs/argo-dataflow/api/v1alpha1" sharedutil "github.com/argoproj-labs/argo-dataflow/shared/util" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5...
/* * Minio Cloud Storage, (C) 2016 Minio, 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 la...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ec2 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type AssociateVpcCidrBlockInput struct { _ struct{} `type:"structure"` // Requests an Amazon-provided IPv6 CIDR block with a ...
package model import "github.com/gogf/gf/frame/g" var Config ServerConfig func init() { Config.Jwt.ExpiresAt = g.Cfg("jwt").GetInt("jwt.ExpiresAt") Config.Jwt.RefreshAt = g.Cfg("jwt").GetInt("jwt.RefreshAt") Config.Jwt.SigningKey = g.Cfg("jwt").GetString("jwt.SigningKey") } func init() { Config.Oss.Local.LocalP...
package viber import ( "crypto/hmac" "crypto/sha256" "encoding/hex" "encoding/json" "io/ioutil" "log" "net/http" "regexp" "strings" "time" ) // Sender structure type Sender struct { Name string `json:"name"` Avatar string `json:"avatar,omitempty"` } type event struct { Event string `json:"ev...
package main import ( "bufio" "fmt" "io/ioutil" "os" "os/exec" "path" "strings" ) type Runner struct { Program string ProgramArgs string DefaultDir string List []Exe ConfigFile string ListFile string } // see if there is a configuration stored in configuration dir // if not then create it...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package servicecatalog import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type CreateServiceActionInput struct { _ struct{} `type:"structure"` // The language code. // // * en - Engli...
package sitemap import ( "fmt" "io" "io/ioutil" "net/url" "strings" "sync" "github.com/PuerkitoBio/goquery" hclog "github.com/hashicorp/go-hclog" "github.com/temoto/robotstxt" ) // Crawl fetches the root URL and then crawls it with the given parallelism. It will // return the sitemap and the number of warni...
package main import ( "fmt" "os" "path/filepath" "strings" "github.com/bitrise-io/go-steputils/stepconf" "github.com/bitrise-io/go-steputils/tools" "github.com/bitrise-io/go-utils/log" "github.com/bitrise-steplib/bitrise-step-build-router-start/bitrise" ) const envBuildSlugs = "ROUTER_STARTED_BUILD_SLUGS" /...
package image import ( "fmt" "image" "image/jpeg" "image/png" "os" "path/filepath" "strings" "github.com/flopp/go-findfont" "github.com/fogleman/gg" "github.com/pterm/pterm" "github.com/dops-cli/dops/cli" ) // Watermark contains the watermark logic func Watermark() *cli.Command { return &cli.Command{ ...
/* SMR technology drive management torture test Copyright 2018 <NAME> <<EMAIL>> */ package main import ( "os" "fmt" "flag" "math" "time" "unsafe" "strconv" "syscall" "io/ioutil" "math/rand" ) func AlignedBytes(size, align uint) []byte { buf := make([]byte, size + align, size + align) ptr := unsafe.Point...
// Code generated by go-swagger; DO NOT EDIT. package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" "github.com/go-openapi/swag" ) // DebugE...
package comic import ( "errors" "fmt" "strings" "github.com/spf13/viper" ) const ( // config data file name defaultConfigFileName = "config" // config data file path defaultConfigFilePath = "." // placeholder command name used for single command applications defaultSingleCommandAppName = "main" // separat...
package downloader import ( "sync" "sync/atomic" "time" ) //Status 状态 type Status interface { StatusCode() StatusCode //状态码 StatusText() string } //StatusCode 状态码 type StatusCode int //WorkerStatus worker状态 type WorkerStatus struct { statusCode StatusCode } //DlStatus 下载状态接口 type DlStatus interface { TotalS...
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
package main import ( "fmt" "math" "gonum.org/v1/plot" "gonum.org/v1/plot/plotter" "gonum.org/v1/plot/plotutil" "gonum.org/v1/plot/vg" ) // F returns the value of the original f(x, y) given in the task at point (x, y). // Needs to be changed for other equations. func F(x, y float64) float64 { return 50 * y * ...
package bls import ( "encoding/binary" "errors" bls12 "github.com/herumi/bls-eth-go-binary/bls" "github.com/olympus-protocol/ogen/pkg/params" ) var ( // ErrorSecSize returned when the secrete key size is wrong ErrorSecSize = errors.New("secret key size is wrong") // ErrorSecUnmarshal returned when the secret k...
// +build medium /* Copyright (c) 2020 SolarWinds Worldwide, 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 ...
// Unless explicitly stated otherwise all files in this repository are licensed // under the MIT License. // This product includes software developed at Guance Cloud (https://www.guance.com/). // Copyright 2021-present Guance, Inc. package build import ( "fmt" "os" "os/exec" "path/filepath" "runtime" "strings" ...
// Schema for objects defined at https://www.thebluealliance.com/apidocs/v3 package bamm import "fmt" type TeamSimple struct { // TBA team key with the format frcXXXX with XXXX representing the team number. Key string `json:"key"` // Official team number issued by FIRST. TeamNumber int `json:"team_number"` // Te...
// +build linux package filesystem import ( contextpkg "context" "os" "path/filepath" "time" "github.com/pkg/errors" "github.com/golang/groupcache/lru" ) const ( watchNativeNonRecursiveMaximumWatches = 50 ) func watchNative(context contextpkg.Context, root string, events chan struct{}, pollInterval uint32)...
package deliver import ( "context" "math/rand" "time" "github.com/MixinNetwork/bot-api-go-client" "github.com/asaskevich/govalidator" "github.com/fox-one/pkg/logger" "github.com/fox-one/pkg/text/localizer" "github.com/yiplee/blockquiz/core" "github.com/yiplee/blockquiz/store" "golang.org/x/sync/errgroup" "...
package exif import ( "bytes" "fmt" "math" "reflect" "strconv" "strings" "time" log "github.com/dsoprea/go-logging" exifcommon "github.com/imclaren/go-exif/common" ) var ( utilityLogger = log.NewLogger("exif.utility") ) var ( timeType = reflect.TypeOf(time.Time{}) ) // ParseExifFullTimestamp parses dat...
package config import ( "bytes" "encoding/json" "io/ioutil" "log" "math/big" "os" "time" ) const ( DefaultConfigFilename = "./config.json" MINGENBLOCKTIME = 2 DefaultGenBlockTime = 6 ) var ( Parameters configParams Version string mainNet = &ChainParams{ Name: "MainNet", ...
/* Copyright © 2019 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense...
package portal import ( "context" "path" goharborv1 "github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1" harbormetav1 "github.com/goharbor/harbor-operator/apis/meta/v1alpha1" "github.com/goharbor/harbor-operator/controllers" "github.com/goharbor/harbor-operator/pkg/image" "github.com/goharbor/harbor-...
/* 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 2019 The Kubeflow 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, so...
package commands import ( "os" "path/filepath" "github.com/spf13/cobra" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/types" ) // MakeResetComm...
package client import ( "bytes" "context" "encoding/json" "fmt" "net/http" ) // CreateAccount struct type CreateAccount struct { Name string `json:"name"` ID string `json:"id"` Password string `json:"password"` FullName string `json:"fullName,omitempty"` IsActive bool `json:"isActive,o...
//----------------------------------------------------------------------------- /* Joko Engineering Part https://www.youtube.com/c/JokoEngineeringhelp https://grabcad.com/library/freecad-practice-part-1 */ //----------------------------------------------------------------------------- package main import ( "log" ...
package main import ( "crypto/rand" "crypto/rsa" "errors" "flag" "fmt" "log" "net" "os" "os/signal" "strconv" "syscall" "time" "golang.org/x/crypto/ssh" "upper.io/db.v3" "upper.io/db.v3/lib/sqlbuilder" "upper.io/db.v3/sqlite" ) type Result struct { Username string `db:"username"` Password st...
// Code generated by protoc-gen-go. // source: greet.proto // DO NOT EDIT! /* Package unary is a generated protocol buffer package. It is generated from these files: greet.proto It has these top-level messages: Request Response */ package unary import ( "fmt" "math" "github.com/golang/protobuf/proto" "golan...
// Package that implements the creation of profiles that resemble real devices, // including topics that clients can subscribe to, and generate random values. // // TODO include a method to load profile topics and determine wether the returning // value should be a number in a range, a string or something else. package...
// Copyright © 2018 <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 fivetran import ( "context" "fmt" "strconv" "github.com/fivetran/go-fivetran" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceDestination() *schema.Resource { return &schema.Resource{ ReadContext: dataSourceDestination...
package generate import ( "fmt" "io" "log" "regexp" "strings" "golang.org/x/net/html" ) var prop = regexp.MustCompile(`{{([a-zA-Z0-9().]+)}}`) func replaceValue(s string) (string, bool) { props := prop.FindStringSubmatch(s) if len(props) > 1 { return props[1], true } return s, false } // Converter ... ...
package main import ( "testing" ) type parseCmdTest struct { input string split []string ok bool } var parseCmdTests = []parseCmdTest{ parseCmdTest{`w1 w2`, []string{`w1`, `w2`}, true}, parseCmdTest{`w1 w2 w3`, []string{`w1`, `w2`, `w3`}, true}, parseCmdTest{`w1 'w2 w3'`, []string{`w1`, `'w2 w3'`}, true}, ...
package app import ( "fmt" "math/rand" "regexp" "sort" "strings" kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" kutil "github.com/GoogleCloudPlatform/kubernetes/pkg/util" deploy ...
package expr import ( "fmt" "strings" "testing" ) var ( testrand = NewRandom("test") simpleResult = resultType("a", String, "b", Int, view("default", "a", String, "b", Int), view("link", "a", String)) simpleResultDefault = resultType("a", String, "b", Int) simpleResultLink = resultType("a", String) ...
package sdkv2 import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim" ) var _ = shim.Schema(v2Schema{}) var _ = shim.SchemaMap(v2SchemaMap{}) // UnknownVariableValue is the sentina...
/* 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 rateengine import ( "time" "github.com/pkg/errors" "go.uber.org/zap" "go.uber.org/zap/zapcore" "github.com/transcom/mymove/pkg/models" "github.com/transcom/mymove/pkg/unit" ) // LinehaulCostComputation represents the results of a computation. type LinehaulCostComputation struct { BaseLinehaul ...
package rds import ( "encoding/json" "fmt" "github.com/huaweicloud/golangsdk/openstack/rds/v1/instances" "github.com/huaweicloud/huaweicloud-service-broker/pkg/database" "github.com/huaweicloud/huaweicloud-service-broker/pkg/models" ) // BuildBindingCredential from different rds instance func BuildBindingCreden...
package controller import ( "context" "fmt" "github.com/sirupsen/logrus" ingressv1alpha1 "github.com/openshift/cluster-ingress-operator/pkg/apis/ingress/v1alpha1" "github.com/openshift/cluster-ingress-operator/pkg/manifests" "github.com/openshift/cluster-ingress-operator/pkg/util/slice" appsv1 "k8s.io/api/ap...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package objectstorage import ( "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Manages a V1 container resource within OpenStack. type Container str...
package main import ( "crypto/tls" "crypto/x509" "fmt" "io/ioutil" "net/http" "os" "path/filepath" cli "github.com/030/n3dr/internal/artifacts" "github.com/gobuffalo/packr/v2" homedir "github.com/mitchellh/go-homedir" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" jww "github.com/spf13/jwalter...
/* Provides a service that accepts objects via a chan and publishes them again via a second chan. Objects are buffered with a file on disk rather than in memory. This allows senders to send objects faster than receivers can process them without consuming much memory. Note that this is not intended to achieve p...
package encryption_test import ( "encoding/base64" "testing" "math/rand" "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/nguyentb/hlf_cclib/convert" "github.com/nguyentb/hlf_cclib/extensions/debug" "github.com/nguyentb/hlf_cclib/extensions/encryption" "github.com/nguyentb/hlf_cclib...
package iostream import ( "bytes" "container/ring" "errors" "sync" ) // StreamBuffer represents a buffer for streaming data that consolidates random // accesses into sequential accesses using a moving buffer. This buffer // contains a series of pre-allocated buffers. Each time the user writes a // chunk of data v...
package scene import ( "log" "sync" "time" "unsafe" "github.com/dgraph-io/ristretto" gonanoid "github.com/matoous/go-nanoid/v2" "photofield/internal/collection" "photofield/internal/image" "photofield/internal/layout" "photofield/internal/metrics" "photofield/internal/render" ) type SceneSource struct { ...
// Copyright (c) 2019 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 applica...
package gandi import ( "encoding/json" "fmt" "log" "sort" "github.com/StackExchange/dnscontrol/models" "github.com/StackExchange/dnscontrol/providers" "github.com/StackExchange/dnscontrol/providers/diff" "github.com/pkg/errors" "strings" gandidomain "github.com/prasmussen/gandi-api/domain" gandirecord "g...
package main import ( "CrackWatchDiscordBot/crackwatch" "errors" "flag" "fmt" "log" "math" "os" "os/signal" "strconv" "strings" "sync" "syscall" "time" "unicode" "github.com/bwmarrin/discordgo" "golang.org/x/text/language" "golang.org/x/text/message" ) var ( discordBotToken = flag.String("token", "...
// Code generated by go-swagger; DO NOT EDIT. package devices // 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 main import ( "bytes" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "strings" "github.com/asaskevich/govalidator" "github.com/sensu-community/sensu-plugin-sdk/sensu" "github.com/sensu-community/sensu-plugin-sdk/templates" corev2 "github.com/sensu/sensu-go/api/core/v2" ) // VOEvent is the J...
// // Copyright 2021 The Sigstore 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 ...
//go:build e2e_framework // +build e2e_framework package framework import ( "bytes" "context" "fmt" "io" "io/ioutil" "math/rand" "os" "os/exec" "path/filepath" "strconv" "strings" "time" ) func init() { rand.Seed(time.Now().Unix()) } // CiOperatorCommand exposes a ci-operator invocation to a test and /...
// Copyright The OpenTelemetry 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...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _ = ...
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT license. */ package storage import ( "fmt" "github.com/Azure/azure-service-operator/v2/tools/generator/internal/astmodel" "github.com/Azure/azure-service-operator/v2/tools/generator/internal/interfaces" "github.com/pkg/errors" ) // PropertyC...
/* Copyright 2019 Intel 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 in writing, softwa...
// Copyright (c) <NAME>. (https://github.com/jeevatkm) // Source code and usage is governed by a MIT style // license that can be found in the LICENSE file. package aah import ( "io" "net/http/httptest" "path/filepath" "reflect" "strings" "testing" "aahframe.work/ahttp" "aahframe.work/ainsp" "aahframe.work/...
// (c) 2019-2020, <NAME>, Inc. All rights reserved. // See the file LICENSE for licensing terms. package zapavm import ( "errors" "fmt" "net/http" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/json" log "github.com/inconshreveable/log15" "github.com/zapalabs/zapavm/zapavm/zclien...
/* Copyright The Kubepack Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
// Code generated by go-swagger; DO NOT EDIT. package documents // 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.co...
package main import ( "encoding/json" "errors" "github.com/apognu/gocal" "log" "net/http" "strings" "unicode" ) func parseIcsFromUrl(icsUrl string) ([]string, error) { // Download the .ics from the website resp, err := http.Get(icsUrl) // This will probably fire if the internet is down if err != nil { l...
package index import ( "encoding/json" "reflect" bosherr "github.com/cloudfoundry/bosh-init/internal/github.com/cloudfoundry/bosh-utils/errors" boshsys "github.com/cloudfoundry/bosh-init/internal/github.com/cloudfoundry/bosh-utils/system" ) type FileIndex struct { path string fs boshsys.FileSystem } type in...
// Package clientts generates client-side TypeScript library package clientts import ( "bytes" "fmt" "reflect" "sort" "strings" "text/template" "github.com/go-generalize/api_gen/pkg/parser" "github.com/go-utils/astutil" "github.com/iancoleman/strcase" ) const ( queryTagKey = "param" jsonTagKey = "json" )...
package gosmpp import ( "errors" "net" "strconv" "sync" "time" "github.com/andrewz1/gosmpp/Data" "github.com/andrewz1/gosmpp/Exception" "github.com/andrewz1/gosmpp/Utils" ) const ( // CONN_SERVER byte = 2 CONN_NONE byte = 0 CONN_CLIENT byte = 1 DFLT_IO_BUF_SIZE ...
package bus import ( "database/sql/driver" "time" "transport/lib/database" "transport/lib/nulltypes" "gopkg.in/guregu/null.v3" ) var ExampleVJRows = [][]driver.Value{ { "MTA NYCT_M55", 1, "MTA NYCT_MQ_E9-Sunday-038000_M55_2", "M55", "MTA NYCT", "MTA_803080", "MTA_803185", "NULL", `{"MTA NYCT_224082","MTA B...
package oomstore import ( "bufio" "context" "io" "github.com/oom-ai/oomstore/pkg/oomstore/util" "github.com/oom-ai/oomstore/internal/database/metadata" "github.com/oom-ai/oomstore/internal/database/offline" "github.com/spf13/cast" "github.com/oom-ai/oomstore/internal/database/dbutil" "github.com/oom-ai/oom...
// Copyright 2019 Google LLC. 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...
/* Copyright (c) 2021 - Present. Blend Labs, Inc. All rights reserved Use of this source code is governed by a MIT license that can be found in the LICENSE file. */ package main import ( "context" "fmt" "os" "github.com/spf13/cobra" "github.com/blend/go-sdk/configutil" "github.com/blend/go-sdk/logger" "git...
package main import ( "fmt" "gitee.com/jntse/minehero/pbmsg" "gitee.com/jntse/gotoolkit/log" "gitee.com/jntse/gotoolkit/net" "gitee.com/jntse/gotoolkit/redis" _"gitee.com/jntse/gotoolkit/util" "github.com/go-redis/redis" pb "github.com/golang/protobuf/proto" "gitee.com/jntse/minehero/server/def" ) type Client...
package chash /* 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 core /* Onix Config Manager - Artisan Copyright (c) 2018-Present by www.gatblau.org Licensed under the Apache License, Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0 Contributors to this project, hereby assign copyright in this code to the project, to be licensed under the same terms as th...
package data import ( "encoding/json" "fmt" "io" "log" "net/http" "strconv" "github.com/brentp/bix" "github.com/gorilla/mux" ) type TabixManager struct { uriMap map[string]string dataMap map[string]*bix.Bix dbname string valueMap map[string]map[string]interface{} //LONG LABELS subdir string } ty...
package semt import ( "encoding/xml" "github.com/thought-machine/finance-messaging/iso20022" ) type Document01700101 struct { XMLName xml.Name `xml:"urn:iso:std:iso:20022:tech:xsd:semt.017.001.01 Document"` Message *SecuritiesTransactionPostingReportV01 `xml:"SctiesTxPstngRpt"` } f...
package core import ( "fmt" ) type ActionType uint8 type OperationSlice []*Operations const ( ADDField ActionType = iota DELETEField ALTERField ADDTable DELETETable ADDIndex DELETEIndex ADDUniqueIndex DELETEUniqueIndex ) const ( ADDIndexStr = "core.ADDIndex" DELETEIndexStr = "core.DELETEI...
package wexapi import ( "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "strconv" "github.com/pkg/errors" "github.com/shopspring/decimal" ) const ( publicAPIEndpoint = "https://wex.nz/api/3" orderParamsCount = 2 orderRateIndex = 0 orderAmountIndex = 1 ) // InfoResponse for /info path. type Inf...
package consent import ( "testing" ) func TestConsentV2Parse(t *testing.T) { s := "COtybn4PA_zT4KjACBENAPCIAEBAAECAAIAAAAAAAAAA" c := ConsentV2{} err := c.Parse(s) noError(t, err) equal(t, int(c.Version()), 2) equal(t, c.Created.String(), "2020-01-26 18:01:00 +0100 CET") equal(t, c.LastUpdated.String(), "202...
package AdminControllers import ( "strings" "fmt" "io/ioutil" "time" "path/filepath" "os" "github.com/TruthHun/DocHub/helper" "github.com/TruthHun/DocHub/models" "github.com/aliyun/aliyun-oss-go-sdk/oss" "github.com/astaxie/beego/orm" ) type SysController struct { BaseController } type logFile struct...
package main import ( "context" "flag" "fmt" "io" "io/ioutil" "net/http" "os" "path/filepath" "text/template" "time" "github.com/sirupsen/logrus" "github.com/so0k/r53Server/version" ) const ( // BANNER is what is printed for help/info output. BANNER = ` Server to index & view records in r53 zones. Ve...
package gwtf import ( "context" "fmt" "io/ioutil" "log" "github.com/enescakir/emoji" "github.com/onflow/cadence" "github.com/onflow/flow-go-sdk/client" "google.golang.org/grpc" ) //FlowScriptBuilder is a struct to hold information for running a script type FlowScriptBuilder struct { GoWithTheFlow *GoWithThe...