Fixing a number of golint issues.

This commit is contained in:
Alain Jobart 2014-12-18 14:16:41 -08:00
Родитель 6a6072f290
Коммит 1dc7acf487
20 изменённых файлов: 39 добавлений и 35 удалений

Просмотреть файл

@ -3,26 +3,26 @@
// license that can be found in the LICENSE file.
/*
Package timer provides timer functionality that can be controlled
by the user. You start the timer by providing it a callback function,
which it will call at the specified interval.
Package timer provides timer functionality that can be controlled
by the user. You start the timer by providing it a callback function,
which it will call at the specified interval.
var t = timer.NewTimer(1e9)
t.Start(KeepHouse)
var t = timer.NewTimer(1e9)
t.Start(KeepHouse)
func KeepHouse() {
// do house keeping work
}
func KeepHouse() {
// do house keeping work
}
You can stop the timer by calling t.Stop, which is guaranteed to
wait if KeepHouse is being executed.
You can stop the timer by calling t.Stop, which is guaranteed to
wait if KeepHouse is being executed.
You can create an untimely trigger by calling t.Trigger. You can also
schedule an untimely trigger by calling t.TriggerAfter.
You can create an untimely trigger by calling t.Trigger. You can also
schedule an untimely trigger by calling t.TriggerAfter.
The timer interval can be changed on the fly by calling t.SetInterval.
A zero value interval will cause the timer to wait indefinitely, and it
will react only to an explicit Trigger or Stop.
The timer interval can be changed on the fly by calling t.SetInterval.
A zero value interval will cause the timer to wait indefinitely, and it
will react only to an explicit Trigger or Stop.
*/
package timer

Просмотреть файл

@ -1,6 +1,7 @@
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package client2
import (

Просмотреть файл

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// API compliant to the requirements of database/sql
// Package tablet is an API compliant to the requirements of database/sql
// Open expects name to be "hostname:port/keyspace/shard"
// For query arguments, we assume place-holders in the query string
// in the form of :v0, :v1, etc.

Просмотреть файл

@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This implements some additional error handling logic to make the client
// more robust in the face of transient problems with easy solutions.
// Package tablet implements some additional error handling logic to
// make the client more robust in the face of transient problems with
// easy solutions.
package tablet
import (

Просмотреть файл

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// primecache primes the MySQL buffer cache with the rows that are
// Package primecache primes the MySQL buffer cache with the rows that are
// going to be modified by the replication stream. It only activates
// if we're falling behind on replication.
package primecache

Просмотреть файл

@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
/*
Package agent exports the ActionAgent object. It keeps the local tablet
Package tabletmanager exports the ActionAgent object. It keeps the local tablet
state, starts / stops all associated services (query service,
update stream, binlog players, ...), and handles tabletmanager RPCs
to update the state.

Просмотреть файл

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// helpers package contains a few utility classes to handle topo.Server
// Package helpers contains a few utility classes to handle topo.Server
// objects, and transitions from one topo implementation to another.
package helpers

Просмотреть файл

@ -1,4 +1,4 @@
// faketopo contains utitlities for tests that have to interact with a
// Package faketopo contains utitlities for tests that have to interact with a
// Vitess topology.
package faketopo

Просмотреть файл

@ -1,4 +1,4 @@
// package test contains utilities to test topo.Server
// Package test contains utilities to test topo.Server
// implementations. If you are testing your implementation, you will
// want to call CheckAll in your test method. For an example, look at
// the tests in github.com/youtube/vitess/go/vt/zktopo.

Просмотреть файл

@ -1,4 +1,4 @@
// package test contains utilities to test topo.Server
// Package test contains utilities to test topo.Server
// implementations. If you are testing your implementation, you will
// want to call CheckAll in your test method. For an example, look at
// the tests in github.com/youtube/vitess/go/vt/zktopo.

Просмотреть файл

@ -1,4 +1,4 @@
// package test contains utilities to test topo.Server
// Package test contains utilities to test topo.Server
// implementations. If you are testing your implementation, you will
// want to call CheckAll in your test method. For an example, look at
// the tests in github.com/youtube/vitess/go/vt/zktopo.

Просмотреть файл

@ -1,4 +1,4 @@
// package test contains utilities to test topo.Server
// Package test contains utilities to test topo.Server
// implementations. If you are testing your implementation, you will
// want to call CheckAll in your test method. For an example, look at
// the tests in github.com/youtube/vitess/go/vt/zktopo.

Просмотреть файл

@ -1,4 +1,4 @@
// package test contains utilities to test topo.Server
// Package test contains utilities to test topo.Server
// implementations. If you are testing your implementation, you will
// want to call CheckAll in your test method. For an example, look at
// the tests in github.com/youtube/vitess/go/vt/zktopo.

Просмотреть файл

@ -1,4 +1,4 @@
// package test contains utilities to test topo.Server
// Package test contains utilities to test topo.Server
// implementations. If you are testing your implementation, you will
// want to call CheckAll in your test method. For an example, look at
// the tests in github.com/youtube/vitess/go/vt/zktopo.

Просмотреть файл

@ -1,4 +1,4 @@
// package test contains utilities to test topo.Server
// Package test contains utilities to test topo.Server
// implementations. If you are testing your implementation, you will
// want to call CheckAll in your test method. For an example, look at
// the tests in github.com/youtube/vitess/go/vt/zktopo.

Просмотреть файл

@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
/*
'worker' package contains the framework, utility methods and core
Package worker contains the framework, utility methods and core
functions for long running actions. 'vtworker' binary will use these.
*/
package worker

Просмотреть файл

@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// wrangler contains the Wrangler object to manage complex topology actions.
// Package wrangler contains the Wrangler object to manage complex
// topology actions.
package wrangler
import (

Просмотреть файл

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/* Emulate a "global" namespace across n zk quorums. */
// Package zk emulates a "global" namespace across n zk quorums.
package zk
import (

Просмотреть файл

@ -42,7 +42,7 @@ func TestLifeCycleGlobal(t *testing.T) {
testLifeCycle(t, "1255@voltron:2890:3890:2183", 1255)
}
func testLifeCycle(t *testing.T, config string, myId uint32) {
func testLifeCycle(t *testing.T, config string, myID uint32) {
currentVtDataRoot := os.Getenv("VTDATAROOT")
vtDataRoot := path.Join(os.TempDir(), fmt.Sprintf("VTDATAROOT_%v", getUUID(t)))
if err := os.Setenv("VTDATAROOT", vtDataRoot); err != nil {
@ -57,7 +57,7 @@ func testLifeCycle(t *testing.T, config string, myId uint32) {
t.Errorf("cannot remove test VTDATAROOT directory: %v", err)
}
}()
zkConf := MakeZkConfigFromString(config, myId)
zkConf := MakeZkConfigFromString(config, myID)
zkd := NewZkd(zkConf)
if err := zkd.Init(); err != nil {
t.Fatalf("Init() err: %v", err)

Просмотреть файл

@ -1,4 +1,5 @@
// To be used with PowerDNS (pdns) as a "pipe backend" CoProcess.
// Package pdns provides code to be used with PowerDNS (pdns) as a
// "pipe backend" CoProcess.
//
// Protocol description:
// http://downloads.powerdns.com/documentation/html/backends-detail.html#PIPEBACKEND.