text
stringlengths
5.51k
28.1k
// Copyright 2020 The Moov Authors // Use of this source code is governed by an Apache License // license that can be found in the LICENSE file. // apitest is a cli tool (and Docker image) used for testing the Moov API. // This tool is designed to operate against the production API and a local // setup. // // With no ...
package bitio_test import ( "bytes" "encoding/hex" "fmt" "testing" "github.com/wader/fq/pkg/bitio" ) func TestRead64(t *testing.T) { testCases := []struct { buf []byte firstBit int nBits int expected uint64 }{ {buf: []byte{0xff}, firstBit: 0, nBits: 8, expected: 0b11111111}, {buf: []byte{0...
/* * Copyright (c) 2014, <NAME> <yawning at schwanenlied dot me> * 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 awsecs import ( "fmt" "strings" "sync" "time" log "github.com/Sirupsen/logrus" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ecs" "github.com/bluele/gcache" ) const servicePrefix = "ecs-svc" // ...
// Package s3 implements an s3 api compatible log store package s3 import ( "bytes" "context" "encoding/base64" "encoding/json" "errors" "fmt" "io" "net/url" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aw...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/extensions/filters/http/grpc_stats/v3/config.proto package envoy_extensions_filters_http_grpc_stats_v3 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" _ "github.com/en...
// Copyright 2009-17 The Go and Gro Authors. All rights reserved. // Use of this source code is governed by the same BSD-style // license as Go that can be found in the LICENSE file. package utf88 import ( "regexp" "strconv" "strings" "unicode" ) //NOTE: go vet gives "unicode.Range32 composite literal uses unkey...
// Copyright 2020 The CDK Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use 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...
package main import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.skia.org/infra/go/testutils/unittest" "go.skia.org/infra/golden/cmd/goldpushk/goldpushk" ) func TestParseAndValidateFlagsErrors(t *testing.T) { unittest.SmallTest(t) testCases := []struct { messag...
package types import ( "fgame/fgame/game/common/common" "fgame/fgame/game/lingtongdev/types" ) const ( //每页显示10条 PageLimit = 10 //显示排行前100 ListLimit = 100 ) type RankClassType int32 const ( //本服排行 RankClassTypeLocal RankClassType = iota //本区排行 RankClassTypeArea //本服活动排行榜 RankClassTypeLocalActivity ) fu...
// Copyright (c) 2016 OpenM++ // This code is licensed under the MIT license (see LICENSE.txt for details) package db // maxBuiltInTypeId is max type id and Hid for openM++ built-in types, ie: int, double, logical const maxBuiltInTypeId = 100 // TotalEnumCode is predefined enum code for "total" enum const T...
package server import ( "bytes" "fmt" "net" "sync" "sync/atomic" "time" "github.com/pkg/errors" log "github.com/sirupsen/logrus" bnet "github.com/bio-routing/bio-rd/net" "github.com/bio-routing/bio-rd/protocols/bgp/packet" bmppkt "github.com/bio-routing/bio-rd/protocols/bmp/packet" "github.com/bio-routin...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.12.4 // source: xsuportal/resources/benchmark_result.proto package resources import ( proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.go...
// 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...
package ansibler import ( "errors" "fmt" "io" "os" "github.com/apenella/go-ansible/execute" "github.com/apenella/go-ansible/stdoutcallback" common "github.com/apenella/go-common-utils/data" ) const ( // AnsiblePlaybookBin is the ansible-playbook binary file value AnsiblePlaybookBin = "ansible-playbook" //...
package influxql import ( "errors" "fmt" "sync" "time" ) // ErrUnknownCall is returned when operating on an unknown function call. var ErrUnknownCall = errors.New("unknown call") const ( // MinTime is used as the minimum time value when computing an unbounded range. MinTime = int64(0) // MaxTime is used as t...
// // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may ...
package main import ( "flag" "image" "image/color" "image/draw" "math" "time" "github.com/faiface/pixel" "github.com/faiface/pixel/pixelgl" ) var ( fullscreen = false width = 320 height = 200 scale = 3.0 pos = pixel.V(18.0, 9.5) dir = pixel.V(-1.0, 0.0) plane = pixel.V(0.0, 0.66) ) ...
// Package ordersync contains the ordersync protocol, which is // used for sharing existing orders between two peers, typically // during initialization. The protocol consists of a requester // (the peer requesting orders) and a provider (the peer providing // them). package ordersync_v4 import ( "context" "encoding...
// Package renterhost implements the handshake and transport for the Sia // renter-host protocol. package renterhost // import "github.com/JayRama/us/renterhost" import ( "bytes" "crypto/cipher" "io" "github.com/pkg/errors" "gitlab.com/SiaPrime/SiaPrime/crypto" "gitlab.com/SiaPrime/SiaPrime/types" "gitlab.com/...
package datadog import ( "container/ring" "context" "fmt" "net/http" "strings" "sync" "time" "github.com/sirupsen/logrus" vhttp "github.com/stripe/veneur/http" "github.com/stripe/veneur/protocol" "github.com/stripe/veneur/samplers" "github.com/stripe/veneur/sinks" "github.com/stripe/veneur/ssf" "github....
// Copyright 2020 The LUCI Authors. 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 main import ( "bytes" "context" "encoding/base64" "encoding/json" "fmt" "io" "regexp" "sort" "strconv" "strings" "unicode/u...
/* Copyright 2019 Cisco Systems Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
package dance import ( "github.com/Mempler/rplpa" "github.com/karrick/godirwalk" "github.com/thehowl/go-osuapi" "sort" //"github.com/thehowl/go-osuapi" "github.com/wieku/danser-go/app/beatmap" "github.com/wieku/danser-go/app/beatmap/difficulty" "github.com/wieku/danser-go/app/bmath" "github.com/wieku/danser-g...
// pmm-agent // Copyright 2019 Percona 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 agr...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/cloud/securitycenter/v1/organization_settings.proto package securitycenter import ( fmt "fmt" math "math" proto "github.com/catper/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" ) // Reference imports to suppress error...
// Copyright (c) 2020 DistAlchemist // // This software is released under the MIT License. // https://opensource.org/licenses/MIT package db import ( "encoding/binary" "log" "os" "sort" "strconv" "strings" "sync" "time" "github.com/DistAlchemist/Mongongo/config" ) // CommitLog tracks every write operation ...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0-devel // protoc v3.11.4 // source: record/info.proto package record import ( proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/refl...
//go:build ignore // +build ignore package main import ( "bytes" . "github.com/mmcloughlin/avo/build" . "github.com/mmcloughlin/avo/operand" . "github.com/mmcloughlin/avo/reg" . "github.com/segmentio/asm/build/internal/asm" ) func init() { ConstraintExpr("!purego") } func incompleteMaskData() []byte { // Th...
// Copyright © 2019, Oracle and/or its affiliates. package oci import ( "bytes" "context" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "sync" "sync/atomic" "time" "github.com/armon/go-metrics" "github.com/hashicorp/errwrap" "github.com/hashicorp/go-uuid" "github.com/hashicorp/vault/sdk/physical...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.6.1 // source: pb.proto package grpc import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ...
/* * * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
// tello-desktop.go // Copyright (C) 2018 <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 use, copy, modify, me...
package raft // // this is an outline of the API that raft must expose to // the service (or tester). see comments below for // each of these functions for more details. // // rf = Make(...) // create a new Raft server. // rf.Start(command interface{}) (index, term, isleader) // start agreement on a new log entry ...
package test import ( "github.com/gruntwork-io/terratest" "testing" "os" terralog "github.com/gruntwork-io/terratest/log" "log" "github.com/gruntwork-io/terratest/util" "time" "fmt" "path/filepath" "regexp" "github.com/gruntwork-io/terratest/ssh" "strconv" "strings" "github.com/hashicorp/vault/api" "net...
// Copyright © 2017 The Blocknet 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 or ag...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/filter/http/grpc_stats/v2alpha/config.proto package envoy_config_filter_http_grpc_stats_v2alpha import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" _ "github.com/env...
// +build base package cxcore import ( . "github.com/skycoin/cx/cx" ) // op codes const ( // time OP_TIME_SLEEP = iota + END_OF_CORE_OPS OP_TIME_UNIX_MILLI OP_TIME_UNIX_NANO // serialize OP_SERIAL_PROGRAM // os OP_OS_GET_WORKING_DIRECTORY OP_OS_LOG_FILE OP_OS_OPEN OP_OS_CREATE OP_OS_CLOSE OP_OS_SEEK ...
// Copyright 2022 The CubeFS Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
package agent import ( "bytes" "crypto/x509" "errors" "fmt" "io/ioutil" "log" "net/http" "net/url" "sync" "sync/atomic" "time" "github.com/google/uuid" "github.com/opentracing/opentracing-go" "gopkg.in/tomb.v2" "go.undefinedlabs.com/scopeagent/tags" "go.undefinedlabs.com/scopeagent/tracer" ) const r...
package netserv import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" peerpkg "github.com/btcsuite/btcd/peer" "github.com/btcsuite/btcd/wire" "github.com/ontio/spvclient/chain" "github.com/ontio/spvclient/log" "net" "time" ) // newPeerMsg signifies a newly connected peer t...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/wasm/v2alpha/wasm.proto package envoy_config_wasm_v2alpha import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/validate" ...
package postgres import ( "fmt" "strings" "github.com/chef/automate/components/applications-service/pkg/storage" "github.com/chef/automate/lib/errorutils" "github.com/chef/automate/lib/pgutils" "github.com/lib/pq" "github.com/pkg/errors" log "github.com/sirupsen/logrus" ) // Service Group Health Status // --...
package manifest import ( "bytes" "context" "encoding/hex" "fmt" "time" manifest "github.com/ovrclk/akash/manifest/v2beta1" clustertypes "github.com/ovrclk/akash/provider/cluster/types/v1beta2" "github.com/ovrclk/akash/provider/cluster/util" "github.com/pkg/errors" "github.com/tendermint/tendermint/libs/l...
package dataframe import ( "fmt" "go.starlark.net/starlark" ) type seriesAttrImpl func(*Series) (starlark.Value, error) var seriesAttributes = map[string]seriesAttrImpl{ "T": attrNoImplSeries("T"), "array": attrNoImplSeries("array"), "at": attrNoImpl...
package main import ( "fmt" "strings" "sync" "unicode" "github.com/xyproto/mode" "github.com/xyproto/stringpainter" "github.com/xyproto/syntax" "github.com/xyproto/textoutput" "github.com/xyproto/vt100" ) const controlRuneReplacement = '¿' // for displaying control sequence characters. Could also use: � va...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v0/enums/education_placeholder_field.proto package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v0/enums" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports t...
package types import ( coretypes "fgame/fgame/core/types" coreutils "fgame/fgame/core/utils" ) type SkillFirstType int32 const ( //普通技能 SkillFirstTypeNormal SkillFirstType = iota //职业技能 SkillFirstTypeRole //坐骑技能 SkillFirstTypeMount //异兽技能 SkillFirstTypeYiShou //古魂技能 SkillFirstTypeGuHun //跳跃技能 SkillFirs...
package rest import ( "bytes" "context" "encoding/json" "fmt" "github.com/elastic/go-elasticsearch/v7" "github.com/elastic/go-elasticsearch/v7/esapi" "github.com/go-chi/jwtauth" "go.uber.org/zap" "io/ioutil" "os" "strconv" "strings" ) type ( // EsSearchAggrTerms is aggregations parameter for es search ap...
package bn256 import ( "errors" "math" "math/big" ) // For details of the algorithms used, see "Multiplication and Squaring on // Pairing-Friendly Fields, Devegili et al. // http://eprint.iacr.org/2006/471.pdf. // gfP2 implements a field of size p² as a quadratic extension of the base field // where i²=-1. type g...
// Dates // // Dates in GEDCOM files can be very complex as they can cater for many // scenarios: // // 1. Incomplete, like "Dec 1943" // // 2. Anchored, like "Aft. 3 Sep 2003" or "Before 1923" // // 3. Ranges, like "Bet. 4 Apr 1823 and 8 Apr 1823" // // 4. Phrases, like "(Foo Bar)" // // This package provides a very r...
/* Copyright 2021 The Kubermatic Kubernetes Platform contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
/* Copyright 2019 Cisco Systems Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
package radius import ( "bytes" "crypto/des" "crypto/rand" "crypto/sha1" "encoding/binary" "fmt" "strconv" "unicode/utf16" "golang.org/x/crypto/md4" ) // MsChapV2ChallengePacket is sent after the Identity Request type MsChapV2ChallengePacket struct { Challenge []byte Name []byte } // MsCHapV2Respons...
// Copyright ©2015 The bíogo 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 gene import ( "github.com/biogo/biogo/feat" "testing" "gopkg.in/check.v1" ) // Assert that interfaces are satisfied var ( _ feat.Feature = (...
package policy import ( "crypto/sha256" "encoding/hex" "errors" "fmt" "math/rand" "net" "net/mail" "regexp" "strings" "sync" "golang.org/x/net/idna" "golang.org/x/text/unicode/norm" "github.com/letsencrypt/boulder/core" berrors "github.com/letsencrypt/boulder/errors" "github.com/letsencrypt/boulder/ia...
/* * Copyright (C) 2019 Red Hat, 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 ofthe License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Copyright 2020 <NAME> // // https://github.com/atc0005/go-ezproxy // // 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 req...
/* Copyright © 2020 Dell Inc. or its subsidiaries. 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 ...
/* Copyright 2016 The Rook 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 to ...
/* Package doh (aka) internal/resolver/doh is a resolver implementation which handles (DoH) lookups via remote servers. Typical usage is pretty straightforward. Create the resolver once then use it to resolve dns.Msgs. res, err := dohresolver.New(dohresolver.Config{....}, &http.Client) for { qname...
/* * Copyright 2020 Saffat Technologies, Ltd. * * 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...
/* * MinIO Client, (C) 2018 MinIO, 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 ag...
package cloudwatch import ( "context" "fmt" "regexp" "strings" "time" "github.com/grafana/grafana-plugin-sdk-go/data" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/aws/aws-...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v3/services/ad_group_audience_view_service.proto package services import ( context "context" fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" resources "google.golang.org/genproto/googleapis/ads/googleads/v3/resources...
// Copyright 2012 The Plotinum Authors. All rights reserved. // Use of this source code is governed by an MIT-style license // that can be found in the LICENSE file. package plot import ( "code.google.com/p/plotinum/vg" "fmt" "image/color" "math" ) // An Axis represents either a horizontal or vertical // axis of...
// Copyright 2018 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 ...
// Copyright (c) 2013 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 or at // https://developers.google.com/open-source/licenses/bsd. // Package lintutil provides helpers for writing linter command lines. package lintutil /...
// Copyright 2017-present The Hugo 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 app...
/* Copyright 2022 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 profile provides a simple way to manage multiple runtime/pprof profiling of your Go application package profile import ( "fmt" "io/ioutil" "os" "os/signal" "path/filepath" "runtime" "runtime/pprof" "runtime/trace" "sync/atomic" "syscall" ) const ( // Supported profiles cpuMode profileMode...
package inject import ( "fmt" "reflect" "sort" "strings" "github.com/jaegertracing/jaeger-operator/pkg/config/ca" "github.com/jaegertracing/jaeger-operator/pkg/config/otelconfig" log "github.com/sirupsen/logrus" "github.com/spf13/viper" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" v1 "github.c...
// Copyright (c) 2017 Zededa, Inc. // SPDX-License-Identifier: Apache-2.0 package types import ( "errors" "fmt" "net" "os" "time" zconfig "github.com/lf-edge/eve/api/go/config" "github.com/lf-edge/eve/pkg/pillar/base" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" ) type UrlCloudCfg stru...
package exec import ( "archive/tar" "errors" "fmt" "io" "os" "path" "path/filepath" "strings" "code.cloudfoundry.org/garden" "code.cloudfoundry.org/lager" "github.com/concourse/atc" "github.com/concourse/atc/creds" "github.com/concourse/atc/db" "github.com/concourse/atc/worker" ) const taskProcessID = ...
// Copyright 2019 The Cockroach Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
// This file contains the Replay type and its components which model a complete // SC:BW replay. package rep import ( "math" "sort" "time" "github.com/icza/screp/rep/repcmd" "github.com/icza/screp/rep/repcore" ) // Replay models an SC:BW replay. type Replay struct { // Header of the replay Header *Header /...
package api import ( "encoding/json" "fmt" "path" "sync" "time" ) const ( // DefaultSemaphoreSessionName is the Session Name we assign if none is provided DefaultSemaphoreSessionName = "Consul API Semaphore" // DefaultSemaphoreSessionTTL is the default session TTL if no Session is provided // when creating ...
// Copyright 2019 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. // Scavenging free pages. // // This file implements scavenging (the release of physical pages backing mapped // memory) of free and unused pages in the heap as...
/* Copyright 2019 Cisco Systems Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
package relayenv import ( "context" "fmt" "net/http" "sync" "time" "github.com/launchdarkly/ld-relay/v6/config" "github.com/launchdarkly/ld-relay/v6/internal/core/httpconfig" "github.com/launchdarkly/ld-relay/v6/internal/core/internal/events" "github.com/launchdarkly/ld-relay/v6/internal/core/internal/metric...
package parser import ( "bytes" "encoding/json" "fmt" "net/http" "reflect" "strconv" "strings" "github.com/golang/protobuf/proto" google_protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor" "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/httprule" "github.com/grpc-ecosystem/grpc-g...
package printer import ( "bytes" "io" "sort" "testing" "time" "github.com/bojand/ghz/runner" promtypes "github.com/prometheus/client_model/go" expfmt "github.com/prometheus/common/expfmt" "github.com/stretchr/testify/assert" ) func TestPrinter_printPrometheus(t *testing.T) { date := time.Now() var tests ...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package lambda 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" ) type UpdateFunctionCodeInput struct { _ struct{} `type:"structure"` // Se...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 // source: eventsourcing/v1/event.proto package v1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.g...
package main import ( "context" "errors" "fmt" "github.com/Azure/azure-sdk-for-go/profiles/latest/compute/mgmt/compute" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure/auth" "github.com/containrrr/shoutrrr" "github.com/patrickmn/go-cache" v1 "k8s.io/api/core/v1" metav1 "k...
package p2p import ( "errors" "fmt" "math/rand" "net" "time" . "github.com/tendermint/go-common" cfg "github.com/tendermint/go-config" crypto "github.com/tendermint/go-crypto" "github.com/tendermint/log15" ) const ( reconnectAttempts = 30 reconnectInterval = 3 * time.Second ) type Reactor interface { Se...
package chirp import ( "testing" ) var cmdTests = ` #must ignore comments proc sum {args} { eval expr [join $args { + }] } proc prod {args} { eval expr [join $args { * }] } must 9 [expr {4 + 5}] must 9.5 [expr {4 + 5.5}] must 15 [sum 5 4 3 2 1 0] must 213 [sum 5 [sum 2 2] [sum 1 2] 2 1 [sum 99 99]] ...
/* Package text holds models which make text classification easy. They are regular models, but take strings as arguments so you can feed in documents rather than large, hand-constructed word vectors. Although models might represent the words as these vectors, the munging of a document is hidden from the user. The simp...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: proto/types/endorsement.proto package iotextypes import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf ...
/* 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, ...
// Copyright 2021 The Matrix.org Foundation C.I.C. // // 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...
package layer import ( "context" stderrors "errors" "fmt" "io" "sort" "strconv" "strings" "time" "github.com/nspcc-dev/neofs-s3-gw/api" "github.com/nspcc-dev/neofs-s3-gw/api/data" "github.com/nspcc-dev/neofs-s3-gw/api/errors" "github.com/nspcc-dev/neofs-s3-gw/internal/misc" "github.com/nspcc-dev/neofs-sd...
package main import ( "github.com/daizi120/gorr/util" "encoding/json" "flag" "fmt" "io/ioutil" "os" "path/filepath" "strings" "time" //"syscall" ) type MoveData struct { Src string `json:"src"` Dst string `json:"dst"` } type TestCase struct { Req string `json:"req"` Rsp string `json:"rsp"` Req...
// push is the web server for pushing debian packages. package main import ( "encoding/json" "flag" "fmt" "io" "net/http" "path/filepath" "runtime" "sort" "strings" "sync" "time" "github.com/gorilla/mux" "go.skia.org/infra/go/allowed" "go.skia.org/infra/go/auth" "go.skia.org/infra/go/chatbot" "go.skia...
// Use of this source code is governed by a MIT license that can be found in the LICENSE file. // Giorgis (<EMAIL>) package avutil //#pragma GCC diagnostic ignored "-Wdeprecated-declarations" //#cgo CFLAGS: -Wdeprecated-declarations //#cgo pkg-config: libavutil //#include <libavutil/frame.h> //#include <stdlib.h> imp...
/* Copyright © 2020 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package pod import ( "bytes" "context" "fmt" "io" "strings" "time" configv1 "github.com/openshift/api/config/v1" "github.com/openshift/cluster-network-operator/pkg/apply" "github.com/pkg/errors" "github.com/vmwa...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.20.1 // protoc v3.11.2 // source: http_artifact_provider.proto package client import ( proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/prot...
package main import ( "bytes" "math/rand" "testing" "github.com/google/go-cmp/cmp" ) func TestSing99(t *testing.T) { rand.Seed(42) var buf bytes.Buffer sing99(&buf) if diff := cmp.Diff(buf.String(), expectedOutput); diff != "" { t.Errorf("output mismatch: %s", diff) } } const expectedOutput = `ninety n...
package pft // DO NOT EDIT THIS FILE. GENERATED BY xgen. import ( "bits" "mmio" "unsafe" ) type PFT_Periph struct { CLIDR RCLIDR CTR RCTR CCSIDR RCCSIDR CSSELR RCSSELR } func (p *PFT_Periph) BaseAddr() uintptr { return uintptr(unsafe.Pointer(p)) } //emgo:const var PFT = (*PFT_Periph)(unsafe.Pointer(uin...
// 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 ...