text
stringlengths
3.08k
10.4k
// Copyright Istio 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 wri...
/** * 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...
package destination import ( "errors" "strings" "time" "gocloud.dev/blob" "gitlab.com/gitlab-org/gitlab/workhorse/internal/api" "gitlab.com/gitlab-org/gitlab/workhorse/internal/config" ) // DefaultObjectStoreTimeout is the timeout for ObjectStore upload operation const DefaultObjectStoreTimeout = 4 * time.Hou...
/* 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 2011-2014 Canonical Ltd. // Licensed under the LGPLv3, see LICENCE file for details. package zip import ( "archive/zip" "bytes" "fmt" "io" "os" "path" "path/filepath" "strings" ) // FindAll returns the cleaned path of every file in the supplied zip reader. func FindAll(reader *zip.Reader) ([]str...
/* Copyright 2016 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 model import ( "errors" "fmt" "os/exec" "time" "github.com/gitran-com/gitran-server/config" "github.com/gitran-com/gitran-server/constant" "github.com/gitran-com/gitran-server/util" log "github.com/sirupsen/logrus" "gorm.io/gorm" ) var ( ProjMutexMap = util.NewMutexMap() ) //Project means project ...
package sm import ( "context" "encoding/json" "fmt" "net/http" "net/url" "strconv" ) type RequestAttachmentService struct{ client *Client } func (r *RequestAttachmentService) Gets(ctx context.Context, issueKeyOrID string, start, limit int) (result *RequestAttachmentPageScheme, response *Response, err error) { ...
package transport // __ // .-----.-----.______.-----.----.-----.--.--.--.--.______.----.---.-.----| |--.-----. // | _ | _ |______| _ | _| _ |_ _| | |______| __| _ | __| | -__| // |___ |_____| | __|__| |_____|__.__|_...
package main import ( "log" "net/http" "strings" "regexp" "github.com/sadbox/mediawiki" "github.com/shiyou0130011/p2mfmt" "github.com/PuerkitoBio/goquery" ) func editPage(success chan bool, puki string, title string, changeTitle bool, client *mediawiki.MWApi) { if title == "" { log.Print("Error: Title i...
// To run this program: go generate // // (the go:generate line is in gen.go/gen_go1.17.go/gen_go1.18.go) // //go:build generate && go1.18 // +build generate,go1.18 package main import ( "fmt" "go/ast" "go/parser" "go/token" "log" "os" "runtime" "sort" "strconv" "strings" "github.com/dolmen-go/codegen" ) ...
package ip2service import ( "crypto/sha256" "encoding/base32" "fmt" "sort" "strconv" "strings" "github.com/pkg/errors" "go.uber.org/zap" ) const ( natTable = "nat" preroutingChain = "PREROUTING" prefixTarget = "-TARGET-" prefixRelay = "-RELAY-" maxChainNameLength = 28 ) var ( hashSep = ...
package service import ( "bytes" "context" "encoding/base64" "encoding/json" "fmt" "strconv" "strings" "time" "github.com/pkg/errors" pb "github.com/tkeel-io/tkeel/api/entity/v1" dapr "github.com/dapr/go-sdk/client" "github.com/google/uuid" "github.com/tkeel-io/kit/log" "google.golang.org/protobuf/typ...
// This code is available on the terms of the project LICENSE.md file, // also available online at https://blueoakcouncil.org/license/1.0.0. package webserver import ( "context" "encoding/hex" "fmt" "net/http" "decred.org/dcrdex/dex" "decred.org/dcrdex/dex/order" "github.com/go-chi/chi" ) type ctxID int con...
package sync import ( "context" "testing" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" "github.com/stretchr/testify/assert" wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" fakewfclientset "github.com/argoproj/argo-workflows/v3/pkg/client/clients...
package main import ( "context" "fmt" notespb "github.com/opendroid/gcp_go_funcs/grpc_tests/notes" "google.golang.org/protobuf/types/known/timestamppb" "sync" "time" ) // Define notes server type notesServer struct { notespb.UnimplementedNotesServiceServer } // Location a mapper for notespb.Location type Loca...
package command import ( "encoding/json" "flag" "fmt" "os" "queueman/libs/config" "queueman/libs/constant" "queueman/libs/queue/redis" "queueman/libs/statistic" "strings" "github.com/marknown/oredis" ) // Args is command argv type Args struct { ConfigFile string Help bool Test bool Stats ...
// Copyright 2013 The Gorilla WebSocket 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 web import ( "encoding/json" "fmt" "math" "regexp" "strconv" log "github.com/sirupsen/logrus" ) // Hub maintains the set of acti...
package main import ( "context" "encoding/json" "flag" "fmt" "github.com/go-pg/pg/v10/orm" "log" "math/rand" "net/http" "os" "os/signal" "syscall" "time" "github.com/go-pg/pg/v10" "github.com/prometheus/client_golang/prometheus/promhttp" ) const ( maxShutdownTime = 10 * time.Second countFakeUsers = ...
// 🚀 Fiber is an Express inspired web framework written in Go with 💖 // 📌 API Documentation: https://fiber.wiki // 📝 Github Repository: https://github.com/gofiber/fiber package logger import ( "fmt" "io" "os" "strconv" "strings" "sync" "time" "github.com/gofiber/fiber" "github.com/valyala/bytebufferpool...
package libgogo import ( "bufio" "io/ioutil" "log" "net" "net/http" "os" "path/filepath" "strconv" "strings" ) type Server struct { sock net.Listener addr string port int host string root string strict bool blocklist []string logger *log.Logger } /* * Returns a new Se...
// This package has utilities to deal with the several sources of configuration for the supervisor package config import ( "encoding/json" "io/ioutil" "log" "os" "reflect" "strconv" "github.com/resin-io/resin-supervisor/gosuper/supermodels" ) // Default location of the UserConfig config.json const DefaultConf...
// Copyright 2020 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 2018 Turbine Labs, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
package randomizer import ( "fmt" "gopkg.in/yaml.v2" ) // a prenode is the precursor to a graph node; its parents can be either // strings (the names of other prenodes) or other prenodes. the main difference // between a prenode and a graph node is that prenodes are trees, not graphs. // string references to other...
package service import ( "crypto/md5" "dev-tools/dao" "dev-tools/datasource" "dev-tools/entity" "encoding/hex" "fmt" "sync" ) // 数据库版本管理 var ( dbVersionServiceOnce sync.Once dbVersionServiceInstance DbVersionService ) type DbVersionService interface { UserLogin(parma entity.UserEntity) *entity.UserEnti...
/* * Copyright (c) 2021 Baidu, 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...
// Copyright (c) 2020-2021, <NAME> (<EMAIL>) // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this // list of ...
package main import ( "math" "math/rand" "testing" ) func tinyNetwork() Network { input := &Input{1, 2, "input", nil} dense := MakeDense(input, 2, Sigmoid, SigmoidDerivative, "dense1") output := MakeDense(dense, 1, Sigmoid, SigmoidDerivative, "dense_output") return Network{ output, input, } } func oneHi...
package src import ( "github.com/seccom/kpass/src/api" "github.com/seccom/kpass/src/auth" "github.com/seccom/kpass/src/bll" "github.com/seccom/kpass/src/ctl" "github.com/seccom/kpass/src/service" "github.com/teambition/gear" ) func noOp(ctx *gear.Context) error { return gear.ErrNotFound.WithMsg("noOp") } func...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package servicecatalog import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type ProvisionProductInput struct { _ struct{} `type:"structure"` // The language code. // // * en - E...
package api import ( "../util" "../logger" "../database" "../config" "../jwt" "encoding/json" "net/http" "bytes" "sort" "fmt" //"os" ) type Result struct { Answer_Count int `json:"answer_count"` Plan_Name string `json:"plan_name"` Day []string `json:"day"` Genre []string `json:"genre"` Area []string `...
/* Copyright 2021 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package apply import ( "context" "fmt" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-plugin" "github.com/lyraproj/hiera/lookup" "github.com/lyraproj/hiera/provider" "github.com/lyraproj/lyra/cmd/lyra/ui" "github.com/lyraproj/lyra/pkg/loader" "github.com/lyraproj/lyra/pkg/logger" "github.com/lyrapr...
package kitkafka import ( "context" "math/rand" "time" "github.com/go-kit/kit/endpoint" "github.com/oklog/run" "github.com/segmentio/kafka-go" ) // HandleFunc is a functional Handler. type HandleFunc func(ctx context.Context, msg kafka.Message) error // Handle deals with the kafka.Message in some way. func (h...
// Copyright (c) Microsoft and contributors. All rights reserved. // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. package main import ( "context" "fmt" "io/ioutil" "os" "path" "regexp" "strings" kv "github.com/Azure/azure-sdk-fo...
// *** 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 datashare import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information abo...
package engine import ( "fmt" "log" "sync" "time" "github.com/globalsign/mgo" "github.com/globalsign/mgo/bson" "github.com/signaux-faibles/opensignauxfaibles/lib/base" "github.com/spf13/viper" ) // DB type centralisant les accès à une base de données type DB struct { DB *mgo.Database DBStatus *mgo.Da...
package main import ( "time" "github.com/gorilla/websocket" "github.com/tehmoon/errors" "github.com/spf13/pflag" "sync" "crypto/tls" "log" "bytes" "text/template" ) func init() { MODULELIST.Register("websocket", "Connect using the websocket protocol", NewWebsocket) } type Websocket struct { url string in...
// Copyright 2019 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...
/* * Copyright (c) 2019 Nike, 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 agree...
package types import ( "fmt" "sort" "time" "github.com/go-playground/validator/v10" ) // Route holds configuration of a route // // Field validation (binding) is done using https://godoc.org/github.com/go-playground/validator type ( Route struct { // Name of route (not changable) Name string `binding:"requi...
/* Copyright 2018 the Velero 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 applicable law or agreed to in writing,...
package blockstorage // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "time" "golang.org/x/net/context" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/clien...
/* * 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 walker import ( "errors" "fmt" "strings" "github.com/flyx/net/html" ) // NodeHandler is a handler that processes a specific kind of node. type NodeHandler interface { // processes the node. if descend is true, the walker will descend into the // node's children afterwards. // // if replacement is not...
// Copyright (c) 2013-2014 The btcsuite developers // Copyright (c) 2015 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package database_test import ( "bytes" "compress/bzip2" "encoding/gob" "fmt" "os" "path/filepath" "testing" "github...
// Package file implements a simple file storage layer for an index to operate on. // The Store object implements the store.Storer interface, which is used by higher level index constructs. // Note: in log file an entry is represented as -> <size><data> // where size is a uint32 encoded in little endian to 4 bytes, sto...
package task import ( "context" "fmt" "net" "sync" "time" "github.com/aos-dev/go-toolbox/natszap" "github.com/aos-dev/go-toolbox/zapcontext" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap" grpc_recovery "github.com/grpc-ecosy...
package clustering import ( "io" "log" "time" "github.com/hashicorp/memberlist" "github.com/pkg/errors" ) // PrintingEventDelegate prints out events to the standard logger. type PrintingEventDelegate struct{} // NotifyJoin is invoked when a node is detected to have joined. // The Node argument must not be modi...
package cst import ( "context" "fmt" "github.com/ipfs/go-cid" "github.com/ipfs/go-hamt-ipld" "github.com/pkg/errors" "github.com/filecoin-project/go-filecoin/actor" "github.com/filecoin-project/go-filecoin/address" "github.com/filecoin-project/go-filecoin/chain" "github.com/filecoin-project/go-filecoin/cons...
// USB device mode support // https://github.com/f-secure-foundry/tamago // // Copyright (c) F-Secure Corporation // https://foundry.f-secure.com // // Use of this source code is governed by the license // that can be found in the LICENSE file. package usb import ( "encoding/binary" "fmt" "log" "github.com/f-sec...
package repository import ( "context" "errors" "github.com/FlipAppDev/FlipServer/server/internal/app/adapter" "github.com/FlipAppDev/FlipServer/server/internal/domain" "github.com/FlipAppDev/FlipServer/server/internal/domain/model" "github.com/FlipAppDev/FlipServer/server/internal/domain/types" "github.com/goo...
//go:generate file2byteslice -package=images -input=images/survivor1_gun.png -output=./images/survivor.go -var=Survivor_png //go:generate file2byteslice -package=images -input=images/zombie1_hold.png -output=./images/zombie1.go -var=Zombie1_png //go:generate file2byteslice -package=sound -input=sound/all.mp3 -output=....
package websocket import ( "fmt" "net/http" "time" "github.com/gorilla/websocket" gonanoid "github.com/matoous/go-nanoid" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "n.eko.moe/neko/internal/config" "n.eko.moe/neko/internal/session" "n.eko.moe/neko/internal/webrtc" ) func New(sessions *session.Ses...
package sharding import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "strings" "time" "github.com/allegro/akubra/log" "github.com/allegro/akubra/metrics" "github.com/allegro/akubra/storages" "github.com/allegro/akubra/types" "github.com/serialx/hashring" ) const ( noTimeoutReg...
package testutils import ( "bytes" "context" "errors" "fmt" "math/rand" "net/url" "sort" "time" "github.com/treeverse/lakefs/pkg/catalog" "github.com/treeverse/lakefs/pkg/graveler" "github.com/treeverse/lakefs/pkg/ingest/store" "github.com/treeverse/lakefs/pkg/testutil" ) type FakeValueIterator struct { ...
package acceptance_test import ( "bytes" "fmt" "io" "io/ioutil" "math/rand" "net/http" "net/url" "os" "strconv" "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" "github.com/cloudfoundry-incubator/cf-test-helpers/cf" "github.com/cloudfoundry-incubator/cf-tes...
package runconfig import ( "strings" "github.com/docker/docker/engine" "github.com/docker/docker/nat" "github.com/docker/docker/pkg/ulimit" "github.com/docker/docker/utils" ) type NetworkMode string // IsPrivate indicates whether container use it's private network stack func (n NetworkMode) IsPrivate() bool { ...
package topics import ( "encoding/json" "fmt" "io" "io/ioutil" "log" "net/http" "os" "github.com/OnitiFR/mulch/cmd/mulch/client" "github.com/OnitiFR/mulch/common" "github.com/spf13/cobra" ) type sshConfigCmdDataStruct struct { hostname string vmList *common.APIVMListEntries privKeyPath string a...
package broker import ( "encoding/json" "net" "sync" cellaserv "github.com/evolutek/cellaserv3-protobuf" "github.com/evolutek/cellaserv3/broker/cellaserv/api" "github.com/evolutek/cellaserv3/common" "github.com/golang/protobuf/proto" log "github.com/sirupsen/logrus" ) // client represents a single connnectio...
package toushi import ( "context" "encoding/json" "errors" "fmt" "io" "mime/multipart" "net/http" "os" "strconv" "strings" "github.com/julienschmidt/httprouter" ) // ErrNoToken is returned when a token is not found in the request var ErrNoToken = errors.New("no token") // FormFile returns the first file ...
// Copyright 2018 <NAME> // Copyright 2015 The Prometheus 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 ap...
package util import ( //"encoding/base64" "fmt" "github.com/gocraft/web" txgen "hyperledger.abchain.org/chaincode/lib/txgen" "hyperledger.abchain.org/core/crypto" txutil "hyperledger.abchain.org/core/tx" "net/http" "time" ) type FabricRPCCore struct { *FabricRPCBase *txgen.TxGenerator ActivePrivk crypto.Si...
// Copyright (C) 2016-Present Pivotal Software, Inc. All rights reserved. // This program and the accompanying materials are made available under the terms of the 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 Licen...
// // Go-FTL // // Copyright (C) <NAME>, 2014-2016 // // Do not remove the following lines - used in auto-update. // Version: 0.5.9 // BuildNo: 1811 // FileId: 1198 // // -------------------------------------------------------------------------------------------------------------------------- // Really simple file ser...
// Package texture provides classes for creating and storing images and textures. package texture import ( "fmt" "github.com/adrianderstroff/pbr/pkg/view/image/image2d" gl "github.com/adrianderstroff/pbr/pkg/core/gl" ) // Texture holds no to several images. type Texture struct { handle uint32 target uint32 te...
// Code generated by go-swagger; DO NOT EDIT. package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "bytes" "encoding/json" "strconv" strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" "gi...
package app import ( "encoding/csv" "fmt" "os" "time" ) type Scenario struct { SrcFW string `json:"SrcFW"` SrcVLAN string `json:"SrcVLAN"` SrcAddress []string `json:"SrcAddress"` SrcNATAddress string `json:"SrcNATAddress"` SrcIntf st...
/* Copyright © 2020 esakat <<EMAIL>> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
package model import xtime "go-common/library/time" const ( // BusinessOpenState . BusinessOpenState = 1 // BusinessOpenType . BusinessOpenType = 1 // UserRoleDefaultVal . UserRoleDefaultVal = -1 // UserOnState . UserOnState = 1 // UserOffState . UserOffState = 0 ) // Business . type Business struct { ID ...
package main import ( "fmt" "os" "time" docopt "github.com/docopt/docopt-go" "github.com/mitchellh/mapstructure" "github.com/FuzzyMonkeyCo/monkey/pkg/as" "github.com/FuzzyMonkeyCo/monkey/pkg/code" ) type params struct { Env, Fmt, Fuzz, Lint, Logs, Schema bool Pastseed bool Update...
package exporter import ( "crypto/tls" "crypto/x509" "errors" "fmt" "io/ioutil" "log" "net/url" "os" "strconv" "strings" "github.com/hashicorp/go-multierror" "github.com/prometheus/client_golang/prometheus" "gopkg.in/ldap.v2" ) const ( baseDN = "cn=Monitor" opsBaseDN = "cn=Operations,cn=Monitor" ...
/* * Copyright (c) 2021 Baidu, 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...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the Li...
// Package traceroute provides functions for executing a tracroute to a remote // host. package traceroute import ( "errors" "fmt" "net" "syscall" "time" ) const DEFAULT_PORT = 33434 const DEFAULT_MAX_HOPS = 64 const DEFAULT_TIMEOUT_MS = 500 const DEFAULT_RETRIES = 3 const DEFAULT_PACKET_SIZE = 52 // Return the...
/* Copyright 2021 The Dapr 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 d...
package cf import ( "encoding/json" ) type VolumeMount struct { VolumeID string `json:"volume_id"` MountDir string `json:"mount_dir"` } type DesiredLRP struct { ProcessGUID string `json:"process_guid"` Instances int32 `json:"instances"` Routes map[string]json.Raw...
//go:build integration // +build integration package gcloudcx_test import ( "context" "fmt" "reflect" "strings" "testing" "time" "github.com/gildas/go-core" "github.com/gildas/go-logger" "github.com/google/uuid" "github.com/joho/godotenv" "github.com/stretchr/testify/suite" "github.com/gildas/go-gcloudc...
/* Copyright 2018 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
/* * Copyright © 2015-2018 <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 o...
package storage import ( "database/sql" "errors" ethereum "github.com/ethereum/go-ethereum/common" "github.com/jmoiron/sqlx" "github.com/lib/pq" "go.uber.org/zap" "github.com/KyberNetwork/reserve-stats/app-names/common" "github.com/KyberNetwork/reserve-stats/lib/caller" "github.com/KyberNetwork/reserve-stat...
// Copyright 2019 Copyright (c) 2019 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 complian...
// Package handler is the handler for the `micro debug stats` service package handler import ( "context" "sync" "time" "github.com/micro/go-micro/v2/client" "github.com/micro/go-micro/v2/config/cmd" debug "github.com/micro/go-micro/v2/debug/service/proto" "github.com/micro/go-micro/v2/errors" "github.com/micr...
// Package flags implements common flags used across multiple commands // and backends. package flags import ( "os" flag "github.com/spf13/pflag" "github.com/spf13/viper" ) const ( // CfgDebugDontBlameOasis is the flag used to opt-in to unsafe/debug/test // behavior. CfgDebugDontBlameOasis = "debug.dont_blame_...
/* * Copyright 1999-2020 Alibaba Group Holding 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 applicab...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the Li...
// // Copyright (C) 2019-2021 vdaas.org vald team <<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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by a...
package glogs import ( "context" "fmt" "go.uber.org/zap" "gorm.io/gorm/logger" "time" "gorm.io/gorm/utils" ) var SqlLogger = "sql_logger" func Default(writer *zap.Logger, level logger.LogLevel) logger.Interface { var config = logger.Config{ SlowThreshold: 200 * time.Millisecond, LogLevel: level, 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 law or agreed to in writing, software // distri...
package BlocoC import ( "github.com/bussoladesenvolvimento/parse-efd-fiscal/Models/Bloco0" "github.com/bussoladesenvolvimento/parse-efd-fiscal/tools" "github.com/jinzhu/gorm" "time" ) // Estrutura criada usando layout Guia Prático EFD-ICMS/IPI – Versão 2.0.20 Atualização: 07/12/2016 // Estrutura do registro C100 ...
package openfaas import ( "bytes" "fmt" "github.com/faasflow/runtime" "github.com/faasflow/runtime/controller/util" "io/ioutil" "log" "net/http" "net/url" "os" "path" "strings" faasflow "github.com/faasflow/lib/openfaas" sdk "github.com/faasflow/sdk" "github.com/faasflow/sdk/executor" "handler/config" ...
package configs import ( "fmt" "io/ioutil" "time" "github.com/iGeeky/open-account/pkg/baselib/cache" "github.com/iGeeky/open-account/pkg/baselib/log" "gopkg.in/yaml.v2" ) // CORS 跨域请求配置参数 type CORS struct { Enable bool `yaml:"enable"` AllowOrigins string `yaml:"allow_origins"` AllowMethods ...
package main import ( "fmt" "net/url" "unsafe" ) type Address struct { Address string Zip float64 } type User struct { Name string Age int32 Ahel bool Test float64 Address Address } //type Error struct { // errCode uint8 //} // //func checkError(err error) { // fmt.Println(&err == nil) //...
package specs import ( "fmt" "math/rand" "os" "path" "testing" "github.com/sha1n/bert/api" "github.com/sha1n/gommons/pkg/test" "github.com/stretchr/testify/assert" "gopkg.in/yaml.v2" ) func TestLoadJson(t *testing.T) { testLoad(t, "../../test/data/spec_test_load.json") } func TestLoadYaml(t *testing.T) { ...
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package pargzip contains a parallel gzip writer implementation. By // compressing each chunk of data in parallel, all the CPUs on the // machine can be used...
package ui import ( "github.com/inkyblackness/shocked-client/ui/events" ) // RenderFunction is called when an area wants to render its content. type RenderFunction func(*Area) // EventHandler is called for events dispatched to the area. type EventHandler func(*Area, events.Event) bool // Area specifies one rectang...
// +build darwin package host import ( "bytes" "encoding/binary" "io/ioutil" "os" "os/exec" "runtime" "strconv" "strings" "time" "unsafe" "../internal/common" "../process" "log" "regexp" "errors" ) // from utmpx.h const USER_PROCESS = 7 func Info() (*InfoStat, error) { ret := &InfoStat{ OS: ...
package argocd import ( "context" "fmt" "os" "reflect" v1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" argop...
// 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 u...