text
stringlengths
3.08k
10.4k
// Copyright Project Contour 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...
/* Copyright 2021 The Hybridnet 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 writ...
// 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 listener import ( "context" "istio.io/client-go/pkg/clientset/versioned" versionedclient "istio.io/client-go/pkg/clientset/versioned" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes" "k8...
package stadium import ( "fmt" "time" ) //Struct for keeping track of timing type ExperimentTime struct { ChainLen int Start time.Time BackStart time.Time Total time.Duration Noise time.Duration Forward time.Duration Back time.Duration /* Times for mixing phase rotation rounds first layer - m...
/* Copyright 2021 <NAME>. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distrib...
package coinpayments import ( "crypto/hmac" "crypto/sha512" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net/http" "net/url" "strconv" "strings" ) // These variables come from the Coinpayments API itself. var ( baseURL = "https://www.coinpayments.net/api.php" version = "1" // the...
// Copyright 2017 The Golem Project Developers // // 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...
/* * Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. 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 ...
package client import ( "crypto/sha1" "errors" "gdbc/constant" "gdbc/gdbcerrors" "gdbc/packets" "github.com/golang/glog" ) //writeAuthenticationData :https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse func (c *Conn) writeAuthenticationData() error { capabil...
package freenas import ( "bytes" "context" "encoding/json" "fmt" "io" "net/http" "net/http/httputil" "net/url" "strings" "sync" ) type Response struct { *http.Response } func newResponse(r *http.Response) *Response { response := &Response{Response: r} return response } type ListOptions struct { // For...
// Code generated by go-swagger; DO NOT EDIT. package universe // 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...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto package envoy_extensions_filters_listener_http_inspector_v3 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" proto "github.com/golang/protobuf/proto" math "math" ) /...
package main import ( "flag" "fmt" "github.com/go-gl/mathgl/mgl32" "github.com/lakal3/vge/vge/materials/env" "github.com/lakal3/vge/vge/materials/pbr" "github.com/lakal3/vge/vge/materials/phong" "github.com/lakal3/vge/vge/vapp" "github.com/lakal3/vge/vge/vasset" "github.com/lakal3/vge/vge/vk" "github.com/lak...
// Copyright 2021 The LUCI 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 dynaml import ( "container/list" "strconv" "strings" "github.com/cloudfoundry-incubator/spiff/debug" "github.com/cloudfoundry-incubator/spiff/yaml" ) type helperNode struct{} func (e helperNode) Evaluate(binding Binding) (yaml.Node, EvaluationInfo, bool) { panic("not intended to be evaluated") } type...
package auth import ( "context" "errors" "fmt" "io/ioutil" "net/http" "regexp" "strings" "github.com/coreos/go-oidc" "github.com/labstack/echo/v4" "go.uber.org/zap" "golang.org/x/exp/utf8string" "golang.org/x/oauth2" "github.com/traPtitech/traQ/repository" "github.com/traPtitech/traQ/router/session" "...
package cmd import ( "fmt" "os" "path" "sort" "strconv" "strings" "github.com/aotimme/gocsv/csv" ) const ( BOM_RUNE = '\uFEFF' BOM_STRING = "\uFEFF" NUM_BOM_BYTES = 3 ) // GetIndicesForColumnsOrPanic is a simple wrapper around GetIndicesForColumns // that will simply panic if GetIndicesForColumns ...
package portal import ( "encoding/json" "fmt" "regexp" "time" "github.com/Azure/azure-sdk-for-go/services/preview/portal/mgmt/2019-01-01-preview/portal" "github.com/hashicorp/go-azure-helpers/response" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider...
package op import ( "fmt" "io" "os" "os/exec" "regexp" "strconv" "strings" ) type Context struct { SessionToken string VaultUUID string } type Query struct { Context Key string // can be a title, uuid, etc. } type DocumentUpsert struct { Query Content string FileName string Title ...
package main import ( "encoding/xml" "fmt" "io" "io/ioutil" "log" "net/http" "strings" "time" ) // how often to check the feeds (in minutes) const checkEvery = 3 // ignore all posts that are older than X minutes const freshness = 90 // if there’s an error reading a feed, retry after X minutes const retryAft...
package main import ( "os" "os/signal" "strings" "syscall" log "github.com/Sirupsen/logrus" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" core_v1 "k8s.io/client-go/informers/core/v1" api_core_v1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/clie...
/* 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 distributed under the License ...
/* Copyright 2017 by GoSpider author. 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, softwar...
//整体配置 package sys import ( "../utility" "errors" "fmt" "github.com/labstack/echo" "github.com/labstack/gommon/log" "gopkg.in/yaml.v2" "io" "net/http" "os" "time" "strings" "github.com/labstack/echo/middleware" ) /* Debug: 模式 Logger : 日志输出格式的配置,日志等级,输出位置 Startup Banner: 开启后的横幅信息 listen : 监听地址与相关配置 Co...
// Copyright 2014 <<EMAIL>>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package webp import ( "image" "image/color" "reflect" ) var ( _ Image = (*_RGB)(nil) ) type _RGB struct { M struct { Pix []uint8 Stride int Rect i...
/* Copyright 2021 Giant Swarm GmbH. 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, softwa...
// Copyright © 2017 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
package es import ( "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/sha256" "crypto/sha512" "errors" "math/big" "github.com/fossoreslp/go-jwt" "github.com/fossoreslp/go-uuid-v4" ) type curve struct { alg int curve elliptic.Curve hash crypto.Hash ilen int } const ( // ES256 is ECDS...
// Copyright 2015| Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package sqltypes import ( "testing" querypb "github.com/youtube/vitess/go/vt/proto/query" ) func TestTypeValues(t *testing.T) { testcases := []struct { def...
package rest import ( "bytes" "context" "io/ioutil" "net/http" "net/url" "time" "github.com/DisgoOrg/disgo/json" "github.com/pkg/errors" "github.com/DisgoOrg/disgo/discord" "github.com/DisgoOrg/disgo/rest/route" "github.com/DisgoOrg/disgo/rest/rrate" "github.com/DisgoOrg/log" ) // NewClient constructs a...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package v20190601 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type Watcher struct { pulumi.CustomReso...
/* Gluon - BOSH / CF Orchestration via Kuberenetes API(s) Copyright (c) 2020 <NAME> 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...
package todoist import ( "context" "fmt" "strings" "time" "unicode" todoist "github.com/sachaos/todoist/lib" "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/xo/dburl" ) type Config struct { DatabaseURL string StartDate string EndDate string DryRun ...
package main import ( "bufio" "flag" "fmt" "image" "image/color" "image/png" "os" "regexp" "strconv" ) var ( inputFile = flag.String("input", "inputs/day10.txt", "input file") partB = flag.Bool("partB", false, "do part b solution?") debug = flag.Bool("debug", false, "debug?") debug2 = flag...
package tv import ( "fmt" "github.com/bry00/m/utl" "github.com/bry00/m/view" "github.com/gdamore/tcell" "github.com/rivo/tview" ) const helpLabelAttribute = "b" const helpLabelActions = "Actions" const helpLabelShortcuts = "Keys" const headerHeight = 3 const footerHeight = 1 const hPadding = 3 type shortcutDes...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package codecommit import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type CreatePullRequestApprovalRuleInput struct { _ struct{} `type:"structure"` // The content of the approval rule, in...
package testcase import ( "crypto/md5" "encoding/hex" "fmt" "io" "io/ioutil" "os" "strconv" "strings" "github.com/Thewalkers2012/DOJ/model" "github.com/Thewalkers2012/DOJ/settings" "go.uber.org/zap" ) func CreateTestcase(args *model.Info, pid int64) error { path := settings.Config.TestPath // 1. 到 testc...
// Package heap contains handy methods for instantiating and using heaps. // Heaps can be pushed to or popped from. Popping always yields the // lowest-ordered item in the heap, and pushing adds an item to the heap. // Unlike in https://pkg.go.dev/container/heap@go1.15.6, if the the heap is at // capacity, pushing ejec...
package request import ( "math" "net/url" "path" "regexp" "strconv" "strings" "time" "github.com/kennygrant/sanitize" ) const ( DEFAULT_REPLY_LIMIT = 3 MAX_REPLY_LIMIT = 25 DEFAULT_LIMIT = 25 MAX_LIMIT = 50 ORDER_ASC = "ASC" ORDER_DESC = "DESC" ) type Query struc...
// errorcheck // Copyright 2020 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 p import "unsafe" const C = 1 var x, x1, x2 int var b bool var s string var c chan int var cp complex128 var slice []int var array [2]...
package termenv import ( "fmt" "strings" ) const ( CursorUpSeq = "%dA" CursorDownSeq = "%dB" CursorForwardSeq = "%dC" CursorBackSeq = "%dD" CursorNextLineSeq = "%dE" CursorPreviousLineSeq = "%dF" CursorHorizontalSeq = "%dG" CursorPositionSeq =...
package main import ( "bufio" "fmt" "log" "os" "sort" ) var width int var board [][2]int // [generation, distance] var units []*int var unitData = make(map[int]*Unit) var elfs, goblins, round, generation int type Unit struct { elf bool pos int hp int } var directions = [][2]int{{0, -1}, {-1, 0}, {1, 0}, {0...
package main import ( "errors" "fmt" "os" "strings" "github.com/jaredpetersen/raspilive/internal/ffmpeg/hls" "github.com/jaredpetersen/raspilive/internal/raspivid" "github.com/jaredpetersen/raspilive/internal/server" "github.com/rs/zerolog/log" "github.com/spf13/cobra" ) // HlsCfg represents the HLS configu...
/* Copyright 2016 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 writing, soft...
package storage import ( "context" "strings" "github.com/gsmcwhirter/go-util/v8/errors" "github.com/gsmcwhirter/go-util/v8/telemetry" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" "google.golang.org/protobuf/proto" ) var ErrTooManyRows = errors.New("too many rows") type pgTrialAPI struct { db ...
package auth // Contains all the logic to connect the API to our Mongo database // This package also leverages some helper functions for // authentication located in the util.go file import ( "log" "time" "github.com/cesar-yoab/authService/graph/model" jwt "github.com/dgrijalva/jwt-go" "github.com/vektah/gqlpar...
package assert import ( "testing" ) func test(t *testing.T, expected bool, message string) { if !expected { t.Error(message) } } func testValue(t *testing.T, a, b, c, array interface{}, desc string) { test(t, Equal(a, b), desc+" values are not equal, must be equal") test(t, LessEqual(a, b), desc+" value A is ...
/* MIT License Copyright The Helmproj Authors. 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, d...
package client import ( "bytes" "encoding/json" "errors" "fmt" "log" "net/http" "strconv" "sync" "time" portainer "github.com/portainer/portainer/api" "github.com/portainer/agent" "github.com/portainer/agent/os" ) // PortainerAsyncClient is used to execute HTTP requests using only the /api/entrypoint/as...
// Copyright (C) 2020, 2021, Oracle and/or its affiliates. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. package k8s import ( "context" "fmt" "strings" "github.com/onsi/ginkgo" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "...
// Copyright 2020 New Relic Corporation. All rights reserved. // SPDX-License-Identifier: Apache-2.0 package v4 import ( ctx2 "context" "strings" "time" "github.com/newrelic/infrastructure-agent/pkg/sysinfo/hostname" "github.com/newrelic/infrastructure-agent/internal/agent/id" "github.com/newrelic/infrastructu...
package compare import ( "errors" "strings" ) //DamerauLevenshtein computes the Damerau-Levenshtein distance between two // strings. The returned value - distance - is the number of insertions, // deletions, substitutions, and transpositions it takes to transform one // string (s1) into another (s2). Each step in t...
// Copyright 2021-2022 The sacloud/autoscaler 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 applic...
// Package TS29531NnssfNSSelection provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen version v1.9.0 DO NOT EDIT. package TS29531NnssfNSSelection import ( externalRef0 "magma/feg/gateway/sbi/specs/TS29510NnrfNFManagement" externalRef1 "magma/feg/gateway...
/* Copyright 2021 The tKeel 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, software...
/** * Copyright 2020 Appvia Ltd <<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 ...
package distiller import ( "github.com/google/syzkaller/pkg/log" "github.com/google/syzkaller/prog" "fmt" "sort" "os" ) func (d *ExplicitDistiller) Add(seeds Seeds) { /* builds out CallToIdx which is used for sorting calls in distilled programs */ d.Seeds = seeds for _, seed := range seeds { d.CallToSeed[se...
/* Package api1 implements version 1 of sms-passd API. */ package api1 import ( "encoding/json" "fmt" "github.com/aavzz/daemon/log" "github.com/aavzz/notifier" "github.com/aavzz/sms-pass/backend/sms-passd/db" "github.com/aavzz/sms-pass/backend/sms-passd/timer" "github.com/spf13/viper" "io/ioutil" "math/rand" ...
package prepare import ( "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "strconv" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/shutter-network/shutter/shuttermint/cmd/deploy" "github.com/shutter-network/shutter/shuttermint/contract" "github...
package tmpl import ( "encoding/json" "html/template" "io" "log" "mime" "net/http" "os" "path" "path/filepath" "sync" "time" "github.com/gorilla/mux" ) // ArgGetter is the type of function that distills the template arguments from a request. type ArgGetter func(*http.Request) (interface{}, error) type h...
package main import ( "fmt" "io/ioutil" "os" "strings" ) type vector3d struct { x int y int z int } type square struct { tl vector3d br vector3d } type state struct { position vector3d distance int } type portal struct { label string from vector3d to vector3d outer bool } func getGrid() (grid m...
// Copyright (C) 2015 Foursquare Labs Inc. package hfile import ( "bytes" "crypto/md5" "encoding/hex" "encoding/json" "fmt" "io" "io/ioutil" "log" "net/http" "os" "path" "path/filepath" "strings" "time" "github.com/foursquare/fsgo/report" ) type LoadMethod int const ( CopiedToMem LoadMethod = iota ...
package migrate import ( "database/sql" "os" "strings" "testing" ) func expectError(t *testing.T, name string, msg string, fn func() error, substr ...string) { if err := fn(); err == nil { t.Errorf("%s: expected error with %s", name, msg) } else { for _, str := range substr { if !strings.Contains(err.Err...
package socks5 import ( "bytes" "encoding/binary" "errors" "fmt" "net" "strconv" "sync" ) // Address represents address in socks protocol // Client usage: // addr := &Address{} // Server usage: // type Address struct { Addr net.IP ATYPE Port uint16 } var bufPool = sync.Pool{New: func() interface{} { b...
package extraction import ( "fmt" "testing" "time" "github.com/michigan-com/newsfetch/lib" m "github.com/michigan-com/newsfetch/model" ) // Test the adding of an hour interval to an article.Visits array func TestAddHourInterval(t *testing.T) { article := &m.Article{} timeVal := getStartTime() numToAdd := 20 ...
package models import ( "encoding/json" "errors" "fmt" "time" "github.com/gobuffalo/events" "github.com/gobuffalo/nulls" "github.com/gobuffalo/pop/v5" "github.com/gobuffalo/validate/v3" "github.com/gofrs/uuid" "github.com/silinternational/cover-api/api" "github.com/silinternational/cover-api/domain" ) //...
// Copyright 2022 Database Mesh 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 ...
package web // configuration module for dbs2go // // Copyright (c) 2015-2016 - <NAME> <<EMAIL>> // import ( "encoding/json" "fmt" "io/ioutil" "log" ) // Configuration stores dbs configuration parameters type Configuration struct { Port int `json:"port"` // dbs port number StaticDir...
package registry import ( "context" "encoding/json" "errors" "io/ioutil" "net/http" "regexp" "strings" "time" manifestV1 "github.com/docker/distribution/manifest/schema1" manifestV2 "github.com/docker/distribution/manifest/schema2" digest "github.com/opencontainers/go-digest" log "github.com/sirupsen/logr...
// Code generated by gotdgen, DO NOT EDIT. package tdapi import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _...
package controllers import ( "context" "fmt" "reflect" "strings" "github.com/argoproj/gitops-engine/pkg/sync/common" "github.com/argoproj/gitops-engine/pkg/utils/kube" "github.com/go-logr/logr" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-g...
package mtcp import ( "container/heap" "sort" "sync" ) type segmentHeap []*segment func (h segmentHeap) Len() int { return len(h) } func (h segmentHeap) Less(i, j int) bool { return h[i].num.lessThan(h[j].num) } func (h segmentHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] } func (h *segmentHeap) Push(x int...
package gettext import ( "bufio" "io" "log" "os" "regexp" "strings" "sync" ) // parseLocaleAlias parses a locale.alias file func parseLocaleAlias(r io.Reader) (map[string]string, error) { s := bufio.NewScanner(r) aliases := make(map[string]string) for s.Scan() { // Lines beginning with a hash (after strip...
// Copyright Contributors to the Open Cluster Management project package create import ( "context" "fmt" "path/filepath" "github.com/open-cluster-management/cm-cli/pkg/cmd/apply" "github.com/ghodss/yaml" "github.com/open-cluster-management/cm-cli/pkg/bindata" "github.com/open-cluster-management/cm-cli/pkg/hel...
// Copyright (c) 2016 baimaohui // 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, distr...
package main import ( "fmt" "io" "io/ioutil" "net/http" "strings" "time" "github.com/ostcar/geiss/asgi" ) const httpResponseWait = 30 // Create the reply channel name for a http.response channel. func createResponseReplyChannel() (replyChannel string, err error) { replyChannel, err = channelLayer.NewChannel...
// Copyright 2015 The Serulian 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 typeconstructor import ( "fmt" "io/ioutil" "os" "strings" "testing" "github.com/serulian/compiler/compilergraph" "github.com/serulian/com...
package main import ( "context" "os" "strconv" "strings" "github.com/mah0x211/github-release-admin/cmd" "github.com/mah0x211/github-release-admin/download" "github.com/mah0x211/github-release-admin/getopt" "github.com/mah0x211/github-release-admin/github" "github.com/mah0x211/github-release-admin/log" "gith...
package solus import ( "context" "fmt" ) // TasksService handles all available methods with tasks. type TasksService service // TaskStatus represents available task's statuses. type TaskStatus string const ( // TaskStatusPending indicates task is just created but not dispatched. TaskStatusPending TaskStatus = "...
package dagprocessor import ( "errors" "sync" "github.com/Deepchain-foundation/lachesis-base/eventcheck" "github.com/Deepchain-foundation/lachesis-base/gossip/dagordering" "github.com/Deepchain-foundation/lachesis-base/hash" "github.com/Deepchain-foundation/lachesis-base/inter/dag" "github.com/Deepchain-founda...
package main import ( "fmt" "image" "image/color" "math/rand" "time" "github.com/ImVexed/dyntree" ) // This file is an example using dyntree to simulate a 2D lingering AoE spell causing damage // over multiple ticks to a group of enemies type LingeringAoESpell struct { duration time.Duration dps float6...
package customization import ( "net/http" "time" "github.com/gorilla/mux" apperrorEnum "github.com/zhongjie-cai/WebServiceTemplate/apperror/enum" "github.com/zhongjie-cai/WebServiceTemplate/headerutil/headerstyle" "github.com/zhongjie-cai/WebServiceTemplate/logger/loglevel" "github.com/zhongjie-cai/WebServiceT...
package repository import ( "context" "github.com/google/uuid" xerrors "github.com/pkg/errors" "github.com/wljgithub/mall-project/internal/dto" "github.com/wljgithub/mall-project/internal/mapper" "github.com/wljgithub/mall-project/internal/model" "gorm.io/gorm" "time" ) type OrderRepo interface { GetOrder(ui...
package vindexdata import ( "bytes" "crypto/md5" "encoding/json" "fmt" "path/filepath" "reflect" "strings" "github.com/pkg/errors" "github.com/tett23/kinsro/src/intdate" "golang.org/x/text/unicode/norm" ) // Digest MD5 type Digest [16]byte // MarshalJSON MarshalJSON func (digest Digest) MarshalJSON() ([]b...
package stringstringmap import ( "encoding" "encoding/base64" "reflect" "strconv" "testing" "time" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" ) type base64EncodedString string var ( _ encoding.TextMarshaler = (*base64EncodedString)(nil) _ encoding.TextUnmarshaler = (*base64Enc...
// Copyright (c) 2016 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 applica...
package service import ( "context" "fmt" "github.com/godcong/aliyun-media-censor/config" "github.com/godcong/aliyun-media-censor/green" "github.com/godcong/aliyun-media-censor/proto" "github.com/json-iterator/go" "github.com/satori/go.uuid" "google.golang.org/grpc" "google.golang.org/grpc/reflection" "log" ...
/* * Copyright (c) 2019 uplus.io */ package v1 import ( "github.com/uplus-io/ugo/core" log "github.com/uplus-io/ugo/logger" "github.com/uplus-io/ugo/utils" "strings" "sync" "time" ) const ( warehouseAvailableInterval = 5 //可用时间间隔 second ) type WarehouseListener func(status WarehouseStatus) type WarehouseS...
package main import ( "math/rand" "time" "github.com/faiface/pixel" "github.com/faiface/pixel/imdraw" "github.com/faiface/pixel/pixelgl" "golang.org/x/image/colornames" ) type Cell struct { Row int Col int } type Board struct { Cells map[Cell]bool } var ( cellSize = float64(40) ) func newRandomBoard(wid...
package bird 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 ( jittersBirthday = nook.Birthday{ Day: 2, Month...
// Copyright 2019 Istio Authors // Copyright 2021 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 ...
package machine import ( "fmt" "log" "os" "time" "github.com/blackchip-org/pac8/pkg/audio" "github.com/blackchip-org/pac8/pkg/input" "github.com/blackchip-org/pac8/pkg/memory" "github.com/blackchip-org/pac8/pkg/proc" "github.com/blackchip-org/pac8/pkg/util/state" "github.com/blackchip-org/pac8/pkg/video" "...
//Handles the logic in the game. package Game import "github.com/golang/The-Lagorinth/Labyrinth" import "github.com/golang/The-Lagorinth/Characters" import "github.com/golang/The-Lagorinth/Point" import "fmt" import "os" import "os/exec" import "runtime" //draw calls all function responsible for drawing objects in th...
package solver_test import ( "strings" "testing" "time" "github.com/brunokim/logic-engine/dsl" "github.com/brunokim/logic-engine/logic" "github.com/brunokim/logic-engine/solver" "github.com/brunokim/logic-engine/test_helpers" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" ) var ( cl...
package main import ( "encoding/json" "fmt" "io/ioutil" "net/http" "strings" ) // JSON Structs // AtlasTOC represents the meta documenation from Salesforce type AtlasTOC struct { AvailableVersions []VersionInfo `json:"available_versions"` Content string ContentDocumentID string `json:"content_docum...
package svgd import ( "errors" "fmt" "github.com/ajstarks/svgo" "io" "math" "math/rand" ) type BarCategory struct { Name string Color string values []float64 } func (lc *BarCategory) SetValues(vals []float64) { lc.values = make([]float64, len(vals)) copy(lc.values, vals) } type BarDiagram struct { T...
package livepkg import ( "bytes" "fmt" "mime" "net/http" "os" "path/filepath" "strings" "sync/atomic" "time" ) // Errors is a wrapper for multiple errors type Errors []error // Error is for implementing error interface func (errs Errors) Error() string { var msgs []string for _, err := range errs { msgs...
// Copyright 2020 <NAME>. All rights reserved. // Use of this source code is governed by a MIT license // that can be found in the LICENSE file. package main import ( "eonza/lib" "eonza/users" "fmt" "os" "path" "path/filepath" "github.com/kataras/golog" "gopkg.in/yaml.v2" ) const ( ModeDefault = `defaul...
package consts const SqlNotFound = "sql: no rows in result set" const CounterpartylibInsufficientFunds = "insufficient funds" const CounterpartylibMalformedAddress = "Odd-length string" const CounterpartylibInsufficientBTC = "Insufficient BTC at address" const CounterpartylibOnlyIssuerCanPayDividends = "only issuer c...