CombinedText
stringlengths
4
3.42M
package models type CreateRequest struct { SenderPubKey []byte SenderOutput string } type CreateResponse struct { ID string Timeout int64 Fee int64 ReceiverPubKey []byte ReceiverOutput string FundingAddress string } type OpenRequest struct { ID string TxID string Vout uint32 SenderSig []byte } ...
// Copyright 2016, Google Inc. // 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, this list of conditions ...
package orchestrators import ( "bytes" "encoding/base64" "encoding/json" "fmt" "io" "io/ioutil" "math/rand" "net" "net/http" "net/url" "regexp" "sort" "strings" "time" "unicode/utf8" "github.com/camptocamp/bivac/pkg/volume" //"github.com/rancher/go-rancher-metadata/metadata" "github.com/rancher/go-r...
package trafcacc import ( "encoding/binary" "errors" "sync" "sync/atomic" "time" "github.com/Sirupsen/logrus" ) type cmd uint8 const ( data cmd = iota close closed connect connected ping pong rqu ack ) type packet struct { Senderid uint32 Connid uint32 Seqid uint32 Buf []byte Cmd ...
package v8 /* #include "v8_wrap.h" */ import "C" import "unsafe" type embedable struct { data interface{} } func (this embedable) GetPrivateData() interface{} { return this.data } func (this *embedable) SetPrivateData(data interface{}) { this.data = data } func GetVersion() string { return C.GoString(C.V8_GetV...
package repo import ( "bufio" "context" "fmt" "regexp" "strings" "time" "unicode" "github.com/blevesearch/segment" "github.com/google/go-github/v33/github" "github.com/google/pullsheet/pkg/ghcache" "github.com/peterbourgon/diskv" "k8s.io/klog/v2" ) var notSegmentRe = regexp.MustCompile(`[/-_]+`) // Revi...
// Copyright 2016 The kube-etcd-controller 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...
package collector import ( "database/sql" _ "github.com/mattn/go-sqlite3" "io/ioutil" . "launchpad.net/gocheck" "os" "path/filepath" "testing" ) func Test(t *testing.T) { TestingT(t) } type S struct{ db *sql.DB } var _ = Suite(&S{}) func (s *S) SetUpSuite(c *C) { s.db, _ = sql.Open("sqlite3", "./tsuru.db"...
// Copyright 2015 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...
// Package listing is a generate subcommand that scans // requested directory and generates a .go file with // a list of all found files. package listing import ( "os" "path/filepath" "github.com/anonx/sunplate/command" "github.com/anonx/sunplate/generation/output" "github.com/anonx/sunplate/log" p "github.com/...
// Copyright 2017 The nvim-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 commands import ( "bytes" "fmt" "io/ioutil" "log" "os" "os/exec" "path/filepath" "strings" "time" "nvim-go/config" "nvim-go/internal/c...
// Copied and modified from sigar_linux.go. package gosigar import ( "io/ioutil" "runtime" "strconv" "strings" "unsafe" ) /* #include <sys/param.h> #include <sys/mount.h> #include <sys/ucred.h> #include <sys/types.h> #include <sys/sysctl.h> #include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <t...
// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. // // Contributor: Julien Vehent jvehent@mozilla.com [:ulfr] package signer // import "go.mozilla.org/autograph/signe...
package genericoauth_test import ( "net/http" "code.cloudfoundry.org/lager/lagertest" "golang.org/x/oauth2" "github.com/concourse/atc/auth/genericoauth" "github.com/concourse/atc/auth/provider" "github.com/concourse/atc/db" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("Generic ...
/* dnsserver.go * * Copyright (C) 2016 Alexandre ACEBEDO * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ package servers import ( "errors" "fmt" "github.com/aacebedo/dnsdock/src/utils" "github.com/miekg/dns" "net" "regexp" "str...
package web import ( "encoding/json" "fmt" "net/http" "net/url" "sort" "strconv" "strings" "github.com/MiniProfiler/go/miniprofiler" "github.com/StackExchange/scollector/opentsdb" ) func Query(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) { ts := make(opentsdb.TagSet) tags := strings.Split...
// The MIT License (MIT) // // Copyright (c) 2016 Alexey Derbyshev // // 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...
package main import ( "sync" ) type Backends struct { Length int current int Addresses []string sync.Mutex } func NewBackends() *Backends { addresses := []string{} current := 0 length := 0 return &Backends{ Length: length, current: current, Addresses: addresses, } } func (self *Backends)...
package gitstats import ( "fmt" "log" "time" "github.com/google/go-github/github" "github.com/intelsdi-x/snap/control/plugin" "github.com/intelsdi-x/snap/control/plugin/cpolicy" "github.com/intelsdi-x/snap/core" "github.com/intelsdi-x/snap/core/ctypes" "golang.org/x/oauth2" ) const ( // Name of plugin Nam...
package engine import ( "encoding/base64" "errors" "net/url" "time" "github.com/keybase/client/go/kex2" "github.com/keybase/client/go/libkb" keybase1 "github.com/keybase/client/go/protocol" rpc "github.com/keybase/go-framed-msgpack-rpc" jsonw "github.com/keybase/go-jsonw" "golang.org/x/net/context" ) // Ke...
package entities import ( "crypto/sha1" "errors" "fmt" db "github.com/fclairamb/m2mp/go/m2mp-db" "github.com/gocql/gocql" "log" "time" ) const ( DEVICE_NODE_PATH = "/device/" DEVICE_BY_IDENT_NODE_PATH = DEVICE_NODE_PATH + "by-ident/" DEVICE_DEFAULT_NODE_PATH = "/device/default/" ) // Device type ...
package main import ( "errors" "fmt" "log" "sync" "time" "github.com/dgryski/go-tsz" ) var serverStart uint32 var statsPeriod time.Duration func init() { serverStart = uint32(time.Now().Unix()) statsPeriod = time.Duration(1) * time.Second } // AggMetric takes in new values, updates the in-memory data and s...
// Copyright 2015 Davis Webb // Copyright 2015 Luke Shumaker // Copyright 2015 Guntas Grewal package store import ( "github.com/jinzhu/gorm" he "httpentity" "httpentity/util" // heutil "io" "jsonpatch" "periwinkle/util" // putil "strings" ) var _ he.Entity = &Group{} var _ he.NetEntity = &Group{} var dirGroup...
// +build linux /* directory structure . |-- repositoryName |-- scratch |-- shardNum // the read-only read created on InitRepository, this is where to start branching |-- commitID |-- shardNum // this is where subvolumes are */ package btrfs import ( "bufio" "bytes" "fmt" "io" "io/iou...
package tokay import ( "bytes" "github.com/valyala/fasthttp" ) // RouterGroup represents a group of routes that share the same path prefix. type RouterGroup struct { path string engine *Engine handlers []Handler } // newRouteGroup creates a new RouterGroup with the given path, engine, and handlers. func ...
// 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. // The printer package implements printing of AST nodes. package printer import ( "bytes" "fmt" "go/ast" "go/token" "io" "os" "path" "runtime" "tabwri...
// Copyright 2011 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. // HTTP client implementation. See RFC 2616. // // This is the low-level Transport implementation of RoundTripper. // The high-level interface is in client.go. ...
// Copyright 2011 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. // HTTP client implementation. See RFC 2616. // // This is the low-level Transport implementation of RoundTripper. // The high-level interface is in client.go....
// Copyright 2011 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. // HTTP client implementation. See RFC 2616. // // This is the low-level Transport implementation of RoundTripper. // The high-level interface is in client.go. ...
package nvim import ( "bytes" "errors" "fmt" "log" "os" "os/exec" "path/filepath" "reflect" "runtime" "sort" "strconv" "strings" "sync/atomic" "testing" ) type version struct { Major int Minor int Patch int } var ( channelID int64 nvimVersion version ) func parseVersion(tb testing.TB, version s...
// Copyright 2017 The Serulian Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package grok import ( "fmt" "log" "github.com/serulian/compiler/compilercommon" "github.com/serulian/compiler/compilerutil" "github.com/serulian/co...
package bundlecollection import boshsys "bosh/system" // e.g. Job, Package type BundleDefinition interface { BundleName() string BundleVersion() string } // BundleCollection is responsible for managing multiple bundles // where bundles can be installed and then enabled. // e.g. Used to manage currently installed/e...
// Package b2 provides an interface to the Backblaze B2 object storage system package b2 // FIXME should we remove sha1 checks from here as rclone now supports // checking SHA1s? import ( "bufio" "bytes" "crypto/sha1" "fmt" gohash "hash" "io" "net/http" "path" "regexp" "strconv" "strings" "sync" "time" ...
package backend import ( "fmt" "github.com/Monnoroch/golfstream/errors" "github.com/Monnoroch/golfstream/stream" "github.com/siddontang/ledisdb/config" "github.com/siddontang/ledisdb/ledis" "log" "os" "sync" ) type ledisListStream struct { db *ledis.DB key []byte num int32 s int32 l ...
// 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 writing...
/* Copyright 2014 Huawei Technologies Co., Ltd. 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 la...
package sobjects // Base struct that contains fields that all objects, standard and custom, include. type BaseSObject struct { Attributes SObjectAttributes `json:"-" force:"attributes,omitempty"` Id string `force:",omitempty"` IsDeleted bool `force:",omitempty"` N...
// Copyright 2017 HenryLee. 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 ...
package ydls import ( "context" "fmt" "io" "io/ioutil" "log" "net/http" "os" "sort" "strings" "sync" "github.com/wader/ydls/ffmpeg" "github.com/wader/ydls/id3v2" "github.com/wader/ydls/rereader" "github.com/wader/ydls/stringprioset" "github.com/wader/ydls/timerange" "github.com/wader/ydls/writelogger"...
package sdl // #include <SDL2/SDL_events.h> import "C" import "unsafe" import "reflect" import "fmt" const ( FIRSTEVENT = 0 QUIT = 0x100 APP_TERMINATING = 0x101 APP_LOWMEMORY = 0x102 APP_WILLENTERBACKGROUND = 0x103 APP_DIDENTERBACKGROUND = 0x104 APP_WILLENTERFOREGROUND = 0x105 APP_DIDENTERFOREGROU...
/* cli is a simple package to allow a game to render to the screen and be interacted with. It's intended primarily as a tool to diagnose and play around with a game while its moves and logic are being defined. */ package cli import ( "github.com/jkomoros/boardgame" "github.com/nsf/termbox-go" "strings" ) //Contr...
// Copyright (c) 2017 Qian Qiao // // 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...
/* * Clifford.go, part of gochem. * * * Copyright 2012 Janne Pesonen <janne.pesonen{at}helsinkiDOTfi> * and Raul Mera <rmera{at}chemDOThelsinkiDOTfi> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free...
package handler import ( "bytes" "encoding/json" "io" "io/ioutil" "log" "net/http" "runtime/debug" "time" "github.com/TimothyYe/godns" "golang.org/x/net/proxy" ) // CloudflareHandler struct definition type CloudflareHandler struct { Configuration *godns.Settings API string } // DNS api respons...
// +build solaris package mlock import ( "syscall" "golang.org/x/sys/unix" ) func init() { supported = true } func lockMemory() error { // Mlockall prevents all current and future pages from being swapped out. return unix.Mlockall(syscall.MCL_CURRENT | syscall.MCL_FUTURE) } `go f...
package config_test import ( "encoding/json" "io/ioutil" "os" "time" cfg "github.com/cloudfoundry/cf-acceptance-tests/helpers/config" . "github.com/cloudfoundry/cf-acceptance-tests/helpers/validationerrors" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) type requiredConfig struct { // required Ap...
package main import ( "qmsk.net/clusterf/config" "qmsk.net/clusterf/clusterf" "flag" "log" "os" ) var ( filesConfig config.FilesConfig etcdConfig config.EtcdConfig ipvsConfig clusterf.IpvsConfig ipvsConfigPrint bool ) func init() { flag.StringVar(&filesConfig.Path, "config-p...
package cmd // filesCmdGroup represents the instances command import ( "encoding/json" "errors" "fmt" "os" "text/tabwriter" "github.com/cozy/cozy-stack/client" "github.com/cozy/cozy-stack/pkg/config" "github.com/cozy/cozy-stack/pkg/consts" "github.com/spf13/cobra" ) var errAppsMissingDomain = errors.New("Mi...
package cmd import ( "fmt" "strings" "github.com/dtan4/valec/aws" "github.com/dtan4/valec/util" "github.com/pkg/errors" "github.com/spf13/cobra" ) // dumpCmd represents the dump command var dumpCmd = &cobra.Command{ Use: "dump NAMESPACE", Short: "Dump secrets in dotenv format", RunE: doDump, } var dumpO...
package cmd import ( "encoding/json" "fmt" "strings" "github.com/akerl/prospectus/checks" "github.com/spf13/cobra" ) var listCmd = &cobra.Command{ Use: "list", Short: "list checks", RunE: listRunner, } func init() { rootCmd.AddCommand(listCmd) f := listCmd.Flags() f.Bool("json", false, "Print output ...
package cmd import ( "io" "strings" "os" "github.com/containerum/chkit/cmd/util" "github.com/containerum/chkit/pkg/client" "gopkg.in/urfave/cli.v2" ) var logsCommandAliases = []string{"log"} var commandLogs = &cli.Command{ Name: "logs", Aliases: logsCommandAliases, Description: `View pod logs`, ...
package main import ( "fmt" "github.com/urfave/cli" "github.com/zrepl/zrepl/jobrun" "github.com/zrepl/zrepl/rpc" "github.com/zrepl/zrepl/sshbytestream" "github.com/zrepl/zrepl/zfs" "io" "log" "os" "runtime/debug" "sync" "time" ) type Logger interface { Printf(format string, v ...interface{}) } var conf ...
//go:build ignore // +build ignore /* * Copyright (c) 2021 The GoPlus Authors (goplus.org). 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.apa...
// Package cmd defines and implements command-line commands and flags // used by Ayi. Commands and flags are implemented using Cobra. // it is generated by cobra https://github.com/spf13/cobra/tree/master/cobra // and modified following https://github.com/spf13/hugo/blob/master/commands/hugo.go package cmd import ( "...
// Copyright © 2017 NAME HERE <EMAIL ADDRESS> // // 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 ...
/* * 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 cmd import ( "bytes" "fmt" "io/ioutil" "os" "github.com/Sirupsen/logrus" "github.com/spf13/cobra" "gopkg.in/yaml.v2" "github.com/emc-advanced-dev/unik/pkg/config" "github.com/emc-advanced-dev/unik/pkg/types" ) var clientConfigFile, host string var port int var RootCmd = &cobra.Command{ Use: "un...
// // Copyright 2015 Gregory Trubetskoy. 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...
// Copyright 2022 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 ...
package orm import "gopkg.in/mgo.v2/bson" import "github.com/lfq7413/tomato/utils" import "regexp" import "strings" // transformKey 把 key 转换为数据库中保存的格式 func transformKey(schema *Schema, className, key string) string { k, _ := transformKeyValue(schema, className, key, nil, nil) return k } // transformKeyValue 把传入的键值...
// // Copyright 2015 Gregory Trubetskoy. 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...
// Copyright © 2020 Karim Radhouani <medkarimrdi@gmail.com> // // 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 © 2016 See CONTRIBUTORS <ignasi.fosch@gmail.com> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by...
package cmd import ( "fmt" "github.com/dtan4/valec/aws" "github.com/dtan4/valec/msg" "github.com/dtan4/valec/secret" "github.com/dtan4/valec/util" "github.com/pkg/errors" "github.com/spf13/cobra" ) // syncCmd represents the sync command var syncCmd = &cobra.Command{ Use: "sync SECRETDIR [NAMESPACE]", Shor...
// Copyright 2016 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...
// Copyright © 2017 Compose, an IBM Company // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
package cmd import ( "encoding/json" "os" "path" "github.com/containerum/chkit/pkg/chkitErrors" kubeClientModels "git.containerum.net/ch/kube-client/pkg/model" "github.com/BurntSushi/toml" "github.com/containerum/chkit/pkg/client" "github.com/containerum/chkit/pkg/model" "github.com/sirupsen/logrus" "gopkg...
package solver import ( "bufio" "fmt" "io" "strconv" "strings" ) // ParseSlice parse a slice of slice of lits and returns the equivalent problem. // The argument is supposed to be a well-formed CNF. func ParseSlice(cnf [][]int) *Problem { var pb Problem for _, line := range cnf { switch len(line) { case 0:...
package solver import ( "fmt" "sort" "strings" "time" ) const ( initNbMaxClauses = 2000 // Maximum # of learned clauses, at first. incrNbMaxClauses = 300 // By how much # of learned clauses is incremented at each conflict. incrPostponeNbMax = 1000 // By how much # of learned is increased when lots of goo...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
//go:generate esc -o static.go -prefix ../web/build -pkg server ../web/build package server import ( "encoding/hex" "encoding/xml" "errors" "fmt" "io" "net/http" "net/url" "strings" "github.com/Sirupsen/logrus" "github.com/cardigann/cardigann/config" "github.com/cardigann/cardigann/indexer" "github.com/ca...
package server import ( "encoding/json" "io/ioutil" "log" "net/http" _ "net/http/pprof" "strconv" "github.com/absolute8511/ZanRedisDB/common" "github.com/absolute8511/ZanRedisDB/node" "github.com/coreos/etcd/raft/raftpb" ) func (self *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { key := r.Req...
package server import ( "bufio" "bytes" "context" "emperror.dev/errors" "github.com/apex/log" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" "github.com/pterodactyl/wings/api" "github.com/pterod...
package colprint import ( "io" "os" "reflect" "strconv" "fmt" "strings" "math" "sort" "github.com/ryanuber/columnize" ) const TagName = "colprint" const ( TagValueEmpty = "" TagValueSkip = "-" TagValueTraverse = "=>" ) // Config holds configuration used when printing columns type Config struct { ...
package main import ( "io/ioutil" "log" "os" "strings" "github.com/serbe/ncp" ) var ( urls = []string{ "/forum/viewforum.php?f=218", // Зарубежные Новинки (HD*Rip/LQ, DVDRip) "/forum/viewforum.php?f=221", // Отечественные Фильмы (HD*Rip/LQ, DVDRip, SATRip, VHSRip) "/forum/viewforum.php?f=225", // Зарубеж...
package main import ( "context" "fmt" ap "github.com/gopasspw/gopass/pkg/action" "github.com/gopasspw/gopass/pkg/action/binary" "github.com/gopasspw/gopass/pkg/action/create" "github.com/gopasspw/gopass/pkg/action/xc" "github.com/gopasspw/gopass/pkg/agent" "github.com/gopasspw/gopass/pkg/agent/client" "githu...
package main import ( "bufio" "fmt" "log" "os" "strconv" "strings" "github.com/codegangsta/cli" "github.com/mackerelio/gomkr/utils" mkr "github.com/mackerelio/mackerel-client-go" ) var Commands = []cli.Command{ commandStatus, commandHosts, commandCreate, commandUpdate, commandThrow, commandFetch, com...
package main import ( "flag" "fmt" "io" "io/ioutil" "log" "os" "os/exec" "strconv" "strings" "sync" "syscall" "unicode/utf8" ) func Execute(outw, errw io.Writer, in io.Reader, stop <-chan struct{}, jq string, s *JQStack) (int64, int64, error) { if jq == "" { jq = "jq" } outcounter := &writeCounter{0,...
package main import ( //"errors" "fmt" "github.com/simulatedsimian/emu6502/core6502" "reflect" "strconv" "strings" ) /* var test interface{} test = ctx logDisp.WriteLine(fmt.Sprint(reflect.TypeOf(test))) t := reflect.TypeOf(testFunc) for n := 0; n < t.NumIn(); n++ { logDisp.WriteLine(fmt.Sprint(t.In(n)...
package main import ( "os" "os/signal" "github.com/hashicorp/terraform/command" "github.com/mitchellh/cli" ) // Commands is the mapping of all the available Terraform commands. var Commands map[string]cli.CommandFactory // Ui is the cli.Ui used for communicating to the outside world. var Ui cli.Ui const ErrorP...
package main import ( "log" "github.com/Tomohiro/air/media" "github.com/codegangsta/cli" "github.com/gongo/go-airplay" ) func newApp() *cli.App { app := cli.NewApp() app.Name = "air" app.Version = Version app.Usage = "Command-line AirPlay client for Apple TV" app.Author = "Tomohiro TAIRA" app.Email = "tomo...
package main import ( "bytes" "errors" "os" "os/exec" "path/filepath" "strings" "github.com/codegangsta/cli" ) const ( GOPKG = repoType(iota) HTTP HTTPS GIT SSH ) type repoType int var ( getCommandDesc = `Clones a package into your GOPATH using the go tool chain, creates a link between it and your...
package server import "github.com/labstack/echo" func RegisterController(name string, e *echo.Echo, m []echo.Middleware, config Config) { rc := ResourceController{name} rcBase := e.Group("/" + name) rcBase.Get("", rc.IndexHandler) rcBase.Post("", rc.CreateHandler) rcItem := rcBase.Group("/:id") rcItem.Get("", ...
package server import ( "fmt" "os" "path/filepath" pb "github.com/kubernetes/kubernetes/pkg/kubelet/api/v1alpha1/runtime" "github.com/opencontainers/ocitools/generate" "golang.org/x/net/context" ) // Version returns the runtime name, runtime version and runtime API version func (s *Server) Version(ctx context....
// Copyright 2011 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. // Reverse proxy tests. package httputil import ( "bufio" "bytes" "io" "io/ioutil" "log" "net/http" "net/http/httptest" "net/url" "reflect" "strconv...
package jsonHttp import "net/http" import "encoding/json" // ResponseJSON write marshalled obj to http.ResponseWriter with correct header func ResponseJSON(w http.ResponseWriter, obj interface{}) { objJSON, err := json.Marshal(obj) if err == nil { w.Header().Set(`Content-Type`, `application/json`) w.Header().S...
// Go support for Protocol Buffers - Google's data interchange format // // Copyright 2015 The Go Authors. All rights reserved. // https://github.com/golang/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met...
// 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. package testing import ( "flag" "fmt" "os" "runtime" "sync" "sync/atomic" "time" ) var matchBenchmarks = flag.String("test.bench", "", "regular express...
// 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. package testing import ( "flag" "fmt" "internal/race" "internal/sysinfo" "io" "math" "os" "runtime" "sort" "strconv" "strings" "sync" "sync/atomic...
// Copyright 2015 The etcd 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 t...
package service import ( "fmt" "net/http" "github.com/gamegos/scotty/storage" "github.com/gorilla/mux" ) func healthCheck(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "OK") } // NewRouter creates and returns the router. func NewRouter(stg storage.Storage) *mux.Router { hnd := new(Handlers) hnd.st...
// Copyright 2016 CoreOS, 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...
// 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 ag...
// package peer implements an object used to represent peers in the ipfs network. package peer import ( "encoding/hex" "encoding/json" "fmt" b58 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" mh "g...
// 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 acco...
// Application that runs the specified benchmark over CT's webpage archives. package main import ( "flag" "fmt" "io/ioutil" "os" "path/filepath" "runtime" "strconv" "time" "github.com/skia-dev/glog" "strings" "skia.googlesource.com/buildbot.git/ct/go/adb" "skia.googlesource.com/buildbot.git/ct/go/util" ...
// Copyright 2017 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 i...
package physical import ( "fmt" "io/ioutil" "log" "net" "net/url" "strconv" "strings" "sync" "sync/atomic" "time" "crypto/tls" "crypto/x509" "github.com/armon/go-metrics" "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/lib" "github.com/hashicorp/errwrap" "github.com/hashicorp/go-clean...
/* _ _ *__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate. All rights reserved. * LICENSE: https://github.com/creativesof...
// Package crypt provides wrappers for Fs and Object which implement encryption package crypt import ( "context" "fmt" "io" "path" "strings" "time" "github.com/pkg/errors" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclon...