text stringlengths 3.08k 10.4k |
|---|
// Code generated by go-swagger; DO NOT EDIT.
package invoice
// 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 v1
import (
"encoding/json"
"time"
)
// TypeMeta describes an individual object in an API response or request
// with strings representing the type of the object and its API schema version.
// Structures that are versioned or persisted should inline TypeMeta.
type TypeMeta struct {
// Kind is a string valu... |
package api
import (
gmdb "fgame/fgame/gm/gamegm/db"
playerservice "fgame/fgame/gm/gamegm/gm/game/player/service"
monitor "fgame/fgame/gm/gamegm/monitor"
gmhttp "fgame/fgame/gm/gamegm/pkg/httputils"
"net/http"
log "github.com/Sirupsen/logrus"
"github.com/xozrc/pkg/httputils"
)
type playerListRequest struct {
... |
package xmpp
import (
"bytes"
"encoding/xml"
"fmt"
"io"
)
const (
xmlURL = "http://www.w3.org/XML/1998/namespace"
xmlnsPrefix = "xmlns"
xmlPrefix = "xml"
)
// A Decoder represents an XMPP parser reading a particular input stream. The parser uses xml.Decoder under the hood.
type Decoder struct {
Header... |
package kubermatic
import (
"fmt"
"os"
"reflect"
"strings"
"testing"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/terraform"
"github.com/kubermatic/go-kubermatic/client/project"
"github.com/kubermatic/go-kubermatic/client/users"
"github.com/kubermati... |
// Copyright 2015 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 commands
import (
"encoding/json"
"fmt"
"os/exec"
"strings"
"sync"
"time"
"gopkg.in/mgo.v2"
a "github.com/michigan-com/newsfetch/fetch/article"
"github.com/michigan-com/newsfetch/lib"
"github.com/spf13/cobra"
)
var artDebugger = lib.NewCondLogger("newsfetch:commands:article")
type SummaryResponse... |
// Copyright 2018 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 jsonrpc2
import (
"encoding/json"
"fmt"
)
// this file contains the go forms of the wire specification
// see http://www.jsonrpc.org/specification f... |
package marmot
import (
"io"
"path"
"regexp"
"strings"
"unicode"
"unicode/utf8"
)
// Responsible for loading and storing a collection of templates, and creating Builder structs which are used to
// execute the templates as necessary.
type Cache interface {
// Loads all of the templates in the given File... |
package main
import (
"flag"
"fmt"
"os"
"os/signal"
"runtime"
"syscall"
"time"
"github.com/signalwire/signalwire-golang/signalwire"
)
// App environment settings
var (
// required
ProjectID = os.Getenv("ProjectID")
TokenID = os.Getenv("TokenID")
DefaultContext = os.Getenv("DefaultContext")
F... |
// Code generated by zanzibar
// @generated
// Copyright (c) 2018 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 limitat... |
package expr_test
import (
"encoding/json"
"testing"
u "github.com/araddon/gou"
"github.com/gogo/protobuf/proto"
"github.com/stretchr/testify/assert"
"github.com/lytics/qlbridge/expr"
"github.com/lytics/qlbridge/value"
)
var pbTests = []string{
`eq(event,"stuff") OR ge(party, 1)`,
`"Portland" IN ("ohio")`,... |
package plans
import (
"sort"
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/configs/configschema"
"github.com/hashicorp/terraform/internal/states"
"github.com/zclconf/go-cty/cty"
)
// Plan is the top-level type representing a planned set of changes.
//
// A plan is a s... |
package utils
import (
"fmt"
"math"
"strconv"
"github.com/handegar/fv1emu/base"
)
func Assert(mustBeTrue bool, msg string) {
if !mustBeTrue {
fmt.Printf("ERROR: %s\n", msg)
panic("ASSERT failed")
}
}
func AssertFloat64(mustBeTrue bool, val float64, msg string) {
if !mustBeTrue {
fmt.Printf("ERROR: %s.\... |
// 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: medifor/v1/kill.proto
package mediforproto
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used... |
//
// Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
//
// Licensed under the Universal Permissive License v 1.0 as shown at
// https://oss.oracle.com/licenses/upl/
//
// The delete example shows how to delete a row or multiple rows satisfying certain criteria from a table.
// For example... |
package azure
import (
"net/http"
"strings"
"testing"
"time"
"github.com/c2fo/cloud-finder/pkg/cloudfinder/provider"
"github.com/c2fo/cloud-finder/pkg/logging"
"github.com/jarcoal/httpmock"
"github.com/stretchr/testify/assert"
)
// From Azure Docs: https://docs.microsoft.com/en-us/azure/virtual-machines/wind... |
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package chicken
import (
"time"
"github.com/lindsaygelle/nook"
"github.com/lindsaygelle/nook/animal"
"github.com/lindsaygelle/nook/character"
"github.com/lindsaygelle/nook/gender"
"github.com/lindsaygelle/nook/personality"
"golang.org/x/text/language"
)
var (
rhodaBirthday = nook.Birthday{
Day: 0,
Mont... |
package main
import (
"errors"
"regexp"
"strconv"
"strings"
)
// version must be formatted <major>.<minor>.<patch><separator><packageName><buildnumber>
// separator should be one of "+" or "-"
// buildnumber can be used total commit count of between last commit and last tagged version.
func CreateVersion(v string... |
package main
import _ "expvar"
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"runtime"
"strconv"
"time"
"github.com/moovweb/gokogiri"
"golang.org/x/net/html/charset"
)
var logger = log.New(os.Stdout, "getxpath: ", log.LstdFlags|log.Lmicroseconds)
func readBodyFromURL(... |
package dependency
import (
"encoding/gob"
"fmt"
"log"
"net/url"
"regexp"
"sort"
"strings"
"github.com/hashicorp/consul/api"
"github.com/pkg/errors"
)
const (
HealthAny = "any"
HealthPassing = "passing"
HealthWarning = "warning"
HealthCritical = "critical"
HealthMaint = "maintenance"
NodeMa... |
package command
import (
"context"
"fmt"
"os"
"path/filepath"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/task"
"github.com/mitchellh/mapstructure"
"github.com/... |
package container
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
"os/signal"
"path"
"strings"
"syscall"
"github.com/lxc/go-lxc"
"github.com/pkg/errors"
"github.com/project-stacker/stacker/embed-exec"
"github.com/project-stacker/stacker/log"
"github.com/project-stacker/stacker/types"
)
const (
Reasonable... |
package irmf
import (
"fmt"
"log"
"sort"
"strings"
"github.com/gmlewis/go-csg/ast"
"github.com/gmlewis/go-csg/evaluator"
"github.com/gmlewis/go-csg/object"
)
func (s *Shader) processPolygonPrimitive(exps []ast.Expression) (string, *MBB) {
var points, paths *object.Array
for _, exp := range exps {
switch ... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package appsync
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"
)
// Represents the input of a UpdateApiCache operation.
type UpdateApiCacheI... |
package main
import (
"bytes"
"context"
"emperror.dev/emperror"
"encoding/base64"
"github.com/go-kit/kit/log"
"github.com/justinas/alice"
"github.com/spf13/viper"
"github.com/xmidt-org/bascule"
"github.com/xmidt-org/bascule/acquire"
"github.com/xmidt-org/bascule/basculehttp"
"github.com/xmidt-org/bascule/ke... |
package grocksdb
// #include "c.h"
import "C"
// FilterPolicy is a factory type that allows the RocksDB database to create a
// filter, such as a bloom filter, which will used to reduce reads.
type FilterPolicy interface {
// keys contains a list of keys (potentially with duplicates)
// that are ordered according t... |
package mp4
import (
"bytes"
"fmt"
"io"
"io/ioutil"
)
// VisualSampleEntryBox - Video Sample Description box (avc1/avc3)
type VisualSampleEntryBox struct {
name string
DataReferenceIndex uint16
Width uint16
Height uint16
Horizresolution uint32
Vertresolution uin... |
package db
import (
"context"
"database/sql"
"fmt"
"time"
"github.com/antonmedv/expr"
"github.com/antonmedv/expr/vm"
dfv1 "github.com/argoproj-labs/argo-dataflow/api/v1alpha1"
"github.com/argoproj-labs/argo-dataflow/runner/sidecar/sink"
"github.com/argoproj-labs/argo-dataflow/runner/util"
sharedutil "github... |
package ofbx
import (
"fmt"
"io"
)
// PropertyType is a mapping of letter to data type
type PropertyType rune
// Property types block
const (
BOOL PropertyType = 'C'
INT16 PropertyType = 'Y'
LONG PropertyType = 'L'
INTEGER PropertyType = 'I'
STRING PropertyType = 'S'
RAWSTRING ... |
// Copyright (c) 2017 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... |
/*
Copyright 2021 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
package pretty
/**
* NOTE: Keep the structs alphabetical please!
* Thank you~
*/
// Pretty - Contains all the settings for customizable text formatting.
type Pretty struct {
// AutomaticMaxWidth - Bool for if pretty should automatically declare the terminal with as the max width for all outputs.
// Note: Only ap... |
// Copyright © 2019 NVIDIA Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
// 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 not... |
package build
import (
"context"
"encoding/csv"
"io"
"os"
"path/filepath"
"strings"
"github.com/containerd/console"
"github.com/docker/distribution/reference"
"github.com/moby/buildkit/client"
"github.com/moby/buildkit/util/progress/progressui"
"github.com/pkg/errors"
"github.com/rancher/k3c/pkg/kvfile"
... |
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package kms
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"net/http/httptest"
"testing"
"github.com/gorilla/mux"
"github.com/stretchr/testify/require"
"github.com/Universal-Health-Chain/aries-fra... |
package zbuf
import (
"bytes"
"container/heap"
"context"
"sync"
"github.com/brimdata/zed"
"github.com/brimdata/zed/expr"
"github.com/brimdata/zed/order"
"github.com/brimdata/zed/zio"
"golang.org/x/sync/errgroup"
)
// A Merger merges multiple upstream Pullers into one downstream Puller.
// If the input strea... |
package main
import (
"context"
"encoding/json"
"strings"
"sync"
gokrbclient "gopkg.in/jcmturner/gokrb5.v7/client"
gokrbconfig "gopkg.in/jcmturner/gokrb5.v7/config"
gokrbcrypto "gopkg.in/jcmturner/gokrb5.v7/crypto"
gokrbkeytab "gopkg.in/jcmturner/gokrb5.v7/keytab"
gokrbmsgs "gopkg.in/jcmturner/gokrb5.v7/mess... |
package recurly
import (
"context"
"encoding/xml"
"fmt"
"net"
"net/http"
)
// BillingService manages the interactions for billing.
type BillingService interface {
// Get retrieves billing info for an account. If the account does not exist,
// or the account does not have billing info, a nil billing struct and ... |
// Copyright (c) 2018, The Gide 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 gide
import (
"encoding/json"
"io/ioutil"
"log"
"path/filepath"
"github.com/goki/gi/gi"
"github.com/goki/gi/giv"
"github.com/goki/gi/osw... |
package containerd
import (
"context"
"fmt"
"os"
"strings"
"time"
"github.com/containerd/console"
"github.com/containerd/containerd"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/namespaces"
"github.com/moby/buildkit/client"
"github.com/moby/buildkit/cmd/buildctl/build"
"gith... |
// +build ignore
// This program generates api documentation from a
// swaggerfile using an amber template.
package main
import (
"crypto/md5"
"flag"
"fmt"
"io"
"log"
"os"
"sort"
"github.com/eknkc/amber"
"github.com/go-swagger/go-swagger/spec"
)
var (
templ = flag.String("template", "index.amber", "")
... |
/*
* Copyright (c) 2015, <NAME> <yawning at torproject dot org>
* 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,... |
// Package clitest contains common utilities and helpers for testing the CLI
package clitest
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"github.com/CircleCI-Public/circleci-cli/client"
"github.com/onsi/gomega/ghttp"
"github.com/onsi/gomega"
)
// TempSettings contains useful se... |
/*
Copyright 2019 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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distri... |
package monexec
import (
"context"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"sync"
"time"
"errors"
"github.com/Pallinder/go-randomdata"
"github.com/mitchellh/mapstructure"
"github.com/reddec/monexec/plugins"
"github.com/reddec/monexec/pool"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
... |
// Code generated by go-swagger; DO NOT EDIT.
package v4customimagecatalogs
// 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"
c... |
/*
* Copyright 2018- The Pixie 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 certstore
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/json"
"sync"
"github.com/rs/zerolog/log"
"github.com/docker/libkv/store"
"github.com/go-acme/lego/v4/certcrypto"
"github.com/go-acme/lego/v4/certificate"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/... |
package store
import (
"context"
"encoding/binary"
"math"
"sync"
"time"
"github.com/dgraph-io/badger/v2"
"github.com/pkg/errors"
)
// ErrMessageNotFound is na error returned when a message with a given offset doesn't exist.
var ErrMessageNotFound = errors.New("message not found")
// ConsumerOffset represents... |
package cli
import (
"os"
"strconv"
"testing"
"github.com/stretchr/testify/require"
)
func TestStringArg(t *testing.T) {
cmd := &Cmd{argsIdx: map[string]*arg{}}
a := cmd.String(StringArg{Name: "a", Value: "test"})
require.Equal(t, "test", *a)
os.Setenv("B", "")
b := cmd.String(StringArg{Name: "b", Value: "... |
// Package convert can convert a image to ascii string or matrix
package convert
import (
"bytes"
"github.com/qeesung/image2ascii/ascii"
"image"
"image/color"
// Support decode jpeg image
_ "image/jpeg"
// Support deocde the png image
_ "image/png"
"log"
"os"
)
// Options to convert the image to ASCII
type ... |
package searcher
import (
"BTC/psychic/cards"
"sort"
"strings"
)
const NumbeOfCards = 5
var SpadesArray []string
var HeartsArray []string
var DiamondsArray []string
var ClubsArray []string
var Flush bool
// LookForSuits checks the highest and second highest number of a particular Suit in the game
func LookForSui... |
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package mongoreplay
import (
"fmt"
"io"
"time"
mgo "github.com/10gen/llmgo"
)
// PlayCommand stores settings for the mongoreplay 'play' subcommand
type PlayCommand struct {
GlobalOpts *Options `no-flag:"true"`
StatOptions
PlaybackFile string `description:"path to the playback file to play from" short:"p" lon... |
package rclib
import (
"errors"
"log"
)
type Package struct {
Header Header
Config Configuration
Channel []int
buffer []byte
decodingState int
decodedDataBytes int
checksum byte
totalDataBytesCount int
}
const (
initial = iota
uid
ti... |
package model
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
const THING_TYPE_DEVICE = "device"
const THING_TYPE_SENSOR = "sensor"
const THING_TYPE_SWITCH = "switch"
const THING_CLASS_TEMPERATURE = "temperature"
const THING_CLASS_HUMIDITY = "humidity"
const THING_CLASS_PRESSURE = "pressure"
// Represen... |
// podium
// https://github.com/topfreegames/podium
// Licensed under the MIT license:
// http://www.opensource.org/licenses/mit-license
// Copyright © 2016 Top Free Games <<EMAIL>>
// Forked from
// https://github.com/dayvson/go-leaderboard
// Copyright © 2013 <NAME>
package api
import (
"context"
"encoding/base64... |
// Code generated by go-swagger; DO NOT EDIT.
package wallet
// 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/g... |
package rye
import (
"context"
"encoding/json"
"errors"
"net/http"
"reflect"
"runtime"
"strconv"
"strings"
"time"
//log "github.com/Sirupsen/logrus"
"github.com/cactus/go-statsd-client/statsd"
)
//go:generate counterfeiter -o fakes/statsdfakes/fake_statter.go $GOPATH/src/github.com/cactus/go-statsd-client... |
// Copyright © 2018-2019, <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package comp
import (
"reflect"
)
// Scope a type that combines the capabilities of a mock and an interface that
// is almost fully compatible with gorm.Scop... |
// Copyright IBM Corp. 2017, 2021 All Rights Reserved.
// Licensed under the Mozilla Public License v2.0
package cis
import (
"fmt"
"time"
"github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns"
"github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex"
"github.com/IBM/go-sdk-core/v5/core"
"github.com/hashicorp/te... |
package main
import (
"bytes"
"fmt"
"go/format"
"io/ioutil"
"log"
"path/filepath"
"sort"
"strconv"
"strings"
"github.com/nimajalali/go-force/force"
)
// New creates a SFDC instance
func New(c config, objectNames string) *SFDC {
sfdc := &SFDC{
Resources: make(map[string]string),
SObjects: ... |
package cluster
import (
"errors"
"fmt"
"net/url"
"strings"
"context"
uuid "github.com/satori/go.uuid"
"github.com/Juniper/contrail/pkg/models"
"github.com/Juniper/contrail/pkg/services/baseservices"
)
func (c *Cluster) createEndpoint(parentUUID, name, publicURL, privateURL string) error {
endpoint := map... |
package main
import (
"bytes"
"errors"
"fmt"
"mime"
"strings"
"github.com/xeipuuv/gojsonschema"
)
// ResponseExpectation is an interface to any validation
// that needs to be performed on response.
type ResponseExpectation interface {
// check does the response meet expectation
check(resp *Response) error
... |
package cache
import (
"crypto/sha256"
"encoding/hex"
"errors"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/bradfitz/gomemcache/memcache"
"github.com/dgryski/go-expirecache"
)
var (
ErrTimeout = errors.New("cache: timeout")
ErrNotFound = errors.New("cache: not found")
)
type BytesCache interface {... |
package repo
import (
"context"
"encoding/json"
"fmt"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/mongo"
"reflect"
"strconv"
"strings"
)
type SuiteStatus string
const (
SuiteStatusStarted SuiteStatus = "started"
SuiteStatusFinished S... |
package report
import (
"HFish/core/dbUtil"
"time"
"HFish/utils/ip"
"strings"
"HFish/utils/send"
"strconv"
)
func alert(title string, agent string, ipx string, infox string) {
sql := `select status,info from hfish_setting where type = "alertMail"`
isAlertStatus := dbUtil.Query(sql)
status := strconv.FormatI... |
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
"time"
"github.com/pkg/profile"
)
type receiverConfig struct {
// Command line options
help bool
addr string
ca string
cert string
key string
profile bool
}
func receiverCmd() comm... |
package view
import (
"io"
"strconv"
"strings"
"github.com/krzysztofreczek/go-structurizr/pkg/model"
)
const (
defaultShape = "rectangle"
defaultShapeStyle = "DEFAULT"
)
// RenderStructureTo renders provided model.Structure into any io.Writer.
// RenderStructureTo will return an error in case the writer
... |
package run
import (
"encoding/hex"
"encoding/json"
"fmt"
"strings"
"github.com/kubetrail/bip39/pkg/mnemonics"
"github.com/kubetrail/bip39/pkg/passphrases"
"github.com/kubetrail/bip39/pkg/prompts"
"github.com/kubetrail/bip39/pkg/seeds"
"github.com/kubetrail/ethkey/pkg/flags"
hdwallet "github.com/miguelmota/... |
// Copyright 2016 Compose, an IBM Company
//
// 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 cache
import (
"bytes"
"encoding/binary"
"encoding/gob"
"fmt"
"hash/fnv"
"strconv"
"sync"
"sync/atomic"
"time"
)
// Cache implements a simple LRU-cache with optional time-to-use. The empty
// value is a cache with no max number of entries and no TTU. It is safe
// for concurrent use
type Cache struct... |
package governance
import (
"fmt"
"testing"
"time"
"github.com/Oneledger/protocol/data/balance"
"github.com/stretchr/testify/assert"
db "github.com/tendermint/tm-db"
"github.com/Oneledger/protocol/data/keys"
"github.com/Oneledger/protocol/storage"
)
const (
numPrivateKeys = 5
numProposals = 10
codeCh... |
package file
import (
"bufio"
"fmt"
"log"
"os"
"strings"
"github.com/brockweaver/hxu/pkg/file"
"github.com/spf13/cobra"
)
func CobraCommands(parent *cobra.Command) *cobra.Command {
fileCmd := &cobra.Command{
Use: "file",
Short: "commands for manipulating files",
}
parent.AddCommand(fileCmd)
parseC... |
package image
import (
"fmt"
"image"
"image/color"
b "scummatlas/binaryutils"
l "scummatlas/condlog"
)
const (
_ = iota
MethodUnknown
MethodUncompressed
MethodOne //ScummVM's UnkB
MethodTwo //ScummVM's UnkA
Horizontal
Vertical
Transp
NoTransp
)
var transparent = color.RGBA{0, 0, 0, 0}
var opaque = colo... |
// Copyright 2011, <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
/*
* File: gonew_main.go
* Author: <NAME> [<EMAIL>]
* Created: Sat Jul 2 19:17:53 PDT 2011
* Usage: gonew [options]
*/
import (
"os"
//"io"... |
package router
import (
"encoding/json"
"errors"
"fmt"
"github.com/Peripli/istio-broker-proxy/pkg/config"
"github.com/Peripli/istio-broker-proxy/pkg/model"
"istio.io/istio/pkg/log"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"net/http"
"strings"
)
const (
servicePort = 5555
)
//ConsumerInte... |
package zhongli
import "github.com/genshinsim/gcsim/pkg/core"
func (c *char) ActionFrames(a core.ActionType, p map[string]int) (int, int) {
switch a {
case core.ActionAttack:
f := 0
a := 0
switch c.NormalCounter {
//TODO: need to add atkspd mod
case 0:
f = 11
a = 18
case 1:
f = 9
a = 13
ca... |
package main
import (
"flag"
"fmt"
"go/ast"
"go/parser"
"go/token"
"os"
"path"
"path/filepath"
"runtime"
"strings"
"text/template"
)
func fatal(v ...interface{}) {
fmt.Fprintln(os.Stderr, v...)
os.Exit(1)
}
func packageDir() string {
_, filename, _, ok := runtime.Caller(0)
if !ok {
panic("No caller ... |
package data
import (
"bytes"
"encoding/gob"
"encoding/xml"
"fmt"
"strings"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/bcrypt"
)
// User keeps configuration for a user.
type User struct {
Password string
Opml string
Pagemonitor string
username string
newUsername string
}
// UserS... |
package vnc
import (
"context"
"fmt"
"github.com/magnolia-cms/vncrecorder/api"
"github.com/magnolia-cms/vncrecorder/config"
"github.com/magnolia-cms/vncrecorder/log"
"github.com/magnolia-cms/vncrecorder/vnc/recorder"
"google.golang.org/grpc"
"math"
"net"
_ "net"
"os"
"runtime"
"runtime/debug"
"strings"
... |
//
// Copyright (c) 2016 <NAME> <<EMAIL>>.
// All rights reserved. This program is free software. It comes without
// any warranty, to the extent permitted by applicable law. You can
// redistribute it and/or modify it under the terms of the Do What
// The Fuck You Want To Public License, Version 2, as published by
// ... |
package seedr
import (
"fmt"
"math/rand"
"reflect"
"time"
)
// Generator provides a way to generate dynamic field values
// for every instance created by seedr.
type Generator interface {
// Next must return any value of supported type:
// - any numeric type
// - time.Time
// - sql.Scanner
// - n... |
package util
/*
Copyright 2017 - 2021 Crunchy Data Solutions, 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 applicab... |
package cli
import (
"context"
"fmt"
"os"
"strings"
"sync"
"time"
"github.com/OJ/gobuster/v3/libgobuster"
)
const ruler = "==============================================================="
const cliProgressUpdate = 500 * time.Millisecond
func banner() {
fmt.Printf("Gobuster v%s\n", libgobuster.VERSION)
fmt.... |
package main
import (
"fmt"
"log"
"strings"
"time"
ui "github.com/gizak/termui"
"github.com/spf13/cobra"
)
var playerCmd = &cobra.Command{
Use: "player",
Short: "Show the live player panel",
RunE: player,
}
func player(cmd *cobra.Command, args []string) error {
if err := ui.Init(); err != nil {
log.F... |
package elgamir
import (
"crypto/rand"
"errors"
"io"
"math/big"
mrand "math/rand"
"time"
)
var (
ReserveIdx = 1
UserIdx = 100
)
type KeyShare struct {
privKeyShare
PubKeyShare
}
type privKeyShare struct {
X, Y *big.Int
}
type PubKeyShare struct {
X, Y *big.Int
}
type ElCipher struct {
C1 *big.Int
... |
package main
import (
"bytes"
"encoding/json"
"log"
"net/http"
"os"
"testing"
"time"
"github.com/gorilla/mux"
)
const (
localServerAddress = "localhost:7777"
webhook = "/dowork"
Secret = "<PASSWORD> an extremely bad secret"
)
// TestMain is run for every tests. It starts the PMmap ... |
package gonuts
import (
"go/ast"
"strings"
"fmt"
)
var builtinTypes = map[string]struct{}{"uint8":{},"uint16":{},"uint32":{},"uint64":{},"int8":{},"int16":{},"int32":{},
"int64":{},"float32":{},"float64":{},"complex64":{},"complex128":{},"byte":{},"rune":{},"unit":{},"int":{},
"unitptr":{},"bool":... |
package main
import (
"context"
"fmt"
"io"
"os"
"reflect"
"strconv"
"time"
"cloud.google.com/go/storage"
"github.com/joho/godotenv"
"github.com/jtbry/CharlotteRoadReports/pkg/api"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/helpers/mail"
"google.golang.org/api/option"
"gorm.io/dri... |
package bootstrap
import (
"bytes"
"encoding/json"
"io/ioutil"
"k8s.io/client-go/dynamic"
"os"
"github.com/gogo/protobuf/jsonpb"
"k8s.io/client-go/kubernetes"
bootconfig "slime.io/slime/framework/apis/config/v1alpha1"
)
const (
DefaultModuleConfigPath = "/etc/slime/config/cfg"
)
var defaultModuleConfig = &... |
package catalogsourceconfig
import (
"context"
"fmt"
"strings"
"github.com/operator-framework/operator-marketplace/pkg/datastore"
olm "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
"github.com/operator-framework/operator-marketplace/pkg/apis/marketplace/v1alpha1"
"g... |
package blockchain
import (
"crypto/sha256"
"errors"
"fmt"
"sort"
. "github.com/ioeXNetwork/ioeX.MainChain/core"
"github.com/ioeXNetwork/ioeX.Utility/common"
"github.com/ioeXNetwork/ioeX.Utility/crypto"
)
func RunPrograms(data []byte, hashes []common.Uint168, programs []*Program) error {
if len(hashes) != l... |
// Package game provides a higher level interface to package dominos.
package game
import (
"errors"
"fmt"
"log"
"github.com/Xe/uuid"
"github.com/cetacean/magiism/dominos"
)
// Package errors
var (
ErrGameCreationFailed = errors.New("game: dominos.NewGame failed, please report as a bug")
ErrNotYourTurn ... |
package main
import (
"bytes"
"compress/gzip"
"encoding/base64"
"flag"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"sort"
"strings"
)
type fileinfo struct {
name string
data []byte
}
type (
filedata []*fileinfo
slice []int
slices map[string]slice
)
type config struct {
pkg string
out stri... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: fleetspeak/src/client/proto/fleetspeak_client/api.proto
/*
Package fleetspeak_client is a generated protocol buffer package.
It is generated from these files:
fleetspeak/src/client/proto/fleetspeak_client/api.proto
fleetspeak/src/client/proto/fleetspeak_cl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.