godoc cleanup, hiding internal APIs

This commit is contained in:
Jarek Kowalski
2016-08-21 08:28:40 -07:00
parent 91d4346f67
commit dcd7e0f76f
16 changed files with 14 additions and 51 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
.DS_Store
.release/
.releases/
cmd/playground/
kopia-*.tar.gz
kopia-*.zip
combined.cov

View File

@@ -24,7 +24,7 @@ play:
go run cmd/playground/main.go
lint:
-golint github.com/kopia/kopia/...
golint github.com/kopia/kopia/...
vet:
go tool vet -all .

View File

@@ -1,5 +1,5 @@
/*
The 'kopia' utility supports creating and accessing backups from command line.
Command-line tool for creating and accessing backups.
Usage:

View File

@@ -1,43 +0,0 @@
package main
import (
"bytes"
"log"
"github.com/kopia/kopia/repo"
"github.com/kopia/kopia/storage/storagetesting"
)
func main() {
d := map[string][]byte{}
s := storagetesting.NewMapStorage(d)
f := repo.Format{
Version: 1,
MaxBlobSize: 100,
ObjectFormat: "TESTONLY_MD5",
}
r, err := repo.NewRepository(s, &f)
if err != nil {
log.Fatalf("Err: %v", err)
}
w := r.NewWriter(repo.WithDescription("tester"))
w.Write(bytes.Repeat([]byte("a"), 5000))
result, err := w.Result(true)
log.Printf("result: %v", result.UIString())
log.Printf("attempting to open")
rdr, err := r.Open(result)
if err != nil {
log.Fatalf("open: %v", err)
}
log.Printf("len: %v\n", rdr.Length())
log.Printf("----")
// for k, v := range d {
// log.Printf("%v = %v", k, string(v))
// }
rdr.Close()
}

View File

@@ -1,5 +1,6 @@
// +build !windows
// Package fuse implements Node FUSE filesystem APIs for mounting contents of filesystem stored in repository.
package fuse
import (

View File

@@ -13,8 +13,8 @@
"testing"
"github.com/kopia/kopia/internal/jsonstream"
"github.com/kopia/kopia/internal/storagetesting"
"github.com/kopia/kopia/storage"
"github.com/kopia/kopia/storage/storagetesting"
)
func testFormat() *Format {

View File

@@ -10,8 +10,8 @@
"github.com/kopia/kopia/storage"
"github.com/kopia/kopia/internal/storagetesting"
"github.com/kopia/kopia/storage/logging"
"github.com/kopia/kopia/storage/storagetesting"
"testing"
)

View File

@@ -1,3 +1,4 @@
// Package filesystem implements filesystem-based Storage.
package filesystem
import (

View File

@@ -5,7 +5,7 @@
"os"
"testing"
"github.com/kopia/kopia/storage/storagetesting"
"github.com/kopia/kopia/internal/storagetesting"
)
func TestFileStorage(t *testing.T) {

View File

@@ -1,3 +1,4 @@
// Package gcs implements Storage based on Google Cloud Storage bucket.
package gcs
import (

View File

@@ -1,3 +1,4 @@
// Package logging implements wrapper around Storage that logs all activity.
package logging
import (
@@ -6,9 +7,10 @@
"github.com/kopia/kopia/storage"
)
// Printfer is
// Printfer supports emitting formatted strings to arbitrary outputs.
// The formatting language must be compatible with fmt.Sprintf().
type Printfer interface {
Printf(string, ...interface{})
Printf(fmt string, args ...interface{})
}
type loggingStorage struct {

View File

@@ -3,7 +3,7 @@
import (
"testing"
"github.com/kopia/kopia/storage/storagetesting"
"github.com/kopia/kopia/internal/storagetesting"
)
func TestLoggingStorage(t *testing.T) {