CombinedText
stringlengths
4
3.42M
/****************************************************************************** * ogre_interface.di - main interface file for D clients ****************************************************************************** * This file is part of * __ __ _ * / // /_____ ____ (_) * / // // ___// __...
profile.di <?xml version="1.0" encoding="ASCII"?> <di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi"> <pageList> <availablePage> <emfPageIdentifier href="zca.profile.notation#...
/****************************************************************************** * ogre_interface.d - main interface file for D clients ****************************************************************************** * This file is part of * __ __ _ * / // /_____ ____ (_) * / // // ___// __ ...
<?xml version="1.0" encoding="UTF-8"?> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> Delete mapping.di
/****************************************************************************** * ogre_interface.di - main interface file for D clients ****************************************************************************** * This file is part of * __ __ _ * / // /_____ ____ (_) * / // // ___// __...
// Copyright (c) 2013-2014 Conformal Systems <info@conformal.com> // // This file originated from: http://opensource.conformal.com/ // // Permission to use, copy, modify, and distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permissio...
package compress import ( "archive/tar" "archive/zip" "compress/gzip" "fmt" "io" "os" "path/filepath" "regexp" "runtime" "github.com/klauspost/pgzip" "github.com/mitchellh/packer/common" "github.com/mitchellh/packer/helper/config" "github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/templat...
// Copyright 2017 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 applicable law or agreed to...
// Copyright 2014 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...
package parser import ( "fmt" "io" "net" "net/mail" "os" "path/filepath" "regexp" "strconv" "strings" "text/scanner" "unicode" "github.com/yuuki/gokc/log" ) const ( EOF = 0 ) var SYMBOL_TABLES = map[string]int{ "{": LB, "}": RB, "global_defs": GLOBALDEFS, "notification_email": ...
// Package passwordhash implements safe password hashing and comparison. // // Hashes are derived using PBKDF2-HMAC-SHA256 function with 5000 iterations // (by default), 32-byte salt and 64-byte output. // // Note: you must not allow users to change parameters of PasswordHash, such as // the number of iterations, direc...
package suggest_test import ( "bytes" "testing" "github.com/mdempsky/gocode/suggest" ) func TestFormatters(t *testing.T) { // TODO(mdempsky): More comprehensive test. num := len("client") candidates := []suggest.Candidate{{ Class: "func", Name: "client_auto_complete", Type: "func(cli *rpc.Client, Arg0...
package gdoc import ( "testing" "github.com/google/go-cmp/cmp" "golang.org/x/net/html" ) func nodeWithStyle(s string) *html.Node { return nodeWithAttrs(map[string]string{"style": s}) } func nodeWithAttrs(attrs map[string]string) *html.Node { n := makePNode() for k, v := range attrs { n.Attr = append(n.Attr,...
package fetch import ( "bytes" "fmt" "github.com/disintegration/imaging" "github.com/rwcarlsen/goexif/exif" "image" "image/jpeg" "image/png" "io" ) func needsRotation(src io.Reader) (bool, int) { metadata, err := exif.Decode(src) if err != nil { fmt.Println(err.Error()) return false, 0 } orientation,...
package fetch import ( "bytes" "fmt" "github.com/disintegration/imaging" "image" "image/jpeg" "image/png" "io" ) func Resize(src io.Reader, c *CacheContext) (io.Reader, error) { image, format, err := image.Decode(src) if err != nil { fmt.Println(err.Error()) return nil, err } buf := new(bytes.Buffer) ...
// 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 verbose import ( "fmt" "os" "path" "path/filepath" "strings" "sync" ) // FileHandler writes log messages to a file to a directory type FileHandler struct { min LogLevel max LogLevel path string separate bool formatter Formatter m sync.Mutex } // NewFileHandler takes the ...
package verbose import ( "fmt" "os" "path" "path/filepath" "strings" "sync" ) // FileHandler writes log messages to a file to a directory type FileHandler struct { min LogLevel max LogLevel path string separate bool formatter Formatter m sync.Mutex } // NewFileHandler takes the ...
package filemanager import ( "crypto/rand" "errors" "fmt" "log" "net/http" "os" "os/exec" "reflect" "regexp" "strings" "time" "golang.org/x/crypto/bcrypt" "github.com/GeertJohan/go.rice" "github.com/hacdias/fileutils" "github.com/mholt/caddy" "github.com/robfig/cron" ) const ( // Version is the cur...
package peco import ( "fmt" "testing" "github.com/stretchr/testify/assert" ) // TestFuzzyFilter tests a fuzzy filter against various inputs func TestFuzzyFilter(t *testing.T) { testValues := []struct { input string query string selected bool }{ {"this is a test to test the fuzzy Filter", "tf", tru...
package eval import ( "bytes" "encoding/json" "monkey/ast" "text/template" ) const ( TEMPLATE_OBJ = "TEMPLATE_OBJ" template_name = "template" ) type TemplateObj struct { Template *template.Template } func NewTemplateObj() Object { ret := &TemplateObj{} SetGlobalObj(template_name, ret) return ret } func ...
package main import ( "bytes" "io/ioutil" "net/http" "net/http/httptest" . "launchpad.net/gocheck" ) type HTTPSuite struct { servers []*testServer httpSvr *httptest.Server } var _ = Suite(&HTTPSuite{}) func (s *HTTPSuite) SetUpSuite(c *C) { addHandlers() s.httpSvr = httptest.NewServer(nil) } func (s *HTT...
/* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
package flame import ( "net/http" "net/http/httptest" "testing" "time" "github.com/256dpi/oauth2" "github.com/256dpi/oauth2/spec" "github.com/stretchr/testify/assert" "gopkg.in/mgo.v2/bson" ) func TestIntegration(t *testing.T) { tester.Clean() var testPassword = "foo" var allowedScope = oauth2.ParseScope...
/* * * Copyright IBM Corp. All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 * / * */ package gossip import ( "fmt" "io/ioutil" "os" "syscall" docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" ...
// Copyright 2017 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 main import ( "database/sql" "encoding/json" "flag" _ "github.com/lib/pq" "io/ioutil" "log" "log/syslog" "os" "strings" ) type Config struct { DataBase DataBase } type DataBase struct { Host, User, Password, SSLMode string MaxOpenConns, MaxIdleConns int } var ( config = initConfig() db...
package main import ( "strconv" "strings" "time" "github.com/dghubble/go-twitter/twitter" "github.com/dghubble/oauth1" ) var ( twitterBot *TwitterBot ) // TwitterBot ... type TwitterBot struct { ID string ImgPath string Client *twitter.Client Follows map[string]string } // NewTwitterBot ... func Ne...
package moul import ( "os" "github.com/ChimeraCoder/anaconda" "github.com/patrickmn/go-cache" ) func init() { RegisterAction("twitter-last-tweets", GetTwitterLastTweetsAction) } func GetTwitterLastTweetsAction(args []string) (interface{}, error) { if tweets, found := moulCache.Get("twitter-last-tweets"); found...
// The txn package implements support for multi-document transactions. // // For details check the following blog post: // // http://blog.labix.org/2012/08/22/multi-doc-transactions-for-mongodb // package txn import ( "encoding/binary" "fmt" "reflect" "sort" "strings" "sync" "gopkg.in/mgo.v2-unstable" "go...
package funcs import ( "encoding/base64" "fmt" "io/ioutil" "os" "path/filepath" "strings" "unicode/utf8" "github.com/hashicorp/hcl2/hcl" "github.com/hashicorp/hcl2/hcl/hclsyntax" homedir "github.com/mitchellh/go-homedir" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" ) // MakeFi...
package main import ( "fmt" "os" "sort" "strconv" "strings" "github.com/coreos/fleet/machine" "github.com/coreos/fleet/schema" ) const ( defaultListUnitFilesFields = "unit,hash,dstate,state,tmachine" ) var ( listUnitFilesFieldsFlag string cmdListUnitFiles = &Command{ Name: "list-unit-files...
package namecheap import ( "fmt" "net/http" "net/http/httptest" "net/url" "testing" ) var ( fakeUser = "foo" fakeKey = "bar" fakeClientIP = "10.0.0.1" tlds = map[string]string{ "com.au": "com.au", "com": "com", "co.uk": "co.uk", "uk": "uk", "edu": "edu", "co.com": "co.com", ...
/* * general_test.go * * Copyright 2012 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 Software Foundation; either version 2 of the * License, or (at y...
package model import "time" type ApiAiRequest struct { Id string `json:"id"` Timestamp time.Time `json:"timestamp"` Result struct { Source string `json:"source"` ResolvedQuery string `json:"resolvedQuery"` Speech string `json:"speech"` Action string `json:"acti...
package beat import ( "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/cfgfile" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/publisher" ) type Execbeat struct { done chan struct{} ExecConfig ConfigSettings events publisher.Client } func New() *Execbeat { ...
package api import ( "fmt" "github.com/Aptomi/aptomi/pkg/lang" "github.com/Aptomi/aptomi/pkg/runtime" "github.com/julienschmidt/httprouter" "net/http" ) func (api *coreAPI) getUserOptional(request *http.Request) *lang.User { username := request.Header.Get("Username") if len(username) == 0 { return nil } ...
// Package cmd defines commands for the DC/OS CLI. package cmd import ( "path/filepath" "github.com/dcos/dcos-cli/api" "github.com/dcos/dcos-cli/pkg/cmd/auth" "github.com/dcos/dcos-cli/pkg/cmd/cluster" "github.com/dcos/dcos-cli/pkg/cmd/config" "github.com/dcos/dcos-cli/pkg/plugin" "github.com/sirupsen/logrus" ...
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package models import ( "fmt" "os" "path" "strings" _ "github.com/go-sql-driver/mysql" _ "github.com/lib/pq" "github.com/lunny/xorm" "github.com/go...
// Copyright 2013 The Chihaya Authors. All rights reserved. // Use of this source code is governed by the BSD 2-Clause license, // which can be found in the LICENSE file. // Package models implements the models for an abstraction over the // multiple data stores used by a BitTorrent tracker. package models import ( ...
package models import ( "github.com/pufferpanel/pufferpanel/v2" "gopkg.in/go-playground/validator.v9" "time" ) type Server struct { Name string `gorm:"UNIQUE_INDEX;size:20;NOT NULL" json:"-" validate:"required,printascii"` Identifier string `gorm:"UNIQUE_INDEX;NOT NULL;PRIMARY_KEY;size:8" json:"-" validate...
// Copyright 2014 Brian J. Downs // // 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 w...
package state import ( "errors" "log" "strings" "unicode/utf8" "github.com/belak/irc" "github.com/belak/seabird/bot" ) func init() { bot.RegisterPlugin("state", NewStatePlugin) } /* * TODO: * Public interface * Stop making assumptions about the number of params */ // State is a plugin which will track t...
package boardgame import ( "encoding/json" "github.com/jkomoros/boardgame/errors" "hash/fnv" "log" "math/rand" "strconv" ) //ImmutableState is a version of State, but minus any mutator methods. Because //states may not be modified except by moves, in almost every case where a //state is passed to game logic you...
package client import ( "crypto/x509" "fmt" "io/ioutil" "net/http" pb "github.com/google/go-tpm-tools/proto/attest" ) // AttestOpts allows for customizing the functionality of Attest. type AttestOpts struct { // A unique, application-specific nonce used to guarantee freshness of the // attestation. This must ...
// Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo // Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file contains code related to state...
package client import ( "crypto/tls" "net/http" "golang.org/x/net/http2" ) // APNS const ( Development = "https://api.development.push.apple.com" Production = "https://api.push.apple.com" ) type Client struct { HTTPClient *http.Client Certificate tls.Certificate } func NewClient(certificate tls.Certificat...
package rbxmk import ( "fmt" "strings" lua "github.com/anaminus/gopher-lua" "github.com/anaminus/rbxmk/rtypes" "github.com/robloxapi/types" ) // FrameType indicates the kind of frame for a State. type FrameType uint8 const ( // Frame is a regular function. FunctionFrame FrameType = iota // Frame is a method...
package lm2 import "sync/atomic" type Stats struct { RecordsWritten uint64 RecordsRead uint64 CacheHits uint64 CacheMisses uint64 } func (s *Stats) incRecordsWritten(count uint64) { atomic.AddUint64(&s.RecordsWritten, count) } func (s *Stats) incRecordsRead(count uint64) { atomic.AddUint64(&s.Recor...
/* * * GoStats * A simple stats server for Go services * * (c)2013 Green Man Gaming Limited * */ package gostats import ( "encoding/json" "fmt" "net/http" "regexp" "strings" "sync" "time" "github.com/VividCortex/gohistogram" "github.com/gorilla/mux" ) type metric struct { histogram *gohistogram.Nume...
package main import ( "sync" ) type ProxyStats struct { sync.RWMutex clients uint64 bytes uint64 } func (ps *ProxyStats) AddServed() { ps.Lock() ps.clients++ ps.Unlock() } func (ps *ProxyStats) AddBytes(bc int64) { if bc <= 0 { return } ps.Lock() ps.bytes += uint64(bc) ps.Unlock() } func (ps *Proxy...
/* Copyright (c) 2014-2015, Daniel Martí <mvdan@mvdan.cc> */ /* See LICENSE for licensing information */ package main import ( "errors" "fmt" "sync" "github.com/mvdan/bytesize" ) var ( ErrReachedMaxNumber = errors.New("reached maximum number of pastes") ErrReachedMaxStorage = errors.New("reached maximum stor...
// TODO Check not for odd numbers but for 2 pow n + 1 package main import ( "errors" "fmt" "math/rand" "time" ) const CornerStartingHeight = 50 const Roughness = 10 type FractalParams struct { LowX int LowY int HighX int HighY int RandomFactor float64 } // Generate an height m...
package frame import "sync" import "bytes" var ( bufPool = sync.Pool{ New: func() interface{} { return &bytes.Buffer{} }, } bytesPool = sync.Pool{ New: func() interface{} { return &[8]byte{} }, } voidBytes = make([]byte, 8) ) func getBuf() *bytes.Buffer { return bufPool.Get().(*bytes.Buffer) } f...
// Package rpc_proxy provides a proxy interface for Nomad Servers. The // RpcProxy periodically shuffles which server a Nomad Client communicates // with in order to redistribute load across Nomad Servers. Nomad Servers // that fail an RPC request are automatically cycled to the end of the list // until the server li...
// Package store is a dead simple configuration manager for Go applications. package store import ( "bytes" "encoding/json" "fmt" "github.com/BurntSushi/toml" "io/ioutil" "os" "path/filepath" "reflect" "runtime" "strings" ) var applicationName string // SetApplicationName defines a unique application handl...
package bolster import ( "fmt" "os" "reflect" "strings" "github.com/boltdb/bolt" "github.com/nochso/bolster/bytesort" "github.com/nochso/bolster/codec" "github.com/nochso/bolster/codec/json" "github.com/nochso/bolster/errlist" ) const ( tagBolster = "bolster" tagID = "id" tagAutoIncremen...
package kademlia import ( "crypto/sha1" "sync" "time" ) // Store is the interface for implementing the storage mechanism for the // DHT. type Store interface { // Store should store a key/value pair on the network with the given // replication and expiration times. Store(key []byte, data []byte, replication tim...
package main import ( "os" "time" ) type Store struct { baseDir string } func NewStore(relPath string) *Store { // TODO: check if we need to add the full path cwd, err := os.Getwd() if err != nil { panic(err) } baseDir := cwd + "/" + relPath err = os.MkdirAll(baseDir, 0755) if err != nil { ...
// 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. // Package sql provides a generic interface around SQL (or SQL-like) // databases. package sql import ( "database/sql/driver" "errors" "fmt" "io" "sync" )...
// 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. // Package sql provides a generic interface around SQL (or SQL-like) // databases. // // The sql package must be used in conjunction with a database driver. // ...
// 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 parser implements a parser for Go source files. Input may be // provided in a variety of forms (see the various Parse* functions); the // output is a...
// 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. // A parser for Go source files. Input may be provided in a variety of // forms (see the various Parse* functions); the output is an abstract // syntax tree (AS...
// 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 parser implements a parser for Go source files. Input may be // provided in a variety of forms (see the various Parse* functions); the // output is a...
// 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 png implements a PNG image decoder and encoder. // // The PNG specification is at http://www.w3.org/TR/PNG/. package png import ( "compress/zlib" ...
// 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 ioutil implements some I/O utility functions. package ioutil import ( "bytes" "io" "os" "sort" ) // readAll reads from r until an error or EOF ...
// Copyright 2010 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 http_test import ( "bytes" "errors" "fmt" "io" "io/ioutil" "mime" "mime/multipart" "net" . "net/http" "net/http/httptest" "net/url" "os" "...
// 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 net import ( "fmt" "io" "io/ioutil" "runtime" "testing" "time" ) func isTimeout(err error) bool { e, ok := err.(Error) return ok && e.Timeout(...
package brewerydb import ( "fmt" "net/http" ) // StyleService provides access to the BreweryDB Style API. Use Client.Style. type StyleService struct { c *Client } // Style represents a style of Beer. type Style struct { ID int Name string ShortName string Description string CategoryID int ...
// 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. package net import ( "runtime" "testing" ) var unicastTests = []struct { net string laddr string ipv6 bool packet bool }{ {net: "tcp4", laddr: "...
// Copyright 2013 tsuru 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 juju import ( "bytes" "errors" "github.com/globocom/commandmocker" "github.com/globocom/config" etesting "github.com/globocom/tsuru/exec/testing" ...
// Copyright 2016 The Gosl 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 fun import ( "math" "math/cmplx" "github.com/cpmech/gosl/chk" "github.com/cpmech/gosl/io" "github.com/cpmech/gosl/la" "github.com/cpmech/gosl/...
/* Copyright 2021 The logr 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, softwa...
package test import ( "fmt" "io" "io/ioutil" "os" "sync" "testing" "time" "github.com/anacrolix/missinggo/v2/filecache" "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/storage" "golang.org/x/time/rate" "github.com/stretchr/testify/assert" "g...
// 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...
// Copyright 2015 monsterqueue 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 mongodb import ( "errors" "fmt" "os" "runtime" "sync" "time" "github.com/tsuru/monsterqueue" "github.com/tsuru/monsterqueue/log" "gopkg...
/* 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, ...
// Copyright 2014 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 runtime import ( "runtime/internal/sys" "unsafe" ) const ( _NSIG = 33 _SI_USER = 0 _SS_DISABLE = 4 _SIG_BLOCK = 1 _SIG_UNBLOCK = ...
/* Copyright 2017 Matthew Lord (mattalord@gmail.com) 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 conditions and the following discl...
package cmds import ( "bufio" "bytes" "errors" "fmt" "io" "net/http" "net/url" "os" "path/filepath" "strings" gosync "sync" "syscall" "golang.org/x/sync/errgroup" "github.com/gogo/protobuf/jsonpb" "github.com/hanwen/go-fuse/fuse/nodefs" "github.com/pachyderm/pachyderm/src/client" "github.com/pachyde...
package cmds import ( "bufio" "errors" "fmt" "io" "io/ioutil" "net/http" "net/url" "os" "os/exec" "path/filepath" "strings" gosync "sync" prompt "github.com/c-bata/go-prompt" "github.com/gogo/protobuf/jsonpb" "github.com/pachyderm/pachyderm/src/client" "github.com/pachyderm/pachyderm/src/client/limit"...
package native import ( "bufio" "github.com/ziutek/mymysql/mysql" "io" ) type pktReader struct { rd *bufio.Reader seq *byte remain int last bool buf [8]byte ibuf [3]byte } func (my *Conn) newPktReader() *pktReader { return &pktReader{rd: my.rd, seq: &my.seq} } func (pr *pktReader) readHeader...
package s3 import ( "bytes" "io" "net/http" "strings" "fmt" "crypto/md5" "encoding/base64" "github.com/gogo/protobuf/types" "github.com/pachyderm/pachyderm/src/client" ) type objectHandler struct { pc *client.APIClient } func newObjectHandler(pc *client.APIClient) *objectHandler { return &objectHandler{p...
package neko // #include "redirect.h" import "C" var redirectFunc Printer //export goRedirect func goRedirect(data *C.char, size C.int, param interface{}) { redirectFunc(C.GoStringN(data, size), param) } redirect.h is not needed in redirect.go package neko import "C" var redirectFunc Printer //export goRedirec...
package yorm import ( "database/sql" "errors" "reflect" "strings" "sync" "time" ) type tableSetter struct { table string dests []interface{} columns []*column pkColumn *column } var ( //TimeType time's reflect type. TimeType = reflect.TypeOf(time.Time{}) BoolType = reflect.TypeOf(true) Int64...
// Copyright 2018 Google LLC. 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 main import ( "fmt" "strings" "time" "github.com/jaracil/ei" . "github.com/jaracil/nexus/log" "github.com/sirupsen/logrus" r "gopkg.in/rethinkdb/rethinkdb-go.v5" ) type Task struct { Id string `rethinkdb:"id" json:"id"` Stat string `rethinkdb:"stat" json:"state""` Path ...
package node import ( "GoOnchain/common" . "GoOnchain/config" "GoOnchain/core/ledger" "GoOnchain/core/transaction" . "GoOnchain/net/message" . "GoOnchain/net/protocol" //"bytes" //"crypto/sha256" //"encoding/binary" "errors" "fmt" "math/rand" "net" "runtime" "sync/atomic" "time" ) // The node capabili...
/* 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/. */ package network import ( "encoding/json" "errors" "log" "strings" "time" "github.com/aws/aws-sdk-go/aws" ...
// // telgo // // // Copyright (C) 2015 Christian Pointner <equinox@helsinki.at> // // This file is part of telgo. // // telgo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the Li...
// // telgo // // // Copyright (C) 2015 Christian Pointner <equinox@helsinki.at> // // This file is part of telgo. // // telgo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the Li...
/* client_events.go provides constants for making VNC keyboard and mouse events. Sample usage: // Move mouse to x=100, y=200. x, y := 100, 200 conn.PointerEvent(vnc.Mouse_none, x, y) // Give mouse some time to "settle." time.Sleep(10*time.Millisecond) // Left click. conn.PointerEvent(vnc.Mouse_left, x, y) conn.Pointe...
package restorer import ( "bufio" "context" "io" "math" "path/filepath" "sort" "sync" "golang.org/x/sync/errgroup" "github.com/restic/restic/internal/crypto" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/restic" ) // TODO if a blo...
//go:build integration // +build integration package tntengine import ( "context" "log" "strconv" "testing" "time" "github.com/centrifugal/centrifuge" "github.com/centrifugal/protocol" "github.com/stretchr/testify/require" ) func newTestTarantoolEngine(tb testing.TB) (*Broker, *PresenceManager) { n, _ := c...
package vecbackup import ( "bytes" "encoding/json" "fmt" "io/ioutil" "math/rand" "os" "os/exec" "path" "strings" "time" ) var rcloneBinary string = "rclone" func SetRcloneBinary(p string) { rcloneBinary = p } type StorageMgrLsDir2Func func(dir, file string) type StorageMgr interface { JoinPath(d, f str...
package zk import ( "encoding/json" "github.com/golang/glog" "github.com/qorio/maestro/pkg/registry" "strconv" "strings" ) const ( PrefixEnv = "env://" PrefixZk = "zk://" ) // Node value func Follow(zc ZK, key registry.Path) (*Node, error) { n, err := zc.Get(key.Path()) if err != nil { return nil, err }...
// Copyright 2019 Martin Holst Swende. All rights reserved. // Use of this source code is governed by a BSD-style license that can be found // in the COPYING file. // // Package math provides integer math utilities. package uint256 import ( "fmt" "math" "math/big" "math/bits" ) var ( SignedMax = &Int{ 0xffff...
package cluster import ( "log" "sync" // dockerapi "github.com/fsouza/go-dockerclient" ) type Node struct { ID string // status *Status config *Container // rename it to container sync.Mutex } // was Data changed to Graph type Graph struct { Nodes []*Node sync.Mutex Out map[*Node][]*Node I...
/* * Copyright (C) 2015 Red Hat, Inc. * * 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 Licens...
package cmd import ( "bytes" "github.com/timeredbull/tsuru/fs/testing" . "launchpad.net/gocheck" "net/http" ) func (s *S) TestLogin(c *C) { fsystem = &testing.RecordingFs{FileContent: "old-token"} defer func() { fsystem = nil }() s.patchStdin(c, []byte("chico\n")) defer s.unpatchStdin() expected := "Passw...