1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 11:57:02 +00:00

formatting

Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-08-17 10:06:20 +03:00
parent 00967408dc
commit 07046ab978
112 changed files with 477 additions and 517 deletions

View File

@@ -99,7 +99,6 @@ func newApp(db *DB) *iris.Application {
ctx.ViewData("FORM_RESULT",
template.HTML("<pre><a target='_new' href='"+shortenURL+"'>"+shortenURL+" </a></pre>"))
}
}
}

View File

@@ -73,5 +73,4 @@ func TestURLShortener(t *testing.T) {
}
time.Sleep(1 * time.Second)
}

View File

@@ -20,9 +20,7 @@ type Store interface {
Close() // release the store or ignore
}
var (
tableURLs = []byte("urls")
)
var tableURLs = []byte("urls")
// DB representation of a Store.
// Only one table/bucket which contains the urls, so it's not a fully Database,
@@ -44,7 +42,7 @@ func openDatabase(stumb string) *bolt.DB {
}
// create the buckets here
var tables = [...][]byte{
tables := [...][]byte{
tableURLs,
}
@@ -160,7 +158,6 @@ func (d *DB) GetByValue(value string) (keys []string) {
// Len returns all the "shorted" urls length
func (d *DB) Len() (num int) {
d.db.View(func(tx *bolt.Tx) error {
// Assume bucket exists and has keys
b := tx.Bucket(tableURLs)
if b == nil {