text stringlengths 5.51k 28.1k |
|---|
package mongo
import (
"encoding/json"
"errors"
"fmt"
"regexp"
"strings"
"github.com/tidwall/gjson"
"github.com/xwb1989/sqlparser"
)
// Convert will transform sql to elasticsearch dsl string
func Convert(sql string) (dsl string, table string, err error) {
stmt, err := sqlparser.Parse(sql)
if err != nil {
... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Copyright 2015 <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 writi... |
/*
Package psyringe provides an easy to use, lazy and concurrent dependency
injector.
Psyringe makes dependency injection very easy for well-written Go code. It
uses Go's type system to decide what to inject, and uses channels to orchestrate
value construction, automatically being as concurrent as your dependency grap... |
// Copyright 2019 The Hugo 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 ... |
package main
import (
"bytes"
"fmt"
"html/template"
"strings"
"github.com/ditashi/jsbeautifier-go/jsbeautifier"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/pseudomuto/protokit"
)
type twirp stru... |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Extract example functions from file ASTs.
package doc
import (
"go/ast"
"go/token"
"path"
"sort"
"strconv"
"strings"
)
// Examples returns the examp... |
/*
Copyright 2022 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 gpuscheduler has the logic for the scheduler extender - including the server it starts and filter methods
package gpuscheduler
import (
"context"
"encoding/json"
"errors"
"net/http"
"net/http/httputil"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/intel/platform-aware-scheduling/extender"... |
//
// 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 2019 The Cloud-Barista 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 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
package main
import (
"fmt"
"io/ioutil"
"math/rand"
"os"
"path"
"strings"
"time"
"github.com/SiriDB/go-siridb-connector"
"github.com/atotto/clipboard"
homedir "github.com/mitchellh/go-homedir"
"github.com/transceptor-technology/goleri"
kingpin "gopkg.in/alecthomas/kingpin.v2"
runewidth "github.com/matt... |
package ig
import (
"context"
"errors"
"fmt"
"github.com/shopspring/decimal"
log "github.com/sirupsen/logrus"
"github.com/sklinkert/at/internal/broker"
"github.com/sklinkert/at/pkg/tick"
"github.com/sklinkert/igmarkets"
"strings"
"sync"
"time"
)
const openPositionsRefreshInterval = time.Second * 5
const cl... |
/*
timeshift.go
-<NAME>
Feb 2019
Shift date/time from log files or from STDIN
https://github.com/jftuga/timeshift
*/
package main
import (
"bufio"
"flag"
"fmt"
"os"
"sort"
"strings"
"time"
"github.com/jftuga/strtime"
"github.com/olekukonko/tablewriter"
)
const version = "1.2.0"... |
package workspace
import (
"io"
"fmt"
"net/http"
"golang.org/x/net/context"
"github.com/hyper-ml/hyperml/server/pkg/storage"
db_pkg "github.com/hyper-ml/hyperml/server/pkg/db"
)
type ApiServer interface {
InitRepo(name string) (*RepoAttrs, error)
InitTypedRepo(repoType RepoType, name string) (*Repo... |
package htmltopdf
/*
#cgo LDFLAGS: -lwkhtmltox
#include <stdlib.h>
#include <wkhtmltox/pdf.h>
*/
import "C"
import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"unsafe"
)
// ErrorAction defines actions to take in case of object load failure.
type ErrorAction string
// Error action values.
const (
Action... |
// Package dynamic generates ops.HueTsk dynamically based on user input.
package dynamic
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/keep94/gohue"
"github.com/keep94/marvin2/ops"
"github.com/keep94/maybe"
"net/url"
"sort"
"strconv"
"strings"
)
const (
// Default name of color parameter
Co... |
/***********************************************************************************\
盘点那些踩过的坑
1)作为返回值,最好不要写成(err error),或者在函数开始声明var err error,因为函数内类似的调用
db, err := sql.Open()会重新声明一个err,有可能导致返回值错乱
2)go语言只有四种类型map、chan、slice、interface{}都属于引用类型(默认值均为nil),内部维护了对象的指针,对所
指向对象的更改会影响到对象本身和所有指向该对象的引用类型;要更改引用对象本身,在函数传递时必须
... |
package main
import (
"bytes"
"encoding/base64"
"os"
"testing"
"github.com/jmhodges/levigo"
. "launchpad.net/gocheck"
)
// Hook gocheck into the gotest runner.
func Test(t *testing.T) { TestingT(t) }
type CommandSuite struct{}
var _ = Suite(&CommandSuite{})
func (s CommandSuite) SetUpSuite(c *C) {
os.Remov... |
package tls
import (
"crypto/x509"
"crypto/x509/pkix"
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/installconfig"
)
const (
// RootCAKeyName is the filename of the RootCAKey.
RootCAKeyName = "root-ca.key"
// RootCACertName is the filename of the RootCACert.
RootCACertN... |
/*
* Copyright (C) 2020 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 t... |
//
// goamz - Go packages to interact with the Amazon Web Services.
//
// https://wiki.ubuntu.com/goamz
//
// Copyright (c) 2014 Canonical Ltd.
//
package ec2_test
import (
"strconv"
"time"
. "gopkg.in/check.v1"
"gopkg.in/amz.v3/aws"
"gopkg.in/amz.v3/ec2"
)
// Volume tests with example responses
func (s *S... |
/*
* Copyright (C) 2018-2019 Fusion Foundation Ltd. All rights reserved.
* Copyright (C) 2018-2019 <EMAIL>
*
* This library is free software; you can redistribute it and/or
* modify it under the Apache License, Version 2.0.
*
* This library is distributed in the hope that it will be useful,
* but WITHOU... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
// Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Package nearbysnippet is for interacting with the Nearby Snippet which provides automated control of Android Nearby share.
package nearbysnippet
im... |
// Copyright © 2015-2018 Galvanized Logic. All rights reserved.
// Use is governed by a BSD-style license found in the LICENSE file.
package main
import (
"image"
"image/color"
"log"
"math"
"math/rand"
"runtime"
"sync"
"time"
"github.com/gazed/vu/device"
"github.com/gazed/vu/load"
"github.com/gazed/vu/mat... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: dbclient.proto
package database_delivery
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference imports to suppress errors if they are not... |
package query
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"math/big"
"strings"
"github.com/DataDog/zstd"
"github.com/schoeppi5/libts"
"github.com/schoeppi5/libts/communication"
)
const (
endVirtualserver = "end_virtualserver"
startChannels = "begin_channels"
endChann... |
package ecs
import (
"reflect"
"testing"
"github.com/yourbasic/bit"
)
type (
data1 struct{ v int }
data2 struct{ v int }
data3 struct{ v int }
)
func setupNullComponent() (*Manager, DataComponent, DataComponent, DataComponent) {
manager := NewManager()
c1 := manager.NewNullComponent()
c2 := manager.NewNull... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/http/router/v2/router.proto
package envoy_config_filter_http_router_v2
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2"
_ "github.com/envoypro... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: discovery.proto
package discovery_go_proto
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
common_go_proto "github.com/grafeas/grafeas/proto/v1beta1/common_go_proto"
status "google.gola... |
// Copyright 2020 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package apply
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"regexp"
"sync"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
package providers
import (
"context"
"errors"
"fmt"
"io/ioutil"
"os... |
package main
import (
"fmt"
log "github.com/Sirupsen/logrus"
etcdc "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/gtfierro/cs262-project/common"
gouuid "github.com/nu7hatch/gouuid"
"golang.org/x/net/context"
"math"
"strings"
"sync"
"time"
)
type EtcdConnection struct {
... |
package new
// Copyright (c) 2018 Bhojpur Consulting Private Limited, India. All rights reserved.
// 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 l... |
package main
import (
"bytes"
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"os/user"
"sort"
"strconv"
"strings"
"time"
"github.com/google/uuid"
"github.com/bandprotocol/band/go/driver"
"github.com/bandprotocol/band/go/dt"
"github.com/bandprotocol/band/go/reqmsg"
"github.co... |
/***
Copyright 2014 Cisco Systems 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... |
package rfc3464
import (
"net/textproto"
"strings"
)
/*
RecipientRecord represents per-recipient DSN record
A DSN contains information about attempts to deliver a message to one
or more recipients. The delivery information for any particular
recipient is contained in a group of contiguous per-recipient fields.... |
package client
import (
"bytes"
"crypto/md5"
"encoding/binary"
"errors"
"fmt"
"math"
"strconv"
"sync"
"time"
"github.com/sinoreps/cmppproxy/log"
cmpp "github.com/bigwhite/gocmpp"
cmpputils "github.com/bigwhite/gocmpp/utils"
"github.com/jpillora/backoff"
"github.com/karlseguin/ccache"
)
// Message is t... |
package grpcmock
import (
"context"
"errors"
"fmt"
"net"
"sort"
"strings"
"sync"
"time"
grpcRecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
grpcTags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc"
grpcErrors "github.com/n... |
// Copyright © 2019 Master.G
//
// 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, distri... |
package detailed
import (
"context"
"fmt"
"strings"
opentracing "github.com/opentracing/opentracing-go"
"github.com/weaveworks/scope/probe/awsecs"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/kubernetes"
"github.com/weaveworks/scope/probe/overlay"
"github.com/weaveworks/scop... |
// Copyright 2021 MatrixOrigin.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package agent
import (
"context"
"fmt"
"strconv"
"github.com/google/uuid"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/uptrace/bun"
"golang.org/x/exp/maps"
"github.com/determined-ai/determined/master/internal/config"
"github.com/determined-ai/determined/master/internal/db"
"github.... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: arenapvp.proto
package cross
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type SIArenap... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: msp/msp_principal.proto
package msp
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type M... |
// Copyright 2020 The LUCI 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... |
// Copyright 2018 Google LLC All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
// Package common implements all the things that an IPFS Cluster API component
// must do, except the actual routes that it handles.
//
// This is meant for re-use when implementing actual REST APIs by saving most
// of the efforts and automatically getting a lot of the setup and things like
// authentication handled.
... |
// Copyright 2020 The Nakama Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
package main
import (
"context"
"errors"
"flag"
"fmt"
"log"
"net/http"
_ "net/http/pprof" // Comment this line to disable pprof endpoint.
"os"
"os/signal"
"sort"
"strings"
"syscall"
"time"
"github.com/fatih/color"
"github.com/influxdata/tail/watch"
"github.com/influxdata/telegraf"
"github.com/influx... |
// Copyright (c) 2015-2021 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... |
/*
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... |
/*
* Copyright (c) 2017, MegaEase
* 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... |
// Copyright 2021 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... |
package models
import (
"fmt"
"strings"
"github.com/TruthHun/DocHub/helper"
"errors"
"strconv"
"github.com/astaxie/beego/orm"
)
//文档资源状态,1正常,0文档未转换成功,-1删除,同时把id录入文档回收站id,-2表示删除了文档文件,但是数据库记录还保留。同时后台也看不到该记录
const (
DocStatusFileDeleted int8 = -2
DocStatusDeleted int8 = -1
DocStatusConverting int8 = 0
... |
/*
Copyright 2016 The Rook 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 agreed to ... |
/*
Copyright 2021 Juicedata 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
d... |
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package p2p
import (
"fmt"
"math/rand"
//"strings"
"sync/atomic"
"sync"
"time"
"github.com/33cn/chain33/common/pubsub"
"github.com/33cn/chain33/p2p/na... |
// 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.2
// source: kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.proto
package v1alpha1
import (
v1alpha1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1"
_ "google.golang.org/... |
package pixelgl
import (
"github.com/faiface/mainthread"
"github.com/faiface/pixel"
"github.com/go-gl/glfw/v3.2/glfw"
)
// Pressed returns whether the Button is currently pressed down.
func (w *Window) Pressed(button Button) bool {
return w.currInp.buttons[button]
}
// JustPressed returns whether the Button has ... |
/*
Copyright 2019 IBM Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... |
package jsonmatch_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/sanity-io/jsonmatch"
)
func r(start int, end int) jsonmatch.Region {
return jsonmatch.Region{Start: start, End: end}
}
func rs(regions ...jsonmatch.Region) jsonmatch.Regions {
if l... |
package core
// server readloop writeloop handleloop
import (
"context"
"io"
"net"
"reflect"
"sync"
"time"
"unsafe"
message "github.com/stratosnet/sds/msg"
"github.com/stratosnet/sds/msg/header"
"github.com/stratosnet/sds/utils"
"github.com/stratosnet/sds/utils/cmem"
)
// MsgHandler
type MsgHandler struct... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/http/cache/v2alpha/cache.proto
package envoy_config_filter_http_cache_v2alpha
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"
matcher "github.com/envoyp... |
package indexer
import (
"context"
"database/sql"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httptest"
"os"
"testing"
"time"
_ "github.com/lib/pq"
"github.com/olivere/elastic/v7"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
const elasticUR... |
package main
import (
"crypto/ecdsa"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"path/filepath"
"strings"
"time"
"github.com/asipto/secsipidx/secsipid"
)
const secsipidxVersion = "1.1.0"
// CLIOptions - structure for command line options
type CLIOptions struct {
httpsrv string
... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// Copyright (c) 2021-2022 Teal.Finance contributors
// This file is part of Teal.Finance/Garcon,
// an API and website server, under the MIT License.
// SPDX-License-Identifier: MIT
package garcon
import (
"encoding/hex"
"errors"
"fmt"
"log"
"math/rand"
"net"
"net/http"
"net/url"
"strconv"
"strings"
"time... |
package api
import (
"context"
"crypto"
"crypto/dsa"
"crypto/ecdsa"
"crypto/rsa"
"crypto/x509"
"encoding/asn1"
"encoding/base64"
"encoding/json"
"encoding/pem"
"fmt"
"net/http"
"strconv"
"strings"
"time"
"github.com/go-chi/chi"
"github.com/pkg/errors"
"github.com/smallstep/certificates/authority"
"... |
package ui
import (
"context"
"encoding/base64"
"fmt"
"hash/fnv"
// "net"
"os/exec"
"sort"
"strconv"
"strings"
"time"
"github.com/AlexTransit/vender/currency"
"github.com/AlexTransit/vender/hardware/input"
"github.com/AlexTransit/vender/helpers"
"github.com/AlexTransit/vender/internal/engine"
"github.... |
package renamer
import (
"fmt"
"sort"
"strconv"
"sync"
"sync/atomic"
"github.com/evanw/esbuild/internal/ast"
"github.com/evanw/esbuild/internal/js_ast"
"github.com/evanw/esbuild/internal/js_lexer"
)
func ComputeReservedNames(moduleScopes []*js_ast.Scope, symbols js_ast.SymbolMap) map[string]uint32 {
names :... |
package transactionpool
import (
"bytes"
"fmt"
"sort"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
)
// findSets takes a bunch of transactions (presumably from a block) and finds
// all of the separate transaction sets within it. Set does not ch... |
package swift
import (
"bytes"
"context"
"crypto/md5"
"encoding/json"
"fmt"
"log"
"sync"
"time"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers"
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects"
"github.com/gophercloud/go... |
// Copyright ©2018 The go-hep 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 ignore
package main
import (
"fmt"
"log"
"os"
"reflect"
"text/template"
"go-hep.org/x/hep/groot/internal/genroot"
"go-hep.org/x/hep/gro... |
package db
import (
"context"
"fmt"
"net/url"
"strings"
"time"
"go.charczuk.com/sdk/configutil"
)
const (
// DefaultEngine is the default database engine.
DefaultEngine = "pgx" // "postgres"
)
const (
// EnvVarDBEngine is the environment variable used to set the Go `sql` driver.
EnvVarDBEngine = "DB_ENGIN... |
package editPE
import (
"debug/pe"
"unsafe"
)
const (
SIZE_OF_OPTIONAL_HEADER_32 = 0xe0
SIZE_OF_OPTIONAL_HEADER_64 = 0xf0
)
const (
ENTRY_NAME_CURSOR = 0x01
ENTRY_NAME_BITMAP = 0x02
ENTRY_NAME_ICON = 0x03
ENTRY_NAME_MENU = 0x04
ENTRY_NAME_DIALOG ... |
package task
import (
"errors"
"fmt"
"log"
"path"
"path/filepath"
"regexp"
"strings"
"github.com/spf13/afero"
"golang.org/x/sync/errgroup"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/yaml"
"github.com/kudobuil... |
package parse
import (
"errors"
"fmt"
"github.com/omniskop/vitrum/vit"
)
// ParseError describes an error that occurred during parsing. Tt contains the position in the file where the error occurred
type ParseError struct {
pos vit.PositionRange
err error
}
func parseErrorf(p vit.PositionRange, format string, a... |
package ks3
import (
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"testing"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/ks3sdklib/aws-sdk-go/aws"
"github.com/ks3sdklib/aws-sdk-go/aws/credentials"
"github.com/ks3sdklib/aws-sdk-go/service/s3"
"github.com/pkg/errors... |
/*
* Copyright IBM Corporation 2020, 2021
*
* 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.0
// source: github.com/dogmatiq/protean/internal/testservice/service.proto
package testservice
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.17.3
// source: protos/domain/daily_job_alert_notification.grpc.proto
package domain
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtim... |
// Copyright 2014 <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... |
// Copyright 2021 IBM Corp
//
// 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 wr... |
/*
Copyright 2014 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 2011 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 agreed to in writing, sof... |
package mag
import (
"bufio"
"fmt"
"math"
"os"
"github.com/MathieuMoalic/mms/data"
"github.com/MathieuMoalic/mms/oommf"
"github.com/MathieuMoalic/mms/timer"
"github.com/MathieuMoalic/mms/util"
)
// Obtains the demag kernel either from cacheDir/ or by calculating (and then storing in cacheDir for next time).
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/securitycenter/v1/finding.proto
package securitycenter // import "google.golang.org/genproto/googleapis/cloud/securitycenter/v1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _struct "github.com/golan... |
package gofpdi
import (
"bufio"
"bytes"
"compress/zlib"
"crypto/sha1"
"encoding/hex"
"fmt"
"github.com/pkg/errors"
"math"
"os"
)
type PdfWriter struct {
f *os.File
w *bufio.Writer
r *PdfReader
k float64
tpls []*PdfTemplate
m int
n int
offsets map[int]int
offset... |
package openstack
import (
"context"
"encoding/json"
"fmt"
"io"
"log"
"os"
"strconv"
"time"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack"
"github.com/gophercloud/gophercloud/openstack/container/v1/capsules"
"github.com/gophercloud/gophercloud/pagination"
"github.com/... |
package pgtype
import (
"database/sql"
"reflect"
errors "golang.org/x/xerrors"
)
// PostgreSQL oids for common types
const (
BoolOID = 16
ByteaOID = 17
QCharOID = 18
NameOID = 19
Int8OID = 20
Int2OID = 21
Int4OID = 23
TextOI... |
package forms
import (
"encoding/json"
"fmt"
"github.com/Jeffail/gabs"
"github.com/bep/gr"
"github.com/bep/gr/attr"
"github.com/bep/gr/el"
"github.com/bep/gr/evt"
"github.com/murdinc/awsmDashboard/helpers"
)
var (
elbSchemes = []string{"internal", "internet-facing"}
)
type LoadBalancerClassForm struct {
*... |
package gossiper
import (
"bytes"
"encoding/csv"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"sync"
"time"
"github.com/Never-M/MyGossip/pkg/types"
"github.com/String-Reconciliation-Ditributed-System/RCDS_GO/pkg/lib/algorithm/iblt"
"github.com/String-Reconciliation-Ditributed-System/... |
package ingest
import (
"bytes"
"fmt"
"io"
"net/http"
"github.com/filecoin-project/go-indexer-core"
v0 "github.com/filecoin-project/storetheindex/api/v0"
"github.com/filecoin-project/storetheindex/api/v0/ingest/schema"
"github.com/filecoin-project/storetheindex/internal/registry"
"github.com/filecoin-project... |
/*
See https://github.com/glycerine/tmframe for the specification of the TMFRAME
format which we implement here.
*/
package tm
import (
"bytes"
"encoding/binary"
"fmt"
//needs CGO: "github.com/codahale/blake2"
// pure Go:
"github.com/glycerine/blake2b" // vendor https://github.com/dchest/blake2b
"github.com/t... |
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.