text stringlengths 3.08k 10.4k |
|---|
package sqlparser
import (
"bytes"
"database/sql"
"fmt"
"strconv"
"strings"
"sync"
"testing"
)
func TestConn_Insert(t *testing.T) {
//c := newTestConn()
//defer c.Close()
//c.UseDB("backend_conn_test_database")
// init db
db, err := sql.Open("mysql", "zerodb:zerodb@tcp(zerodb-proxy003.pre.2dfire.info:969... |
package main
import (
"errors"
"flag"
"fmt"
"os"
"runtime"
"github.com/sjsafranek/go-micro-sessions/lib/api"
"github.com/sjsafranek/go-micro-sessions/lib/clients/repl"
"github.com/sjsafranek/go-micro-sessions/lib/clients/web"
"github.com/sjsafranek/go-micro-sessions/lib/config"
"github.com/sjsafranek/logger... |
package gkvlite
import (
"encoding/binary"
"errors"
"fmt"
"sync/atomic"
"unsafe"
)
// A persistable item.
type Item struct {
Transient unsafe.Pointer // For any ephemeral data; atomic CAS recommended.
Key, Val []byte // Val may be nil if not fetched into memory yet.
Priority int32 // Use ra... |
package transactions
import (
"context"
"crypto/sha1"
"errors"
"fmt"
"sync"
)
var (
// ErrTransactionVoteFailed indicates the transaction didn't reach quorum.
ErrTransactionVoteFailed = errors.New("transaction did not reach quorum")
// ErrTransactionCanceled indicates the transaction was canceled before
// r... |
package eval
import (
"errors"
"fmt"
"github.com/elves/elvish/pkg/diag"
"github.com/elves/elvish/pkg/eval/errs"
"github.com/elves/elvish/pkg/eval/vals"
"github.com/elves/elvish/pkg/eval/vars"
"github.com/elves/elvish/pkg/parse"
)
// Parsed group of lvalues.
type lvaluesGroup struct {
lvalues []lvalue
// Ind... |
/*
Copyright 2020 The KubeSphere 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 main
import (
"fmt"
"strings"
"html/template"
"net/http"
"google.golang.org/appengine" // Required external App Engine library
"google.golang.org/appengine/log"
"google.golang.org/appengine/datastore"
)
func main() {
fs := http.FileServer(http.Dir("static"))
http.Handle("/static/", http.StripPrefix("... |
package cloud
import (
"fmt"
"io"
"os"
"time"
log "github.com/Sirupsen/logrus"
"github.com/pkg/sftp"
"github.com/spf13/afero"
"github.com/spf13/afero/sftpfs"
"golang.org/x/crypto/ssh"
tlsIO "github.com/quilt/quilt/connection/credentials/tls/io"
"github.com/quilt/quilt/connection/credentials/tls/rsa"
"git... |
/*
Copyright 2018 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... |
// Copyright 2017 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 runner
import (
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"io/ioutil"
"math/rand"
"path"
"strconv"
"strings"
"text/template"
"time"
"github.com/google/uuid"
"github.com/jhump/protoreflect/desc"
)
// call template data
type callTemplateData struct {
WorkerID string // unique w... |
package models
import (
"bytes"
"encoding/json"
"strconv"
"time"
"github.com/Tommy-42/f1-2020-go-telemetry/models/packet"
)
type CarTelemetryDataDetails struct {
Speed uint16 // Speed of car in kilometres per hour
Throttle string // Amount of throttle applied (0.0 to 1.0)
Steer ... |
package restgen
import (
"fmt"
"log"
"path/filepath"
"strings"
"syscall"
"text/template"
"github.com/99designs/gqlgen/codegen"
"github.com/99designs/gqlgen/codegen/config"
"github.com/99designs/gqlgen/codegen/templates"
"github.com/99designs/gqlgen/plugin"
"github.com/speedoops/go-gqlrest/res... |
package reception
import (
"context"
"time"
etcd "github.com/coreos/etcd/client"
"github.com/efritz/glock"
)
type (
etcdClient struct {
api keysAPI
config *etcdConfig
}
etcdWatcher struct {
prefix string
name string
api keysAPI
stop chan struct{}
}
etcdConfig struct {
prefix ... |
// Copyright (c) 2020 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... |
package cmd
import (
"github.com/nathanhack/errorcorrectingcodes/cmd/internal/tools/bec/simple"
"github.com/nathanhack/errorcorrectingcodes/cmd/internal/tools/bsc/dwbf"
"github.com/nathanhack/errorcorrectingcodes/cmd/internal/tools/bsc/gallager"
"github.com/nathanhack/errorcorrectingcodes/cmd/internal/tools/csv"
... |
package handler
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"net/http"
"strconv"
"strings"
"github.com/cruisechang/dbex"
"github.com/gorilla/mux"
)
//NewRoundIDHandler returns a handler
func NewRoundIDHandler(base baseHandler) *RoundIDHandler {
return &RoundIDHandler{
baseHandler: base,
}
}
/... |
// Copyright (c) 2016 <NAME>. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
package tiny
import (
"encoding/json"
"encoding/xml"
"fmt"
"net/http"
"net/url"
"regexp"
"strconv"
"time"
"github.com/cxr29/log"
)
func (ctx *Context) WriteSt... |
// Copyright 2022 anorm 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 applicable law o... |
package components
import (
"fmt"
ks "github.com/kardianos/service"
"go.amplifyedge.org/booty-v2/internal/service"
"go.amplifyedge.org/booty-v2/internal/store"
"go.amplifyedge.org/booty-v2/internal/update"
"os"
"path/filepath"
"strings"
"go.amplifyedge.org/booty-v2/dep"
"go.amplifyedge.org/booty-v2/internal... |
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License i... |
package main
import (
"bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/binary"
"fmt"
"hash"
"io"
"io/ioutil"
"os"
"regexp"
"sort"
)
// Keychain represents parsed PasswordSafe data file.
type Keychain struct {
// Encrypted.
salt [32]byte // Salt.
pwd [32]byte // SHA256 of expected stretched password.
b... |
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License ... |
// Copyright 2020 go-myjvn 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 myjvn
import (
"context"
"encoding/xml"
)
// VDIVulInfoDesc stores the data from API response.
type VDIVulInfoDesc struct {
Text string `xml:... |
// 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 console provides a feature to implement CLI commands into your
// aah application easily and extensible.
package console
import (
"flag"
"github.com... |
package main
import (
"context"
"fmt"
"image"
"image/png"
"log"
"os"
"path/filepath"
"strings"
"time"
// "github.com/adanalife/tripbot/internal/takeout"
c "github.com/adanalife/tripbot/pkg/config/tripbot"
"github.com/adanalife/tripbot/pkg/helpers"
"github.com/adanalife/tripbot/pkg/video"
"googlemaps.git... |
package cmd
import (
"fmt"
"io"
"strings"
"github.com/fatih/color"
tspb "github.com/golang/protobuf/ptypes"
google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
)
type Color string
// Color codes interpretted by the terminal
// NOTE: all codes must be of the same length or they will throw off the fie... |
package maven
import (
"testing"
"github.com/stretchr/testify/assert"
)
func v(s string) *Version {
ver := &Version{}
ver.Unmarshal(s)
return ver
}
func TestUnmarshal(t *testing.T) {
version := v("7")
assert.Equal(t, 7, version.Min.Major)
assert.Equal(t, 0, version.Min.Minor)
assert.Equal(t, 0, version.Min... |
// Package svcache provides a threadsafe in-memory single-value cache.
package svcache
import (
"context"
"sync/atomic"
"time"
"unsafe"
)
var alreadyLoaded <-chan struct{}
var expiredState inMemoryState
func init() {
closedChannel := make(chan struct{})
close(closedChannel)
alreadyLoaded = closedChannel
expi... |
/*
SpaceDock Backend
API Backend for the SpaceDock infrastructure to host modfiles for various games
SpaceDock Backend is licensed under the Terms of the MIT License.
Copyright (c) 2017 <NAME> (StollD), RockyTV
*/
package objects
import (
"github.com/KSP-SpaceDock/SpaceDock-Backend/app"
"github.com/KSP-... |
package logger
import (
"fmt"
"io"
"log"
"sync"
"github.com/kick-project/maker/internal/resources/exit"
)
type Level int
const (
InvalidLevel Level = iota - 1
DebugLevel
InfoLevel
WarnLevel
ErrorLevel
FatalLevel
)
// LogIface
type LogIface interface {
LoggerIface
LogLevelIface
}
// OutputIface router... |
package mojang
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"strings"
"sync"
"time"
)
var HttpClient = &http.Client{
Timeout: 10 * time.Second,
Transport: &http.Transport{
MaxIdleConnsPerHost: 1024,
},
}
type SignedTexturesResponse struct {
Id string `json:"id"`
Name string ... |
// Copyright (c) 2019 Siemens AG
//
// 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, di... |
package main
import (
"flag"
"fmt"
"os"
"reflect"
"strings"
"text/template"
"github.com/tada-team/tdproto/codegen/api_paths"
)
type pathDoc struct {
MethodName string
Path string
Description string
RequestDescription string
RequestObjectName string
RequestQueryName string... |
package http
import (
"crypto/tls"
"encoding/json"
"errors"
"github.com/golang/glog"
"github.com/samitpal/goProbe/modules"
"io/ioutil"
"net/http"
"regexp"
"time"
)
type httpProbe struct {
ProbeName *string `json:"probe_name"`
ProbeURL *string `json:"probe_url"`
... |
package main
import (
"context"
"fmt"
"os"
"strings"
"time"
"github.com/jauhararifin/ugrade"
"github.com/jauhararifin/ugrade/sandbox"
"github.com/jauhararifin/ugrade/sandbox/guard"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/xerrors"
)
func runGuard(cmd *cobra.Command, args []strin... |
//
// DISCLAIMER
//
// Copyright 2018 ArangoDB GmbH, Cologne, Germany
//
// 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 require... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: dapr/proto/internals/v1/status.proto
package internals
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = ... |
package main
import (
"context"
"crypto/tls"
"fmt"
"io"
"io/fs"
"log"
"mime"
"net"
"os"
"path"
"regexp"
"strconv"
"strings"
"github.com/spf13/pflag"
"golang.org/x/sync/errgroup"
"gopkg.in/gemini.v0"
)
/*
opts.optopt(
"",
"lang",
"RFC 4646 Language code(s) for text/gemini docum... |
package libgin
import (
"crypto/md5"
"encoding/hex"
"fmt"
"log"
"net/http"
"regexp"
"strings"
"time"
)
// NOTE: TEMPORARY COPIES FROM gin-doi
// UUIDMap is a map between registered repositories and their UUIDs for
// datasets registered before the new UUID generation method was implemented.
// This map is re... |
package main
//go:generate go run .
//go:generate go fmt ../../../pkg/z80/fuse_in_test.go
//go:generate go fmt ../../../pkg/z80/fuse_expected_test.go
import (
"bufio"
"bytes"
"fmt"
"html/template"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
)
var (
root = filepath.Join("..", "..", "..")
targe... |
/*
* 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 ... |
package main
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"log"
"os"
"path"
)
//
// 1. Process the provided Markdown file.
// 2. Comment out all lines within the markdown file,
// 3. EXCEPT for those lines within a FencedBlock that is tagged with the supplied language
//
func process_file(input_file *os.File, ou... |
package models
import (
"fmt"
"strconv"
"strings"
"time"
"github.com/emersion/go-imap"
"github.com/emersion/go-message/mail"
"github.com/gdamore/tcell/v2"
"github.com/stregouet/nuntius/config"
ndb "github.com/stregouet/nuntius/database"
"github.com/stregouet/nuntius/lib"
"github.com/stregouet/nuntius/widg... |
// Package team6 contains code for team 6's client implementation
package team6
import (
"math"
"github.com/SOMAS2020/SOMAS2020/internal/common/baseclient"
"github.com/SOMAS2020/SOMAS2020/internal/common/disasters"
"github.com/SOMAS2020/SOMAS2020/internal/common/rules"
"github.com/SOMAS2020/SOMAS2020/internal/co... |
// 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 wri... |
package ocr
import (
"image"
"image/color"
"gocv.io/x/gocv"
)
var (
rowHeight = 30
colWidthAvgSpeed = 90
colWidthUDPNAT = 200
white = color.RGBA{255, 255, 255, 0}
black = color.RGBA{0, 0, 0, 0}
)
// GetBorderIndex returns the indices of the rows and columns.
func getBorderInde... |
/*
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
*/
package testcommon
import (
"bytes"
"fmt"
"strings"
"testing"
"time"
"github.com/go-logr/logr"
)
// TODO: I'm not sure the best way to configure this so for now I'm just going to set it to 5
var LogLevel = 5
var _ logr.LogSink = &Test... |
/*
Copyright 2021 Adobe. All rights reserved.
This file is licensed 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/LICENSE-2.0
Unless required by applicable law or agre... |
package compression
import (
"context"
)
// EncodedFrame contains the streams of one compressed frame.
type EncodedFrame struct {
Bitstream []byte
Maskstream []byte
}
type tileDelta [PixelPerTile]byte
type frameDelta struct {
tiles []tileDelta
}
// SceneEncoder encodes an entire scene of bitmaps sharing the s... |
package blockchainparser
import (
"encoding/binary"
"encoding/hex"
"errors"
"fmt"
)
type Script []byte
func (script Script) String() string {
return hex.EncodeToString(script)
}
type TxInput struct {
Hash Hash256
Index uint32
Script Script
Sequence uint32
ScriptWitness [][]byt... |
package listener
import (
"fmt"
"math"
"time"
"github.com/beego/beego/v2/core/logs"
"land-bridge/conf"
"land-bridge/handle/dao"
"land-bridge/handle/listener/gethlisten"
"land-bridge/handle/listener/klaylisten"
"land-bridge/handle/listener/platonlisten"
"land-bridge/models"
)
var chainListens [12]*ChainLis... |
package rpclog
import (
"fmt"
"sync"
"time"
"github.com/asaskevich/govalidator"
"github.com/micro-plat/hydra/conf"
"github.com/micro-plat/hydra/registry"
"github.com/micro-plat/hydra/registry/watcher"
"github.com/micro-plat/hydra/rpc"
"github.com/micro-plat/lib4go/logger"
)
type loggerSetting struct {
Leve... |
package main
import (
"bufio"
"fmt"
"io"
"os"
"sort"
"strconv"
)
var sc *bufio.Scanner
const BufferSize = 1024
func nextInt() int {
if !sc.Scan() {
panic(nil)
}
i, e := strconv.Atoi(sc.Text())
if e != nil {
panic(e)
}
return i
}
var production bool
func debugf(format string, v ...interface{}) {
i... |
package utils
import (
"bytes"
"fmt"
"os"
"os/exec"
"regexp"
"sort"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudformation"
"github.com/aws/aws-sdk-go/service/ecr"
"github.com/aws/aws-sdk-go/service/ecs"
)
// Looks up a given st... |
/*
* Copyright (c) 2019 ChainFront LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
package hetzner
type ServerSummary struct {
ServerIP string `json:"server_ip"`
ServerNumber int `json:"server_number"`
ServerName string `json:"server_name"`
Product string `json:"product"`
DC string `json:"dc"`
Traffic string `json:"traffic"`
Sta... |
package controller
import (
"log"
"regexp"
"sync"
dg "github.com/bwmarrin/discordgo"
"gitlab.com/technonauts/akordo/antispam"
plugs "gitlab.com/technonauts/akordo/plugins"
"gitlab.com/technonauts/akordo/roles"
"gitlab.com/technonauts/akordo/xp"
)
const version string = "v1.0.0"
// SessionData holds the data... |
package app
import (
"bytes"
"encoding/csv"
"fmt"
"strings"
"text/tabwriter"
"github.com/ktr0731/evans/meta"
"github.com/ktr0731/go-multierror"
"github.com/pkg/errors"
"github.com/spf13/pflag"
)
var usageFormat = `
Usage: %s [--help] [--version] [options ...] [PROTO [PROTO ...]]
Positional arguments:
... |
package main
import (
"fmt"
)
type puzzle2 struct {
cubes []cube
}
type cube struct {
x1, x2, y1, y2, z1, z2 int
}
func (c cube) volume() int64 {
return int64(c.x2-c.x1+1) * int64(c.y2-c.y1+1) * int64(c.z2-c.z1+1)
}
func (c cube) isReal() bool {
return (c.x1 <= c.x2) &&
(c.y1 <= c.y2) &&
(c.z1 <= c.z2)
}
... |
// This file was generated from JSON Schema using quicktype, do not modify it directly.
// To parse and unparse this JSON data, add this code to your project and do:
//
// cve, err := UnmarshalCve(bytes)
// bytes, err = cve.Marshal()
package calc
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
... |
// KATO, Application Management Platform
// Copyright (C) 2021 Gridworkz Co., Ltd.
// 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 r... |
package commands
import (
"fmt"
"time"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/builder"
sdk "github.com/cosmos/cosmos-sdk/types"
wire "github.com/cosmos/cosmos-sdk/wire"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/comman... |
package ui
import (
"encoding/json"
"fmt"
"os"
"os/exec"
"path/filepath"
"popup/library"
"popup/model/tables"
"popup/view"
"strings"
"time"
"github.com/go-vgo/robotgo"
)
func jsbind() {
//监控事件
event_monitor()
// Bind Go functions to JS
Lorcaui.Bind("lorca_loadcontent", lorca_loadcontent)
Lorcaui.Bind... |
package main
import (
"fmt"
"os"
"path"
"strings"
ansi "github.com/k0kubun/go-ansi"
"github.com/macroblock/imed/pkg/cli"
"github.com/macroblock/imed/pkg/misc"
"github.com/macroblock/imed/pkg/zlog/loglevel"
"github.com/macroblock/imed/pkg/zlog/zlog"
)
var (
log = zlog.Instance("main")
logFilter = log... |
package recruiters
import (
"fmt"
jobs "job-scraper/internal"
"regexp"
"strings"
"time"
"github.com/gocolly/colly"
"go.uber.org/zap"
)
var srURL = "https://www.sr2rec.co.uk/jobs/?jf_what=&jf_where=London"
// SR2 is a JobSource
type SR2 jobs.JobSource
// GetJobs returns all jobs for a given receiver
func (s... |
// 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... |
package data_type
import (
"bytes"
"fmt"
"regexp"
"strconv"
"strings"
)
var (
reColumnType = regexp.MustCompile("(\\w+)(\\((\\d+)(,(\\d+))?\\))?")
reDefault = regexp.MustCompile("DEFAULT (('([^']+)?')|(\\w+)(\\((\\d+)(,(\\d+))?\\))?)")
reCharset = regexp.MustCompile("CHARACTER SET (\\S+)")
reCollate ... |
package message
import (
"encoding/binary"
"errors"
"fmt"
"io"
//"encoding/hex"
"github.com/philipyao/prpc/codec"
"github.com/philipyao/toolbox/util"
)
type MsgKind byte
const (
MsgKindDefault MsgKind = iota //默认rpc包
MsgKindHeartbeat //心跳包
)
type CompressKind by... |
package contract
import (
"fmt"
"strings"
"github.com/TIBCOSoftware/dovetail-cli/model"
"github.com/project-flogo/core/trigger"
)
func processDovetailTrigger(txnTrigger *trigger.Config) ([]ModelResources, error) {
txnsbyasset := make(map[string]ModelResources)
for _, h := range txnTrigger.Handlers {
asset :=... |
package sqlf_test
import (
"database/sql"
"testing"
"time"
"github.com/jmoiron/sqlx"
"github.com/jjeffery/sqlf"
"github.com/stretchr/testify/assert"
)
type Row1 struct {
Id int64 `gorm:"AUTO_INCREMENT"`
GivenName string
FamilyName string
IgnoreMe bool `sql:"-"`
DOB time.Time `gorm:"... |
package decision
import (
"github.com/pkg/errors"
"github.com/prometheus/common/log"
"gitlab.alibaba-inc.com/RDS_PG/polardb_cluster_manager/pkg/action"
"gitlab.alibaba-inc.com/RDS_PG/polardb_cluster_manager/pkg/common"
"gitlab.alibaba-inc.com/RDS_PG/polardb_cluster_manager/pkg/meta"
"gitlab.alibaba-inc.com/RDS_P... |
/*
Copyright 2017 Caicloud 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 law or agreed to i... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: helloworld.proto
package main
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/mwitkow/go-proto-validators"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal... |
package util
import (
"io"
"sync"
"time"
"github.com/sirupsen/logrus"
)
// -----------------------------------------------------------------------------
// Public - Reduced Redudancy Debug Logging
// -----------------------------------------------------------------------------
// MakeDebugLoggerWithReducedRedud... |
package domain
import (
"crypto/rand"
"encoding/base64"
"encoding/hex"
"fmt"
"io"
"os"
"strings"
"time"
"github.com/google/uuid"
"github.com/mantil-io/mantil/kit/token"
"github.com/pkg/errors"
)
const (
DefaultNodeName = "dev"
DefaultStageName = "dev"
EnvWorkspace = "MANTIL_WORKSPACE"
EnvKey ... |
//
// Copyright (C) 2012-2017, <NAME> <<EMAIL>>, all rights reserverd.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Note that the Error and Errors defined in this file are the same as the
// Error and ErrorList in go/scanner.
//
package scanner
im... |
package doh
import (
"encoding/binary"
)
// answer describes a parsed answer from the response message.
type answer struct {
name string
t DNSType
class DNSClass
ttl uint32
parsed interface{}
}
// parseResponse parses the message the resolver responded with.
// Returns all of the answers included in... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: ligato/vpp/l3/arp.proto
package vpp_l3
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is... |
package intcode
import (
"fmt"
queue "github.com/enriquebris/goconcurrentqueue"
)
// ExecuteProgram executes an Intcode program.
// An operation consists of up to 4 integers, the last three being parameters with varying length:
// [0]: Operation + Parameter modes:
// 1 add,
// 2 multiply,
// 3 input,
// 4 ... |
/*
copyright 2020 the Escli 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, softwa... |
package dockerhub
import (
"fmt"
"log"
"strings"
"time"
dads "github.com/LF-Engineering/da-ds"
)
// Enricher contains dockerhub datasource enrich logic
type Enricher struct {
DSName string // Datasource will be used as key for ES
ElasticSearchProvider ESClientProvider
BackendVersion str... |
// 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 cmd
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"github.com/SAP/jenkins-library/pkg/command"
"github.com/SAP/jenkins-library/pkg/cpi"
piperhttp "github.com/SAP/jenkins-library/pkg/http"
"github.com/SAP/jenkins-library/pkg/log"
"github.com/SAP/jenkins-library/pkg/piperutils"
"github.com/SAP/jenkins... |
// Copyright 2018 Project Harbor 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 agr... |
// Copyright 2013 Beego Authors
// Copyright 2014 The Macaron 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 req... |
/*
Copyright 2021 The KodeRover 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, s... |
package gomolkafka
import (
"encoding/json"
"errors"
"fmt"
"time"
"github.com/Shopify/sarama"
"github.com/aphistic/gomol"
)
type KafkaLoggerConfig struct {
// The prefix to add before every field name in the JSON data. Defaults to a blank string
FieldPrefix string
// A list of field names excluded from hav... |
// Copyright 2017 Vector Creations Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
package horizon
import (
"context"
"net/http"
"strings"
"time"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
chimiddleware "github.com/go-chi/chi/middleware"
"github.com/dfc/go/services/horizon/internal/errors"
"github.com/dfc/go/services/horizon/internal/hchi"
"github.com/dfc/go/services/horiz... |
/*
Copyright 2019 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// Copyright Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
// Copyright 2019 Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
/*
* 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 ... |
package mpawsec2
import (
"errors"
"flag"
"fmt"
"log"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudwatch"
mp "github.com/mackerelio/go-mackerel-... |
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Copyright 2015 The etcd 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 t... |
package opensips
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"net"
"os"
"path"
"strconv"
"strings"
"sync/atomic"
"time"
)
const firstLineOK = "200 OK\n"
// OpenSIPS holds all the information necessary for handling connections to
// the OpenSIPS Management Interface (targeting version 1.10).
type OpenSIPS ... |
// Copyright 2020 The gVisor 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 agree... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package idemix
import (
"crypto/rand"
"crypto/sha256"
"github.com/wingbaas/platformsrv/settings/fabric/txgeneratev2/fabric-amcl/amcl"
"github.com/wingbaas/platformsrv/settings/fabric/txgeneratev2/fabric-amcl/amcl/FP256BN"
"github... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.