text
stringlengths
3.08k
10.4k
package migration import ( "context" "io/ioutil" "log" "os" "path" "path/filepath" "regexp" "strings" "sync" "github.com/pkg/errors" "github.com/by46/whalefs/client" "github.com/by46/whalefs/common" "github.com/by46/whalefs/utils" ) const ( NameOriginal = "original" ) var ( ReIsProduct = regexp.Must...
package statsig import ( "encoding/json" "fmt" "net/http" "strings" ) // An instance of a StatsigClient for interfacing with Statsig Feature Gates, Dynamic Configs, Experiments, and Event Logging type Client struct { sdkKey string evaluator *evaluator logger *logger transport *transport options *Opti...
package main /* Authenticate users for nginx mail https://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html */ import ( "errors" "flag" "fmt" "net" "net/http" "os" "strings" "github.com/patrickhaller/confix" "github.com/patrickhaller/go-ldap-client" "github.com/patrickhaller/slog" "github.com/patric...
// Copyright 2016 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. // gccgo-specific support for GC. package runtime import ( "runtime/internal/sys" "unsafe" ) // For gccgo, use go:linkname to rename compiler-called functi...
package clif import ( "regexp" "strings" "fmt" ) // Formatter is used by Output for rendering. It supports style directives in the form <info> or <end> or suchlike type Formatter interface { // Escape escapes a string, so that no formatter tokens will be interpolated (eg `<foo>` -> `\<foo>`) Escape(msg string) ...
package main import ( "math" ) // based on https://www.scratchapixel.com/lessons/procedural-generation-virtual-worlds/simulating-sky/simulating-colors-of-the-sky type Atmosphere struct { sunDirection Tuple sunSize float64 sunColor Color earthRadius float64 atmosphereRadius...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package migration import ( "context" "crypto/ed25519" "sync" "testing" "github.com/kinecosystem/agora-common/headers" "github.com/kinecosystem/agora-common/solana" "github.com/kinecosystem/go/clients/horizon" "github.com/kinecosystem/go/strkey" "github.com/mr-tron/base58" "github.com/pkg/errors" "github.co...
// 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 writi...
package jqtop import ( "errors" "fmt" "regexp" "strings" "sync" "github.com/hpcloud/tail" "github.com/paulbellamy/ratecounter" "github.com/sirupsen/logrus" "github.com/tidwall/gjson" metrics "github.com/rcrowley/go-metrics" ) // countersSlice stores registries (go-metrics) for various fields // We use a s...
package proc import ( "fmt" "net/http" "net/http/httptest" "strconv" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tb "gopkg.in/tucnak/telebot.v2" "github.com/umputun/feed-master/app/feed" ) func TestNewTelegramClientIfTokenEmpty(t *testing.T) { client, err :...
package throttler import ( "net/http" "os" "path/filepath" elastic "github.com/olivere/elastic/v7" // Elasticsearch client. "github.com/prometheus/client_golang/prometheus" // Prometheus metrics. "go.uber.org/zap" // Logging. kingpin "gopkg.in/alecthomas/kingpin.v2" ...
package cmd import ( "bytes" "fmt" "net/url" "os" "strconv" "strings" "text/template" "time" "github.com/nukosuke/garoon/utility" "github.com/otoyo/garoon" "github.com/spf13/cobra" ) // TODO: --no-template option var eventListViewColumns = []string{ "id", "start", "end", "subject", } const ( eventLi...
package http import ( "context" "encoding/json" "net/http" "github.com/sapawarga/phonebook-service/endpoint" "github.com/sapawarga/phonebook-service/helper" "github.com/sapawarga/phonebook-service/usecase" kitlog "github.com/go-kit/kit/log" "github.com/go-kit/kit/transport" kithttp "github.com/go-kit/kit/tr...
package main import ( "bufio" "fmt" "log" "os" "strconv" ) const maxint = int(^uint(0) >> 1) func load() ([]rune, error) { file, err := os.Open("input.txt") if err != nil { return nil, fmt.Errorf("couldn't open file: %v", err) } defer file.Close() vals := []rune{} scanner := bufio.NewScanner(file) for...
package generated import ( "encoding/base64" "fmt" "io/ioutil" "os" "path/filepath" "github.com/loft-sh/devspace/pkg/devspace/config/constants" "github.com/loft-sh/devspace/pkg/util/encryption" yaml "gopkg.in/yaml.v2" ) const ( DevspaceDisableVarsEncryptionEnv = "DEVSPACE_DISABLE_VARS_ENCRYPTION" ) // Enc...
/* Copyright 2018-2019 <NAME>, S.A. 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 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
package compose import ( "fmt" "sort" "strconv" "strings" "time" composetypes "github.com/compose-spec/compose-go/types" "github.com/loft-sh/devspace/pkg/devspace/config/versions/latest" v1 "k8s.io/api/core/v1" ) func (cb *configBuilder) AddDeployment(dockerCompose *composetypes.Project, service composetypes...
package main import ( "errors" "fmt" "time" "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/theme" "fyne.io/fyne/v2/widget" "github.com/fpabl0/sparky-go" "github.com/fpabl0/sparky-go/scont" "github.com/fpabl0/sparky-go/svalid" "github.com/fpa...
package internal import ( "database/sql" "fmt" _ "github.com/denisenkom/go-mssqldb" _ "github.com/go-sql-driver/mysql" _ "github.com/lib/pq" _ "github.com/mattn/go-sqlite3" "github.com/stackworx-go/dberrors/internal/dialect" "github.com/stackworx-go/dberrors/parser/mssql" "github.com/stackworx-go/dberrors/par...
// Copyright (c) 2018 <NAME> // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial app...
/* Example plugin. * Copyright (C) 2013-2020 Red Hat Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions ...
/* git-remote-helper implements a git-remote helper that uses the ipfs transport. TODO Currently assumes a IPFS Daemon at localhost:5001 Not completed: new Push (issue #2), IPNS, URLs like fs:/ipfs/.. (issue #3), embedded IPFS node ... $ git clone ipfs://ipfs/$hash/repo.git $ cd repo && make $stuff $ git commit...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: tensorflow_serving/apis/model.proto package apis import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import google_protobuf "github.com/golang/protobuf/ptypes/wrappers" // Reference imports to suppress errors if they are not ...
package httphandler import ( "encoding/json" "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" "io/ioutil" "net/http" "time" ) const ( requestID = "X-Request-Id" traceId = "X-B3-Traceid" spanId = "X-B3-Spanid" parentSpanId = "X-b3-Parentspanid" sampled = "...
package scope import ( "bytes" "encoding/json" "fmt" "log" "strings" "github.com/arborlang/ArborGo/internal/lexer" "github.com/arborlang/ArborGo/internal/parser/ast/types" "github.com/olekukonko/tablewriter" ) // SymbolData is the data related to the symbol. type SymbolData struct { // Type is the type of t...
package encoding import ( "io" ) // An encoded DDSketch comprises multiple contiguous blocks (sequences of // bytes). Each block is prefixed with a flag that indicates what the block // contains and how the data is encoded in the block. // // A flag is a single byte, which itself contains two parts: // - the flag ty...
package main import ( "bufio" "encoding/json" "flag" "fmt" "log" "os" "path" "strconv" "strings" "sync" couchbase "github.com/couchbase/go-couchbase" ) const ( bufferSize = 1e3 ) type tableMeta struct { keyFormat string rangeStart int64 } type kv struct { key string value interface{} } // parse...
package amazon import ( "fmt" "sort" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/banzaicloud/pipeline/auth" "github.com/banzaicloud/pipeline/internal/objectstore" commonObjectstore "github.com/banzaicloud/pipeline/pkg/objectstore" amazonObjectstore "github.co...
package event var UseMultiKey = false var diacriticsData diacriticsState func ComposeDiacritic(ks *KeySym, ru *rune) (isLatch bool) { if UseMultiKey { if *ks == KSymMultiKey { diacriticsData.multiKey = true return true } else if !diacriticsData.multiKey { return false } } // order matters to match...
package functional import ( "context" "path/filepath" "testing" "time" "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" "github.com/stretchr/testif...
// 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{} _...
/* Copyright 2021 The Crossplane 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 roll import ( "bytes" "fmt" "math/rand" "strconv" "strings" "text/tabwriter" "time" ) func init() { rand.Seed(time.Now().UnixNano()) } // Tabler interface is used to define all roll.Tables that can be rolled or printed. type Tabler interface { Label() string Roll() string String() string } // Tab...
// Copyright 2022 PolyCrypt 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 ...
package autorefresh import ( "github.com/robfig/cron" "os" "os/signal" "sync" "syscall" "time" ) const INSTANCE_MAX_AGE = time.Minute * 120 type AutoRefreshAmi struct { Account *Account LaunchConfig LaunchConfig RetentionCount uint Cron string Name string logFields map[s...
/* Copyright 2016 caicloud authors. 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 ...
/* Copyright The ORAS 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 distrib...
package main import ( "bytes" "fmt" "io/ioutil" "os" "path/filepath" "strings" "time" "github.com/kiteco/kiteco/kite-go/lang/python/pythonast" "github.com/kiteco/kiteco/kite-go/lang/python/pythonbatch" "github.com/kiteco/kiteco/kite-go/lang/python/pythonimports" "github.com/kiteco/kiteco/kite-go/lang/pytho...
//---------------------------------------- // 代码由GenlibVcl工具自动生成。 // Copyright © ying32. All Rights Reserved. // //---------------------------------------- package vcl import ( . "github.com/ying32/govcl/vcl/api" . "github.com/ying32/govcl/vcl/types" "unsafe" ) type TJumpListItem struct { IObject ...
// Package api provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT. package api import ( "fmt" "net/http" "github.com/deepmap/oapi-codegen/pkg/runtime" "github.com/labstack/echo/v4" ) // ServerInterface represents all server handlers. typ...
// Copyright 2019 Authors of Cilium // // 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 ...
// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
/* MIT License Copyright contributors to the fluent-forward-go project 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, m...
package controllers import ( "context" "errors" "fmt" mysqlv1alpha1 "github.com/blaqkube/mysql-operator/mysql-operator/api/v1alpha1" "github.com/slack-go/slack" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" ) c...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package databricks import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Related Resources // // The following reso...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.23.0 // protoc v3.17.1 // source: janbar.proto package pb import ( reflect "reflect" sync "sync" proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.go...
package main import ( "fmt" "os" "path" "strings" "github.com/bitrise-io/go-steputils/stepconf" "github.com/bitrise-io/go-steputils/tools" "github.com/bitrise-io/go-utils/log" "github.com/bitrise-io/go-utils/pathutil" ) // Config ... type Config struct { // XCHTMLReport TestResults string `env:"te...
/* Copyright 2019 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 zabbix // ItemPrototype represent Zabbix item prototype object // https://www.zabbix.com/documentation/3.2/manual/api/reference/itemprototype/object type ItemPrototype struct { ItemID string `json:"itemid,omitempty"` // Readonly Delay string `json:"delay"` // R...
package client import ( "bytes" "context" "encoding/json" "fmt" "io" "net/http" "net/url" "os" "path" "path/filepath" "strings" "github.com/opentracing-contrib/go-stdlib/nethttp" "github.com/opentracing/opentracing-go/ext" "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/queue/types" "...
// SPDX-License-Identifier: ISC // Copyright (c) 2014-2020 Bitmark Inc. // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package listeners import ( "crypto/tls" "net" "net/rpc" "net/rpc/jsonrpc" "strings" "github.com/bitmark-inc/bitmarkd/announce" "github.com/...
/* Copyright 2020 The Crossplane 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, ...
/* * Copyright 2012-2019 the original author or 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* Copyright 2013 <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 i...
package mango import ( "net/http" "strconv" "strings" ) // CORSConfig holds CORS configuration. It can be used as // the configuration for an individual resource or as a // global configuration for the entire router tree. type CORSConfig struct { // Origins list all permitted origins. A CORS request // origin MU...
package pkg import ( "bufio" "bytes" "changlie/pithy/common" "fmt" "io/ioutil" "os" "regexp" "strings" "text/template" ) const ( PkgName = "internel_pithy_gen" InitHandlerFile = "init_handler.go" ) func init() { pkgPath := "src/"+PkgName if _, err := os.Stat(pkgPat...
// Package types implements different core types of the API. package types import ( "encoding/json" "math/big" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ) // Swap represents a basic information provided by the API about finished swap from Uniswap contract. type Swa...
// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Lice...
/* 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 use this f...
package leet import ( "encoding/json" "fmt" "io" "io/ioutil" "os" "strconv" "strings" ) type BonusConfig struct { StepPoints int // points to multiply substring position with NoStepPoints int // points to return for match when UseStep == false PrefixChar rune // the char required as only prefix ...
// Copyright (c) 2021 6 River Systems // // 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, publis...
// Copyright 2020 The GMC Author. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. // More information at https://github.com/snail007/gmc package gbytes import ( "errors" "fmt" "strconv" "strings" ) type ByteSize uint64 const ( B Byte...
package main import ( "bufio" "bytes" "errors" "fmt" "io" "log" "os" "regexp" "sort" "strconv" "strings" "time" "unicode" ) const bom = '\uFEFF' type Subtitle struct { idx int fromTime time.Duration toTime time.Duration text string } var timeFramePattern, _ = regexp.Compile(`(\d+):(\d+):...
/* The supervisor package implements an elementary supervision tree for goroutines ala erlangs supervision trees. Supervisors monitor their immediate children routines. A child routine is defined by a ServiceSpec and is registered with a supervisor using RegisterService(name, spec). The supervisor monitors the...
package main import ( "errors" "flag" "fmt" "io/ioutil" "os" "path/filepath" "strings" "sync" "go.uber.org/zap" "go.uber.org/zap/zapcore" "kubesphere.io/monitoring-dashboard/tools/converter" ) // a converter container type ConverterContainer struct { // target paths that the converter takes jobs to Conve...
// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
// // Copyright 2019 AT&T Intellectual Property // Copyright 2019 Nokia // // 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 ...
package playback import ( "encoding/base64" "encoding/json" "fmt" "io/ioutil" "log" "mime/multipart" "net/http" "net/textproto" "net/url" "time" "github.com/grafana/loki/pkg/loghttp" ) type imageServer struct { sc *synchronizer } func NewImageServer(s *synchronizer) *imageServer { return &imageServer{ ...
package cmd import ( "atcoder-gli/atcoder" "bytes" "context" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "strings" "text/template" "github.com/logrusorgru/aurora/v3" "github.com/mattn/go-colorable" "github.com/pkg/errors" "github.com/spf13/cobra" ) func init() { cmd := newCommand(&commandArgs{ ...
package digpro import ( "reflect" "github.com/rectcircle/digpro/internal" "github.com/rectcircle/digpro/internal/digcopy" "go.uber.org/dig" ) // ResolveCyclic to resolve *digpro.ContainerWrapper.Struct cyclic dependency. // The option only support *digpro.ContainerWrapper.Struct and *digglobal.Struct functions. ...
/* Copyright 2014 The Kubernetes Authors 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 ag...
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. package utils import ( l4g "code.google.com/p/log4go" "encoding/json" "net/mail" "os" "path/filepath" ) const ( MODE_DEV = "dev" MODE_BETA = "beta" MODE_PROD = "prod" ) type ServiceSettings struct { Site...
// Package model package model import ( "github.com/ulyyyyyy/tapd_notify/internal/helper/mysql" "gorm.io/gorm" "gorm.io/gorm/schema" "time" ) const ( _tableName = "tapd_conf" _mapperTableName = "field_mapper" ) // // 注意,这里由于存在两个关键key(project_id & platform_key),所以这里需要了解逻辑。 // 部分数据是需要向前端传可读性高的数据,部分数据是需要向后端...
package client import ( "bytes" "crypto/tls" "encoding/base64" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "time" ) const ( // ScaleIODefaultTokenExpiration is the ScaleIO token expiration time. ScaleIODefaultTokenExpiration = 8 * time.Hour // ScaleIODefaultInactivityTimeout is the ScaleIO toke...
package storageadapter import ( "context" market0 "github.com/filecoin-project/specs-actors/actors/builtin/market" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors/builtin/market" "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/...
// Package api provides data model interfaces. package api import ( "github.com/ambientsound/gompd/mpd" "github.com/ambientsound/pms/db" "github.com/ambientsound/pms/input/keys" "github.com/ambientsound/pms/message" pms_mpd "github.com/ambientsound/pms/mpd" "github.com/ambientsound/pms/options" "github.com/ambi...
// Copyright (c) KwanJunWen // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. package estemplate import "fmt" // TokenFilterHyphenationDecompounder token filter that uses XML-based hyphenation patterns // to find potential subwords in compou...
package versions import ( "fmt" "strings" ) // Version represents a single version. type Version struct { Major uint64 Minor uint64 Patch uint64 Prerelease VersionExtra Metadata VersionExtra } // Unspecified is the zero value of Version and represents the absense of a // version number. // //...
// Copyright 2016 <NAME>. All rights reserved. // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. package stack import ( "testing" "github.com/maruel/ut" ) var p = &Palette{ EOLReset: "A", RoutineFirst: "B", Routine: ...
// zipcodes is a package that uses the GeoNames Postal Code dataset from http://www.geonames.org // in order to perform zipcode lookup operations package zipcodes import ( "bufio" "fmt" "log" "math" "os" "strconv" "strings" ) const ( earthRadiusKm = 6371 earthRadiusMi = 3958 ) // ZipCodeLocation struct repr...
package inventory import ( "context" "crypto/sha1" "encoding/base64" "encoding/json" "fmt" "io/ioutil" "log" "os" "cloud.google.com/go/firestore" "cloud.google.com/go/pubsub" "cloud.google.com/go/storage" "google.golang.org/api/iterator" ) type routerMessage struct { Bucket string `json:"buck...
package ray import ( "math" ) // Sphere is a canonical sphere, centered of origin, of radius 1 type Sphere struct { Transform Surface name string } // NewSphere instantiate a new sphere func NewSphere() *Sphere { return &Sphere{ Transform: IDTransform, Surface: DefaultSurface, } } // SetName ... func (s...
package cfsm import ( "bytes" "fmt" "log" "strings" "sync" "text/template" "github.com/nickng/cfsm/petrify" ) const ( // FreeStateID is the ID used to identify a State unattached to any CFSM. FreeStateID = -1 ) // System is a set of CFSMs. type System struct { sync.Mutex CFSMs []*CFSM // Individual CFS...
// Copyright 2021 <NAME>. // All rights reserved. package storage import ( "context" "encoding/json" "flag" "fmt" "io" "log" "os" "cloud.google.com/go/storage" "github.com/derat/nup/cmd/nup/client" "github.com/derat/nup/server/db" "github.com/google/subcommands" "golang.org/x/oauth2/google" "google.g...
package tblstore import ( "fmt" "strings" "github.com/hillbig/rsdic" ) //go:generate mockgen -source ./rank_select.go -destination=./rank_select_mock.go -package tblstore // Ref: // [1] Engineering the LOUDS succinct tree representation: // http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.106.4250&re...
// 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. //go:build hurd || linux // +build hurd linux // glibc library calls. package syscall import ( "internal/itoa" "internal/race" "unsafe" ) //sys Openat(di...
/* * Copyright (c) 2021 NetEase 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...
/* Copyright (c) 2019 <NAME> <<EMAIL>> For the full copyright and license information, please view the LICENSE file that was distributed with this source code. */ package ksort import ( "bufio" "errors" "flag" "fmt" "io/ioutil" "os" "path/filepath" "regexp" "strings" "github.com/spf13/cobra" "helm.sh/hel...
/* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
// Package main contains an example command line tool goxz built on top of the xz package. package main import ( "errors" "flag" "fmt" "github.com/jamespfennell/xz" "io" "os" ) const usage = `Compress or decompress in the xz format. Usage: goxz [<option>...] <input_file> [<output_file>] If <input_file> ha...
package core import ( "context" "fmt" "io" "io/ioutil" "sort" "strings" "sync" "testing" context2 "github.com/oneconcern/datamon/pkg/context" "github.com/oneconcern/datamon/pkg/model" "github.com/oneconcern/datamon/pkg/storage" "github.com/oneconcern/datamon/pkg/storage/mockstorage" "github.com/stretchr/...
package netconnutil import ( "context" "encoding/binary" "github.com/pkg/errors" "github.com/xiaonanln/pktconn" "io" "log" "math/rand" "net" "runtime" "sync" "testing" ) const ( testClientCount = 10 sendValMax = 100 sendDataSize = 1024 ) type testServer struct { ctx context.Contex...
// Copyright 2016 The Gofem 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 out implements FE simulation output handling for analyses and plotting package out import ( "github.com/cpmech/gofem/ele" "github.com/cpmech/go...
package nfdstat import ( "context" "encoding/xml" "fmt" "os/exec" ) func getStatus(ctx context.Context) (*NFDStatus, error) { b, err := exec.CommandContext(ctx, "nfdc", "status", "report", "xml").CombinedOutput() if err != nil { return nil, fmt.Errorf("nfdc: %w: %s", err, b) } var status NFDStatus err = xm...
package v6 import ( _ "embed" "encoding/binary" "gopkg.in/dtapps/go-library.v3/utils/gostring" "math/big" "net" "strings" ) var ( header []byte country []byte area []byte v6ip uint64 offset uint32 start uint32 end uint32 ) type Result struct { IP string `json:"ip,omitempty"` /...
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license" file ...
package main import ( "encoding/json" "errors" "log" "net" "net/http" "net/url" "strings" "time" "github.com/codeskyblue/groupcache" "github.com/gorilla/websocket" ) var ( upgrader = websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, } wsclient *websocket.Conn sendc = make(chan ma...
package evaluator import ( "os" "reflect" "strings" "fmt" "github.com/hashicorp/hcl" hclast "github.com/hashicorp/hcl/hcl/ast" hilast "github.com/hashicorp/hil/ast" "github.com/hashicorp/terraform/helper/variables" ) type hclVariable struct { Name string `hcl:",key"` Default interface{} Desc...