text stringlengths 5.51k 28.1k |
|---|
package nginx
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"text/template"
"github.com/Masterminds/sprig"
"github.com/deis/router/model"
)
const (
confTemplate = `{{ $routerConfig := . }}daemon off;
pid /tmp/nginx.pid;
worker_processes {{ $routerConfig.WorkerProcesses }};
events {
worker_connections {{ ... |
package cluster
import (
"context"
"io/ioutil"
"math/rand"
"net"
"strconv"
"strings"
"sync"
"time"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/hashicorp/memberlist"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/improbable-eng/thanos/pkg/store/storepb"
"github.c... |
// Copyright 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 to in ... |
package parser
import (
"testing"
"github.com/nokia/ntt/internal/loc"
)
type Expect int
const (
pass Expect = iota
fail
)
type Test struct {
expect Expect
input string
}
func TestModules(t *testing.T) {
modules := []Test{
{pass, `module m {}`},
{pass, `module m language "str1", "str2" {}`},
}
testP... |
/*
Copyright 2021 The Vitess 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/monitoring/dashboard/v1/scorecard.proto
package dashboard
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
)
// Reference imports to suppress errors if they are not oth... |
package main
import (
"database/sql/driver"
"encoding/json"
"fmt"
"strings"
)
type kvChan chan *KeyValue
// KeyValue is basic key:value struct
type KeyValue map[string]interface{}
// bool returns the value of the given name, assuming the value is a boolean.
// If the value isn't found or is not of the type, the... |
// Package main defines a service for handling various post-processing
// and house-keeping tasks associated with the pipelines.
// Most tasks will be run periodically, but some may be triggered
// by URL requests from authorized sources.
// Design doc is here: https://docs.google.com/document/d/1503gojY_bVZy1iHlxdDqsz... |
package m
import (
"fmt"
"os"
"regexp"
"strconv"
"strings"
"unicode"
log "github.com/sirupsen/logrus"
"github.com/walles/moar/twin"
)
const _TabSize = 4
const BACKSPACE = '\b'
var manPageBold = twin.StyleDefault.WithAttr(twin.AttrBold)
var manPageUnderline = twin.StyleDefault.WithAttr(twin.AttrUnderline)
... |
package text
import (
"bytes"
"errors"
"math"
"math/rand"
"strings"
"time"
"unicode"
"github.com/robjporter/go-functions/as"
)
const UPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
const LOWERCASE = "abcdefghijklmnopqrstuvwxyz"
const VOWELS = "aeoui"
const CONSONANTS = "bcdfghjklmnpqrstvwxyz"
const NUMBERS = "12345... |
package main
/*
Performance test for TaskScheduler.
*/
import (
"context"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"math"
"net/http"
"os"
"path"
"path/filepath"
"runtime"
"runtime/pprof"
"sort"
"strings"
"time"
"cloud.google.com/go/datastore"
"github.com/google/uuid"
swarming_api "go.chromiu... |
/*
* Copyright (c) 2019. Baidu Inc. All Rights Reserved.
*/
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"math/big"
"os"
"time"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"google.golang.org/grpc"
"google.golang.org/grpc/c... |
package ast
import (
"fmt"
"strings"
"github.com/VirusTotal/gyp/pb"
)
// RuleSetFromProto creates a RuleSet from its corresponding protobuf.
func RuleSetFromProto(rs *pb.RuleSet) *RuleSet {
pbRules := rs.GetRules()
astRules := make([]*Rule, len(pbRules))
for i, rule := range pbRules {
astRules[i] = RuleFromP... |
// Copyright 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 to in... |
package metal
import (
"context"
"crypto/sha256"
"encoding/base64"
"fmt"
"net/url"
"github.com/equinix/cloud-provider-equinix-metal/metal/loadbalancers"
"github.com/equinix/cloud-provider-equinix-metal/metal/loadbalancers/empty"
"github.com/equinix/cloud-provider-equinix-metal/metal/loadbalancers/kubevip"
"g... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
package main
import (
"context"
"fmt"
"strconv"
"time"
"github.com/certusone/solana_exporter/pkg/rpc"
"github.com/prometheus/client_golang/prometheus"
"k8s.io/klog/v2"
)
const (
slotPacerSchedule = 1 * time.Second
)
var (
totalTransactionsTotal = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "solana_co... |
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markup_test
import (
"testing"
"github.com/stretchr/testify/assert"
. "git.scs.buaa.edu.cn/iobs/bugit/internal/markup"
)
func Test_IsReadmeFile... |
// Code generated for package bootstrap by go-bindata DO NOT EDIT. (@generated)
// sources:
// bindata/bootstrap/cloudcredential_v1_credentialsrequest_crd.yaml
// bindata/bootstrap/cloudcredential_v1_operator_config_custresdef.yaml
// bindata/bootstrap/namespace.yaml
package bootstrap
import (
"fmt"
"io/ioutil"
"os... |
package traceskeleton
import (
"fmt"
"sync"
)
func abs(x int) int {
if x < 0 {
return -x
}
return x
}
//================================
// ENUMS
//================================
const (
HORIZONTAL = 1
VERTICAL = 2
)
//================================
// DATASTRUCTURES
//===... |
package int
import (
"context"
"database/sql"
"fmt"
"os"
"os/signal"
"strconv"
"strings"
"syscall"
"testing"
"time"
"github.com/google/uuid"
. "github.com/obsidiandynamics/goharvest"
"github.com/obsidiandynamics/goharvest/stasher"
"github.com/obsidiandynamics/libstdgo/check"
"github.com/obsidiandynamic... |
/*
Copyright 2018 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 main
import (
"bufio"
"bytes"
"encoding/gob"
"fmt"
"os"
"strconv"
"github.com/mattn/go-runewidth"
"github.com/zyedidia/clipboard"
"github.com/zyedidia/tcell"
)
// TermMessage sends a message to the user in the terminal. This usually occurs before
// micro has been fully initialized -- ie if there is... |
// Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" fil... |
/*
* Copyright 2020 The Dragonfly 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 la... |
package main
//select COLUMN_NAME,DATA_TYPE,COLUMN_TYPE from information_schema.COLUMNS where table_schema = 'dbiot' and table_name = 'mqtt_acl';
//COLUMN_NAME,DATA_TYPE,COLUMN_TYPE
import (
"database/sql"
"flag"
"fmt"
"html/template"
"io/fs"
"io/ioutil"
"log"
"os"
"path/filepath"
"strconv"
"strings"
"t... |
package xxl
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"runtime"
"strings"
"time"
"github.com/douyu/jupiter/pkg/executor"
"github.com/douyu/jupiter/pkg/executor/xxl/logger"
"github.com/douyu/jupiter/pkg/util/xdebug"
)
var MaxQueueSize = 1
type JobExecutor struct {
opts ... |
/*
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
* Copyright (C) 2010-2013 <NAME>. All Rights Reserved.
*/
package winc
import (
"bytes"
"github.com/tadvi/winc/w32"
)
type Key uint16
func (k Key) String() string {
return key2string[k]
}
const (
KeyLButton Key = w32.VK_LBUTTON
KeyRB... |
// Copyright (c) 2020, 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 mat32
import (
"fmt"
"log"
"strconv"
"strings"
"unicode"
)
/*
This is heavily modified from: https://github.com/fogleman/gg
Copyright (C)... |
package common
import (
"archive/tar"
"bytes"
"compress/gzip"
"crypto/sha1"
"encoding/json"
"errors"
"fmt"
base "github.com/omegaup/go-base/v3"
"io"
"io/ioutil"
"math/big"
"net/http"
"os"
"os/exec"
"path"
"regexp"
"sort"
"strconv"
"strings"
"time"
)
// LiteralPersistMode indicates whether the Lite... |
package monitor
import (
"context"
"math"
"math/big"
"time"
"github.com/MadBase/MadNet/application/deposit"
"github.com/MadBase/MadNet/blockchain"
"github.com/MadBase/MadNet/blockchain/dkg"
"github.com/MadBase/MadNet/blockchain/tasks"
"github.com/MadBase/MadNet/config"
"github.com/MadBase/MadNet/consensus/a... |
// Copyright 2018 The Cockroach Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
package oauth
import (
"bytes"
"context"
"encoding/base64"
"encoding/gob"
"encoding/json"
"errors"
"fmt"
"net/url"
"strings"
"time"
"flamingo.me/flamingo/v3/core/auth"
"flamingo.me/flamingo/v3/framework/config"
"flamingo.me/flamingo/v3/framework/flamingo"
"flamingo.me/flamingo/v3/framework/web"
"github... |
// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package v1beta20211001
import (
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
)
type ContainerGroups_S... |
package runtime_test
import (
"fmt"
"testing"
"github.com/healthy-tiger/scalc/parser"
"github.com/healthy-tiger/scalc/runtime"
)
type optest struct {
src string
parseError bool // パースエラーが期待値ならtrue
evalError bool // 評価時エラーが期待値ならtrue
expected interface{}
}
var addtests []optest = []optest{
{`(+ 1 2... |
package gpg
import (
"bytes"
"crypto"
"crypto/ecdsa"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"fmt"
"hash"
"io"
"reflect"
"strconv"
"strings"
"time"
"github.com/go-phorce/dolly/xlog"
"github.com/pkg/errors"
"golang.org/x/crypto/openpgp"
"golang.org/x/crypto/openpgp/armor"
"golang.org/x/crypto/openp... |
package beanstalk
import (
"bufio"
"bytes"
"io"
"net"
"strconv"
"time"
)
// DefaultDialTimeout is the time to wait for a connection to the beanstalk server.
const DefaultDialTimeout = 10 * time.Second
// DefaultKeepAlivePeriod is the default period between TCP keepalive messages.
const DefaultKeepAlivePeriod =... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/enums/google_ads_field_data_type.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if ... |
package fuse
import (
"context"
"io"
"os"
"sync"
"syscall"
"bazil.org/fuse"
"bazil.org/fuse/fs"
"bazil.org/fuse/fuseutil"
"github.com/puppetlabs/wash/activity"
"github.com/puppetlabs/wash/plugin"
)
// ==== FUSE file Interface ====
// file's implementation differs primarily on two axes: whether `Size` is s... |
package gorose
import (
"errors"
"fmt"
"github.com/gohouse/gocar/structEngin"
"github.com/gohouse/t"
"reflect"
"strconv"
"strings"
"sync"
)
var operator = []string{"=", ">", "<", "!=", "<>", ">=", "<=", "like", "not like",
"in", "not in", "between", "not between"}
type BuilderDefault struct {
IOrm
operato... |
package funl
import (
"fmt"
"math"
"runtime"
"runtime/debug"
"strconv"
"sync"
"sync/atomic"
)
type ValueType int
type ItemType int
type OperType int
const (
IntValue ValueType = iota
StringValue
BoolValue
FuncProtoValue
FunctionValue
ListValue
ExtProcValue
ChanValue
FloatValue
OpaqueValue
MapValu... |
// Package api provides the functionality of the aurora
// client-facing HTTP API.
package api
import (
"context"
"encoding/json"
"errors"
"fmt"
"github.com/gauss-project/aurorafs/pkg/multicast"
"github.com/gauss-project/aurorafs/pkg/netrelay"
"io"
"io/ioutil"
"math"
"net/http"
"strings"
"sync"
"time"
"u... |
package main
import (
"bytes"
"context"
"crypto/md5"
"encoding/hex"
"encoding/json"
"flag"
"fmt"
"go/parser"
"go/token"
"html/template"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"time"
log "github.com/cihub/seelog"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis"
"githu... |
package models
import (
log "github.com/sirupsen/logrus"
)
/*
II | I
----------
III | IV
*/
var (
//Transform from computer format (0,0 = top left) -> to
Xform0 = [3][3]int{{0, 1, 0}, {0, 0, 1}, {int(Rotate0), 0, 0}} // Do Nothing
Xform1 = [3][3]int{{0, 0, 1}, {0, 1, 0}, {int(RotateTwo), 0, 0}} //Transpose... |
// Copyright 2017, OpenCensus 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: components/automate-gateway/api/deployment/deployment.proto
package deployment
import (
context "context"
fmt "fmt"
_ "github.com/chef/automate/components/automate-grpc/protoc-gen-policy/api"
_ "github.com/chef/automate/components/automate-grpc/protoc-ge... |
package helmchart
import (
"context"
"crypto/sha256"
"encoding/hex"
"fmt"
"k8s.io/apimachinery/pkg/util/intstr"
"os"
"sort"
"strconv"
helmv1 "github.com/Kubedex/helm-controller/pkg/apis/helm/v1"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg... |
// Copyright © 2013-2016 Galvanized Logic Inc.
// Use is governed by a BSD-style license found in the LICENSE file.
package main
import (
"container/list"
"math"
"github.com/gazed/vu"
"github.com/gazed/vu/math/lin"
)
// game keeps track of the game play screen. This includes all game levels
// and the heads up ... |
package wfc
import (
// "fmt"
"image"
"image/color"
"math"
)
/**
* OverlappingModel Type
*/
type OverlappingModel struct {
*BaseModel // Underlying model of generic Wave Function Collapse algorithm
N int // Size of patterns (ie pixel distance of influencing pixels)
Colors... |
package madek
import (
"errors"
"fmt"
"io/ioutil"
"net/http"
"sort"
"sync"
"time"
"github.com/tidwall/gjson"
)
// ErrInvalidAuthentication is returned when the supplied authentication
// credentials have been rejected.
var ErrInvalidAuthentication = errors.New("invalid authentication")
// ErrAccessForbidden... |
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// source: /usr/share/vpp/api/core/ip6_nd.api.json
/*
Package ip6_nd is a generated VPP binary API for 'ip6_nd' module.
It consists of:
10 enums
6 aliases
7 types
1 union
13 messages
6 services
*/
package ip6_nd
import (
"bytes"
"context"
... |
// Package dtime enables easy human input of times, dates, and durations. It
// also includes many convenience functions for rouding time duration
// boundaries as is frequently needed for scheduling and time-based search
// applications.
//
// Pointers to time.Time are used throughout the package since <nil> is usuall... |
package models
import (
"strconv"
"strings"
)
// ArchInfo tracks information required to make a BootEnv work across
// different system architectures. It supersedes the matching fields
// in the BootEnv struct and the OsInfo struct.
type ArchInfo struct {
// IsoFile is the name of the ISO file (or other archive)
... |
package utils
import (
"encoding/base64"
"encoding/json"
"fmt"
"math"
"regexp"
"strconv"
"strings"
"time"
)
// WCSParams contains the serialised version
// of the parameters contained in a WCS request.
type WCSParams struct {
Service *string `json:"service,omitempty"`
Version *string ... |
package main
// Starting Soon!
// Homework
//
// 1. Implement Insertion Sort For Balloon ( https://en.wikipedia.org/wiki/Insertion_sort )
// This should be faster since balloons will already be mostly sorted each frame.
// Time it, very carefully to see if you can beat Go's built in sort
//
// 2. Implement Collisions... |
// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the AWS Customer Agreement (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/agreement/
//
// Package pluginutil implement... |
/*
* Copyright 2020 <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 applicable law or agree... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/resources/ad_group_ad.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/google... |
// Copyright 2021 Monoskope 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 polyn is for arithmetic with linear polynomials and linear equations.
/*
BSD 3-Clause License
Copyright (c) 2017–21, <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:
1. Redistributio... |
// Copyright 2018 Owkin, 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... |
/*
Maddy Mail Server - Composable all-in-one email server.
Copyright © 2019-2020 <NAME> <<EMAIL>>, Maddy Mail Server contributors
This program 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 t... |
/**
*
* @author qinxuewu
* @create 19/6/25下午8:28
* @since 1.0.0
*/
package main
import (
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/mysql"
"fmt"
)
type Users struct {
ID uint `gorm:"primary_key"`
Name string
Age int
}
func main() {
dbs,_:=gorm.Open("mysql", "root:870439570@tcp... |
package ghostferry
import (
sqlorig "database/sql"
"fmt"
sql "github.com/Shopify/ghostferry/sqlwrapper"
"strings"
sq "github.com/Masterminds/squirrel"
"github.com/siddontang/go-mysql/schema"
"github.com/sirupsen/logrus"
)
var ignoredDatabases = map[string]bool{
"mysql": true,
"information_schem... |
//
// Rover - Core execution of landingzone operations and actions
// * Curent status is: launchpad deploy works and sets up remote state
// * <NAME>, May 2021
//
package landingzone
import (
"context"
"errors"
"fmt"
"os"
"path"
"path/filepath"
"strings"
"github.com/aztfmod/rover/pkg/azure"
"github.com/aztf... |
// 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 hwsec
import (
"context"
"encoding/hex"
"fmt"
"regexp"
"strings"
"chromiumos/tast/errors"
"chromiumos/tast/testing"
)
const (
// NVR... |
package main
import (
"bufio"
"errors"
"flag"
"fmt"
"os"
"strconv"
"strings"
"time"
"github.com/rogpeppe/godate/timeformat"
)
//go:generate bash getzones.bash
// Possible TODOs:
// - support for rounding and truncation (how would that work syntactically?).
//
// godate now +5m round:1h trunc:1day
//
// ... |
/*
Copyright AppsCode 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 applicable law or agreed to in writing... |
package storages
import (
"context"
"errors"
"fmt"
"github.com/jitsucom/jitsu/server/appconfig"
"github.com/jitsucom/jitsu/server/caching"
"github.com/jitsucom/jitsu/server/config"
"github.com/jitsucom/jitsu/server/enrichment"
"github.com/jitsucom/jitsu/server/events"
"github.com/jitsucom/jitsu/server/geo"
"... |
// 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 ... |
// Copyright (c) 2020-2021 Doc.ai and/or its affiliates.
//
// SPDX-License-Identifier: Apache-2.0
//
// 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/license... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: append.proto
package instance_relation
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
_ "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference impo... |
package sql_test
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"os"
"strings"
"testing"
"time"
"github.com/Masterminds/squirrel"
bt "github.com/elh/bitempura"
"github.com/elh/bitempura/dbtest"
. "github.com/elh/bitempura/sql"
"github.com/google/uuid"
_ "github.com/mattn/go-sqlite3"
"github.com... |
package lb
import (
"context"
"errors"
"io"
"net"
"net/url"
"regexp"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/goinsane/xlog"
"github.com/prometheus/client_golang/prometheus"
)
// HTTPFrontendRestriction defines HTTP frontend restriction
type HTTPFrontendRestriction struct {
Network *net.IPNet
... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: instance_tree_anchor.proto
package instance_tree
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
_ "github.com/mwitkow/go-proto-validators"
cmdb "github.com/easyo... |
package aandaSdk
type HotelSearchResponse struct {
HotelCode MustString `json:"hotel_code"`
HotelName string `json:"hotel_name"`
Address string `json:"address"`
ImageUrl string `json:"image_url"`
Vat MustInt `json:"vat"`
Description string `json:"description"`
Amenities [... |
package spec
import (
"fmt"
"os"
"strings"
"text/template"
"github.com/fatih/color"
"gopkg.in/yaml.v3"
)
const envVarName = "CHANGELOG_ACCESS_TOKEN"
var specFiles = []string{"changelog.yml", "changelog.yaml"}
const helpTemplate = `
changelog is a simple command-line tool for generating changelogs based on ... |
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- types_linux.go
package syscall
const (
sizeofPtr = 0x8
sizeofShort = 0x2
sizeofInt = 0x4
sizeofLong = 0x8
sizeofLongLong = 0x8
PathMax = 0x1000
)
type (
_C_short int16
_C_int int32
_C_long int64
_C_l... |
// Copyright © 2020 The Knative Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
// Copyright (c) 2014 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package waddrmgr
import (
"encoding/hex"
"fmt"
"sync"
"github.com/roasbeef/btcd/btcec"
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcutil"
"github.com/... |
// Copyright (c) 2017-2018 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 ... |
package fasthttp
import (
"bytes"
"fmt"
"io"
"mime/multipart"
"net"
"net/http"
"net/url"
"os"
"os/signal"
"path"
"sort"
"strconv"
"strings"
"time"
"github.com/revel/revel"
"github.com/revel/revel/utils"
"github.com/valyala/fasthttp"
"github.com/valyala/fasthttp/reuseport"
)
// The engine.
type Fast... |
package ovn
import (
"fmt"
"net"
"strings"
"time"
goovn "github.com/ebay/go-ovn"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/cni/types"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics"
"github.com/ovn-org/ovn-kubernetes/go-con... |
/*
Copyright 2022 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 main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
"os"
"path/filepath"
"strconv"
"strings"
"testing"
"time"
"github.com/hectane/go-acl"
"github.com/powerman/check"
"github.com/jedisct1/go-minisign"
)
type SourceFixture struct {
suffix string
content []byte
l... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
package main
import (
"context"
"crypto/tls"
"fmt"
"io/ioutil"
"log"
"net"
"os"
"os/signal"
"runtime"
"runtime/pprof"
"runtime/trace"
"strconv"
"sync"
"sync/atomic"
"syscall"
"time"
"github.com/felixge/fgprof"
"github.com/herumi/bls-eth-go-binary/bls"
"github.com/relab/hotstuff"
"github.com/relab/... |
/*
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心检索引擎
* (BlueKing-IAM-Search-Engine) available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance w... |
// Copyright 2019 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
/*
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 2014 Google 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 in ... |
// Copyright (c) 2019 The BFE Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
package ddstats
import (
"fmt"
"hash/fnv"
"sort"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/jmizell/ddstats/client"
)
type job struct {
metric *metric
shutdown bool
flush bool
}
type Stats struct {
namespace string
host string
tags []string
flushInterval time... |
package deployment
import (
"fmt"
// kube
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
appsclientv1 "k8s.io/client-go/kubernetes/typed/apps/v1"
"k8s.io/klog"
// openshift
c... |
//
// Copyright 2021 IBM Inc. All rights reserved
// SPDX-License-Identifier: Apache2.0
//
// CHANGE HISTORY
//
// Date Initials Description
// 12/08/2020 CLH T390301 - Add minimal touch functions
package ep11cmds
import (
"strings"
)
var msgMap map[string]string
var msgInit bool = f... |
// Copyright 2021, Pulumi Corporation. All rights reserved.
package openapi
import (
"encoding/json"
"fmt"
"github.com/pulumi/pulumi/pkg/v3/codegen"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
)
// versioner checks whether the given combination of a provider, a resource path, and a versions
// are kno... |
package parser
import (
"github.com/hscells/transmute/fields"
"github.com/hscells/transmute/ir"
"log"
"strings"
"unicode"
)
type PubMedTransformer struct{}
var PubMedFieldMapping = map[string][]string{
"Mesh": {fields.MeshHeadings},
"mesh": {fields.Mes... |
//
// Copyright (c) 2017-2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
package main
import (
"bufio"
"context"
"fmt"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"syscall"
pb "github.com/kata-containers/agent/protocols/grpc"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
... |
// Copyright 2015 <NAME>. All rights reserved.
// Use of this source code is governed by the BSD 3-Clause
// license that can be found in the LICENSE file.
package packets
import (
"bytes"
"encoding/binary"
"math"
"strconv"
"strings"
"github.com/theckman/packets/err"
)
// These are the control (CTRL) bits of ... |
package sync
import (
"crypto/rand"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/lanfang/go-lib/ha"
"github.com/lanfang/go-lib/log"
"github.com/lanfang/go-mysql/canal"
"github.com/lanfang/go-mysql/mysql"
"github.com/lanfang/mysql-river/config"
"github.com/lanfang/mysql-river/protocol"
"github.com/lan... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.