text stringlengths 3.08k 10.4k |
|---|
package cmdstr
import (
"errors"
"fmt"
"reflect"
"unsafe"
)
type stateType int
func (s stateType) String() string {
switch s {
case stateStart:
return "start"
case stateSingle:
return "squot"
case stateDouble:
return "dquot"
case stateBare:
return "arg"
case stateBareSingle:
return "squot"
case ... |
/*
* Copyright 2019-2020 by <NAME>
* https://www.fibratus.io
* 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
*... |
package main
import (
"fmt"
"go/build"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
)
// envFile returns the name of the Go environment configuration file.
// Copy from https://github.com/golang/go/blob/c4f2a9788a7be04daf931ac54382fbe2cb754938/src/cmd/go/internal/cfg/cfg.go#L150-L166
func en... |
// Copyright 2018 <NAME>. All rights reserved.
package sim
import (
"context"
"encoding/json"
"io/ioutil"
"strings"
"time"
"github.com/simagix/keyhole/mdb"
"github.com/simagix/keyhole/sim/util"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
)
// Transaction -
type Transaction struct... |
package main
import (
"fmt"
"github.com/gdamore/tcell"
"os"
"time"
)
const mpdAddr = "localhost:6600"
type state struct {
mpdState mpdState // play, stop or pause
// elapsed time of the current song in seconds;
// nil when stopped:
elapsed *float32
// songid of the currently playing or paused song;
// nil ... |
package view
import (
"context"
"encoding/json"
"fmt"
"github.com/viant/velty"
"github.com/viant/xunsafe"
"reflect"
"strconv"
"strings"
"unsafe"
)
type (
Accessors struct {
index map[string]int
accessors []*Accessor
}
Accessor struct {
xFields []*xunsafe.Field
xSlices []*xunsafe.Slice
}
)
f... |
// Copyright 2020 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 registration
import (
"context"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"go.chromium.org/gae/service/datas... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iot
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
// The input to the ListCertificatesByCA operation.
type ListCertificatesByCAIn... |
package config
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"time"
"github.com/elastos/Elastos.ELA.Arbiter/arbitration/base"
. "github.com/elastos/Elastos.ELA/common"
)
const (
DefaultConfigFilename = "./config.json"
)
var (
Version string
Parameters configParams
DataPath = "elastos_arbi... |
package x509
import (
"bytes"
"strings"
)
// rfc2821Mailbox represents a “mailbox” (which is an email address to most
// people) by breaking it into the “local” (i.e. before the '@') and “domain”
// parts.
type rfc2821Mailbox struct {
local, domain string
}
// domainToReverseLabels converts a textual domain name ... |
package game
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strconv"
"time"
"github.com/gorilla/websocket"
)
// Client - Game client
type Client struct {
connection *websocket.Conn
name string
identifer string
Send chan *message
hub *Hub
game *game
cards []*card
positi... |
package draft
import (
"crypto/tls"
"fmt"
"io"
"sync"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"github.com/Azure/draft/pkg/build"
"github.com/Azure/draft/pkg/rpc"
"github.com/Azure/draft/pkg/version"
"golang.org/x/net/context"
)
// ClientConfig stores information about the draft serve... |
package sync
import (
"encoding/json"
"io"
gohttp "net/http"
"os"
"path/filepath"
"strings"
"syscall"
"time"
"github.com/baetyl/baetyl-go/v2/context"
"github.com/baetyl/baetyl-go/v2/errors"
"github.com/baetyl/baetyl-go/v2/http"
"github.com/baetyl/baetyl-go/v2/log"
specv1 "github.com/baetyl/baetyl-go/v2/s... |
package mockfn
import (
"fmt"
"reflect"
"sync"
"unsafe"
)
type (
// function is an applied function
// needed to undo a function
function struct {
originalBytes []byte
replacement *reflect.Value
aliasMockedPos uintptr
aliasOriginalBytes []byte
addr *uintptr
}
value s... |
package moby
import (
"crypto/tls"
"crypto/x509"
"encoding/hex"
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/url"
"path"
"path/filepath"
"strings"
"time"
log "github.com/Sirupsen/logrus"
"github.com/docker/distribution/reference"
"github.com/docker/distribution/registry/client/auth"
"github.com/d... |
package core
import (
"fmt"
"reflect"
"rulex/typex"
"strings"
)
//
// 空串
//
const EMPTY_STRING string = ""
/*
*
* 这里是一些前端渲染支持
*
*/
type viewType string
const (
_NUMBER viewType = "el-number"
_TEXT viewType = "el-text"
_INLINE viewType = "el-inline"
_SELECT viewType = "el-select"
... |
// SPDX-License-Identifier: Apache-2.0
//
// Copyright (c) 2019-present, Jet.com, 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
//
... |
package tcp
import (
"bufio"
"context"
"fmt"
"net"
"strings"
"sync"
"time"
"github.com/ryansann/hydro/index"
"github.com/sirupsen/logrus"
)
// ServerOption overrides a default option
type ServerOption func(*options)
type options struct {
port string
readTimeout time.Duration
shutdownTimeo... |
package util
import (
"fmt"
"regexp"
)
// full command has <COMMAND_NAMESPACE>/<COMMAND_NAME>@<VERSION>.
// COMMAND_NAMESPACE can only be named with A-Z,a-z,0-9,-,_
// COMMAND_NAME can only be named with A-Z,a-z,0-9,-,_
// VERSION can only be a-z0-9.~*^
// ex(cmd-namespace/cmd_name@1.0.0)
var fullCommandRegexp = re... |
// Code generated by go-swagger; DO NOT EDIT.
package apps
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-... |
/*
* Copyright 2019 Splunk, 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 ... |
package thirdbean
import "time"
type ResultGiteePremiumCreateHooks struct {
Id int `json:"id"`
Url string `json:"url"`
CreatedAt time.Time `json:"created_at"`
Password string `json:"password"`
ProjectId int `json:"project... |
// Copyright (c) 2021 Terminus, 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 agree... |
package kubernetes
import (
"fmt"
"path/filepath"
"strings"
"sync"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/util/homedir"
"github.com/qaware/minikube-support/pkg/sh"
)
// ContextHandler is a small interface to enc... |
package rtnetlink
import (
"errors"
"fmt"
"net"
"github.com/jsimonetti/rtnetlink/internal/unix"
"github.com/mdlayher/netlink"
)
var (
// errInvalidNeighMessage is returned when a LinkMessage is malformed.
errInvalidNeighMessage = errors.New("rtnetlink NeighMessage is invalid or too short")
// errInvalidNei... |
// Copyright 2020 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
package cloudflare
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"github.com/xenolf/lego/acme"
)
// defaultBaseURL represents the API endpoint to call.
const defaultBaseURL = "https://api.cloudflare.com/client/v4"
// APIError contains error details for failed requests
type APIE... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"time"
"github.com/gorilla/websocket"
"github.com/streadway/amqp"
)
const (
// Time allowed to write a message to the peer.
writeWait = 10 * time.Second
// Time allowed to read the next pong message from the peer.
pongWait = 60 * time.... |
/*
* Copyright 2017 - 2019 KB Kontrakt 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 require... |
package services
import (
"encoding/json"
"fmt"
"github.com/chenziliang/descartes/base"
kafkawriter "github.com/chenziliang/descartes/sinks/kafka"
"github.com/chenziliang/descartes/sinks/memory"
kafkareader "github.com/chenziliang/descartes/sources/kafka"
"github.com/golang/glog"
"os"
"runtime"
"sync/atomic"... |
package main
import (
"fmt"
"io"
"log"
"os"
"path/filepath"
"strings"
clilog "github.com/b4b4r07/go-cli-log"
"github.com/jessevdk/go-flags"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing/object"
)
var (
Version = "unset"
Revision = "unset"
)
type CLI struct {
Option Option
Stdout io.Wr... |
package repos
import (
"context"
"sync"
"golang.org/x/sync/errgroup"
"golang.org/x/sync/semaphore"
"github.com/sourcegraph/sourcegraph/internal/api"
"github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies"
"github.com/sourcegraph/sourcegraph/internal/conf/reposource"
"github.com/sourcegraph/sourc... |
package wallet
import (
"bytes"
"math"
"strings"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcutil/base58"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/tdex-network/tdex-daemon/pkg/bufferutil"
"github.com/tdex-network/tdex-daemon/pkg/explorer"
"github.com/vulpemventures/go-bip39"
"git... |
package message_handlers
import (
"bytes"
"errors"
model2 "github.com/saichler/file-management-service/golang/file-management-service/model"
fms "github.com/saichler/file-management-service/golang/file-management-service/service"
. "github.com/saichler/messaging/golang/net/protocol"
. "github.com/saichler/servic... |
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"github.com/docopt/docopt-go"
"github.com/fatih/color"
log "github.com/sirupsen/logrus"
)
func init() {
var err error
log.SetLevel(log.WarnLevel)
log.SetFormatter(
&log.TextFormatter{
FullTimestamp: true,
},
)
usage := `Usage... |
package v1
import (
"crypto/rand"
"fmt"
"os"
"strings"
"time"
"errors"
jwt "github.com/appleboy/gin-jwt/v2"
"github.com/crowdsecurity/crowdsec/pkg/database"
"github.com/crowdsecurity/crowdsec/pkg/database/ent/machine"
"github.com/crowdsecurity/crowdsec/pkg/models"
"github.com/crowdsecurity/crowdsec/pkg/ty... |
package main
import (
"bufio"
"fmt"
"os"
"path/filepath"
"strings"
"gitgud.io/softashell/rpgmaker-patch-translator/block"
"gitgud.io/softashell/rpgmaker-patch-translator/text"
log "github.com/sirupsen/logrus"
"github.com/dimchansky/utfbom"
"github.com/pkg/errors"
"github.com/vbauerster/mpb"
"github.com/... |
/**
* @Author <NAME>
* @license: (C) Copyright 2013-2021, <NAME>.AllRightsReserved.
* @Description: //Beanwatch agent running on remote host in background
* @Date: 16:08 2021/6/30
* @Software: BeanWatch
* @Version: 1.0
**/
package main
import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/hpcloud/tai... |
package metacmd
import (
"context"
"database/sql"
"io"
"os/user"
"strings"
"time"
"github.com/xo/usql/dburl"
"github.com/xo/usql/drivers"
"github.com/xo/usql/drivers/metadata"
"github.com/xo/usql/env"
"github.com/xo/usql/rline"
"github.com/xo/usql/stmt"
"github.com/xo/usql/text"
)
// Handler is the shar... |
package instance
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"log"
"github.com/oracle/oci-go-sdk/common"
"github.com/oracle/oci-go-sdk/core"
"github.com/schmidtp0740/ociadm/pkg"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
type fullInstanceDetails struct {
Instance core.Instan... |
package importers
import (
"bytes"
"context"
"crypto/aes"
"crypto/cipher"
"database/sql"
"encoding/json"
"io/ioutil"
"net/http"
"net/url"
"os/user"
"path/filepath"
"strconv"
"time"
"github.com/improbable-eng/go-httpwares/logging/logrus/ctxlogrus"
_ "github.com/mattn/go-sqlite3" // for chrome data store... |
package prago
import (
"fmt"
"os"
"reflect"
"strconv"
"strings"
)
var defaultPort = 8585
func addServerCommand(app *App) {
var port int
var developmentMode bool
app.addCommand("server").
flag(
newCommandFlag("port", "port of server").Alias("p").Int(&port),
).
flag(
newCommandFlag("development", "... |
// Copyright © 2016 Asteris, 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 ... |
/*
* Copyright (c) 2013 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL... |
/*
* Copyright 2018-2022 The NATS 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 ... |
package fsdriver
import (
"encoding/binary"
"io"
Error "github.com/zavla/upload/errstr"
)
// startstructver1 is a header of version 1 of journal.
type startstructver1 struct {
VersionBytes uint32
TotalExpectedFileLength int64
VersionBytesEnd uint32
}
// universal StartStruct -> to StartStruc... |
/* MIT License
*
* Copyright (c) 2018 <NAME> <<EMAIL>ghi[at]<EMAIL>.<EMAIL>>
*
* 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
* t... |
/*
Copyright (c) 2021 SAP SE or an SAP affiliate company. 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 app... |
package seeker
import (
"fmt"
"sync"
"time"
"github.com/cloudfoundry-community/gogobosh"
"github.com/starkandwayne/goutils/log"
)
//VMCache contains the fields needed for caching VM information
type VMCache struct {
data map[string]*VMInfo
deployments map[string]*deploymentEntry //not nil if cached
tt... |
package outbrain
import (
"encoding/json"
"fmt"
"net/http"
"github.com/mxmCherry/openrtb/v15/native1"
nativeResponse "github.com/mxmCherry/openrtb/v15/native1/response"
"github.com/mxmCherry/openrtb/v15/openrtb2"
"github.com/prebid/prebid-server/adapters"
"github.com/prebid/prebid-server/config"
"github.com/... |
// Copyright 2019 The Xorm 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 cmd
import (
"bytes"
"errors"
"html/template"
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/kkoudev/xorm-reverse/pkg/conf"
"github... |
package resolvers
import (
"context"
"encoding/base64"
"strconv"
"strings"
"sync"
graphql "github.com/graph-gophers/graphql-go"
"github.com/graph-gophers/graphql-go/relay"
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend"
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/graphqlu... |
/*
* Minio Client (C) 2014, 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 ... |
package api
import (
"context"
"fmt"
"net/url"
"github.com/smallstep/certificates/acme"
)
// NewLinker returns a new Directory type.
func NewLinker(dns, prefix string) Linker {
return &linker{prefix: prefix, dns: dns}
}
// Linker interface for generating links for ACME resources.
type Linker interface {
GetLi... |
package log
import (
"context"
"github.com/arr-ai/frozen"
)
// Fields is a struct that contains all the fields data to log.
type Fields struct{ m frozen.Map }
// Debug logs from context at the debug level.
func Debug(ctx context.Context, args ...interface{}) {
Fields{}.Debug(ctx, args...)
}
// Debugf logs from ... |
package xcodeproj
import (
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"github.com/bitrise-io/go-xcode/xcodeproject/xcscheme"
)
const (
yes = "YES"
no = "NO"
buildableID = "primary"
defaultDebugConfiguration = "Debug"
defaultReleaseConfi... |
package state
import (
"github.com/abchain/fabric/core/db"
"github.com/abchain/fabric/core/ledger/statemgmt"
)
// supporting for the concurrent executation of tx
// the r/w in tx exec involve three sets:
// wset record all set/delete action
// rset trace all get action, so we can evaluate the whole cost to db for o... |
package main
import (
"sort"
"strings"
)
//典型渠道分析
func analysisVIPProducts(videos []Video, vodt VodT, outfile string) (VPro, VPro, VPro, VPro, VPro) {
vpros := make([]VPro, 0)
vproceb := analysisPro("CEB", "索尼", "Android2.0", videos, vodt)
vpro30 := analysisPro("BS3.0", "", "Android3.0", videos, vodt)
vprovidaa... |
package model_module
import (
"encoding/json"
"fmt"
"go-eladmin/core/mongo"
"go-eladmin/model/a_mongo_index"
"go-eladmin/model/model_app"
"go-eladmin/model/shareDB"
"time"
"gopkg.in/mgo.v2/bson"
)
const (
CollectionModule = mongo_index.CollectionModule
)
const (
DataModulePermissionALL = "Model_ALL"
D... |
// Copyright (c) 2018 Cisco and/or its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... |
package slackbot
import (
"regexp"
"context"
slack "github.com/nlopes/slack"
)
type contextKey string
func (c contextKey) String() string {
return string(c)
}
// Route represents a route
type Route struct {
handler Handler
err error
matchers []Matcher
subrouter Router
preprocessor Pr... |
/*
Copyright 2022 The Koordinator 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 wr... |
// Copyright 2017 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"sync"
"time"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/kbfs/kbfsblock"
... |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package types
import (
"fmt"
"go/ast"
"go/token"
"strconv"
)
func (check *checker) declareObj(scope, altScope *Scope, obj Object, dotImport token.Pos) {
... |
// BSD 2-Clause License
//
// Copyright (c) 2020, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// ... |
package cluster
import (
"context"
"fmt"
"regexp"
picchuv1alpha1 "go.medium.engineering/picchu/pkg/apis/picchu/v1alpha1"
"go.medium.engineering/picchu/pkg/controller/utils"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8... |
// Copyright 2019 StreetByters Community
// 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, Ve... |
package main
import (
"errors"
"fmt"
"io"
"os"
"path"
"path/filepath"
"sync"
"time"
"github.com/go-co-op/gocron"
log "github.com/sirupsen/logrus"
irc "github.com/thoj/go-ircevent"
)
// Matchers lists exported matchers in the plugin
var Matchers = []string{"Chanlog"}
var loggers map[string]*log.Logger
var... |
package exql
import (
"database/sql"
"fmt"
"regexp"
"strings"
"text/template"
"github.com/iancoleman/strcase"
)
type parser struct {
tmpl *template.Template
outDir string
}
type Parser interface {
ParseTable(db *sql.DB, table string) (*Table, error)
}
func NewParser() Parser {
return &parser{}
}
type ... |
package krawler
import (
"os"
"os/signal"
"reflect"
"sync"
"sync/atomic"
"time"
log "github.com/sirupsen/logrus"
)
// Engine is the core of the crawler system.
type Engine struct {
Config *Config
downloader Downloader
queue Queue
processors map[string]FuncProcessor
shuttingDown ... |
package lshforest
import (
"errors"
"github.com/gaspiman/cosine_similarity"
"github.com/justinfargnoli/lshforest/pkg/hash"
"github.com/justinfargnoli/lshforest/pkg/lshtree"
"math"
"sort"
)
// LSHForest is an index of high-dimensional data based on cosine similarity
type LSHForest struct {
trees []lshtree.LSH... |
// Code generated by go-swagger; DO NOT EDIT.
package pages
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go... |
/*
Copyright (C) 2018 Synopsys, Inc.
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
"... |
// Copyright (c) 2019 Palantir Technologies. 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 require... |
package search
import "go-common/library/time"
var (
//NotDelete not delete
NotDelete uint8
//Delete delete
Delete uint8 = 1
//Business log business ID
Business = 202
//ActionAddBlack log action
ActionAddBlack = "ActionAddBlack"
//ActionDelBlack log action
ActionDelBlack = "ActionDelBlack"
//ActionAddInter... |
package components
import (
"encoding/json"
"errors"
"fmt"
"io"
"os"
"os/user"
)
// ErrInvalidMountType signifies that there was an error parsing a component mount specification.
// Specifically, that the MountType member did not have a valid value.
var ErrInvalidMountType = errors.New("Invalid mount type in co... |
/*
Copyright 2017 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 2020 gRPC 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... |
// bazaar is the package that kind of presides over the MySQL connection
// and it also allows us to think about the Vendors as a set.
//
// It implements a subtype Vendor which all Vendors should inherit from.
//
// It also sets up the connection from the command line parameters and a
// password that it asks for fro... |
// 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 syzcorpus
import (
"context"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
"golang.org/x/sync/errgroup"
"chromiumos/tast/dut"
"chro... |
/*
Copyright (c) 2017 SAP SE or an SAP affiliate company. 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 app... |
package cmd
import (
"context"
"fmt"
"os"
pathpkg "path"
"strings"
"cloud.google.com/go/spanner"
"github.com/spf13/cobra"
"go.mercari.io/yo/generator"
"go.mercari.io/yo/internal"
"go.mercari.io/yo/loaders"
)
const (
defaultSuffix = ".yo.go"
exampleUsage = `
# Generate models under models directory
y... |
package immortal
import (
"bytes"
"encoding/json"
"fmt"
"os"
"os/signal"
"path/filepath"
"reflect"
"runtime"
"sync"
"syscall"
"testing"
"time"
)
func TestMain(m *testing.M) {
switch os.Getenv("GO_WANT_HELPER_PROCESS") {
case "sleep10":
GWHPsleep10()
case "nosleep":
GWHPnosleep()
case "signalsUDOT"... |
package botcom
import (
"encoding/json"
"fmt"
"log"
"sync"
"github.com/pion/mediadevices"
"github.com/pion/webrtc/v3"
_ "github.com/pion/mediadevices/pkg/driver/camera"
_ "github.com/pion/mediadevices/pkg/driver/microphone"
)
type InitParams struct {
Id int
StunUrls ... |
package cli
import (
"fmt"
"os"
"github.com/jawher/mow.cli"
"github.com/mirakl/http2back/notifier"
"github.com/mirakl/http2back/provider"
"github.com/mirakl/http2back/server"
)
var (
addr *string
port, maxmemmb *int
notif notifier.Datadog
)
func Process(appName, appDesc, appVersion strin... |
// Copyright 2022 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 docgen
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"text/template"
"github.com/gogo/protobuf/proto"
plugin_gogo "github.com/gogo/protobuf/protoc-gen-gogo/plugin"
plugin_go "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/iancoleman/strcase"
"github.com/pkg/errors"
gendoc "githu... |
package lmath
import (
"gonet/base"
"math"
"unsafe"
)
type(
Point2F struct {
X float32
Y float32
}
IPoint2F interface {
Set(float32 , float32)
SetF([] float32)
SetMin(Point2F)
SetMax(Point2F)
Interpolate(Point2F, Point2F, float32)
Zero()
IsZero() bool
Len() float32
LenSquared() float32
... |
package node
import (
"bytes"
"encoding/base64"
"errors"
"fmt"
)
const (
COINBASE = iota
TRANSFER = iota
POST = iota
COMMENT = iota
UPVOTE = iota
)
const TX_FEE = 1
const TX_UPVOTE = 10
const TX_COINBASE = 100
type Transaction struct {
Type uint32 // the type of transaction
TxIns []TxIn ... |
// Copyright (c) 2018, The GoKi 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 parse
import (
"fmt"
"github.com/goki/ki/kit"
"github.com/goki/pi/lex"
"github.com/goki/pi/token"
)
// Actions are parsing actions to perf... |
package main
import (
"errors"
"io/ioutil"
"regexp"
"strconv"
"strings"
"golang.org/x/net/context"
"golang.org/x/oauth2/google"
"gopkg.in/Iwark/spreadsheet.v2"
)
// Board members of a Toastmasters meeting.
type Board struct {
President string
VPE string
VPM string
VPPR string
Secretary ... |
package keys
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/x509"
"encoding/asn1"
"encoding/pem"
"fmt"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/foundriesio/fioctl/subcommands"
)
var prettyFormat bool
func init() {
cmd := &cobra.Command{
Use: "show... |
// Copyright (c) 2014 - The Event Horizon authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
package storage
import (
"context"
"fmt"
"time"
"github.com/calvinmclean/automated-garden/garden-app/pkg"
"github.com/rs/xid"
"gopkg.in/yaml.v3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/rest"
)
// ConfigMapC... |
// Copyright 2017-2018 VMware, Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... |
// headscan is used to test one of more origin web servers to see if
// they return a specific HTTP header.
//
// It expects to receive one or more lines on stdin that consist of
// comma separated entries representing an HTTP Host header value and
// the name of an origin web server to which to send an HTTP
// request... |
// TODO: clean up this code.
package dpf
// This file contains the server side code for the FSS library.
import (
"crypto/aes"
"crypto/cipher"
"encoding/binary"
"math"
)
// Upon receiving query from client, initialize server with
// this function. The server, unlike the client
// receives prfKeys, so it doesn't ... |
// Copyright 2021 <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 prober
import (
"context"
"crypto/tls"
"errors"
"fmt"
"net"
"net/url"
"strconv"
"strings"
"time"
pconfig "github.com/prometheus/common/config"
"mellium.im/xmpp/jid"
"github.com/horazont/xmpp-blackbox-exporter/internal/config"
)
var ErrNotThisNetwork = errors.New("address family disabled by conf... |
package request
import (
"encoding/json"
"fmt"
"io/ioutil"
"mime/multipart"
"net/http"
"strings"
"sync"
"github.com/daison12006013/lucid/pkg/errors"
"github.com/daison12006013/lucid/pkg/facade/urls"
"github.com/daison12006013/lucid/pkg/rules"
"github.com/daison12006013/lucid/pkg/rules/must"
"github.com/go... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.