text
stringlengths
3.08k
10.4k
package insider import ( "bytes" "context" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "os" "path/filepath" "strings" "time" "github.com/insidersec/insider/report" ) type JavaScriptAnalyzer struct { logger *log.Logger npm NPM } func NewJavaScriptAnalyzer(npm NPM, logger *log.Logger) JavaScri...
/* * MinIO Client (C) 2020 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 law or agr...
package relay import ( "bytes" "encoding/json" "fmt" log "github.com/Sirupsen/logrus" "github.com/go-yaml/yaml" "github.com/operable/go-relay/relay/bus" "github.com/operable/go-relay/relay/messages" "github.com/operable/go-relay/relay/util" "io/ioutil" "os" "path" "path/filepath" "strings" "time" ) // D...
/* 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 agreed to in writing, soft...
package network import ( "errors" "fmt" "net" "sync" "time" "github.com/newswarm-lab/new-bee/pkg/bonus/log" ) var ( curSessionID = uint32(0) sessionLock sync.Mutex ) type PingPongFunc func(session *Session) type Session struct { sync.Mutex waitGroup sync.WaitGroup //sync sessionID uint32 ...
// Package ircparse provides an IRC message parser and serializer supporting RFC1459 and IRCv3 message tags. package ircparse import ( "fmt" "regexp" "sort" "strings" ) // An RFC1459 IRC protocol message. Supports IRCv3 tags. type Msg struct { // Where :server.name is present, this is "server.name". ServerName ...
// Copyright 2014 The Cockroach 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 ag...
// Copyright (c) 2018 Cisco and/or its affiliates. // // 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 fir implements the FIR benchmark form Hetero-Mark. package fir import ( "log" "math" "gitlab.com/akita/mgpusim/driver" "gitlab.com/akita/mgpusim/insts" "gitlab.com/akita/mgpusim/kernels" ) // KernelArgs defines kernel arguments type KernelArgs struct { Output driver.GPUPtr Filter ...
// // KULADO INC. CONFIDENTIAL // __________________ // // [2014] - [2019] KULADO INC. // All Rights Reserved. // // NOTICE: All information contained herein is, and remains // the property of KULADO INC. and its suppliers, // if any. The intellectual and technical concepts contained // herein are proprietary to KULA...
package main import ( "encoding/json" "fmt" "io/ioutil" "log" "os" "regexp" "strings" "github.com/Open-Science-Global/idtapi" "github.com/Open-Science-Global/poly/io/genbank" "github.com/spf13/cobra" ) func main() { Execute() } type SeqInfo struct { Name string `json:"name"` IsSynt...
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package ref import ( "time" "testing" "github.com/stretchr/testify/assert" "github.com/google/uuid" "flag" ) type FAddress struct { Country string `json:"country" yaml:"country"` Index string `json:"index" yaml:"index"` City string `json:"city"...
package libra import ( "fmt" "github.com/yejingxuan/go-libra/pkg/server" "net" "sync" "github.com/gin-gonic/gin" "github.com/robfig/cron" "github.com/spf13/viper" "golang.org/x/sync/errgroup" "google.golang.org/grpc" "github.com/panjf2000/ants/v2" "github.com/yejingxuan/go-libra/pkg/conf" "github.com/yej...
package main import ( "flag" "fmt" "github.com/ghodss/yaml" "io/ioutil" "log" "os" "os/exec" "strings" ) type BrewYaml []map[string]interface{} func main() { configFile := flag.String("config", "brew.yaml", "path to the brew.yaml config file") flag.Parse() fmt.Printf("reading %v\n", *configFile) data, e...
package pkg import ( "fmt" "github.com/mattn/go-isatty" "github.com/owenrumney/go-sarif/sarif" "github.com/pterm/pterm" log "github.com/sirupsen/logrus" "os" "path/filepath" "strings" ) // TODO: unify logging/error exiting messages across the codebase // https://patorjk.com/software/taag/#p=testall&f=Impossi...
package network import ( "context" "encoding/hex" "fmt" "sync" lp2p "github.com/libp2p/go-libp2p" lp2pcircuit "github.com/libp2p/go-libp2p-circuit" lp2pcrypto "github.com/libp2p/go-libp2p-core/crypto" lp2phost "github.com/libp2p/go-libp2p-core/host" lp2peer "github.com/libp2p/go-libp2p-core/peer" lp2pdht "g...
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
package library import ( "fmt" "os" "path" "path/filepath" "strings" polochon "github.com/odwrtw/polochon/lib" index "github.com/odwrtw/polochon/lib/media_index" "github.com/sirupsen/logrus" ) // MovieIDs returns the movie ids func (l *Library) MovieIDs() []string { return l.movieIndex.IDs() } // MovieInde...
package hstream import ( "context" "github.com/hstreamdb/hstreamdb-go/client" "github.com/hstreamdb/hstreamdb-go/hstreamrpc" hstreampb "github.com/hstreamdb/hstreamdb-go/proto/gen-proto/hstream/server" "github.com/hstreamdb/hstreamdb-go/util" "github.com/pkg/errors" "go.uber.org/zap" "google.golang.org/grpc" ...
// 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...
/* * Copyright 2018 The Kythe Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
package connector import ( "context" "fmt" "strings" "github.com/harness/harness-go-sdk/harness/nextgen" "github.com/harness/terraform-provider-harness/helpers" "github.com/harness/terraform-provider-harness/internal/gitsync" u "github.com/harness/terraform-provider-harness/internal/utils" "github.com/hashico...
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei...
package graphql_test import ( "context" "fmt" "testing" "github.com/evergreen-ci/evergreen" "github.com/evergreen-ci/evergreen/db" "github.com/evergreen-ci/evergreen/graphql" "github.com/evergreen-ci/evergreen/model" "github.com/evergreen-ci/evergreen/model/task" "github.com/evergreen-ci/evergreen/model/user...
// Copyright 2012-present <NAME>. All rights reserved. // Use of this source code is governed by a MIT-license. // See http://olivere.mit-license.org/license.txt for details. package elastic import ( "context" "encoding/json" "fmt" "net/http" "net/url" "strings" "github.com/olivere/elastic/v7/uritemplates" ) ...
package lion import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( rexBirthday = nook.Birthday{ Day: 24, Month: t...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: mesh/v1alpha1/dataplane_overview.proto package v1alpha1 import ( fmt "fmt" _ "github.com/envoyproxy/protoc-gen-validate/validate" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise us...
package services import ( "encoding/json" "io/ioutil" "net/http" "github.com/gorilla/mux" cconf "github.com/pip-services3-go/pip-services3-commons-go/config" cdata "github.com/pip-services3-go/pip-services3-commons-go/data" cerr "github.com/pip-services3-go/pip-services3-commons-go/errors" crefer "github.com/...
package main import ( "time" "github.com/astaxie/beego/config" "github.com/astaxie/beego/logs" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/rpcclient" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil/base58" ) const ( DefaultDust ...
// Copyright 2022 The Casdoor Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
/* Copyright © 2020 <NAME> <<EMAIL>> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
package arduino import ( "encoding/binary" "fmt" "log" "math" "net/url" "regexp" "strconv" "strings" "time" "github.com/yanzay/autohome/modules/generic" "github.com/yanzay/automata" "github.com/yanzay/reactiverecord" ) type ArduinoModule struct { generic.GenericModule arduino *automata.Arduino db ...
/* * 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...
// Copyright 2019 Anapaya Systems package fake import ( "context" "encoding/json" "fmt" "io/ioutil" "net" "time" "github.com/scionproto/scion/go/lib/addr" "github.com/scionproto/scion/go/lib/common" "github.com/scionproto/scion/go/lib/ctrl/path_mgmt" "github.com/scionproto/scion/go/lib/sciond" "github.com...
package metrics import ( "testing" "time" "github.com/launchdarkly/ld-relay/v6/config" st "github.com/launchdarkly/ld-relay/v6/internal/core/sharedtest" "gopkg.in/launchdarkly/go-sdk-common.v2/ldlog" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opencensus.io/stats" "go.ope...
package main import ( "html/template" "net/http" "time" "github.com/ua-parser/uap-go/uaparser" ) type UnsafeTemplateData map[string]string type SafeTemplateJs map[string]template.JS type SafeTemplateCss map[string]template.CSS type Configuration struct { Host string `json:"Host"` Port int `json:"...
package fakedata import ( "fmt" "github.com/brianvoe/gofakeit/v5" accountRpc "github.com/getcouragenow/sys-share/sys-account/service/go/rpc/v2" sharedConfig "github.com/getcouragenow/sys-share/sys-core/service/config" "github.com/getcouragenow/sys-share/sys-core/service/fakehelper" "math/rand" ) type bootstrapS...
package treerack import "strconv" func dropComments(n *Node) *Node { ncc := *n nc := &ncc nc.Nodes = filterNodes(func(n *Node) bool { return n.Name != "comment" }, n.Nodes) nc.Nodes = mapNodes(dropComments, nc.Nodes) return nc } func flagsToCommitType(n []*Node) CommitType { var ct CommitType for _, ni := ran...
// SPDX-FileCopyrightText: 2020 SAP SE or an SAP affiliate company and Gardener contributors. // // SPDX-License-Identifier: Apache-2.0 package remote import ( "context" "errors" "fmt" "io/ioutil" "os" "path/filepath" cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2" "github.com/gardener/componen...
// Copyright 2020 The SQLFlow Authors. All rights reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
package search import ( "context" "sort" "strings" "html/template" "github.com/inconshreveable/log15" "github.com/sourcegraph/sourcegraph/cmd/frontend/internal/highlight" "github.com/sourcegraph/sourcegraph/internal/api" "github.com/sourcegraph/sourcegraph/internal/search/result" stream "github.com/sourcegr...
package secrets import ( "fmt" httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/ActiveState/cli/internal/errs" "github.com/ActiveState/cli/internal/locale" "github.com/ActiveState/cli/internal/logging" "github.com/ActiveState/cli/pkg/platform/api" "github.com/Ac...
package money import ( "encoding/xml" "fmt" "io" "io/ioutil" "net/http" "os" "reflect" "testing" ) func TestCurrency_Get(t *testing.T) { tcs := []struct { code string expected string }{ {EUR, "EUR"}, {"EUR", "EUR"}, {"Eur", "EUR"}, } for _, tc := range tcs { c := newCurrency(tc.code).get(...
// Copyright 2014 <NAME>. All rights reserved. // Use of this source code is governed by The MIT License // found in the accompanying LICENSE file. package ora /* #include <oci.h> #include "version.h" */ import "C" import ( "io" "unsafe" ) type bndLobSlice struct { stmt *Stmt ocibnd *C.OCIBind ...
// Package repo implements gotoil's core project management functionality package repo import ( "context" "errors" "fmt" "io/fs" "net/http" "os" "strings" "github.com/FollowTheProcess/gotoil/pkg/api" "github.com/google/go-github/v38/github" ) const gitHubBaseURL = "https://github.com" // ErrEmptyDir warns ...
package main import ( "fmt" "os" // "strings" "time" "encoding/csv" "github.com/Arafatk/glot" "gorgonia.org/tensor" ) func run(o Optimizer, optiIndex int) []Point { // Main optimization loop var trajectory = []Point{} trajectory = append(trajectory, *o.getCurrent()) // Set the first point as the begining...
// Code generated by https://github.com/gagliardetto/anchor-go. DO NOT EDIT. package nft_candy_machine_v2 import ( "errors" ag_binary "github.com/gagliardetto/binary" ag_solanago "github.com/gagliardetto/solana-go" ag_format "github.com/gagliardetto/solana-go/text/format" ag_treeout "github.com/gagliardetto/tree...
// Package glog implements almost [glog](https://github.com/golang/glog) package API. // The aim of this package is to replace all the glog calls for the ones to a custom // logger that satisfies this package Logger interface. This way any code using glog // global logger will use the desired logger. package glog impo...
package firestore import ( "context" "errors" "cloud.google.com/go/firestore" "golang.org/x/xerrors" "google.golang.org/api/iterator" "github.com/ww24/linebot/domain/model" ) type Conversation struct { *Client } type ShoppingItem struct { ID string `firestore:"-"` Name string `firest...
/* Copyright 2019 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
package main // #cgo LDFLAGS: -Wl,-rpath -Wl,\$ORIGIN/lib // import "C" import ( "bufio" "bytes" "io/ioutil" "os" "path/filepath" "sort" "github.com/sdeoras/edge/grpc/inception" tf "github.com/tensorflow/tensorflow/tensorflow/go" "github.com/tensorflow/tensorflow/tensorflow/go/op" ) var ( graph *tf.Graph...
// Package parser implements a parser for a template string. package parser import ( "io" "github.com/zoncoen/scenarigo/template/ast" "github.com/zoncoen/scenarigo/template/token" ) // Parser represents a parser. type Parser struct { s *scanner cal *posCalculator pos int tok token.Token lit ...
package storage import ( "context" "fmt" "io" "io/ioutil" "net/http" "time" gstorage "cloud.google.com/go/storage" ttlcache "github.com/patrickmn/go-cache" "go.skia.org/infra/go/gcs" "go.skia.org/infra/go/skerr" "go.skia.org/infra/go/sklog" "go.skia.org/infra/go/util" "go.skia.org/infra/golden/go/types" ...
//Package hander handles reactions. A reaction is basically a series of actions // trigerred by an event. package handler import ( "sync" "fmt" log "github.com/sirupsen/logrus" "github.com/prometheus/client_golang/prometheus" "github.com/ObjectifLibre/csf/eventsources" "github.com/ObjectifLibre/csf/scripting" ...
package proxy import ( "context" "net/http" "testing" "time" "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" netv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/cli...
// Copyright 2019 - 2020, Packethost, Inc and contributors // SPDX-License-Identifier: Apache-2.0 package log import ( "os" grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap" "github.com/packethost/pkg/log/internal/rollbar" "github.com/pkg/errors" "go.uber.org/zap" "go.uber.org/zap/zaptest" "...
/* MIT License Copyright 2016 Comcast Cable Communications Management, LLC 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, cop...
package gomusixmatch import ( "encoding/json" "time" ) type musixMatchResponse struct { Message struct { Header struct { StatusCode int `json:"status_code"` ExecuteTime float64 `json:"execute_time"` Available int `json:"available,omitempty"` Hint string `json:"hint,omitempty"` C...
package k8s import ( "context" "github.com/kyma-project/kyma/components/console-backend-service/internal/domain/k8s/listener" "github.com/kyma-project/kyma/components/console-backend-service/internal/domain/k8s/pretty" "github.com/kyma-project/kyma/components/console-backend-service/internal/gqlerror" "github.co...
package gosshtool import ( crand "crypto/rand" "encoding/hex" "errors" "fmt" "io" "io/ioutil" mrand "math/rand" "os" "regexp" "strings" "sync" "time" ) var ( sshClients map[string]*SSHClient sshClientsMutex sync.RWMutex ) var seeded bool = false var syncbufpool *sync.Pool var uuidRegex *regexp.R...
package checks import ( "crypto/tls" "fmt" "net/http" "regexp" "time" "github.com/prometheus/client_golang/prometheus" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" v1 "github.com/flanksource/canar...
// Copyright 2021 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package config import ( "errors" "fmt" "os" "path/filepath" "time" "github.com/Axway/agent-sdk/pkg/cmd/properties" corecfg "github.com/Axway/agent-sdk/pkg/config" ) var config *AgentConfig const ( pathAnypointExchangeURL = "mulesoft.anypointExchangeUrl" pathEnvironment = "mulesoft.environment" ...
package upgrade import ( "context" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" "github.com/stackrox/rox/generated/internalapi/central" "github.com/stackrox/rox/pkg/centralsensor" "github.com/stackrox/rox/pkg/concurrency" pkgKubernetes "github.com/stackrox/rox/pkg/kubernetes" "github.com/stackrox/...
// +build !clustered,!gcloud // Command-line backup program. package main import ( "flag" "fmt" "io" "os" "os/exec" "path" "path/filepath" "strings" "time" ) var ( // Display usage if true. showHelp = flag.Bool("help", false, "") // Delete old snapshot directory if it exists. deleteSnapshot = flag.Boo...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: legacymixer.proto /* Package legacy is a generated protocol buffer package. TODO: Temporarily placing this file in the istio repo. Eventually this should go into istio.io/api. It is generated from these files: legacymixer.proto It has these top-level me...
/* Copyright 2021 The Kubernetes-CSI-Addons 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 main import ( "fmt" "strconv" s "strings" "github.com/theatlasroom/advent-of-code/go/utils" ) /** --- Day 2: Dive! --- Now, you need to figure out how to pilot this thing. It seems like the submarine can take a series of commands like forward 1, down 2, or up 3: forward X increases the horizontal ...
package main import ( "bytes" "errors" "fmt" "io" "os" "path/filepath" "text/template" "github.com/DeedleFake/bog/internal/bufpool" "github.com/DeedleFake/bog/markdown" "github.com/Depado/bfchroma" "github.com/gosimple/slug" "github.com/russross/blackfriday/v2" "golang.org/x/net/html" "gopkg.in/yaml.v3"...
package main import ( pb "github.com/cybermaggedon/evs-golang-api/protos" "github.com/golang/protobuf/ptypes" "time" ) // Gaffer object types etc. const ( ENTITY = "uk.gov.gchq.gaffer.data.element.Entity" EDGE = "uk.gov.gchq.gaffer.data.element.Edge" TIMESTAMP_SET = "uk.gov.gchq.gaffer.time.RBMB...
package consensus import ( "context" "sync" big2 "github.com/filecoin-project/go-state-types/big" "github.com/Secured-Finance/dione/sigs" "github.com/Secured-Finance/dione/rpc" "github.com/Secured-Finance/dione/beacon" oracleEmitter "github.com/Secured-Finance/dione/contracts/oracleemitter" "github.com/lib...
package gocode import ( "go/build" "log" "os" "path/filepath" "runtime" "strings" "sync" "github.com/charlievieth/buildutil" ) const g_debug = false func init() { if g_debug { log.SetOutput(os.Stderr) log.SetFlags(log.Lshortfile | log.LstdFlags) log.SetPrefix("[gocode] ") log.Println("debug enabled...
// Package grpcmon provides monitoring instrumentation for gRPC clients and // servers. // // The following metrics are provided: // // grpc_client_connections_open [gauge] Number of gRPC client connections open. // grpc_client_connections_total [counter] Total number of gRPC client connections opened. // grpc_clien...
package list import ( "bytes" "fmt" "io/ioutil" "net/http" "testing" "time" "github.com/MakeNowJust/heredoc" "github.com/cli/cli/v2/internal/ghrepo" "github.com/cli/cli/v2/pkg/cmdutil" "github.com/cli/cli/v2/pkg/httpmock" "github.com/cli/cli/v2/pkg/iostreams" "github.com/google/shlex" "github.com/stretch...
/* Copyright 2019-2020 vChain, 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 2016-2017 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 appli...
// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package adapter import ( "github.com/pkg/errors" "math/big" "strings" "github.com/airbloc/airbloc-go/shared/blockchain" "github.com/airbloc/airbloc-go/shared/blockchain/bind" "github.com/airbloc/airbloc-go...
// Copyright 2017-2018 Authors of Cilium // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
package oss import ( "net/http" . "gopkg.in/check.v1" ) type OssConnSuite struct{} var _ = Suite(&OssConnSuite{}) func (s *OssConnSuite) TestURLMarker(c *C) { um := urlMaker{} um.Init("docs.github.com", true) c.Assert(um.Type, Equals, urlTypeCname) c.Assert(um.Scheme, Equals, "http") c.Assert(um.NetLoc, Equ...
package config import ( "bufio" "fmt" "io/ioutil" "net" "net/url" "os" "strings" "github.com/ghodss/yaml" v1 "k8s.io/api/core/v1" "k8s.io/client-go/tools/clientcmd" "github.com/openshift/baremetal-runtimecfg/pkg/monitor" "github.com/openshift/baremetal-runtimecfg/pkg/utils" "github.com/openshift/install...
// Copyright © 2021 The Gomon Project. package file /* #cgo CFLAGS: -x objective-c -std=gnu11 -fobjc-arc #cgo LDFLAGS: -framework CoreServices #import <CoreServices/CoreServices.h> // callback handles events sent on stream extern void callback(ConstFSEventStreamRef, void *, size_t, char **, FSEventStreamEventFlags *...
package snappy import ( "hash/crc32" "io" "github.com/andybalholm/pack" ) type Encoder struct { wroteHeader bool } var magicChunk = []byte("\xff\x06\x00\x00sNaPpY") var crcTable = crc32.MakeTable(crc32.Castagnoli) // crc implements the checksum specified in section 3 of // https://github.com/google/snappy/blo...
package main import ( "log" ui "github.com/gizak/termui/v3" "github.com/gizak/termui/v3/widgets" ) const title = ` __ __ ______ __ __ ______ ______ __ __ ______ ______ ______ ______ _____ /\ \/ / /\ __ \ /\ "-.\ \ /\ == \ /\ __ \ /\ "-.\ \ /\ ...
package statement_test import ( "testing" "github.com/genjidb/genji/document" "github.com/genjidb/genji/internal/sql/parser" "github.com/genjidb/genji/internal/testutil" "github.com/genjidb/genji/internal/testutil/assert" ) func ParseDocumentPath(t testing.TB, str string) document.Path { vp, err := parser.Pars...
package ops import ( "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "strings" "bitbucket.org/atlassianlabs/restclient" ctrllogz "github.com/atlassian/ctrl/logz" ops_v1 "github.com/atlassian/voyager/pkg/apis/ops/v1" "github.com/atlassian/voyager/pkg/ops/util/zappers" "github.com/atlassian/voya...
package hub import ( "fmt" "strings" "time" "github.com/floeit/floe/client" "github.com/floeit/floe/config" nt "github.com/floeit/floe/config/nodetype" "github.com/floeit/floe/event" "github.com/floeit/floe/log" ) // This file contains all functions that deal with events that may or may not // be serviced on...
package users import ( "cloud/sql" "cloud/util" "github.com/astaxie/beego" "cloud/models/groups" "strconv" "strings" ) type GroupsController struct { beego.Controller } // 部门团队管理入口页面 // @router /users/groups/list [get] func (this *GroupsController) GroupsList() { this.TplName = "users/groups/list.html" } /...
package kafka_nais_io_v1 import ( "fmt" "hash/crc32" "strconv" "strings" aiven_nais_io_v1 "github.com/nais/liberator/pkg/apis/aiven.nais.io/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) const ( EventRolloutComplete = "RolloutComplete" EventFailedPrepare = "FailedPrepare" EventFailedSynch...
// Copyright 2021-2022 Zenauth Ltd. // SPDX-License-Identifier: Apache-2.0 package module import ( "encoding/json" "github.com/cerbos/cerbos/hack/tools/protoc-gen-jsonschema/jsonschema" "github.com/envoyproxy/protoc-gen-validate/validate" pgs "github.com/lyft/protoc-gen-star" "google.golang.org/protobuf/proto" ...
package password import ( "fmt" "regexp" "unicode" "github.com/lolopinto/ent/ent/field" "github.com/lolopinto/ent/internal/util" "golang.org/x/crypto/bcrypt" ) // Type returns a datatype that represents a password func Type() *dataType { return &dataType{str: field.StringType()} } // hide from graphql √ // p...
package sexp import ( "cfg" "vmm" ) // CostOfList calls each form Cost method and returns // accumulated cost sum. func CostOfList(forms []Form) int { total := 0 for _, form := range forms { total += form.Cost() } return total } // CostOf is a convenience wrapper over CostOfList. func CostOf(forms ...Form) i...
// Copyright (c) 2017, CodeBoy. All rights reserved. // // This Source Code Form is subject to the terms of the // license that can be found in the LICENSE file. package model import ( "encoding/json" "fmt" log "github.com/Sirupsen/logrus" "io" "io/ioutil" "os" "path/filepath" "sort" "time" "github.com/fil...
// Copyright © 2021 Alibaba Group Holding 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...
package impl import ( "context" "gitee.com/Ljolan/si-mqtt/cluster/store" messagev2 "gitee.com/Ljolan/si-mqtt/corev5/v2/message" "gitee.com/Ljolan/si-mqtt/corev5/v2/sessions" "gitee.com/Ljolan/si-mqtt/logger" "time" ) type batchOption interface { GetBatchNum() int GetNum() int GetLastTime() int64 BatchReleas...
// Copyright 2012 Google 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 p4 import ( "bytes" "fmt" "io" "log" "os/exec" "strconv" "strings" ) // Conn is an interface to the Conn command line client. type ConnOptions str...
package nginx // Tracks basic nginx metrics via the status module // * number of connections // * number of requets per second // Requires nginx to have the status option compiled. // See http://wiki.nginx.org/HttpStubStatusModule for more details import ( "bufio" "crypto/tls" "net/http" "net/url" "strconv" ...
package main import ( "context" "fmt" "log" "os" "regexp" "strings" "time" "github.com/containers/image/v5/docker" "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/types" "github.com/containers/skopeo/version" "github.com/coreos/go-semver/semver" "github.com/pkg/errors" )...
package application import ( "errors" "log" "os" "path" "time" "github.com/cloudfoundry-incubator/notifications/gobble" "github.com/cloudfoundry-incubator/notifications/mail" "github.com/cloudfoundry-incubator/notifications/postal" "github.com/cloudfoundry-incubator/notifications/uaa" "github.com/cloudfound...
package lualib import ( "os" "fmt" "reflect" "unsafe" "github.com/flosch/pongo2" . "github.com/yuin/gopher-lua" . "github.com/MoHuacong/luaweb/context" ) type Template struct { Cxt *Context Data pongo2.Context Tpl *pongo2.Template } const luaTemplateTypeName = "template" var templateFuncs = map[string]LGF...