CombinedText stringlengths 4 3.42M |
|---|
package main
import (
"KudosBackend/models"
"fmt"
"log"
"net/http"
"os"
_ "github.com/mattn/go-sqlite3"
)
func main() {
models.InitDB("./kudos.db")
SelectMode(os.Args)
}
func SelectMode(args []string) {
if len(args) > 1 {
switch args[1] {
case "serve":
router := models.NewRouter()
log.Print... |
package kv
import (
"fmt"
"os"
"path"
"github.com/s3git/s3git-go/config"
mdb "github.com/szferi/gomdb"
"encoding/hex"
)
var env *mdb.Env
// KV databases containing root level digests for different object types
// When a particular key is present, the value is as follows:
// - when empty, underlying chunk(s) ... |
package influxdb
import (
"context"
)
// ErrLabelNotFound is the error for a missing Label.
const ErrLabelNotFound = ChronografError("label not found")
const (
OpFindLabels = "FindLabels"
OpFindLabelByID = "FindLabelByID"
OpFindLabelMapping = "FindLabelMapping"
OpCreateLabel = "CreateLabel... |
package sexp
import (
"fmt"
"regexp"
"strconv"
)
type Item struct {
Type ItemType
Position int
Value []byte
}
type ItemType int
func (item Item) String() string {
switch item.Type {
case ItemError:
return fmt.Sprintf("Error(%v)", item.Value)
case ItemBracketLeft:
return "("
case ItemBracketRigh... |
package mark
import (
"fmt"
"regexp"
"strings"
"unicode/utf8"
)
// type position
type Pos int
// itemType identifies the type of lex items.
type itemType int
// Item represent a token or text string returned from the scanner
type item struct {
typ itemType // The type of this item.
pos Pos // The startin... |
// Copyright 2017 The LUCI 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... |
package sdk
/*
Copyright 2016 Alexander I.Grafov <grafov@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 require... |
package model
import (
"fmt"
"strings"
"github.com/evandroflores/claimr/database"
"github.com/jinzhu/gorm"
log "github.com/sirupsen/logrus"
)
func init() {
database.DB.AutoMigrate(&Container{})
}
// Container defines the Container information on database.
type Container struct {
gorm.Model
TeamID s... |
package main
import (
"eaciit/gdrj/model"
"eaciit/gdrj/modules"
"os"
"github.com/eaciit/dbox"
"github.com/eaciit/orm/v1"
"github.com/eaciit/toolkit"
// "strings"
"time"
)
var conn dbox.IConnection
var count int
var (
t0 time.Time
fiscalyear, iscount, scount int
data ... |
package render
import (
"container/heap"
"image"
"image/color"
"image/draw"
"time"
"bitbucket.org/oakmoundstudio/oak/event"
"bitbucket.org/oakmoundstudio/oak/timing"
)
var (
rh *RenderableHeap
srh *RenderableHeap
toPushRenderables []Renderable
toPushStatic []Renderable
... |
// This file is part of Monsti, a web content management system.
// Copyright 2012-2013 Christian Neumann
//
// Monsti 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,... |
package aranGO
Added replication
package aranGO
import(
"time"
"errors"
)
type CollectionParameters struct {
CollectionOptions
Id string `json:"cid"`
Version int `json:"version"`
Deleted bool `json:"deleted"`
}
type CollectionDump struct {
Parameters CollectionParameters `... |
package agent
import (
"errors"
"fmt"
"os"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/defaults"
"github.com/aws/aws-sdk-go/aws/endpoints"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/a... |
// Copyright (C) 2013 - 2014, Lefteris Zafiris <zaf.000@gmail.com>
// This program is free software, distributed under the terms of
// the BSD 3-Clause License. See the LICENSE file
// at the top of the source tree.
package agi
import (
"bufio"
"bytes"
"io"
"io/ioutil"
"testing"
)
// AGI environment data
var en... |
package social
import (
"fmt"
"gnd.la/app"
"gnd.la/log"
"gnd.la/tasks"
"time"
)
const (
pollInterval = 5 * time.Minute
)
type Sharer struct {
// Name indicates the name of the gnd.la/tasks.Task which will
// be created when scheduling this Sharer. If empty, a name
// will be derived from the service and the... |
package metric
import (
"time"
"github.com/cloudfoundry/dropsonde/metrics"
)
type Counter string
func (c Counter) Increment() {
metrics.IncrementCounter(string(c))
}
func (c Counter) Add(i uint64) {
metrics.AddToCounter(string(c), i)
}
type Duration string
func (name Duration) Send(duration time.Duration) {
... |
revert changes to assets/bindata.go
|
/*
Copyright 2015 The ContainerOps Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... |
package routing
import (
"bytes"
"fmt"
"runtime"
"sync"
"sync/atomic"
"time"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/coreos/bbolt"
"github.com/davecgh/go-spew/spew"
"github.com/go-errors/errors"
sphinx "github.com/lightningnetwork/lightn... |
package rpcfs
import (
"os"
"log"
"io/ioutil"
"rpc"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/unionfs"
)
type Task struct {
Argv []string
Env []string
Dir string
}
type WorkerTask struct {
fileServer *rpc.Client
mount string
rwDir string
tmpDir string
*Task
*fuse.MountState
}
func ... |
package soyhtml
import (
"bytes"
"fmt"
"io"
"log"
"runtime"
"runtime/debug"
"github.com/robfig/soy/ast"
"github.com/robfig/soy/data"
soyt "github.com/robfig/soy/template"
)
// Logger collects output from {log} commands.
var Logger *log.Logger
// state represents the state of an execution.
type state struct... |
disk: If could not get Inodes, return empty.
|
/*
Copyright 2014 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ag... |
/*
Copyright 2014 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 © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.
package monitor
import (
"crypto/tls"
"io"
"strings"
"sync"
"github.com/TheThingsNetwork/go-utils/grpc/restartstream"
"github.com/TheThingsNetwork/go-utils/log"
"github.com/T... |
package version
// Version of Functions
var Version = "0.3.245"
fnserver: 0.3.246 release [skip ci]
package version
// Version of Functions
var Version = "0.3.246"
|
package consul
import (
"bytes"
"fmt"
"net/http"
"strings"
"sync"
"time"
"github.com/hashicorp/consul/api"
"github.com/portworx/kvdb"
"github.com/sirupsen/logrus"
)
const (
// httpError is a substring returned by consul during such http errors.
// Ideally such errors should be provided as consul constants... |
package controllers
import (
"net/http"
"github.com/julienschmidt/httprouter"
"github.com/raggaer/castro/app/lua"
"github.com/raggaer/castro/app/util"
)
// LuaPage executes the given lua page
func LuaPage(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
luaState := lua.Pool.Get()
defer lua.Pool.... |
package gps
import (
"bytes"
"fmt"
"go/build"
gscan "go/scanner"
"io"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"text/scanner"
)
var osList []string
var archList []string
var stdlib = make(map[string]bool)
const stdlibPkgs string = "archive archive/tar archive/zip bufio builtin bytes compress comp... |
package vsolver
import (
"bytes"
"fmt"
"go/build"
"io"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"text/scanner"
)
var osList []string
var archList []string
var stdlib = make(map[string]struct{})
const stdlibPkgs string = "archive archive/tar archive/zip bufio builtin bytes compress compress/bzip2 c... |
package gps
import (
"bytes"
"errors"
"fmt"
"go/build"
"go/parser"
gscan "go/scanner"
"go/token"
"io"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"text/scanner"
"unicode"
)
var (
osList []string
archList []string
ignoreTags = []string{} //[]string{"appengine", "ignore"} //TODO: appengine i... |
// Copyright 2016 CNI 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 ... |
// Package rundeck provides a client for interacting with a Rundeck instance
// via its HTTP API.
//
// Instantiate a Client with the NewClient function to get started.
//
// At present this package uses Rundeck API version 13.
package rundeck
import (
"crypto/tls"
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
"ne... |
package runner
import (
"bufio"
"errors"
"fmt"
"github.com/lhchavez/quark/common"
"io"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"strconv"
"strings"
"syscall"
)
var (
minijailPath string = "/var/lib/minijail"
)
// Preloads an input so that the contestant's program has to wait less time.
type in... |
package linda
import (
"github.com/sirupsen/logrus"
"strconv"
"sync"
"errors"
)
var (
broker Broker
saver Saver
initMutex sync.Mutex
initialized bool
config *Config
quit chan bool
ErrNotInitialized = errors.New("")
)
// Open linda with config
//... |
package api
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"mime/multipart"
"net/http"
"net/url"
"os"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/matzoe/xunlei/cookiejar"
)
var noSuchTaskErr error
var invalidResponseErr error
var unexpectedErr error
var taskNotComp... |
// Package api defines data types representing core collectd data types.
package api // import "collectd.org/api"
import (
"time"
)
// Value represents either a Gauge or a Derive. It is Go's equivalent to the C
// union value_t. If a function accepts a Value, you may pass in either a Gauge
// or a Derive. Passing in... |
package main
import (
"crypto/x509"
"encoding/pem"
"fmt"
"net/http"
"github.com/russellhaering/gosaml2"
"github.com/russellhaering/goxmldsig"
)
var rawIdpCertificate = `
-----BEGIN CERTIFICATE-----
MIIDpDCCAoygAwIBAgIGAVLIBhAwMA0GCSqGSIb3DQEBBQUAMIGSMQswCQYDVQQGEwJVUzETMBEG
A1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN... |
package models
type Registration struct {
Id int `name:"id" type:"int" null:"NOT NULL" extra:"PRIMARY"`
FaceId int `name:"face_id" type:"int" null:"NOT NULL" extra:"REFERENCES" refTable:"faces" refField:"id" refFieldShow:"id"`
}
func (c *ModelManager) Registrations() *RegistrationModel {
model := new(... |
package targetworkloadservice
import (
"context"
"fmt"
"strings"
"sync"
"github.com/pkg/errors"
util "github.com/rancher/rancher/pkg/controllers/user/workload"
"github.com/rancher/types/apis/core/v1"
"github.com/rancher/types/config"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
"k8s.io/apima... |
/*
Copyright 2019 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 2013 Andreas Koch. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package updatehandler
import (
"strings"
)
type hub struct {
// Registered connections.
connections map[*connection]bool
// Inbound messages from the conne... |
// 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 os
import (
"syscall";
"os";
"unsafe";
)
const (
blockSize = 4096 // TODO(r): use statfs
)
func clen(n []byte) int {
for i := 0; i < len(n); i++... |
package sous
import "github.com/samsalisbury/semv"
type (
// Manifests is a collection of Manifest.
Manifests []*Manifest
// Manifest is a minimal representation of the global deployment state of
// a particular named application. It is designed to be written and read by
// humans as-is, and expanded into full D... |
package sparse
import (
"crypto/sha1"
"net"
"os"
"strconv"
"bytes"
"encoding/binary"
fio "github.com/rancher/sparse-tools/directfio"
"github.com/rancher/sparse-tools/log"
)
import "encoding/gob"
import "errors"
import "fmt"
import "time"
// HashCollsisionError indicates block hash collision
type HashCol... |
package webhook
import (
"crypto/hmac"
"crypto/sha1"
"encoding/hex"
"encoding/json"
"fmt"
"html"
"io/ioutil"
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/google/go-github/github"
"github.com/matrix-org/gomatrix"
"github.com/matrix-org/util"
)
// OnReceiveRequest processes incoming g... |
package cli
import (
"bytes"
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"reflect"
"strings"
"testing"
)
var (
lastExitCode = 0
fakeOsExiter = func(rc int) {
lastExitCode = rc
}
fakeErrWriter = &bytes.Buffer{}
)
func init() {
OsExiter = fakeOsExiter
ErrWriter = fakeErrWriter
}
type opCounts struct... |
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2012 The Gorilla 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 rpc
import (
"fmt"
"net/http"
"reflect"
"strings"
)
// -------------------------------... |
package model
import "fmt"
import "net/url"
import "net/http"
import "net/http/cookiejar"
import "github.com/ishiikurisu/moneylog"
import "os"
import "mime/multipart"
import "bufio"
/*****************************
* LOCAL STORAGE DEFINITIONS *
*****************************/
// This is the structure that will deal w... |
package models
type Direction int
const (
North Direction = 1 << iota
South
East
West
)
type Coordinate struct {
X, Y int
}
type Gopher struct {
// Current direction
Direction Direction
X, Y int
Path []Coordinate
Score int
Paths chan map[int][]Coordinate
Close chan struct{}
}
func... |
// Copyright 2014 Unknwon
//
// 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 writ... |
package models
import (
"encoding/json"
"fmt"
"io/ioutil"
"os/exec"
"github.com/astaxie/beego"
)
var listener map[string][]string = nil
func Listener() map[string][]string {
if listener == nil {
fn := beego.AppConfig.String("listen")
data, err := ioutil.ReadFile(fn)
beego.Error(data)
if err != nil {
... |
package models
import (
"database/sql"
"fmt"
"log"
"sort"
"strings"
"time"
"github.com/brnstz/bus/common"
"github.com/jmoiron/sqlx"
)
const maxStops = 3
type Trip struct {
Id string
Headsign string
DirectionId int
}
type Service struct {
Id string
RouteId string
}
type ScheduledStopT... |
// This package implements a provisioner for Packer that uses
// Chef to provision the remote machine, specifically with chef-client (that is,
// with a Chef server).
package chefclient
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/hashicorp/packer/common"
"git... |
// This package implements a provisioner for Packer that uses
// Chef to provision the remote machine, specifically with chef-client (that is,
// with a Chef server).
package chefclient
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/mitchellh/packer/co... |
// Copyright (c) 2016, Daniel Martí <mvdan@mvdan.cc>
// See LICENSE for licensing information
package sh
import (
"reflect"
"strings"
"testing"
"github.com/kr/pretty"
)
func lit(s string) Lit { return Lit{Value: s} }
func lits(strs ...string) []Node {
l := make([]Node, len(strs))
for i, s := range strs {
l[... |
// 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 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... |
package server
import (
"bytes"
"fmt"
"io/ioutil"
"math/rand"
"os"
"path"
"path/filepath"
"strings"
"sync"
"testing"
"time"
"github.com/pachyderm/pachyderm"
"github.com/pachyderm/pachyderm/src/client"
pfsclient "github.com/pachyderm/pachyderm/src/client/pfs"
"github.com/pachyderm/pachyderm/src/client/p... |
package sprite
import (
"fmt"
"math/rand"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"sync"
"github.com/runningwild/glop/render"
"github.com/runningwild/glop/util/algorithm"
"github.com/runningwild/opengl/gl"
"github.com/runningwild/opengl/glu"
"github.com/runningwild/yedparse"
)
const ... |
package server
import (
"bytes"
"fmt"
"io/ioutil"
"math/rand"
"os"
"path"
"path/filepath"
"strings"
"sync"
"testing"
"time"
"golang.org/x/net/context"
"github.com/pachyderm/pachyderm"
"github.com/pachyderm/pachyderm/src/client"
pfsclient "github.com/pachyderm/pachyderm/src/client/pfs"
"github.com/pac... |
package server
import (
"bytes"
"context"
"encoding/base64"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"math"
"math/rand"
"net"
"net/http"
"net/url"
"os"
"os/exec"
"path"
"strconv"
"strings"
"sync"
"testing"
"time"
"golang.org/x/sync/errgroup"
"github.com/pachyderm/pachyde... |
package btelegram
import (
"html"
"path/filepath"
"strconv"
"strings"
"unicode/utf16"
"github.com/42wim/matterbridge/bridge/config"
"github.com/42wim/matterbridge/bridge/helper"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
)
func (b *Btelegram) handleUpdate(rmsg *config.Message, message, posted... |
/*
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 2017 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 jenkins
import (
"bytes"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"net/http"
"regexp"
"strings"
"time"
g "github.com/onsi/ginkgo"
o "github.com/onsi/gomega"
kapi "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/util/wait"
exutil "github.com/openshift/origin/test/extended/util"
)
// JenkinsRef ... |
// 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 io
// Simple byte buffer for marshaling data.
import (
"io";
"os";
)
// TODO(r): Do better memory management.
func bytecopy(dst []byte, doff int,... |
// Copyright (c) 2014 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package btcjson
// GetTransactionDetailsResult models the details data from the gettransaction command.
//
// This models the "short" version of the ListTransactionsResult t... |
package vxlan
import (
//"fmt"
//"strings"
//"time"
"net"
"strconv"
log "github.com/Sirupsen/logrus"
"github.com/docker/go-plugins-helpers/network"
//"github.com/samalba/dockerclient"
//"github.com/davecgh/go-spew/spew"
"github.com/vishvananda/netlink"
)
type Driver struct {
network.Driver
networks map[s... |
// 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 ... |
// Copyright 2017, Kerby Shedden and the Muscato contributors.
// Muscato (Multi-Genome Scalable Alignment Tool) is a software tool
// for matching large collections of reads into large collections of
// target sequence (e.g. transcript sequences).
//
// Muscato uses a two-stage approach. First, high-entropy
// subse... |
//go:generate struct-markdown
//go:generate mapstructure-to-hcl2 -type Config,SharedImageGallery,SharedImageGalleryDestination,PlanInformation
package arm
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"math/big"
"net"
"regexp"
"str... |
// Package adminz provides a simple set of adminz pages for administering
// a simple go server.
package adminz
import (
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"runtime"
"sync"
"time"
)
type Adminz struct {
// keep track of killfile state
running bool
// ticker that checks killfiles every 1 second
k... |
package bagins_test
import (
"github.com/APTrust/bagins"
"github.com/APTrust/bagins/bagutil"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
)
func TestNewBag(t *testing.T) {
// Use this ChecksumAlgorithm for the tests.
algo := "sha1"
hsh, _ := bagutil.LookupHashFunc(algo)
cs := bagutil.NewChecksumAl... |
// Copyright 2015 Mikio Hara. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipoam
import (
"net"
"runtime"
"sync/atomic"
"time"
"golang.org/x/net/icmp"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
)
type cookie uint64
... |
package godoto
import (
"encoding/json"
"net/url"
"strconv"
)
type MatchHistory struct {
Status int `json:"status"`
Limit int `json:"num_results"`
Total int `json:"total_results"`
Remaining int `json:"results_remaining"`
Matches []... |
package amazonproduct
import (
"net/url"
"sort"
"fmt"
"strings"
"crypto/hmac"
"crypto/sha256"
"encoding/base64"
"time"
"net/http"
"io/ioutil"
)
type AmazonProductAPI struct {
AccessKey string
SecretKey string
AssociateTag string
Host string
}
func (api AmazonProductAPI) ItemSearchByKeyword(Keywords st... |
package main
import (
"encoding/csv"
"encoding/json"
"flag"
"fmt"
"github.com/skelterjohn/go.matrix"
"github.com/ziutek/mymysql/mysql"
_ "github.com/ziutek/mymysql/native"
"log"
"math"
"os"
"runtime"
"sort"
"strconv"
)
const _DB_CONFIG_FILENAME = "db_config.SECRET.json"
const _OUTPUT_FILENAME = "output.c... |
/*
Copyright 2015 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 main
const Version = "0.0.3"
Bump version.
package main
const Version = "0.0.4"
|
package datastore
import (
"io"
"log"
dsq "github.com/ipfs/go-datastore/query"
)
// Here are some basic datastore implementations.
type keyMap map[Key]interface{}
// MapDatastore uses a standard Go map for internal storage.
type MapDatastore struct {
values keyMap
}
// NewMapDatastore constructs a MapDatastor... |
/*
Copyright 2015 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 goldb
import (
"sync/atomic"
"github.com/syndtr/goleveldb/leveldb"
)
func (s *Storage) ExecBatch(fn func(tx *Transaction)) error {
atomic.AddInt64(&s.cntWaitingTrans, 1)
defer atomic.AddInt64(&s.cntWaitingTrans, -1)
// put tx to batch
s.batchMx.Lock()
if s.batchExst == nil {
s.batchExst = make(chan... |
auth: fix typo in comments
|
// 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 mime_test
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"mime"
)
func ExampleWordEncoder_Encode() {
fmt.Println(mime.QEncoding.Encode("utf-8", "¡Hola,... |
/*
Copyright 2015 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 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Copyright 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 main
import (
"bytes"
"code.google.com/p/go.crypto/pbkdf2"
"crypto/sha512"
"encoding/json"
"fmt"
"github.com/globocom/config"
"github.com/globoco... |
[login] Remove the ID() function which is never used.
Change-Id: I924887fb9c8b142c10670cc3c7de6fa5fe0bcc9b
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/392099
Auto-Submit: Joe Gregorio <b9cf2471ff6d33504cafe8e6f356b732b2cadced@google.com>
Reviewed-by: Kevin Lubick <7cdab2cfab351f23814786ba39716e90ee... |
dl: add go1.13rc1
Change-Id: I2d98f699060e761f26ab590641061dc9f90e1918
Reviewed-on: https://go-review.googlesource.com/c/dl/+/191161
Reviewed-by: Dmitri Shuralyov <d181b7fea0ec87c86ba5a890ab716db52498e3ba@golang.org>
|
fix variable lower camel case
|
update import path for snappy
|
package main
import (
"bytes"
"crypto/rand"
"encoding/json"
"io/ioutil"
"log"
"os"
"github.com/cloudfoundry/bosh-bootloader/application"
"github.com/cloudfoundry/bosh-bootloader/aws"
"github.com/cloudfoundry/bosh-bootloader/aws/clientmanager"
"github.com/cloudfoundry/bosh-bootloader/aws/cloudformation"
"gi... |
package api
import (
"database/sql"
"fmt"
"log"
"net/http"
"strconv"
"strings"
"github.com/mdlayher/wavepipe/data"
"github.com/mdlayher/wavepipe/transcode"
"github.com/go-martini/martini"
"github.com/martini-contrib/render"
)
// GetTranscode returns a transcoded media file stream from wavepipe. On succes... |
package apig
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"text/template"
"github.com/wantedly/apig/msg"
"github.com/wantedly/apig/util"
)
var r = regexp.MustCompile(`_templates/skeleton/.*\.tmpl$`)
func generateSkeleton(detail *Detail, outDir string) error {
var wg ... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"github.com/golang/gddo/httputil"
"github.com/gorilla/mux"
"github.com/yunify/metad/backends"
"github.com/yunify/metad/log"
"github.com/yunify/metad/metadata"
"github.com/yunify/metad/util/flatmap"
yaml "gopkg.in/yaml.v2"
"net"
"net/http"
"os"
"os/signa... |
package gangliamr
import (
"github.com/daaku/go.ganglia/gmetric"
"github.com/daaku/go.metrics"
)
// Meters count events to produce exponentially-weighted moving average rates
// at one-, five-, and fifteen-minutes and a mean rate.
type Meter struct {
metrics.Meter
Name string // Required.
Title stri... |
package main
import (
"flag"
"fmt"
"github.com/slowfei/gosfdoc"
"strings"
)
var (
_lang *string = nil
_configFile = flag.String("config", "gosfdoc.json", "custom config file path.")
)
func init() {
impls := make([]string, 0, 0)
for k, _ := range gosfdoc.MapParser() {
impls = append(impls, k)
... |
Update hello.go
|
package aws
import (
"fmt"
"reflect"
"regexp"
"strings"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/autoscaling"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
)
func TestAccAWSAutoScalingGr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.