CombinedText
stringlengths
4
3.42M
// Copyright 2013 The lime Authors. // Use of this source code is governed by a 2-clause // BSD-style license that can be found in the LICENSE file. package main import ( "fmt" "image/color" "runtime" "strings" "sync" "time" "github.com/atotto/clipboard" "gopkg.in/fsnotify.v1" "github.com/limetext/backend"...
package nds import ( "encoding/binary" "errors" "math/rand" "reflect" "time" "appengine/datastore" ) const ( // memcachePrefix is the namespace memcache uses to store entities. memcachePrefix = "NDS0:" // memcacheLockTime is the maximum length of time a memcache lock will be // held for. 32 seconds is cho...
package gps import ( "strings" "fmt" "log" "strconv" "reflect" ) // func validateNMEAChecksum determines if a string is a properly formatted NMEA sentence with a valid checksum. // // If the input string is valid, output is the input stripped of the "$" token and checksum, along with a boolean 'true' // If the i...
// Copyright ©2013 The gonum 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 mat64 import ( "fmt" check "launchpad.net/gocheck" "math" "github.com/gonum/floats" ) func isUpperTriangular(a *Dense) bool { rows, cols := ...
package quic import ( "fmt" "io" "sync" "time" "github.com/lucas-clemente/quic-go/internal/flowcontrol" "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" ...
//+build skip package main import ( "crypto/hmac" "crypto/sha1" "crypto/sha512" "encoding/base64" "encoding/json" "flag" "fmt" "github.com/gorilla/mux" mcassoc "github.com/lukegb/mcassoc/mcassoc" minecraft "github.com/lukegb/mcassoc/minecraft" mojang "github.com/lukegb/mcassoc/mojang" "html/template" "im...
package main import ( "bytes" "encoding/json" "fmt" "github.com/mingrammer/go-codelab/models" "log" "net/http" "strings" "time" "sync" "strconv" ) func main() { var wg sync.WaitGroup wg.Add(3) gyroTicker := time.NewTicker(500 * time.Millisecond) accelTicker := time.NewTicker(500 * time.Millisecond) t...
package nomad import ( "fmt" "reflect" "strings" "testing" "time" memdb "github.com/hashicorp/go-memdb" msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs...
package nil import ( "fmt" "reflect" ) func Is(i interface{}) bool { return i == nil || reflect.ValueOf(i).IsNil() } func MustNot(i interface{}) { if IsNil(i) { panic(fmt.Sprintf("%#v (%T) must not be nil", i, i)) } } // convenience functions, if included with . func Nø(i interface{}) { MustNot(i) } ...
package main // go:generate go-bindata . import ( "encoding/json" "fmt" "io/ioutil" "os" "strings" "text/template" ) type NixDependency struct { GoPackagePath string `json:"goPackagePath,omitempty"` Fetch *FetchGit `json:"fetch,omitempty"` IncludeFile string `json:"include,omitempty"` Packa...
/* file: nnc.go author: alemedeiros <alexandre.n.medeiros _at_ gmail.com> A n-sized noughts and crosses game library. It is a generalization of noughts and crosses, with a n x n board. To win, you have to fill a line, column or diagonal with your symbol. */ // Package nnc implements a n-sized noughts and crosses gam...
// Copyright 2012-2016 Apcera Inc. All rights reserved. package server import ( "bufio" "crypto/tls" "encoding/json" "fmt" "math/rand" "net" "sync" "sync/atomic" "time" ) // Type of client connection. const ( // CLIENT is an end user. CLIENT = iota // ROUTER is another router in the cluster. ROUTER ) c...
package trees import ( "errors" "sync" "github.com/joushou/qp" ) type FilterDir struct { Lister UpdateHook func(string, *FilterDir) FilteredNames map[string]bool Whitelist bool FilterLock sync.RWMutex } // Things to mask: // List (files must be filtered) // Walk (name must be permitted) // Ren...
t8407 테스트 수정.
// Config takes care of the whole configuration. package config import ( "errors" "strconv" ) type Config struct { Secret string BuildLogPath string EmailFrom string EmailHost string EmailPort int EmailUser string EmailPassword string SlackChannel string SlackEndpoint string Repos...
package config import ( "github.com/cblomart/vsphere-graphite/backend" "github.com/cblomart/vsphere-graphite/vsphere" ) // Configuration : configurarion base type Configuration struct { VCenters []*vsphere.VCenter Metrics []vsphere.Metric Interval int Domain string Backend backend.Backe...
// Copyright 2016 IBM Corporation // // 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 config import ( "encoding/json" "io/ioutil" "log" "path/filepath" "strings" "github.com/sivel/overseer/monitor" "github.com/sivel/overseer/notifier" ) type Config struct { } type NotifierType struct { Type string } func getNotifiers(configPath string) []notifier.Notifier { notifierPath := filepath...
package config import ( "os" "sync" "sync/atomic" ) //Config é a estrutura que tem todas as configurações da aplicação type Config struct { APIPort string Version string SEQUrl string SEQAPIKey string EnableRequestLog bool EnablePrintRequest bool Environmen...
// Package config collects together all configuration settings // NOTE: Subject to change, do not rely on this package from outside git-lfs source package config import ( "errors" "fmt" "reflect" "strconv" "strings" "sync" "github.com/ThomsonReutersEikon/go-ntlm/ntlm" "github.com/bgentry/go-netrc/netrc" "git...
// package config import ( "fmt" "io/ioutil" "os" "path/filepath" "runtime" "sync" "github.com/ghodss/yaml" "github.com/mitchellh/go-homedir" "github.com/nanobox-io/nanobox-golang-stylish" ) const ( OS = runtime.GOOS ARCH = runtime.GOARCH LOGTAP_PORT = ":6361" MIST_PORT = ":1445" SERV...
package config import ( "encoding/base64" "encoding/json" "errors" "fmt" "io/ioutil" "net" "os" "os/user" "strings" "gopkg.in/yaml.v2" "github.com/coreos/pkg/capnslog" "github.com/jgsqware/clairctl/xstrings" "github.com/jgsqware/xnet" "github.com/spf13/viper" ) var log = capnslog.NewPackageLogger("git...
package app import ( "github.com/0xb10c/memo/memod/database" "github.com/0xb10c/memo/memod/logger" "github.com/0xb10c/memo/memod/mempool" ) // Start starts the memo deamon func Start() { db, err := database.Setup() if err != nil { if err != nil { logger.Error.Printf("Failed to setup database connection: %s...
package main import ( "encoding/json" "fmt" "log" ) // A Client is a connected player and associated websocket connection. type Client struct { // WebSocket connection (communicate with this via send and receive channels) conn *Connection // ID of the player that this client represents playerId string // ID...
// Copyright 2012-2018 The NATS 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 ...
//line lang.y:6 package lang import __yyfmt__ "fmt" //line lang.y:6 import ( "github.com/hashicorp/terraform/config/lang/ast" ) //line lang.y:14 type parserSymType struct { yys int node ast.Node nodeList []ast.Node str string token *parserToken } const PROGRAM_BRACKET_LEFT = 57346 const PROGR...
// Copyright 2017 Pilosa Corp. // // 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 disclaime...
// Copyright 2012-2018 The NATS 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 (C) 2013 CompleteDB LLC. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program i...
package main import ( "flag" "log" "net" "net/http" "net/rpc" ) type Nothing bool type Message struct { User string Target string Msg string } type ChatServer struct { port string messageQueue map[string][]string users []string shutdown chan bool } func (c *ChatServer) Register...
package main import ( "bufio" "bytes" "encoding/json" "errors" "flag" "io" "io/ioutil" "log" "net/http" "os" "os/signal" "path/filepath" "regexp" "sort" "strconv" "strings" "sync" "sync/atomic" "syscall" "time" "github.com/gorilla/mux" "github.com/slugalisk/overrustlelogs/common" "github.com/xl...
/* Copyright 2018 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 server import ( "database/sql" "log" "net/http" "github.com/99designs/gqlgen/graphql" "github.com/emwalker/digraph/models" "github.com/emwalker/digraph/resolvers" "github.com/volatiletech/sqlboiler/boil" ) // Server holds config information for running the API server. type Server struct { BasicAuthUs...
package server import ( "fmt" "net/http" "os" "github.com/adrianduke/configr" _ "github.com/adrianduke/configr/sources/file/toml" "github.com/astaxie/beego/session" _ "github.com/go-sql-driver/mysql" "github.com/jinzhu/gorm" _ "github.com/mattn/go-sqlite3" "github.com/qor/admin" "github.com/qor/i18n" "git...
package server import ( "fmt" "html/template" "net/http" ) func RootHandler(w http.ResponseWriter, r *http.Request, processes []*Process) { tmpl, err := template.ParseFiles("templates/root.html") if err != nil { fmt.Printf("Error parsing template") } if err := tmpl.Execute(w, processes); err != nil { fmt.P...
package server import ( ".." "../fs" "../future" "../rcli" "bufio" "bytes" "encoding/json" "errors" "fmt" "io" "net/http" "net/url" "os" "path" "strconv" "strings" "sync" "text/tabwriter" "time" ) const VERSION = "0.0.1" func (srv *Server) ListenAndServe() error { go rcli.ListenAndServeHTTP("127....
package main import ( // General "github.com/golang/glog" "flag" "github.com/iambc/xerrors" "reflect" "os" //API "net/http" "encoding/json" //DB "database/sql" _ "github.com/lib/pq" ) /* TODO: 2) Add different input/output formats for the API 6) quote of the day */ type image_board_clusters struct { ...
package server import ( "encoding/json" "errors" "fmt" "net/http" "strconv" log "github.com/Sirupsen/logrus" "github.com/gorilla/mux" ) type Server struct { games map[int]Game } func NewServer() *Server { server := new(Server) server.games = make(map[int]Game) return server } func (server *Server) Start...
package server import ( "encoding/json" "fmt" "io/ioutil" "log" "net/http" "os" "path/filepath" "runtime" "strings" "sync" "time" "github.com/jpillora/cloud-torrent/engine" "github.com/suryadewa/ForNesiaToRrent/static" "github.com/jpillora/go-realtime" "github.com/jpillora/requestlog" "github.com/jpil...
// gorewind is an event store server written in Python that talks ZeroMQ. // Copyright (C) 2013 Jens Rantil // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the ...
package smtpapi import ( "encoding/json" "reflect" "testing" ) func Test_JsonString(t *testing.T) { header := NewSMTPAPIHeader() result, _ := header.JsonString() if result != "{}" { t.Errorf("Result did not match") } } func Test_AddTo(t *testing.T) { header := NewSMTPAPIHeader() header.AddTo("a...
package server import ( "encoding/json" "fmt" "net" "net/http" "net/url" ) // Routez represents detail information on current routes type Routez struct { NumRoutes int `json:"num_routes"` Routes []*RouteInfo `json:"routes"` } // RouteInfo has detailed information on a per connection basis. type Ro...
package main import ( "encoding/json" "fmt" "html/template" "io/ioutil" "net/http" "os" "path/filepath" "sync" "time" "github.com/Sirupsen/logrus" "github.com/docker/distribution/manifest/schema1" humanize "github.com/dustin/go-humanize" "github.com/jessfraz/reg/clair" "github.com/jessfraz/reg/registry"...
package main import ( "encoding/json" "errors" "fmt" "html/template" "io/ioutil" "net/http" "os" "path/filepath" "strings" "sync" "time" "github.com/Sirupsen/logrus" "github.com/docker/distribution/manifest/schema1" "github.com/docker/docker/cliconfig" "github.com/docker/engine-api/types" humanize "gi...
package main import ( "encoding/json" "fmt" "net/http" "os/exec" "strings" "log/syslog" "github.com/Sirupsen/logrus" logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" "github.com/garyburd/redigo/redis" ) // Server is the abstraction of a koderunr web api type Server struct { redisPool *redis.Poo...
/* Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute /* Copyright [2016] EMBL-European Bioinformatics Institute 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...
// gorewind is an event store server written in Python that talks ZeroMQ. // Copyright (C) 2013 Jens Rantil // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the ...
// Copyright 2016 Jacob Taylor jacob@ablox.io // License: Apache2 - http://www.apache.org/licenses/LICENSE-2.0 package main import ( "fmt" "net" "../utils" "bufio" "encoding/binary" //"time" "os" "bytes" "io" "io/ioutil" "github.com/urfave/cli" "path/filepath" ) const n...
package server import ( "context" "net" "sync" "time" "bitbucket.org/harfangapps/regis-companion/resp" "github.com/pkg/errors" ) // Server defines the regis-companion Server that listens for incoming connections // and manages SSH tunnels. type Server struct { // The address the server listens on. Addr net....
package main import ( "crypto" "crypto/tls" "crypto/x509" "encoding/pem" "errors" "flag" "fmt" "io" "io/ioutil" "log" "net" "os" "os/exec" "os/signal" "runtime" "sync" "syscall" "github.com/kardianos/osext" "github.com/kavu/go_reuseport" ) var listenAddress = "127.0.0.1:8043" var privateKeyPath = ...
package main import ( "io" "log" "fmt" "net/http" mrand "math/rand" "crypto/rand" "code.google.com/p/go.net/websocket" ) var globalWorld = newWorld() func handler(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "." + r.URL.Path) } type Message struct { Kind string Payload map[string]interfa...
package server import ( "encoding/json" "fmt" "net" "net/http" "os" "github.com/gtfierro/hod/config" hod "github.com/gtfierro/hod/db" "github.com/gtfierro/hod/query" "github.com/julienschmidt/httprouter" "github.com/op/go-logging" "github.com/pkg/profile" ) // logger var log *logging.Logger // set up lo...
// Copyright 2012 Apcera Inc. All rights reserved. package server import ( "bufio" "encoding/json" "fmt" "net" "sync/atomic" "github.com/apcera/gnatsd/hashmap" "github.com/apcera/gnatsd/sublist" ) type Options struct { Host string Port int Trace bool Debug bool Logtime bool MaxConn int } typ...
package server import ( "encoding/json" "errors" "fmt" "io" "log" "net" "net/http" "os" "os/exec" "runtime" "time" "github.com/99designs/aws-vault/vault" ) const ( metadataBind = "169.254.169.254:80" awsTimeFormat = "2006-01-02T15:04:05Z" localServerUrl = "http://127.0.0.1:9099" localServerBind...
package server import ( "encoding/json" "fmt" "io/ioutil" "net/http" "os" "strconv" "strings" "github.com/seiflotfy/skizze/config" "github.com/seiflotfy/skizze/counters" "github.com/seiflotfy/skizze/storage" "github.com/seiflotfy/skizze/utils" ) type requestData struct { id string typ string ...
// Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. // // 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...
// Copyright (c) 2014 The SkyDNS Authors. All rights reserved. // Use of this source code is governed by The MIT License (MIT) that can be // found in the LICENSE file. package server import ( "fmt" "math" "net" "strconv" "strings" "sync" "time" "github.com/coreos/go-etcd/etcd" "github.com/coreos/go-systemd...
// Copyright 2012 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 cookiejar implements an RFC 6265-compliant http.CookieJar. // // TODO: example code to create a memory-backed cookie jar with the default // public s...
// 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 x11 import ( "bufio" "io" "os" ) // readU16BE reads a big-endian uint16 from r, using b as a scratch buffer. func readU16BE(r io.Reader, b []byte) ...
// 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 jpeg package implements a decoder for JPEG images, as defined in ITU-T T.81. package jpeg // See http://www.w3.org/Graphics/JPEG/itu-t81.pdf import ( ...
// 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. // +build darwin freebsd linux netbsd openbsd windows // TCP sockets package net import ( "io" "os" "syscall" "time" ) // BUG(rsc): On OpenBSD, listeni...
Add statics for search
package mediasort import ( "errors" "fmt" "io/ioutil" "log" "os" "path/filepath" "strings" "sync" "time" "github.com/fatih/color" mediasearch "github.com/jpillora/media-sort/search" "github.com/jpillora/sizestr" "gopkg.in/fsnotify.v1" ) //Config is a sorter configuration type Config struct { Targets ...
package zygo func init() { GITLASTTAG = "v4.0"; GITLASTCOMMIT = "2924d0de39dcf13401e9048ae956f36236e81088" } link to Go comment definition package zygo func init() { GITLASTTAG = "v4.0"; GITLASTCOMMIT = "01ca1478e707401070dedd5738ee450a3ac8ee7f" }
package zygo func init() { GITLASTTAG = "v1.5.1"; GITLASTCOMMIT = "567aa375d1f0c4cbb0ec3994f6df4b93235a4879" } v1.5.3 correct input continuation. package zygo func init() { GITLASTTAG = "v1.5.3"; GITLASTCOMMIT = "ec0e31304ec5c6b8e14d6a7cee286cf084aea194" }
// 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. /* Data-driven templates for generating textual output such as HTML. Templates are executed by applying them to a data structure. Annotations in the templa...
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// 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 syscall_test import ( "bufio" "fmt" "io" "io/ioutil" "os" "os/exec" "os/signal" "path/filepath" "runtime" "strconv" "strings" "syscall" "t...
package repo import ( "github.com/OpenBazaar/openbazaar-go/ipfs" "github.com/OpenBazaar/openbazaar-go/pb" "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer" ) type Datastore interface { Config() Config Followers() Followers Following() Following OfflineMessages() OfflineMessages Pointers(...
package repo import ( "github.com/OpenBazaar/openbazaar-go/repo/migrations" "io/ioutil" "os" "path" "strconv" ) type Migration interface { Up(repoPath string, dbPassword string, testnet bool) error Down(repoPath string, dbPassword string, testnet bool) error } var Migrations = []Migration{ migrations.Migrati...
package eighttracks import ( "fmt" "net/url" "github.com/zquestz/s/providers" ) func init() { providers.AddProvider("8tracks", &Provider{}) } // Provider merely implements the Provider interface. type Provider struct{} // BuildURI generates a search URL for 8tracks. func (p *Provider) BuildURI(q string) string...
// Copyright 2016 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 docker import ( "encoding/json" stderror "errors" "fmt" "net/http" "net/url" "sort" "strconv" "strings" "sync" "time" "github.com/cezarsa/fo...
package setup import ( "bytes" "fmt" "os" "os/exec" "strings" ) // RestoreOptions : Define the options for restore a dump file into a database type RestoreOptions struct { CustomArgs []string } /* RestoreDumpFile : Calls the 'pg_restore' to restore a dump file gererated by pg_dump */ func RestoreDumpFile(connD...
// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. // Package pio is a peripherals I/O library. It contains host, devices, and // test packages to emulate the hardware. // // pio acts as a registry of...
package pip import ( "encoding/csv" "fmt" rtreego "github.com/dhconnelly/rtreego" lru "github.com/hashicorp/golang-lru" geo "github.com/kellydunn/golang-geo" geojson "github.com/whosonfirst/go-whosonfirst-geojson" utils "github.com/whosonfirst/go-whosonfirst-utils" metrics "github.com/rcrowley/go-metrics" "io...
package pip import ( "github.com/dhconnelly/rtreego" "github.com/whosonfirst/go-whosonfirst-geojson" ) type WOFPointInPolygon struct { Rtree *rtreego.Rtree } func PointInPolygon() *WOFPointInPolygon { rt := rtreego.NewTree(2, 25, 50) return &WOFPointInPolygon{ Rtree: rt, } } func (p WOFPointInPolygon) Ind...
package pmc import ( "errors" "fmt" "math" "github.com/dgryski/go-bits" "github.com/dgryski/go-farm" "github.com/dgryski/go-pcgr" "github.com/willf/bitset" ) var ( rnd = pcgr.Rand{State: 42, Inc: 0xcafebabe} // Use const due to quick conversion against 0.78 (n = 1000000.0) // Actual implementation => n := ...
package shared import ( "fmt" "os" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecs" ) // Save some repetition, formatting the output of these. func FormatAwsError(err error) string { var result str...
// Copyright 2012 Joseph Hager. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package rog provides algorithms and data structures for creating roguelike games. package main import ( "github.com/ajhager/rog" ) fun...
/* Go Language Raspberry Pi Interface (c) Copyright David Thorpe 2016-2018 All Rights Reserved Documentation http://djthorpe.github.io/gopi/ For Licensing and Usage information, please see LICENSE.md */ package gopi import ( "context" "net" "regexp" "time" ) /////////////////////////////////////////////////...
package pixel import ( "github.com/faiface/mainthread" "github.com/go-gl/glfw/v3.2/glfw" ) // Run is essentialy the "main" function of Pixel. It exists mainly due to the technical // limitations of OpenGL and operating systems. In short, all graphics and window manipulating // calls must be done from the main threa...
// Package blockfetcher aims to reduce boilerplate code that one needs to write // over and over again when implementing a program that is processing blocks // that are being fetched over steemd WebSocket RPC endpoint. // // All you need from now in is to import this package and implement BlockProcessor interface, // t...
package buildah import ( "encoding/json" "io/ioutil" "os" "os/exec" "path/filepath" "strings" "github.com/containers/storage/pkg/ioutils" digest "github.com/opencontainers/go-digest" "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" "github.com/pkg/errors"...
/* Package test161 implements a library for testing OS/161 kernels. We use expect to drive the sys161 system simulator and collect useful output using the stat socket. */ package test161 import ( "bytes" "errors" "fmt" "github.com/kr/pty" "github.com/ops-class/test161/expect" "github.com/termie/go-shutil" "io" ...
// Copyright 2014 Hajime Hoshi // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
package main import ( "bufio" "bytes" "fmt" "github.com/tilezen/tapalcatl" "io" "net" "net/http" "time" ) type HttpRequestData struct { Path string ApiKey string UserAgent string Referrer string Format string } type ParseResult struct { Coord tapalcatl.TileCoord Cond Condition...
package cwl import ( "fmt" "io/ioutil" "sort" "strings" ) // Input represents "CommandInputParameter". // @see http://www.commonwl.org/v1.0/CommandLineTool.html#CommandInputParameter type Input struct { ID string `json:"id"` Label string `json:"label"` Doc stri...
/* Open Source Initiative OSI - The MIT License (MIT):Licensing The MIT License (MIT) Copyright (c) 2013 Ralph Caraveo (deckarep@gmail.com) 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...
package discrete // On one hand, using an interface{} as a key works on some levels. // On the other hand, from experience, I can say that working with interface{} is a pain // so I don't like it in an API. An alternate idea is to make Set an interface with a method that allows you to GRAB a map[interface{}]struct{} f...
package cmds import ( "bufio" "bytes" "context" "encoding/base64" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "net/url" "os" "regexp" "strconv" "strings" "time" "github.com/pachyderm/pachyderm/src/client" deployclient "github.com/pachyderm/pachyderm/src/client/deploy" "github.com/pachyder...
package postgresql import ( "database/sql" "fmt" "log" "os" "path" "reflect" "sync" "testing" "time" "github.com/hashicorp/vault/logical" logicaltest "github.com/hashicorp/vault/logical/testing" "github.com/lib/pq" "github.com/mitchellh/mapstructure" "github.com/ory-am/dockertest" ) var ( testImagePul...
// Copyright 2019 NDP Systèmes. All Rights Reserved. // See LICENSE file for full licensing details. package generate import "text/template" var poolInterfacesTemplate = template.Must(template.New("").Parse(` // This file is autogenerated by hexya-generate // DO NOT MODIFY THIS FILE - ANY CHANGES WILL BE OVERWRITTEN...
package main /* * 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 * "L...
// Copyright 2016 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package state import ( "fmt" "math/rand" "net" "github.com/juju/errors" jujutxn "github.com/juju/txn" "github.com/juju/utils/set" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "gopkg.in/mgo.v2/txn" "github.com/juju/juj...
package jira import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "mime/multipart" "net/url" "reflect" "strings" "time" "github.com/fatih/structs" "github.com/google/go-querystring/query" "github.com/trivago/tgo/tcontainer" ) const ( // AssigneeAutomatic represents the value of the "Assignee: Automa...
package main import ( "container/heap" "errors" "fmt" ) // + consumables (potion-like or throwing dart, strategic + tactical) // + equipables // + recharging with depth (rod-like, strategic & a little tactical + mana) // - digging, fog, slowing clouds or something, fear, // fireball, lightning bolt, shatter,...
// Copyright 2016 Tim O'Brien. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package jnigi import ( "errors" "fmt" "runtime" "unsafe" "strings" ) // copy arguments in to C memory before passing to jni functions var copyToC bool = fal...
// Package junos provides automation for Junos (Juniper Networks) devices, as // well as interaction with Junos Space. package junos import ( "encoding/xml" "errors" "fmt" "github.com/scottdware/go-netconf/netconf" "io/ioutil" "log" "regexp" "strings" ) // All of our RPC calls we use. var ( rpcCommand ...
package junos import ( "fmt" "github.com/Juniper/go-netconf/netconf" "log" ) type Session struct { Conn *netconf.Session } func NewSession(host, user, password string) *Session { s, err := netconf.DialSSH(host, netconf.SSHConfigPassword(user, password)) if err != nil { log.Fatal(err) } de...
package karts import ( "fmt" "log" "net/http" "github.com/julienschmidt/httprouter" "github.com/firedrake969/karts/staticfiles" "github.com/firedrake969/karts/views" ) func RunKarts(routes map[string]views.View) { fmt.Println("Starting...") router := httprouter.New() staticli...