Run gofmt on files that need it

This commit is contained in:
Matt Baer 2021-06-09 14:22:13 -04:00
parent e7245536f3
commit 230c736583
5 changed files with 12 additions and 13 deletions

View File

@ -60,6 +60,7 @@ func AssetNames() []string {
var _bindata = map[string]func() ([]byte, error){ var _bindata = map[string]func() ([]byte, error){
"schema.sql": schema_sql, "schema.sql": schema_sql,
} }
// AssetDir returns the file names below a certain // AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata. // directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the // For example if you run go-bindata on data/... and data contains the
@ -96,10 +97,10 @@ func AssetDir(name string) ([]string, error) {
} }
type _bintree_t struct { type _bintree_t struct {
Func func() ([]byte, error) Func func() ([]byte, error)
Children map[string]*_bintree_t Children map[string]*_bintree_t
} }
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{ var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"schema.sql": &_bintree_t{schema_sql, map[string]*_bintree_t{ "schema.sql": &_bintree_t{schema_sql, map[string]*_bintree_t{}},
}},
}} }}

View File

@ -23,4 +23,3 @@ func RunTransactionWithOptions(ctx context.Context, db *sql.DB, txOpts *sql.TxOp
} }
return tx.Commit() return tx.Commit()
} }

View File

@ -150,4 +150,4 @@ func countRows(t *testing.T, ctx context.Context, db *sql.DB, count int, query s
err := db.QueryRowContext(ctx, query, args...).Scan(&returned) err := db.QueryRowContext(ctx, query, args...).Scan(&returned)
assert.NoError(t, err, "error executing query %s and args %s", query, args) assert.NoError(t, err, "error executing query %s and args %s", query, args)
assert.Equal(t, count, returned, "unexpected return count %d, expected %d from %s and args %s", returned, count, query, args) assert.Equal(t, count, returned, "unexpected return count %d, expected %d from %s and args %s", returned, count, query, args)
} }

View File

@ -7,4 +7,3 @@ type ClientStateStore interface {
Generate(ctx context.Context) (string, error) Generate(ctx context.Context) (string, error)
Validate(ctx context.Context, state string) error Validate(ctx context.Context, state string) error
} }

View File

@ -14,10 +14,10 @@ import "testing"
func TestPostLede(t *testing.T) { func TestPostLede(t *testing.T) {
text := map[string]string{ text := map[string]string{
"早安。跨出舒適圈,才能前往": "早安。", "早安。跨出舒適圈,才能前往": "早安。",
"早安。This is my post. It is great.": "早安。", "早安。This is my post. It is great.": "早安。",
"Hello. 早安。": "Hello.", "Hello. 早安。": "Hello.",
"Sup? Everyone says punctuation is punctuation.": "Sup?", "Sup? Everyone says punctuation is punctuation.": "Sup?",
"Humans are humans, and society is full of good and bad actors. Technology, at the most fundamental level, is a neutral tool that can be used by either to meet any ends. ": "Humans are humans, and society is full of good and bad actors.", "Humans are humans, and society is full of good and bad actors. Technology, at the most fundamental level, is a neutral tool that can be used by either to meet any ends. ": "Humans are humans, and society is full of good and bad actors.",
`Online Domino Is Must For Everyone `Online Domino Is Must For Everyone
@ -40,9 +40,9 @@ func TestPostLede(t *testing.T) {
func TestTruncToWord(t *testing.T) { func TestTruncToWord(t *testing.T) {
text := map[string]string{ text := map[string]string{
"Можливо, ми можемо використовувати інтернет-інструменти, щоб виготовити якийсь текст, який би міг бути і на, і в кінцевому підсумку, буде скорочено, тому що це тривало так довго.": "Можливо, ми можемо використовувати інтернет-інструменти, щоб виготовити якийсь", "Можливо, ми можемо використовувати інтернет-інструменти, щоб виготовити якийсь текст, який би міг бути і на, і в кінцевому підсумку, буде скорочено, тому що це тривало так довго.": "Можливо, ми можемо використовувати інтернет-інструменти, щоб виготовити якийсь",
"早安。This is my post. It is great. It is a long post that is great that is a post that is great.": "早安。This is my post. It is great. It is a long post that is great that is a post", "早安。This is my post. It is great. It is a long post that is great that is a post that is great.": "早安。This is my post. It is great. It is a long post that is great that is a post",
"Sup? Everyone says punctuation is punctuation.": "Sup? Everyone says punctuation is punctuation.", "Sup? Everyone says punctuation is punctuation.": "Sup? Everyone says punctuation is punctuation.",
"I arrived in Japan six days ago. Tired from a 10-hour flight after a night-long layover in Calgary, I wandered wide-eyed around Narita airport looking for an ATM.": "I arrived in Japan six days ago. Tired from a 10-hour flight after a night-long", "I arrived in Japan six days ago. Tired from a 10-hour flight after a night-long layover in Calgary, I wandered wide-eyed around Narita airport looking for an ATM.": "I arrived in Japan six days ago. Tired from a 10-hour flight after a night-long",
} }
c := 1 c := 1