text stringlengths 5.51k 28.1k |
|---|
// 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.
// POSIX library calls.
// This file is compiled as ordinary Go code,
// but it is also input to mksyscall,
// which parses the //sys lines and generates librar... |
// Copyright 2017 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 ... |
package main
import (
"bufio"
"encoding/hex"
"flag"
"fmt"
"os"
"runtime"
"strconv"
"strings"
)
func intEnvConfig(i *int, name string) {
if env, err := strconv.Atoi(os.Getenv(name)); err == nil {
*i = env
}
}
func floatEnvConfig(i *float64, name string) {
if env, err := strconv.ParseFloat(os.Getenv(name)... |
package main
import (
"log"
"net"
"os"
"path"
"path/filepath"
"regexp"
"strings"
"text/template"
"github.com/spf13/viper"
kingpin "gopkg.in/alecthomas/kingpin.v2"
"github.com/falcosecurity/falcosidekick/types"
)
func getConfig() *types.Configuration {
c := &types.Configuration{
Customfields: make(map[... |
// Package scenario allows creating orders for testing purposes with a variety of options.
// It also supports setting up the necessary on-chain state for both the taker and maker.
package scenario
import (
"bytes"
"context"
"fmt"
"math/big"
"testing"
"time"
"github.com/0xProject/0x-mesh/constants"
"github.co... |
package dactyloscopy
import (
"fmt"
"log"
"strconv"
)
var tempFPCounter int
// Check that lengths are not off the end of the packet, etc XXX TODO
// TLSFingerprint finds the fingerprint that is matched by the provided packet
func TLSFingerprint(buf []byte, fingerprintDBNew map[uint64]string) (FingerprintOutput, ... |
package nb
import (
"encoding/json"
"strconv"
)
// SystemInfo is a struct of system info returned by the API
type SystemInfo struct {
Accounts []AccountInfo `json:"accounts"`
Buckets []BucketInfo `json:"buckets"`
Pools []PoolInfo `json:"pools"`
Tiers []TierInfo `json:"tiers"`
Version string ... |
/*
Copyright 2021 The Kruise 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 workflow
import (
"bytes"
"context"
"encoding/json"
"fmt"
"strings"
"time"
"github.com/fsamin/go-dump"
"github.com/go-gorp/gorp"
"github.com/ovh/cds/engine/api/cache"
"github.com/ovh/cds/engine/api/observability"
"github.com/ovh/cds/engine/api/repositoriesmanager"
"github.com/ovh/cds/sdk"
"githu... |
// Copyright (c) 2019 Uber Technologies, Inc.
//
// 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... |
/*
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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/services/ad_group_audience_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v3/resources... |
package groups
import (
"net/http"
"strings"
"github.com/go-chi/render"
"github.com/jinzhu/gorm"
"github.com/France-ioi/AlgoreaBackend/app/database"
"github.com/France-ioi/AlgoreaBackend/app/service"
)
// swagger:model groupUserProgressResponseTableCell
type groupUserProgressResponseTableCell struct {
// The... |
// Copyright (c) 2021 Uber Technologies, Inc.
//
// 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, merg... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/dataproc/v1/subcluster.proto
package dataproc
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
math "math"
)
// Referen... |
/*
* Minio Client (C) 2015 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
/**
* Copyright 2019 gd Author. All rights reserved.
* Author: Chuck1024
*/
package redisdb
import (
"errors"
"fmt"
log "github.com/gdp-org/gd/dlog"
"github.com/gdp-org/gd/runtime/gl"
"github.com/gdp-org/gd/runtime/gr"
"github.com/gdp-org/gd/runtime/pc"
"github.com/gdp-org/gd/utls"
"github.com/garyburd/red... |
// Portions Copyright (C) 2020 VMware, Inc.
// SPDX-License-Identifier: Apache-2.0
package commands
import (
"context"
"os"
"path/filepath"
"strings"
"github.com/moby/buildkit/client"
"github.com/moby/buildkit/util/appcontext"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github... |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package rand implements pseudo-random number generators.
//
// Random numbers are generated by a Source. Top-level functions, such as
// Float64 and Int, use... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/enums/placeholder_type.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v0/enums"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress ... |
/**
* Copyright 2019 Comcast Cable Communications Management, 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 requir... |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// DNS client: see RFC 1035.
// Has to be linked into package net for Dial.
// TODO(rsc):
// Could potentially handle many outstanding lookups faster.
// Could... |
package openapi
import (
"errors"
"fmt"
"github.com/dikhan/terraform-provider-openapi/openapi/openapiutils"
"github.com/go-openapi/loads"
"github.com/go-openapi/spec"
"log"
"regexp"
"strings"
)
const extTfResourceRegionsFmt = "x-terraform-resource-regions-%s"
// specV2Analyser defines an SpecAnalyser impleme... |
// Copyright 2018 Capsule8, 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 ... |
package logparse
import (
"fmt"
"github.com/pkg/errors"
"strconv"
"strings"
)
// MsgType defines a known, parsable message type
type MsgType int
//goland:noinspection GoUnnecessarilyExportedIdentifiers
const (
// UnhandledMsg is used for messages we are ignoring
UnhandledMsg MsgType = 0
// UnknownMsg is for a... |
package main
import (
"flag"
"fmt"
"github.com/fatih/color"
"io"
"os"
"osv-detector/internal"
"osv-detector/internal/configer"
"osv-detector/internal/reporter"
"osv-detector/pkg/database"
"osv-detector/pkg/lockfile"
"path"
"sort"
)
// these come from goreleaser
var (
version = "dev"
commit = "none"
da... |
// Copyright 2019 The Fuchsia 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 (
"context"
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
"time"
"go.fuchsia.dev/fuchsia/tools/bootserver"
... |
package gdpgen
import (
"errors"
"fmt"
"log"
"os"
)
var logger = log.New(os.Stderr, "[Parser] ", 0)
type Parser struct {
augG *G
lex Lexer
actionTable *actionTable
gotoTable *goToTable
}
func NewParser(g *G, lex Lexer) *Parser {
augment(g)
parser := &Parser{
g,
lex,
newActionTable()... |
// +build !js
package glfw
import (
"io"
"os"
"runtime"
"github.com/go-gl/glfw/v3.2/glfw"
)
func init() {
runtime.LockOSThread()
}
var contextWatcher ContextWatcher
// Init initializes the library.
//
// A valid ContextWatcher must be provided. It gets notified when context becomes current or detached.
// It... |
package internal
import (
"github.com/go-gl/gl/v4.6-core/gl"
"github.com/mokiat/gomath/sprec"
"github.com/mokiat/lacking/framework/opengl"
)
const maxVertexCount = 524288
func NewRenderer() *Renderer {
return &Renderer{
shape: newShape(),
shapeMesh: newShapeMesh(maxVertexCount),
shap... |
package signer
import (
"bytes"
"errors"
"fmt"
"sync"
"time"
"github.com/hashicorp/raft"
proto "github.com/strangelove-ventures/horcrux/signer/proto"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/protoio"
tmProto "github.com/ten... |
package ui
import (
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"path"
"strings"
"time"
"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/charm"
"github.com/charmbracelet/charm/keygen"
"github.com/charmbracelet/charm/ui/common"
"github.com/muesli/git... |
/*
This file contains functionality around storing configuration settings
inside Git's metadata storage for the repository.
*/
package git
import (
"errors"
"fmt"
"os"
"regexp"
"strconv"
"strings"
"github.com/Originate/git-town/src/command"
"github.com/Originate/git-town/src/util"
)
// Configuration manages... |
package check
import (
"bytes"
"errors"
"flag"
"fmt"
"go/ast"
"go/build"
"go/token"
"go/types"
"log"
"os"
"path/filepath"
"regexp"
"runtime"
"runtime/pprof"
"sort"
"strings"
"sync"
"github.com/go-critic/go-critic/framework/linter"
"github.com/go-critic/go-critic/framework/lintmain/internal/hotload"... |
package puppetdb
import (
"crypto/tls"
"crypto/x509"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"strings"
"time"
"github.com/Jeffail/gabs"
)
// Client This represents a connection to your puppetdb instance
type Client struct {
BaseURL string
Cert string
Key str... |
/*
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, ... |
package pucontext
import (
"fmt"
"net"
"strconv"
"strings"
"sync"
"time"
"github.com/minio/minio/pkg/wildcard"
"go.aporeto.io/trireme-lib/common"
"go.aporeto.io/trireme-lib/controller/constants"
"go.aporeto.io/trireme-lib/controller/internal/enforcer/acls"
"go.aporeto.io/trireme-lib/controller/internal/enf... |
package proxy
import (
"bufio"
"context"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
"strings"
"time"
"github.com/getlantern/errors"
"github.com/getlantern/netx"
"github.com/getlantern/preconn"
"github.com/getlantern/proxy/v2/filters"
)
func (opts *Opts) applyHTTPDefaults() {
// Apply defaults
if opts... |
package xsdvalidate
/*
#cgo CFLAGS: -std=c99
#cgo pkg-config: libxml-2.0
#include <string.h>
#include <libxml/xmlschemastypes.h>
#include <errno.h>
#include <malloc.h>
#include <stdbool.h>
#define GO_ERR_INIT 1024
#define P_ERR_DEFAULT 1
#define P_ERR_VERBOSE 2
#define LIBXML_STATIC
struct xsdParserResult {
xmlSchem... |
package ecs
import (
. "aliyun-openapi-go-sdk/core"
"strconv"
)
type DescribeInstancesRequest struct {
RpcRequest
OwnerId int
ResourceOwnerAccount string
ResourceOwnerId int
VpcId string
VSwitchId string
ZoneId string
InstanceNetworkType string
Sec... |
package nmble
import (
"encoding/hex"
"encoding/json"
"fmt"
"sync"
"time"
log "github.com/Sirupsen/logrus"
"mynewt.apache.org/newt/util/unixchild"
. "mynewt.apache.org/newtmgr/nmxact/bledefs"
"mynewt.apache.org/newtmgr/nmxact/nmxutil"
"mynewt.apache.org/newtmgr/nmxact/scan"
"mynewt.apache.org/newtmgr/nmxa... |
// Copyright 2017 <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, sof... |
package network
import (
"context"
"fmt"
"io"
"net"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/icon-project/goloop/common/log"
"github.com/icon-project/goloop/module"
"github.com/icon-project/goloop/server/metric"
)
const isLoggingPacket = false
type Peer struct {
id module.Pee... |
// Copyright calabashdad. https://github.com/calabashdad/seal.git
//
// Copyright (c) 2019,CAOHONGJU All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package mpegts
import (
"bytes"
"fmt"
"io"
"sync"
)
// @see: ngx_rtmp_mpegts_header
var... |
/*
* Copyright 2017-2018 <NAME>, Inc. and Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... |
package main
import (
"bytes"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"strings"
"unicode"
_ "github.com/amsokol/ignite-go-client/sql"
"github.com/iancoleman/strcase"
"github.com/valyala/fasttemplate"
)
type table struct {
tableName string
column []column
pk column
composedPK stri... |
// Copyright (C) 2017 Google 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... |
// protocolbuffers/protobuf-go cmd/protoc-gen-go/internal_gengo/main.go
// https://github.com/protocolbuffers/protobuf-go/blob/master/cmd/protoc-gen-go/internal_gengo/main.go
//
// Copyright © 2018 The Go Authors. All rights reserved.
// Portions Copyright © 2021 RomiChan
//
// Redistribution and use in source and bina... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/campaign_feed.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/googleapis/ads/goog... |
package prometheus
import (
"context"
"crypto/md5"
"encoding/hex"
"encoding/json"
"errors"
"math"
"os"
"path/filepath"
"time"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/grafana/agent/pkg/prometheus/wal"
"github.com/oklog/run"
"github.com/prometheus/client_golang/prometheus... |
// Copyright © 2019 - 2020 <NAME> <<EMAIL>>
// Copyright © 2017 - <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 ... |
package service
import (
"fmt"
"net/http"
"net/url"
"time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/auth"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/user"
"github.com/evergreen-ci/evergreen/plugin"
"github.com/evergreen-ci/evergreen/util"... |
package sapphire
// ActorControlType - Actor control category map.
var ActorControlType = map[string]uint16{
/*! Toggles weapon status -> Sheathed/UnSheathed
\param param1 status 0|1 */
"ToggleWeapon": 0x00,
/*! Toggles Autoattack status on/off
\param param1 status 0|1 */
"AutoAttack": 0x01,
"SetStatus": ... |
// TODO rename
package threadsafe
/*
* 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, V... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: proto/pushservice/push.proto
package pushservice
import (
proto1 "bilalekrem.com/pushnotification-service/proto"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/prot... |
// Copyright (c) 2015 Couchbase, 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 w... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc (unknown)
// source: mapping/testdata/schema/with_complex_id.proto
package schema
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "goo... |
package main
import (
"fmt"
"log"
"time"
)
// RunState specifies the current running state of the Processor.
type RunState uint32
const (
// RunStateStopped indicates that the Processor is no longer incrementing the
// program counter and executing instructions.
RunStateStopped RunState = iota
// RunStateRun... |
// Copyright (c) 2015, <NAME>. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
//
package rocksdb
/*
#include "options.h"
*/
import "C"
import (
"runtime"
)
// DB contents are stored in a set of blocks, each o... |
/*
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 edit
import (
"strings"
"unicode"
"unicode/utf8"
"src.elv.sh/pkg/cli"
"src.elv.sh/pkg/cli/tk"
"src.elv.sh/pkg/eval"
"src.elv.sh/pkg/strutil"
"src.elv.sh/pkg/wcwidth"
)
func initBufferBuiltins(app cli.App, nb eval.NsBuilder) {
m := make(map[string]interface{})
for name, fn := range bufferBuiltinsDat... |
package webauthn
import (
"bytes"
"crypto/sha256"
"encoding/base64"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"strings"
"time"
"github.com/duo-labs/webauthn/protocol"
"github.com/duo-labs/webauthn/protocol/webauthncose"
"github.com/duo-labs/webauthn/webauthn"
"github.com/jrockway/jsso2/pkg/jssopb"... |
package service
import (
"errors"
"fmt"
"io"
"net"
"reflect"
"sync"
"sync/atomic"
"github.com/mailru/easygo/netpoll"
"github.com/surgemq/message"
"github.com/hb-go/micro-mq/broker"
"github.com/hb-go/micro-mq/gateway/sessions"
"github.com/hb-go/micro-mq/gateway/topics"
"github.com/hb-go/micro-mq/pkg/log"... |
package main
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io"
"os"
"reflect"
"sort"
"strconv"
"strings"
"text/template"
yaml2 "github.com/ghodss/yaml"
"github.com/imdario/mergo"
nais_io_v1 "github.com/nais/liberator/pkg/apis/nais.io/v1"
nais_io_v1alpha1 "github.com/nais/liberator/pkg/apis/nais.io/v1... |
package scheduler
import (
"fmt"
"sort"
"strings"
"time"
"github.com/hashicorp/nomad/nomad/structs"
)
// placementResult is an allocation that must be placed. It potentially has a
// previous allocation attached to it that should be stopped only if the
// paired placement is complete. This gives an atomic plac... |
/*
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
*/
/*
THIS FILE IS AUTOGENERATED BY 'rclgo-gen generate'
*/
package px4_msgs_msg
import (
"unsafe"
"gith... |
package embercsi
import (
"context"
"encoding/json"
"fmt"
"time"
embercsiv1alpha1 "github.com/embercsi/ember-csi-operator/pkg/apis/ember-csi/v1alpha1"
"github.com/golang/glog"
snapv1b1 "github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1beta1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8... |
// Copyright (C) 2015 NTT Innovation Institute, 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 applicabl... |
package wasabeehttps
import (
"fmt"
"net/http"
// "net/http/httputil"
"strings"
"sync"
"github.com/gorilla/mux"
"github.com/wasabee-project/Wasabee-Server/config"
"github.com/wasabee-project/Wasabee-Server/log"
)
var scanners sync.Map
func setupRouter() *mux.Router {
// Main Router
router := config.NewRou... |
/*
* go4api - an api testing tool written in Go
* Created by: <NAME> 2018
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
package pairwise
import (
"fmt"
"s... |
package main
import (
"fmt"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/client_golang/prometheus/promhttp"
"log"
"net"
"net/http"
"net/http/pprof"
"os"
"strconv"
"strings"
"time"
"github.com/valyala/fasthttp"
)
var (
... |
package main
import (
"bytes"
"encoding/base64"
"encoding/binary"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"math/rand"
"net"
"net/http"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/coyove/common/sched"
"github.com/coyove/goflyway"
"github.com/coyove/goflyway/v"
"golan... |
package app
import (
"context"
"strings"
"time"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
const (
blockConfigurationNestingLevelLimit int = 50
)
const (
//AppAdmin owner roleID
AppAdmin string = "Admin"
//AppAdmi... |
// Code generated by protoc-gen-go.
// source: ospf_sh_redist.proto
// DO NOT EDIT!
/*
Package cisco_ios_xr_ipv4_ospf_oper_ospf_processes_process_vrfs_vrf_process_information_redistributions_redistribution is a generated protocol buffer package.
It is generated from these files:
ospf_sh_redist.proto
It has these to... |
// Copyright 2021 The go-ethereum Authors
// This file is part of go-ethereum.
//
// go-ethereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any la... |
package dasql
// DAS Query Language (QL) implementation for DAS server
//
// Copyright (c) 2015-2016 - <NAME> <<EMAIL>>
//
import (
"crypto/md5"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"log"
"strconv"
"strings"
"time"
"github.com/dmwm/das2go/config"
"github.com/dmwm/das2go/utils"
"gopkg.in/mgo.v2/b... |
// Copyright (c) 2016 Pulcy.
//
// 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 main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strconv"
"strings"
"time"
"github.com/hashicorp/terraform/helper/schema"
terraModel "github.com/osallou/goterra-lib/lib/model"
)
const goterraTmplPre string = `#!/bin/bash
set -e
export TOKEN="${GOT_TOKEN}"
ON_ERROR... |
package stellarnet
import (
"strings"
"testing"
"github.com/stretchr/testify/require"
)
var convertXLMToOutsideUnits = []struct {
ok bool
rate string
xlm string
out string
}{
{false, "", "1", ""},
{false, "1", "", ""},
{false, "0", "1", ""},
{false, "a", "1", ""},
{false, "1e10", "1", ""},
{false, "... |
package utils
import (
"crypto/md5"
"crypto/sha1"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"math/rand"
"net/http"
"net/url"
"notepad-api/conf"
"sort"
"strconv"
"strings"
"time"
"gopkg.in/redis.v5"
"github.com/astaxie/beego"
"github.com/astaxie/beego/context"
"github.com/sat... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/resources/google_ads_field.proto
package resources // import "google.golang.org/genproto/googleapis/ads/googleads/v0/resources"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import wrappers "githu... |
// This file holds the struct and code to communicate with remote peers
// over webrtc data channels.
package main
import (
"encoding/json"
"fmt"
"os"
"strconv"
"strings"
"sync"
"time"
"unicode"
"github.com/creack/pty"
"github.com/pion/webrtc/v3"
"github.com/riywo/loginshell"
)
const keepAliveInterval = 2... |
// Copyright 2018 the LinuxBoot 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 uefi
import (
"bytes"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"unsafe"
"github.com/linuxboot/fiano/pkg/compression"
"github.com... |
package ydb
import (
"context"
"errors"
"io"
"net"
"path"
"strconv"
"sync"
"time"
"github.com/golang/protobuf/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"github.com/yandex-cloud/ydb-go-sdk/api"
"github.com/yandex-cloud/ydb-go-sdk/api/protos/Ydb"
"... |
package response
import (
"github.com/spyroot/tcactl/lib/models"
"time"
)
type InstanceUpdate struct {
Id string `json:"id" yaml:"id"`
TaskId string `json:"taskId" yaml:"taskId"`
OperationState string `json:"operationState" yaml:"operationState"`
StateEnteredTime in... |
package bme680
import (
"errors"
"fmt"
"log"
"sync"
"time"
"periph.io/x/conn/v3"
"periph.io/x/conn/v3/i2c"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/spi"
)
const (
AddrVariant byte = 0xF0 // read-only, only defined on BME688
AddrChipID byte = 0xD0 // read-only, should contain 0x61
// calibratio... |
// Copyright (c) 2018, <NAME> <<EMAIL>>
// See LICENSE for licensing information
package main
import (
"flag"
"fmt"
"go/types"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"text/template"
"golang.org/x/tools/go/packages"
)
var recursive = flagSet.Bool("r", false, "include inits of transitive depende... |
/*
* Copyright (C) 2017 "IoT.bzh"
* Author <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
package main
import (
"fmt"
"github.com/echocat/caretakerd/errors"
"github.com/echocat/caretakerd/logger"
"github.com/echocat/caretakerd/panics"
"github.com/echocat/caretakerd/system"
"go/ast"
"go/build"
"go/importer"
"go/parser"
"go/token"
"go/types"
"os"
"path/filepath"
"reflect"
"regexp"
"runtime"
... |
package process
import (
"fmt"
"strings"
"github.com/spf13/cast"
"github.com/google/uuid"
"path/filepath"
"cwl"
"cwl/expr"
)
type scope struct {
prefix string
links map[string][]string
}
func (n scope) child(prefix string) scope {
return scope{prefix: n.prefix + "/" + prefix, links: n.links}
}
func... |
/*
* 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 by applicable law or agreed to in writing, software
* distributed under ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/ad_group_simulation.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/googleapis/ad... |
// Copyright (c) 2018 The btcsuite developers
// Copyright (c) 2018 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package memwallet
import (
"bytes"
"fmt"
"sync"
"time"
"github.com/decred/dcrd/blockchain"
"github.com/decred/dcrd/chaincf... |
package script
import (
"bytes"
"math"
"github.com/VIVelev/btcd/crypto/ecdsa"
"github.com/VIVelev/btcd/crypto/elliptic"
"github.com/VIVelev/btcd/crypto/hash"
"github.com/VIVelev/btcd/utils"
)
type operation func(st, altst *stack, cmds Script, sighash []byte) bool
func encodeNum(n int) (b element) {
if n == 0... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/resources/customer_client.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
_ "google.golang.org/genproto/googleapis/api/annotat... |
package nakama
import (
"bytes"
"context"
"database/sql"
"encoding/gob"
"encoding/json"
"fmt"
"image"
"image/jpeg"
"image/png"
"io"
"strings"
"time"
"unicode/utf8"
"github.com/cockroachdb/cockroach-go/crdb"
"github.com/go-kit/log/level"
"github.com/lib/pq"
gonanoid "github.com/matoous/go-nanoid"
"gi... |
package archiver
import (
"bytes"
"fmt"
"io"
"mime"
nurl "net/url"
"path"
"regexp"
"strings"
"github.com/tdewolff/parse/v2/css"
"github.com/tdewolff/parse/v2/js"
"golang.org/x/net/html"
)
// ProcessResult is the result from content processing.
type ProcessResult struct {
Name string
ContentType s... |
/*
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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: types.proto
package api_pb
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 a compile-t... |
package cerebro
import (
"errors"
"fmt"
"github.com/comiccruncher/comiccruncher/comic"
"github.com/comiccruncher/comiccruncher/internal/log"
"github.com/comiccruncher/comiccruncher/internal/stringutil"
"github.com/aimeelaplant/externalissuesource"
"github.com/avast/retry-go"
"github.com/go-pg/pg"
"github.com/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.