mirror of
https://github.com/documize/community.git
synced 2025-07-19 05:09:42 +02:00
gofmt
This commit is contained in:
parent
3019c6fa61
commit
c80ea52d72
42 changed files with 849 additions and 708 deletions
|
@ -27,11 +27,11 @@ import (
|
|||
"github.com/documize/community/core/api/entity"
|
||||
"github.com/documize/community/core/api/request"
|
||||
"github.com/documize/community/core/api/util"
|
||||
"github.com/documize/community/core/section/provider"
|
||||
"github.com/documize/community/core/web"
|
||||
"github.com/documize/community/core/environment"
|
||||
"github.com/documize/community/core/log"
|
||||
"github.com/documize/community/core/section/provider"
|
||||
"github.com/documize/community/core/utility"
|
||||
"github.com/documize/community/core/web"
|
||||
)
|
||||
|
||||
// Authenticate user based up HTTP Authorization header.
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/documize/community/core/api/request"
|
||||
"github.com/documize/community/core/api/store"
|
||||
"github.com/documize/community/core/api/util"
|
||||
api "github.com/documize/community/core/convapi"
|
||||
api "github.com/documize/community/core/convapi"
|
||||
"github.com/documize/community/core/log"
|
||||
|
||||
uuid "github.com/nu7hatch/gouuid"
|
||||
|
|
|
@ -18,8 +18,8 @@ import (
|
|||
"github.com/documize/community/core/api/entity"
|
||||
"github.com/documize/community/core/api/request"
|
||||
"github.com/documize/community/core/api/util"
|
||||
"github.com/documize/community/core/section/provider"
|
||||
"github.com/documize/community/core/log"
|
||||
"github.com/documize/community/core/section/provider"
|
||||
)
|
||||
|
||||
// GetSections returns available smart sections.
|
||||
|
|
|
@ -13,8 +13,8 @@ package utility
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/documize/community/core/log"
|
||||
"errors"
|
||||
"github.com/documize/community/core/log"
|
||||
"os/exec"
|
||||
"time"
|
||||
)
|
||||
|
|
|
@ -17,7 +17,7 @@ import "time"
|
|||
|
||||
func TestCmd(t *testing.T) {
|
||||
cmd := exec.Command("echo", "test")
|
||||
buf, err := CommandWithTimeout(cmd,time.Second)
|
||||
buf, err := CommandWithTimeout(cmd, time.Second)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
|
@ -26,13 +26,13 @@ func TestCmd(t *testing.T) {
|
|||
t.Error("command did not return `test` it returned:" + string(buf))
|
||||
}
|
||||
cmd2 := exec.Command("dingbat doodah")
|
||||
_, err2 := CommandWithTimeout(cmd2,time.Second)
|
||||
_, err2 := CommandWithTimeout(cmd2, time.Second)
|
||||
if err2 == nil {
|
||||
t.Error("bad command did not return an error")
|
||||
}
|
||||
timeout := 5 * time.Second
|
||||
cmd3 := exec.Command("sleep", "50")
|
||||
_, err3 := CommandWithTimeout(cmd3,timeout)
|
||||
_, err3 := CommandWithTimeout(cmd3, timeout)
|
||||
if err3 != errTimeout {
|
||||
t.Error("sleep command did not timeout:", err3)
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import "github.com/documize/community/core/log"
|
|||
|
||||
func TestDefclose(t *testing.T) {
|
||||
var f *os.File
|
||||
log.TestIfErr=true
|
||||
log.TestIfErr = true
|
||||
Close(f)
|
||||
if log.TestIfErr {
|
||||
t.Error("Close() did not error when it should have")
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
)
|
||||
|
||||
func TestWords(t *testing.T) {
|
||||
ws(t, " the quick brown fox jumps over the lazy dog [ ] [" +string(rune(0x200B)), 0, true,
|
||||
ws(t, " the quick brown fox jumps over the lazy dog [ ] ["+string(rune(0x200B)), 0, true,
|
||||
"the quick brown fox jumps over the lazy dog [ [", 1)
|
||||
ws(t, "the quick brown [ dog jumps over the lazy ] fox", 0, false,
|
||||
"the quick brown [ fox .", 0)
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -10,6 +10,7 @@
|
|||
// https://documize.com
|
||||
|
||||
package documize_test
|
||||
|
||||
/* TODO(Elliott)
|
||||
import "testing"
|
||||
import "github.com/documize/community/sdk/exttest"
|
||||
|
|
|
@ -14,8 +14,8 @@ package exttest
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/documize/community/sdk"
|
||||
"github.com/documize/community/core/api/entity"
|
||||
"github.com/documize/community/sdk"
|
||||
)
|
||||
|
||||
func testFolders(t *testing.T, c *documize.Client, myFolder *entity.Label) {
|
||||
|
|
|
@ -14,8 +14,8 @@ package exttest
|
|||
import (
|
||||
"testing"
|
||||
|
||||
api "github.com/documize/community/core/convapi"
|
||||
"github.com/documize/community/sdk"
|
||||
api "github.com/documize/community/core/convapi"
|
||||
)
|
||||
|
||||
// loadData provides data-loading tests to be run locally or from the main Documize repo.
|
||||
|
|
|
@ -14,8 +14,8 @@ package exttest
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/documize/community/sdk"
|
||||
"github.com/documize/community/core/api/entity"
|
||||
"github.com/documize/community/sdk"
|
||||
)
|
||||
|
||||
func testUsers(t *testing.T, c *documize.Client) {
|
||||
|
|
|
@ -17,8 +17,8 @@ import (
|
|||
"errors"
|
||||
"strings"
|
||||
|
||||
api "github.com/documize/community/core/convapi"
|
||||
"github.com/documize/community/core/api/entity"
|
||||
api "github.com/documize/community/core/convapi"
|
||||
)
|
||||
|
||||
// LoadData uploads and converts the raw data comprising a Documize document into Documize, returning a fileID and error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue