text stringlengths 3.08k 10.4k |
|---|
package main
import (
"encoding/json"
"fmt"
"os"
"strconv"
"time"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/timestreamque... |
package network
import (
"crypto/tls"
"fmt"
"net"
"strings"
"time"
"github.com/mfojtik/cluster-up/pkg/api"
"github.com/mfojtik/cluster-up/pkg/container"
"github.com/mfojtik/cluster-up/pkg/log"
"github.com/mfojtik/cluster-up/pkg/util/sets"
)
type NetworkConfig struct {
dockerClient container.Client
portFo... |
package provider
import (
"context"
"encoding/json"
"fmt"
"github.com/stackql/stackql/internal/stackql/constants"
"github.com/stackql/stackql/internal/stackql/dto"
"github.com/stackql/stackql/internal/stackql/netutils"
"net/http"
"regexp"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"golang.org/x/o... |
package k8ssecret
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/Masterminds/sprig"
"github.com/contentful-labs/kube-secret-syncer/pkg/secretsmanager"
"github.com/pkg/errors"
"reflect"
"text/template"
secretsv1 "github.com/contentful-labs/kube-secret-syncer/api/v1"
corev1 "k8s.io/api/... |
package geom
import (
"fmt"
"math"
"github.com/peterstace/simplefeatures/rtree"
)
// Envelope is an axis-aligned rectangle (also known as an Axis Aligned
// Bounding Box or Minimum Bounding Rectangle). It usually represents a 2D area
// with non-zero width and height, but can also represent degenerate cases
// wh... |
//
// MIT License
//
// (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
//
// 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 lim... |
package libplum
import (
"context"
"encoding/json"
"net/http"
"sync"
"github.com/Sirupsen/logrus"
"github.com/maplebed/libplumraw"
)
// TestHouse implements the House interface
type TestHouse struct {
libplumraw.House
Account
httpClient *http.Client
events chan libplumraw.Event
conn libplumraw.WebCon... |
package stubext
import (
"context"
"errors"
"log"
"net"
"strconv"
"time"
"google.golang.org/grpc/status"
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
"github.com/shanbay/gobay"
"go.elastic.co/apm/module/apmgrpc"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.or... |
/*
* MIT License
*
* Copyright (c) 2021 <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, m... |
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <<EMAIL>> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a bee... |
package e2e
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"
"time"
"github.com/efficientgo/e2e"
"github.com/efficientgo/tools/core/pkg/testutil"
"github.com/google/uuid"
"github.com/observatorium/obsctl/pkg/config"
"golang.org/x/oauth2"
)
const tenantsYAMLTmpl = `
- id: %[1]s
... |
// Copyright 2019 Xusixxxx Author. 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... |
package main
import (
"fmt"
"github.com/spf13/cobra"
)
// TODO: something more intelligent
// Remember to change this every time ...
const VERSION = "0.2.0"
var rootCmd = &cobra.Command{
Use: "multisig",
Short: "manage multisig transactions",
Version: VERSION,
Run: func(cmd *cobra.Command, args []string)... |
package lib
import (
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"github.com/ahmetb/go-linq"
)
// PathList is a list of paths
type PathList struct {
SourcePath string
TargetPath string
}
// HashList is a list of HashData struct
typ... |
// Copyright (C) 2018 The Syncthing Authors.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.
package model
import (
"sort"
"time"
"github.com/syncthing/sync... |
package primary
import (
"fmt"
"strings"
"github.com/gobwas/glob"
"github.com/puppetlabs/wash/cmd/internal/find/parser/predicate"
"github.com/puppetlabs/wash/cmd/internal/find/types"
)
// Kind is the kind primary
//
// kindPrimary => -kind ShellPattern
//nolint
var Kind = Parser.add(&Primary{
Description: ... |
package web
import (
"net/http"
"path"
"strings"
"github.com/gorilla/mux"
"github.com/shunfei/cronsun"
)
func GetVersion(ctx *Context) {
outJSON(ctx.W, cronsun.Version)
}
func initRouters() (s *http.Server, err error) {
jobHandler := &Job{}
nodeHandler := &Node{}
jobLogHandler := &JobLog{}
infoHandler :=... |
package models
import (
"errors"
"goERP/utils"
"strings"
"time"
"github.com/astaxie/beego/orm"
)
//ProductUomCateg 产品单位类别
type ProductUomCateg struct {
ID int64 `orm:"column(id);pk;auto"` //主键
CreateUserID int64 `orm:"column(create_user_id);null"` //创建者
UpdateUserID int64 ... |
package test
import (
"fmt"
"os"
"github.com/Jeffail/benthos/v3/lib/config"
"github.com/Jeffail/benthos/v3/lib/log"
"github.com/Jeffail/benthos/v3/lib/manager"
"github.com/Jeffail/benthos/v3/lib/metrics"
"github.com/Jeffail/benthos/v3/lib/processor"
"github.com/Jeffail/benthos/v3/lib/types"
yaml "gopkg.in/ya... |
/*
Copyright 2016 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 Red Hat, Inc. 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 applic... |
// Copyright 2019-2020 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 stmgr_test
import (
"context"
"fmt"
"io"
"testing"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin"
init_ "github.com/filecoin-project/spec... |
package hls
import (
"crypto/sha1"
"fmt"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
"path/filepath"
)
type EncodingRequest struct {
file string
segment int64
res int64
data chan *[]byte
err chan error
}
func NewEncodingRequest(file string, segment int64, res int64) *EncodingRequest {
... |
/*
Copyright 2021 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// 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 2016 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 ... |
package restaurants_us
const PAGE_SIZE_LIMIT = 50
const ROW_LIMIT = 500
type restuarantsUSData struct {
factual_id string "The Factual ID"
name string "Business/POI name"
address string "Address number and street name"
address_extended string "Additional address, inc... |
package mongodb
import (
"fmt"
bulkQuerygen "github.com/naivewong/influxdb-comparisons/bulk_query_gen"
"math/rand"
"time"
)
// MongoDevops produces Mongo-specific queries for the devops use case.
type MongoDevops struct {
bulkQuerygen.CommonParams
DatabaseName string
}
// NewMongoDevops makes an MongoDevops ob... |
// Copyright 2016-2020, Pulumi Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
/*
Copyright 2020 The Nocalhost Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
package test
import (
"encoding/json"
"io"
"net"
"net/http"
"net/http/httptest"
"net/url"
"path"
"runtime"
"strconv"
"sync"
"time"
)
type Backend struct {
srv *httptest.Server
mux *http.ServeMux
}
func NewBackend() *Backend {
b := &Backend{
mux: http.NewServeMux(),
}
b.srv = httptest.NewServer(b)
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: github.com/aperturerobotics/controllerbus/example/plugin-demo/demo-controller/config.proto
package hot_compile_demo_controller
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are n... |
package server
import (
"JuneGoBlog/src"
"JuneGoBlog/src/consts"
"JuneGoBlog/src/dao"
"JuneGoBlog/src/message"
"JuneGoBlog/src/util"
"fmt"
juneGin "github.com/520MianXiangDuiXiang520/GinTools/gin"
juneLog "github.com/520MianXiangDuiXiang520/GinTools/log"
"github.com/gin-gonic/gin"
"strings"
"time"
"unicode... |
// Copyright 2020 Dolthub, 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 models
import (
"encoding/json"
"errors"
"fmt"
"strconv"
"strings"
"time"
"github.com/astaxie/beego/logs"
kapi "k8s.io/api/core/v1"
"github.com/Qihoo360/wayne/src/backend/util/hack"
)
const (
TableNameStatefulset = "statefulset"
)
type statefulsetModel struct{}
type StatefulsetMetaData struct {
... |
package jsoniter
import (
"fmt"
"unicode/utf16"
)
// ReadString read string from iterator
func (iter *Iterator) ReadString() (ret string) {
c := iter.nextToken()
if c == '"' {
for i := iter.head; i < iter.tail; i++ {
c := iter.buf[i]
if c == '"' {
ret = string(iter.buf[iter.head:i])
iter.head = i ... |
// Copyright 2022 The sacloud/iaas-api-go 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... |
package chunk
import (
"fmt"
. "github.com/claudetech/loggo/default"
"github.com/plexdrive/plexdrive/drive"
)
// Manager manages chunks on disk
type Manager struct {
ChunkSize int64
LoadAhead int
downloader *Downloader
storage *Storage
queue chan *QueueEntry
}
type QueueEntry struct {
request *... |
// Copyright 2015 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 main
import "fmt"
var output string
func mypanic(s string) {
fmt.Printf(output)
panic(s)
}
func assertEqual(x, y int) {
if x != y {
mypanic("as... |
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package types
import (
"io/ioutil"
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/crypto/ed25519"
tmtime "github.com/tendermint/tendermint/types/time"
)
func TestGenesisBad(t *testing.T) {
// test some bad ones from raw json
testC... |
package coprhd
import (
"crypto/tls"
"fmt"
"net/http"
"net/url"
"gopkg.in/jmcvetta/napping.v3"
"go.pedge.io/dlog"
"github.com/libopenstorage/openstorage/api"
"github.com/libopenstorage/openstorage/volume"
"github.com/libopenstorage/openstorage/volume/drivers/common"
"github.com/portworx/kvdb"
)
const (
... |
// Package mng defines AWS EKS Managed Node Group configuration.
package mng
import (
"errors"
"os"
"strings"
"sync"
"time"
"github.com/aws/aws-k8s-tester/eksconfig"
k8s_client "github.com/aws/aws-k8s-tester/pkg/k8s-client"
"github.com/aws/aws-k8s-tester/pkg/timeutil"
"github.com/aws/aws-sdk-go/service/autos... |
/*
This file is part of rclgo
Copyright © 2021 Technology Innovation Institute, United Arab Emirates
Licensed under the Apache License, Version 2.0 (the "License");
http://www.apache.org/licenses/LICENSE-2.0
*/
// Code generated by rclgo-gen. DO NOT EDIT.
package test_msgs_msg
import (
"unsafe"
"github.com/tiiu... |
package db
import (
"errors"
"sync"
cfenv "github.com/cloudfoundry-community/go-cfenv"
"github.com/bgentry/que-go"
"github.com/jackc/pgx"
)
// Return a database object, using the CloudFoundry environment data
// This function retrieves the credential and the db conenction from VCAP_SERVICES environment variabl... |
package radix
import (
"bytes"
"github.com/zond/god/common"
)
const (
subTreeError = "Illegal, only one level of sub trees supported"
)
// HashTree is something that can be synchronized using Sync.
type HashTree interface {
Hash() []byte
Configuration() (conf map[string]string, timestamp int64)
Configur... |
package localstore
import (
"github.com/juju/errors"
"github.com/pingcap/tidb/kv"
"github.com/pingcap/tipb/go-tipb"
goctx "golang.org/x/net/context"
)
type dbClient struct {
store *dbStore
regionInfo []*regionInfo
}
func (c *dbClient) Send(ctx goctx.Context, req *kv.Request) kv.Response {
it := &response... |
package controllers
import (
"encoding/json"
"time"
"baselinCheck/enums"
"baselinCheck/models"
"baselinCheck/utils"
"fmt"
"strconv"
"strings"
"github.com/astaxie/beego/orm"
)
//CourseController 课程管理
type CourseController struct {
BaseController
}
//Prepare 参考beego官方文档说明
func (c *CourseController) Prepar... |
// Copyright 2019-2020 go-gtp 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 main
import (
"context"
"log"
"net"
"net/http"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/vishvananda/netlink"
... |
// Copyright 2017-2018 DERO Project. All rights reserved.
// Use of this source code in any form is governed by RESEARCH license.
// license can be found in the LICENSE file.
// GPG: 0F39 E425 8C65 3947 702A 8234 08B2 0360 A03A 9DE8
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" A... |
package modules
import (
"errors"
"strings"
"gitlab.com/NebulousLabs/encoding"
"go.sia.tech/siad/crypto"
"go.sia.tech/siad/types"
)
const (
// TransactionSetSizeLimit defines the largest set of dependent unconfirmed
// transactions that will be accepted by the transaction pool.
TransactionSetSizeLimit = 250e... |
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Portions Copyright The Go 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/L... |
package main
import (
"fmt"
"github.com/go-yaml/yaml"
"io/ioutil"
"os"
"strconv"
"strings"
)
var khome = os.Getenv("KUIPER_HOME")
var fileMap = map[string]string{
"edgex": khome + "/etc/sources/edgex.yaml",
"random": khome + "/etc/sources/random.yaml",
"zmq": khome + "/etc/sources/zmq.yam... |
package blobl
import (
"context"
"encoding/json"
"errors"
"fmt"
"html/template"
"log"
"net/http"
"net/url"
"os"
"os/exec"
"os/signal"
"runtime"
"sync"
"syscall"
"time"
"github.com/urfave/cli/v2"
"github.com/benthosdev/benthos/v4/internal/bloblang"
"github.com/benthosdev/benthos/v4/internal/bloblang... |
/*
Copyright 2016 <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 writing, software
distribu... |
package gomega
import (
"fmt"
"github.com/onsi/gomega/matchers"
)
//Track whether we've already warned about a deprecated feature. Nobody likes a nag.
var deprecationWarnings map[string]bool = make(map[string]bool)
//Equal uses reflect.DeepEqual to compare actual with expected. Equal is strict about
//types when... |
/*
* Minio Cloud Storage, (C) 2015, 2016, 2017 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 a... |
// Copyright © Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// See LICENSE in the project root for license information.
package utils
import (
"bytes"
"errors"
"fmt"
"kic/cfmt"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/spf13/cobra"
)
// execute a bash c... |
package handlers
import (
"context"
"encoding/json"
"fmt"
"net/http"
"github.com/openshift-online/ocm-cli/pkg/arguments"
sdk "github.com/openshift-online/ocm-sdk-go"
"github.com/prometheus/alertmanager/template"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
oav1alpha1 "github.com/openshift/ocm-... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package datasync
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
// CreateLocationSmbRequest
type CreateLocationSmbInput struct {
_ struct{} `type:"structure"`
// The Amazon Reso... |
/*
Copyright (c) Facebook, Inc. and 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 applicable law or agreed to in... |
// Package sim provides utilities to simulate fusion processes
// happening in a supernova.
//
// A typical use case would look like:
//
// var w io.Writer
// engine := sim.Engine{
// NumIters: *nIters,
// NumCarbons: *nCarbons,
// Seed: *seed,
// }
// err = engine.Run(w)
//
package sim
import (
"encoding/... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
//
package store
import (
"database/sql"
sq "github.com/Masterminds/squirrel"
"github.com/mattermost/mattermost-cloud/model"
"github.com/pkg/errors"
)
var clusterInstallationSelect sq.SelectBuilder
f... |
// Code generated from http.g4 by ANTLR 4.7.2. DO NOT EDIT.
package http // http
import "github.com/antlr/antlr4/runtime/Go/antlr"
// BasehttpListener is a complete listener for a parse tree produced by httpParser.
type BasehttpListener struct{}
var _ httpListener = &BasehttpListener{}
// VisitTerminal is called wh... |
// 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 ddhttp
import (
"context"
"github.com/common-nighthawk/go-figure"
"github.com/gorilla/mux"
"github.com/olekukonko/tablewriter"
"github.com/sirupsen/logrus"
"github.com/unionj-cloud/go-doudou/stringutils"
"github.com/unionj-cloud/go-doudou/svc/config"
"github.com/unionj-cloud/go-doudou/svc/http/model"
... |
// 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... |
// lots of this has been directly ported from one of the example files, will brush up later
// Copyright 2014 The gocui 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 gui
import (
"strings"
"github.com/fatih/color"
"gi... |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20170401
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Topic struct {
pulumi.CustomResour... |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux
package runtime
import (
"runtime/internal/atomic"
"unsafe"
)
//extern epoll_create
func epollcreate(size int32) int32
//extern epoll_crea... |
package db
import (
"bytes"
"errors"
"fmt"
"github.com/rs/zerolog/log"
"github.com/satori/go.uuid"
"go.mongodb.org/mongo-driver/bson"
)
type Cluster struct {
Uuid string `json:"uuid"`
Name string `json:"name"`
NameSpace string `json:"namespaces"`
// Cluster revision
Revision int `json:"revision"`... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
"github.com/aws/aws-sdk-go-v2/private/protocol/restxml"
)
// Please also see http... |
package sim
import (
"math/rand"
"github.com/spacemeshos/go-spacemesh/common/types"
"github.com/spacemeshos/go-spacemesh/log"
"github.com/spacemeshos/go-spacemesh/signing"
)
// GenOpt for configuring Generator.
type GenOpt func(*Generator)
// WithSeed configures seed for Generator. By default 0 is used.
func Wi... |
package testing
import (
"encoding/json"
"net/http"
"net/http/httptest"
"net/http/httputil"
"net/url"
"path"
"strings"
"golang.org/x/oauth2"
"github.com/go-logr/logr"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
logf "sigs.k8s.io/controller-runtime/pkg/log"
// gcp auth etc.
_ "k8s.io/client-g... |
// 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... |
// Package eth contains interface for interaction with an ethereum blockchain
// along with structures reflecting events emitted on an ethereum blockchain.
package eth
import (
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/keep-network/keep-common/pkg/subscription"
"github.com/keep-network/keep-... |
// Copyright 2019 Hewlett Packard Enterprise Development LP
// 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 main
import (
"database/sql"
"flag"
"fmt"
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"simple-mysql-mgp-hook/moudle"
"strings"
"time"
)
import _ "database/sql"
import _ "github.com/go-sql-driver/mysql"
var path string
var conf *moudle.YamlConfig
var beforeStatus = true
var ... |
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/minotar/minecraft"
"image"
"io"
"log"
"net/http"
"os"
"path"
"strconv"
"strings"
"time"
)
const (
DefaultSize = uint(180)
MaxSize = uint(300)
MinSize = uint(8)
StaticLocation = "www"
SkinCache
ListenOn = ":9999"
Minutes ... |
/*
Copyright (c) 2019 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
/*******************************************************************************
* Copyright (c) 2021 Genome Research Ltd.
*
* Author: <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to dea... |
package websocket
import (
"encoding/json"
"sync"
"time"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/konger/ckgo/common/codes"
"github.com/konger/ckgo/common/logger"
"github.com/konger/ckgo/common/util/convert"
service "github.com/konger/ckgo/service/v1/api"
"log"
"net/http"
)
/... |
package quote
import (
"bytes"
"io/ioutil"
"log"
"net/http"
"net/url"
"strconv"
"strings"
)
//EASYPOST STUFF
const apiUrl = "https://api.easypost.com/v2/orders/"
//GET SHIPPING QUOTES
//calculate rates to ship this shipment of one or more packages
//this makes a "curl" style http request to easypost since eas... |
/*
* Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses... |
package logagent
import (
// rotatelogs "github.com/lestrrat-go/file-rotatelogs"
"context"
"fmt"
"os"
"strings"
"sync"
"time"
nested "github.com/antonfisher/nested-logrus-formatter"
"github.com/google/uuid"
"github.com/max-gui/logagent/pkg/logsets"
"github.com/rifflock/lfshook"
"github.com/sirupsen/logr... |
package proxy
import (
"crypto/tls"
"database/sql"
"log"
"net"
"net/http"
"net/http/httputil"
"net/url"
"strconv"
"time"
"github.com/FoxComm/highlander/intelligence/river-rock/channels"
"github.com/FoxComm/highlander/intelligence/river-rock/clustering"
"github.com/FoxComm/highlander/intelligence/river-roc... |
package logrus_influxdb
import (
"fmt"
"sync"
"time"
influxdb "github.com/influxdata/influxdb1-client/v2"
"github.com/sirupsen/logrus"
)
var (
defaultHost = "localhost"
defaultPort = 8086
defaultDatabase = "logrus"
defaultBatchInterval = 5 * time.Second
defaultMeasurement = "logrus... |
package discord
import (
jsoniter "github.com/json-iterator/go"
)
// application.go represents the application object and integrations.
// ApplicationTeamMemberState represents the state of a member in a team.
type ApplicationTeamMemberState uint8
const (
ApplicationTeamMemberStateInvited ApplicationTeamMemberSta... |
// +build linux darwin
/*
Copyright 2014 The Perkeep Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
// ----------------------- Opcode Struct Start -----------------------
type Opcode struct {
opcode int
tags []int
}
func get_opcode(value int) Opcode {
var opcode int = value % 100
var tags []int = make([]int, 0)
value = value / 100
for va... |
package capi
import (
"archive/zip"
"context"
"errors"
"io"
"io/ioutil"
"log"
"net/http"
"os"
"path"
"sync"
"time"
"github.com/bluele/gcache"
)
type Doer interface {
Do(req *http.Request) (*http.Response, error)
}
type PackageManager struct {
c PackageClient
d Doer
mu sync.RWMutex
m map[str... |
package iosvariant
import (
"context"
"time"
pushv1alpha1 "github.com/aerogear/unifiedpush-operator/pkg/apis/push/v1alpha1"
"github.com/aerogear/unifiedpush-operator/pkg/controller/util"
"github.com/aerogear/unifiedpush-operator/pkg/nspredicate"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"... |
/*
* 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 2015 The Vanadium 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 profiles and its subdirectoris implement support for managing external
// sofware dependencies. They offer a balance between providing no suppo... |
package main
import (
"flag"
"fmt"
"os"
"os/signal"
"runtime"
"strings"
"sync"
"syscall"
"time"
"github.com/grafana/globalconf"
"github.com/grafana/metrictank/stats"
eventsPublish "github.com/grafana/worldping-gw/events/publish"
eventsIngest "github.com/grafana/worldping-gw/ingest"
"github.com/grafana/w... |
package main
// Print the contents of a file in a format used by pydicom. Used to ensure
// that pydicom and go-dicom parses files in the same way.
import (
"flag"
"fmt"
"io/ioutil"
"log"
"sort"
"strings"
"github.com/hxhxhx88/go-dicom"
"github.com/hxhxhx88/go-dicom/dicomtag"
"github.com/hxhxhx88/go-dicom/d... |
package types
import (
"fmt"
"path"
"strings"
)
// Installer is an interface for laying a package manifest down on a system
// and setting up K3s.
type Installer interface {
Install(node Node, pkg Package, opts *InstallOptions) error
}
// InstallOptions are options to pass to an installation
type InstallOptions ... |
/*
* Copyright 2021, Offchain Labs, 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... |
// +build darwin netbsd freebsd openbsd dragonfly
package multiplex
import (
"github.com/zput/zput_net_golang/net/log"
"github.com/zput/zput_net_golang/net/protocol"
"golang.org/x/sys/unix"
)
// Multiplex Kqueue封装
type Multiplex struct {
fd int // Kqueue fd
waitEvents []unix.Kevent_t
//sockets sync.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.