text stringlengths 3.08k 10.4k |
|---|
package main
import (
"bufio"
"fmt"
"os"
"flag"
"strconv"
"strings"
// "regexp"
)
var bookmarkfilemsg = "location of bookmark file where we store log file position"
var logfilemsg = "location of log file to read in"
var regexmsg = "regexp to search in log file sin... |
// Copyright 2020 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 checklicenses
import (
"fmt"
"io/ioutil"
"path/filepath"
"regexp"
"sort"
"strings"
"sync"
"unicode"
)
const (
cp = `(?: ©| \(C\))`
... |
package timescale
import (
"context"
"fmt"
"time"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"github.com/sdslabs/pinger/pkg/checker"
"github.com/sdslabs/pinger/pkg/exporter"
"github.com/sdslabs/pinger/pkg/util/appcontext"
)
const exporterName = "timescale"
func init() {
exporter.Register(exporterName, func(... |
package lxf // import "github.com/automaticserver/lxe/lxf"
import (
"encoding/json"
"errors"
"fmt"
"io"
"strconv"
"time"
"github.com/gorilla/websocket"
lxd "github.com/lxc/lxd/client"
lxdApi "github.com/lxc/lxd/shared/api"
"golang.org/x/sys/unix"
"k8s.io/client-go/tools/remotecommand"
)
const (
WindowHei... |
package blocklist
import (
"sync"
"github.com/google/uuid"
"github.com/grafana/tempo/tempodb/backend"
)
// PerTenant is a map of tenant ids to backend.BlockMetas
type PerTenant map[string][]*backend.BlockMeta
// PerTenantCompacted is a map of tenant ids to backend.CompactedBlockMetas
type PerTenantCompacted map[... |
// Copyright 2018 ePoxy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package tcp_fixed_head
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"io"
"net"
"github.com/panjf2000/gnet"
)
type ProtocalData struct {
Version uint16 //协议版本标识
ActionType uint16 //行为定义
DataLength uint32
Data []byte
//headDecode bool
//Lock sync.Mutex
}
type TCPFixHeadProtocal struc... |
/*
* solr-status.go - simple collectd plugin for Apache Solr
* Copyright (c) 2018 <NAME> <<EMAIL>>
*/
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strconv"
"strings"
"time"
"github.com/Jeffail/gabs"
)
const defaultIntervalSecs = 20
const httpTimeoutSecs = 5
const pluginName = "... |
package main
import (
"bufio"
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"strings"
"syscall"
"time"
"github.com/headzoo/surf"
"github.com/PuerkitoBio/goquery"
"golang.org/x/crypto/ssh/terminal"
)
const minerva = "https://horizon.mcgill.ca/pban1/twbkwbis.P_WWWLogin"
const transcript = "https://hori... |
/*
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 workplan_viewer
import (
"bufio"
"encoding/json"
"fmt"
"html/template"
"io"
"net/http"
"github.com/appscode/go/log"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"github.com/kube-ci/engine/apis/engine/v1alpha1"
"github.com/kube-ci/engine/pkg/logs"
"k8s.io/client-go/rest"
)
const (
stat... |
package conf
import (
"fmt"
"path/filepath"
"strings"
"github.com/knadh/koanf"
"github.com/knadh/koanf/parsers/json"
"github.com/knadh/koanf/parsers/toml"
"github.com/knadh/koanf/parsers/yaml"
"github.com/knadh/koanf/providers/confmap"
"github.com/knadh/koanf/providers/env"
"github.com/knadh/koanf/providers... |
// 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.
// The hashmap package
package hashmap
import (
"errors"
"fmt"
"reflect"
)
const (
growLoadFactor float32 = 0.75
shrinkLoadFactor float32 = 0.25
)
// ... |
package nougat
import (
"encoding/xml"
"net/http"
"net/http/httptest"
"net/url"
"reflect"
"testing"
)
type FakeParams struct {
KindName string `url:"kind_name"`
Count int `url:"count"`
}
// Url-tagged query struct
var paramsA = struct {
Limit int `url:"limit"`
}{
30,
}
var paramsB = FakeParams{KindN... |
package trigram
import "sort"
type Trigram uint32
type docList []int
func (d docList) Len() int { return len(d) }
func (d docList) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (d docList) Less(i, j int) bool { return d[i] < d[j] }
//The trigram indexing result include all Document IDs and its Fre... |
// Copyright 2019 ETH Zurich, Anapaya 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... |
package demo
import (
"database/sql"
"fmt"
"os"
"time"
"github.com/dtm-labs/dtmcli/logger"
"github.com/dtm-labs/rockscache"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis/v8"
"github.com/go-resty/resty/v2"
)
const dbKey = "key1"
var rdbKey = "key1"
var rdb = redis.NewClient(&redis.Options{
Addr: ... |
package app
import (
"errors"
"github.com/jinzhu/copier"
"github.com/yoyofx/yoyogo/abstractions"
"gorm.io/gorm"
"kubelilin/api/req"
"kubelilin/domain/database/models"
"kubelilin/domain/dto"
"kubelilin/pkg/page"
"strings"
)
type ApplicationService struct {
db *gorm.DB
VCSService VcsService
config ... |
// Package cmd
/*
Copyright 2022 Keyhole Software (http://keyholesoftware.com)
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 main
import (
"bytes"
"fmt"
"gopkg.in/gomail.v2"
"log"
"os"
"os/exec"
"os/signal"
"strings"
"syscall"
//"time"
"io/ioutil"
)
const CURR_TMP_FILE = "/tmp/curr_sessions.log"
const LOG_FILE = "/tmp/screen_monitor_logs"
const IDEAL_SESSIONS_FILE = "/home/xxx/go/src/screen_monitor/ideal_screen_sessio... |
// Copyright 2017 The Mellium Contributors.
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.
//
// Code in this file copied from the Go io package:
//
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
... |
package bootstrap
import (
"context"
"sync/atomic"
"github.com/libp2p/go-libp2p-core/event"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"golang.org/x/sync/errgroup"
"github.com/spacemeshos/go-spacemesh/log"
)
type waitPeersReq st... |
package main
import (
"errors"
"flag"
"fmt"
"github.com/gorilla/context"
"github.com/gorilla/sessions"
"github.com/keep94/gosqlite/sqlite"
"github.com/keep94/ramstore"
"github.com/keep94/toolbox/db"
"github.com/keep94/toolbox/db/sqlite_db"
"github.com/keep94/toolbox/http_util"
"github.com/keep94/toolbox/log... |
package main
// Sample code for a common error using pointers in golang when you are used to use C or C++
//
// This sample code is based on http://openmymind.net/Things-I-Wish-Someone-Had-Told-Me-About-Go/
//
// See github.com/framps/golang_gotchas for latest code
//
// Copyright (C) 2017 framp at linux-tips-and-tric... |
// Copyright (c) 2017 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... |
package models
import (
"archive/zip"
"bytes"
"encoding/base64"
"io"
"io/ioutil"
"net/url"
"path/filepath"
"regexp"
"strings"
)
// Attachment contains the fields and methods for
// an email attachment
type Attachment struct {
Id int64 `json:"-"`
TemplateId int64 `json:"-"`
Content string `... |
package intercept
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"path"
"strings"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
)
const (
notFound = "<!DOCTYPE html><html><head><title>Not found</title></head><body><h1>404 not found</h1>Sorry, we could not find the requested page!</body></ht... |
package v3
import (
"encoding/json"
"fmt"
"github.com/cloudfoundry-incubator/cf-test-helpers/cf"
"github.com/cloudfoundry-incubator/cf-test-helpers/generator"
"github.com/cloudfoundry-incubator/cf-test-helpers/helpers"
"github.com/cloudfoundry/cf-acceptance-tests/helpers/assets"
. "github.com/cloudfoundry/cf-a... |
// Ported from https://github.com/Tagussan/Bspline
package spline
import (
"math"
)
type Bspline struct {
points [][]float64
degree int
copy bool
}
var (
pts [][]float64
degree int
dimension int
baseFunc func(x float64) float64
baseFuncRangeInt int
)
func NewBspline(... |
package itbit
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"net/url"
"time"
)
type Balance struct {
Currency string `json:"currency"`
AvailableBalance float64 `json:"availableBalance,string"`
TotalBalance float64 `json:"totalBalance,string"`
}
type Funding struct {
TotalNumberOfRecords st... |
package main
import (
"bufio"
"flag"
"fmt"
"io"
"log"
"math/rand"
"os"
"os/signal"
"runtime/pprof"
"strings"
"github.com/RedisAI/aibench/cmd/aibench_generate_data/common"
"github.com/RedisAI/aibench/cmd/aibench_generate_data/fraud"
"github.com/RedisAI/aibench/cmd/aibench_generate_data/serialize"
)
const... |
// cSpell.language:en-GB
// cSpell:disable
package authenticate
import (
"encoding/json"
"sync"
"github.com/jcmurray/monitor/network"
"github.com/jcmurray/monitor/protocolapp"
"github.com/jcmurray/monitor/errorcodes"
"github.com/jcmurray/monitor/sequence"
"github.com/jcmurray/monitor/worker"
"github.com/juju... |
package client
import (
"errors"
"sync/atomic"
"testing"
"time"
"bytes"
"context"
"fmt"
"sort"
"strconv"
"strings"
"sync"
"github.com/stretchr/testify/assert"
"github.com/vontikov/stoa/internal/gateway"
"github.com/vontikov/stoa/internal/test"
)
func TestDictionary(t *testing.T) {
const (
clusterSi... |
package collector
import (
"encoding/json"
"io/ioutil"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/sirupsen/logrus"
mlspb "github.com/tony-yang/realtor-tracker/indexer/mls"
"github.com/tony-yang/realtor-tracker/indexer/storage"
)
const (
source = "mls-canada"
)
var (
cityIndex = map[stri... |
package chain
import (
"gitlab.com/accumulatenetwork/accumulate/config"
"gitlab.com/accumulatenetwork/accumulate/internal/core"
"gitlab.com/accumulatenetwork/accumulate/internal/database"
"gitlab.com/accumulatenetwork/accumulate/internal/encoding"
"gitlab.com/accumulatenetwork/accumulate/internal/errors"
"gitlab... |
package cmd
import (
"fmt"
"log"
"os"
"strings"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/bpineau/cloud-floating-ip/config"
"github.com/bpineau/cloud-floating-ip/pkg/operation"
"github.com/bpineau/cloud-floating-ip/pkg/run"
)
var (
cfgFile string
ip string
hoster string
ins... |
package sbox
import (
"bytes"
"crypto/rand"
"encoding/binary"
"errors"
"io"
"math/big"
"sync"
"golang.org/x/crypto/nacl/secretbox"
)
const (
versionLen = 4 // size of a uint32
nonceLen = 24 // nonce is 24 bytes
)
var (
magic = []byte{'s', 'b', 'o', 'x'} // magic prefix for packed blobs
magicLen = ... |
package comptop
import (
"fmt"
"sort"
)
type simplex struct {
base Base
sorted bool
}
func (s *simplex) String() string {
s.sort()
return fmt.Sprintf("%+v", s.base)
}
func (s *simplex) sort() {
if s.sorted {
return
}
sort.Sort(s.base)
s.sorted = true
}
func (s *simplex) equals(f *simplex) bool {
so... |
// Copyright 2012, <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/* Filename: lexer.go
* Author: <NAME> <bryan.matsuo [at] gmail.com>
* Created: 2012-11-02 22:10:59.782356 -0700 PDT
* Description: Main source file... |
// Package atreugo_csrf is CSRF middleware library for atreugo
package atreugo_csrf
import (
"crypto/subtle"
"github.com/savsgio/atreugo/v11"
"github.com/valyala/fasthttp"
"math/rand"
"time"
)
type (
CSRFConfig struct {
// Specifies the length of the token. The default is 32.
TokenLength uint8
// Set whe... |
package pkg
import (
"encoding/base64"
"fmt"
)
func Test() {
{ // simplest case
x := 5
fmt.Println(x)
x = 6 // want `^reassignment of x$`
fmt.Println(x)
}
{ // more "normal" reassignments
x, y := 5, 6
x, y = 6, x // want `^reassignment of x$` `^reassignment of y$`
x, z := 5, 6 // want `^reassignme... |
package pingrelay
import (
"encoding/json"
"fmt"
"strings"
"syscall"
"time"
"github.com/tankbusta/haleakala/muxer"
"github.com/agext/levenshtein"
zmq "github.com/pebbe/zmq4"
"github.com/sirupsen/logrus"
)
const (
defaultMaxPingSimilarity = 0.75
moarMessages = zmq.Errno(syscall.EAGAIN)
ESIEnd... |
package hedera
import (
"os"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
var mockPrivateKey string = "<KEY>"
var accountIDForTransactionID = AccountID{Account: 3}
var validStartForTransacionID = time.Unix(124124, 151515)
var testTransactionID TransactionID = TransactionID{
AccountID: &accountIDFo... |
package gorm
import (
"fmt"
"os"
"reflect"
"sort"
"strconv"
"strings"
"sync"
"time"
)
type cacheItem struct {
dataMutex sync.RWMutex
data interface{}
err error
created int64
accessMutex sync.RWMutex
accessCount int64
}
type cache struct {
size int
highWaterMark int
enab... |
package bolt
import (
"reflect"
"testing"
"unsafe"
)
// Ensure that a page is added to a transaction's freelist.
func TestFreelist_free(t *testing.T) {
f := newFreelist()
f.free(100, &page{id: 12})
if !reflect.DeepEqual([]pgid{12}, f.pending[100]) {
t.Fatalf("exp=%v; got=%v", []pgid{12}, f.pending[100])
}
}
... |
package node
import (
"crypto/ecdsa"
"errors"
"fmt"
"path/filepath"
"reflect"
"sync"
"github.com/beego/beego/v2/core/logs"
"github.com/ethereum/go-ethereum/event"
"gorm.io/gorm"
"land-bridge/network/bridge"
"land-bridge/network/linq/txblock"
"land-bridge/network/p2p"
)
const (
initializingState = iota
... |
package configrant
import (
"os"
"reflect"
"testing"
"time"
"github.com/umalmyha/configrant/internal/structs"
)
type ConfigSubstruct struct {
Subname string `cfgrant:"env:SUBNAME_ENV,default:SubConfig"`
Percent float32 `cfgrant:"default:3.32"`
}
type Config struct {
//lint:ignore U1000 we must test that un... |
package cfaws
import (
"context"
"fmt"
"os"
"strings"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/sts"
"github.com/bigkevmcd/go-configparser"
"github.com/common-fate/granted/pkg/debug"
"github.com/pkg/errors"
)
type CFSharedConfig struct {
... |
package store
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestUnmarshalList(t *testing.T) {
count := 1000
b := newMockBackend(count)
l := []testStruct{}
err := UnmarshalJSONList(&l, "", b)
require.NoError(t, err)
assert.Len(t, l, coun... |
// Copyright 2013 The ql Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSES/QL-LICENSE file.
// Copyright 2015 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in complia... |
package taskqueueworker
import (
"context"
"fmt"
"net"
"net/http"
"strings"
"github.com/agungdwiprasetyo/task-queue-worker-dashboard/external"
"github.com/golangid/graphql-go"
"github.com/golangid/graphql-go/relay"
"github.com/golangid/candi/candishared"
"github.com/golangid/candi/codebase/app/graphql_serv... |
// Package billmodel contains the types for schema 'equinox'.
package billmodel
// GENERATED BY XO. DO NOT EDIT.
import (
"database/sql"
"github.com/lib/pq"
)
// Exfitter represents a row from 'equinox.exfitter'.
type Exfitter struct {
Efid sql.NullString `json:"efid"` // efid
Efcaptstat... |
// 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 2021 <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 agreed to in writ... |
/**
* Go Video Downloader
*
* Copyright 2018 Tenta, 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... |
package names
import (
"math/rand"
)
func NewRandomName(joinString string) string {
word1 := adjectives[rand.Intn(len(adjectives))]
word2 := nouns[rand.Intn(len(nouns))]
return word1 + joinString + word2
}
var adjectives = []string{
"adventurous",
"adorable",
"aggressive",
"agile",
"agitated",
"animated",
... |
package dbus
import (
"context"
"github.com/godbus/dbus"
)
// GetPlaylistLength returns the number of songs in the active playlist.
func GetPlaylistLength(ctx context.Context) (length int32, err error) {
return length, audObj.CallWithContext(ctx,
"org.atheme.audacious.Length", 0).Store(&length)
}
// GetSongTit... |
/*
Copyright 2018 <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,... |
package jwtparser
import (
"fmt"
"regexp"
"strings"
jwt "github.com/dgrijalva/jwt-go"
"github.com/flaviostutz/go-utils"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)
//Config configuration properties for JWT Parser
type Config struct {
//SkipPathRegex Request paths (as in gin.Context.FullPath()) ... |
// The package CPPN provides implementation of Compositional Pattern Producing Network
// which is a part of Hypercube-based NEAT algorithm implementation
package cppn
import (
"errors"
"fmt"
"github.com/yaricom/goNEAT/neat/genetics"
"github.com/yaricom/goNEAT/neat/network"
"math"
"os"
)
// Defines point with f... |
// 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 dataframe
import (
"sync"
"sort"
"encoding/csv"
"fmt"
"strconv"
"io"
"os"
)
type CSVWritingSpec struct {
// missing values will be replaced with this string. Default: ""
StringMissingMarker string
// Value used by ToCSVDir when splitting the dataframe into multiple files.
// If there are... |
package collector
import (
"encoding/json"
"fmt"
"strconv"
"strings"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)
var (
ospfSubsystem = "ospf"
frrOSPFInstances = kingpin.Flag("collector.ospf.instances", "Comma-separated list of instan... |
package nfa
import (
"encoding/json"
"fmt"
"net"
"strings"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
"stellar.af/netbox-to-nfa/types"
"stellar.af/netbox-to-nfa/util"
)
func createName(tenant string) string {
return fmt.Sprintf("Utilization: %s", tenant)
}
// GetFilters gets all NFA filter... |
// Copyright 2020 The Meerkat 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... |
package fs
import (
"os"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/xichen2020/eventdb/document/field"
indexfield "github.com/xichen2020/eventdb/index/field"
"github.com/xichen2020/eventdb/index/segment"
"github.com/xichen2020/eventdb/persist"
"github.com/xichen2020/eventdb/x/bytes"
)... |
package main
import (
"flag"
"fmt"
"os"
"strings"
"time"
"github.com/domtriola/automata/internal/models"
"github.com/domtriola/automata/internal/runner"
log "github.com/sirupsen/logrus"
)
const (
// General
defaultWidth = 500
defaultHeight = 500
defaultNFrames = 100
defaultGIFDelay = 2
// Cellul... |
// Package billmodel contains the types for schema 'equinox'.
package billmodel
// GENERATED BY XO. DO NOT EDIT.
import (
"database/sql"
"github.com/lib/pq"
)
// Exgth represents a row from 'equinox.exgth'.
type Exgth struct {
Exgthid sql.NullString `json:"exgthid"` // exgthid
Exgthname sql.... |
//go:build windows
// +build windows
/*
* 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://... |
// Package gdbm provides support for the GNU database manager.
package gdbm
/*
#cgo LDFLAGS: -lgdbm
#include <gdbm.h>
#include <stdlib.h>
*/
import "C"
import (
"unsafe"
)
type Mode int
const (
// Open as a reader.
Reader Mode = C.GDBM_READER
// Open as a writer. The database must already exist.
Writer = C.GDB... |
// Code generated by go-swagger; DO NOT EDIT.
package storage
// 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/... |
// Package analyzer Debian CVE Tracker Analyzer
// Copyright 2019 debcvescan 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
/... |
package models
import (
"fmt"
"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/orm"
"github.com/xiliangMa/diss-backend/utils"
"net/http"
"strconv"
"strings"
)
type DockerEvent struct {
Id string `orm:"pk;size(256)" description:"(容器id)"`
HostId string `orm:"size(256)" description:"(主机Id age... |
// Program linkpatch rewrites absolute URLs pointing to targets in GitHub in
// Markdown link tags to target a different branch.
//
// This is used to update documentation links for backport branches.
// See https://github.com/tendermint/tendermint/issues/7675 for context.
package main
import (
"bytes"
"flag"
"fmt"... |
package generator
import (
"fmt"
"log"
"strconv"
"sync"
"unicode/utf8"
"github.com/melias122/engine/archiv"
"github.com/melias122/engine/csv"
"github.com/melias122/engine/engine"
"github.com/melias122/engine/filter"
"github.com/melias122/engine/hrx"
)
type syncWriter struct {
sync.Mutex
w *csv.CsvMaxWrit... |
package http
import (
"errors"
"net"
"net/http"
"strconv"
"time"
"github.com/chen-zyc/gtime"
)
type TransportOption interface {
apply(*TransportOpts)
}
type funcTransportOption struct {
f func(*TransportOpts)
}
func newFuncTransportOption(f func(*TransportOpts)) *funcTransportOption {
return &funcTranspor... |
package game
import (
"fmt"
"sort"
"strings"
"github.com/codemicro/cs-toptrumps/internal/cards"
"github.com/codemicro/cs-toptrumps/internal/helpers"
"github.com/codemicro/cs-toptrumps/internal/input"
au "github.com/logrusorgru/aurora"
)
const NumPlayers = 2
type Game struct {
decks [NumPlayer... |
package main
import (
"bytes"
"encoding/json"
"errors"
"io/ioutil"
"net/http"
"reflect"
"strconv"
"github.com/twinj/uuid"
)
type (
// SERVICE describe Service methods
SERVICE interface {
CreateStubMapping(Request, *http.Response) error
CreateBodyFile(string, []byte) error
CreateMapping(StubMapping) e... |
// Copyright 2020 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,... |
// Copyright 2015, 2018, 2019 Opsmate, Inc. All rights reserved.
// Copyright 2015 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 pkcs12
import (
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"errors"
"io"
)
... |
package sshbox
import (
"fmt"
"io"
"os"
"os/signal"
"runtime"
"strings"
"sync"
"syscall"
"time"
"github.com/ArthurHlt/sshbox/sigwinch"
"github.com/moby/term"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh"
)
type TTYRequest int
const (
RequestTTYAuto TTYRequest = iota
RequestTTYNo
Request... |
// Copyright 2022 The CubeFS 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... |
package datasources
import (
"encoding/json"
"fmt"
"math"
"net/http"
"github.com/tirith-tech/dlc-oracle/logging"
)
// MinAPICryptoCompareBTCResponse for current price from Crypto Compare
type MinAPICryptoCompareBTCResponse struct {
Value float64 `json:"BTC"`
}
// MinAPICryptoCompareHistoricalBTCResponse neste... |
// Copyright © 2016 <NAME> <<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
// to use, copy, modify, merge, publish... |
package gluasocket_mimecore
import (
"bytes"
"github.com/yuin/gopher-lua"
)
const (
qpbase = "0123456789ABCDEF"
QP_PLAIN = iota
QP_QUOTED
QP_CR
QP_IF_LAST
)
var (
qpclass, qpunbase [256]byte
)
/*-------------------------------------------------------------------------*\
* Incrementally converts a string t... |
/*
Copyright 2019 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... |
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// Copyright (c) 2018 The MATRIX Authors
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php
package man
import (
"fmt"
"io"
"math/big"
"github.com/MatrixAINetwork/go-matrix/common"
"github.com/MatrixAINetwork/go-matrix/core"
... |
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... |
// Copyright 2018 the Go-FUSE 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 test
// exercise functionality to store/retrieve kernel cache.
import (
"io/ioutil"
"os"
"testing"
"golang.org/x/sys/unix"
"github.com/han... |
// Copyright 2016 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... |
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V.
//
// 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
//
// Un... |
// 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... |
package warp
import (
"encoding/json"
"fmt"
"sort"
"github.com/cloudogu/cesapp-lib/registry"
"github.com/cloudogu/k8s-service-discovery/controllers/config"
"github.com/cloudogu/k8s-service-discovery/controllers/warp/types"
ctrl "sigs.k8s.io/controller-runtime"
"github.com/pkg/errors"
)
// ConfigReader reads... |
/*
*
* Copyright 2014 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... |
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"os"
"path"
"regexp"
"text/template"
"github.com/joho/godotenv"
"github.com/stripe/stripe-go/v72"
"github.com/stripe/stripe-go/v72/checkout/session"
)
type Config struct {
PublicURL string
StripeKey string
StripeSecret... |
package goshoplazza
import (
"fmt"
"time"
)
// FulfillmentService is an interface for interfacing with the fulfillment endpoints
// of the Shopify API.
// https://help.shopify.com/api/reference/fulfillment
type FulfillmentService interface {
List(interface{}) ([]Fulfillment, error)
Count(interface{}) (int, error)... |
package store
import (
"fmt"
"sync"
dd "panorama/decision"
dt "panorama/types"
du "panorama/util"
pb "panorama/build/gen"
)
const (
itag = "inference"
)
type InferMap map[string]*pb.Inference
type HealthInferenceStorage struct {
Results InferMap
Workbooks map[string]InferMap
ReportCh chan *pb.Report
... |
/*
* Copyright 2017 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy ofthe License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... |
package marker
import (
"errors"
"fmt"
"reflect"
"strings"
)
// Argument names
const (
ValueArgument = "Value"
)
type Output struct {
Type reflect.Type
IsAnonymous bool
SyntaxFree bool
UseValueSyntax bool
AnonymousTypeInfo ArgumentTypeInfo
Fields map[string]Argument... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.