4 Commits

Author SHA1 Message Date
3117e730c2 Update roadmap 2022-06-05 16:03:46 +09:30
8cf034516f Bump version 2022-06-05 16:03:16 +09:30
18b1c2d559 Do version check every 6 hours 2022-06-05 16:02:40 +09:30
f3c9cf3179 Use gzip compresion and remove some unused imports 2022-06-05 16:01:01 +09:30
7 changed files with 20 additions and 7 deletions

View File

@@ -67,7 +67,7 @@ will not work.
# Roadmap
* More options when managing links
* delete
* sorting
* More tag options
* bookmarklet with pre-filled tags
* bookmarklet with pre-filled tags
* search/filter on tags

View File

@@ -3,6 +3,7 @@ package main
import (
"flag"
"log"
"time"
"github.com/tardisx/linkwallet/db"
"github.com/tardisx/linkwallet/version"
@@ -27,7 +28,12 @@ func main() {
bmm := db.NewBookmarkManager(&dbh)
cmm := db.NewConfigManager(&dbh)
go func() { version.UpdateVersionInfo() }()
go func() {
for {
version.UpdateVersionInfo()
time.Sleep(time.Hour * 6)
}
}()
log.Printf("linkwallet version %s starting", version.Is())

3
go.mod
View File

@@ -20,7 +20,7 @@ require (
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
github.com/stretchr/testify v1.6.1 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/ugorji/go/codec v1.1.7 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
@@ -34,6 +34,7 @@ require (
github.com/antchfx/htmlquery v1.2.4 // indirect
github.com/antchfx/xmlquery v1.3.10 // indirect
github.com/antchfx/xpath v1.2.0 // indirect
github.com/gin-contrib/gzip v0.0.5
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect

4
go.sum
View File

@@ -11,8 +11,11 @@ github.com/antchfx/xpath v1.2.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwq
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gin-contrib/gzip v0.0.5 h1:mhnVU32YnnBh2LPH2iqRqsA/eR7SAqRaD388jL2s/j0=
github.com/gin-contrib/gzip v0.0.5/go.mod h1:OPIK6HR0Um2vNmBUTlayD7qle4yVVRZT0PyhdUigrKk=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs=
github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
@@ -73,6 +76,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/temoto/robotstxt v1.1.2 h1:W2pOjSJ6SWvldyEuiFXNxz3xZ8aiWX5LbfDiOFd7Fxg=
github.com/temoto/robotstxt v1.1.2/go.mod h1:+1AmkuG3IYkh1kv0d2qEB9Le88ehNO0zwOr3ujewlOo=
github.com/timshannon/bolthold v0.0.0-20210913165410-232392fc8a6a h1:oIi7H/bwFUYKYhzKbHc+3MvHRWqhQwXVB4LweLMiVy0=

View File

@@ -8,7 +8,7 @@ import (
"golang.org/x/mod/semver"
)
const Tag = "v0.0.18"
const Tag = "v0.0.19"
var versionInfo struct {
Local struct {

View File

@@ -69,9 +69,9 @@
</div>
<script src="/assets/js/vendor/jquery.js"></script>
<!-- <script src="/assets/js/vendor/jquery.js"></script>
<script src="/assets/js/vendor/what-input.js"></script>
<script src="/assets/js/vendor/foundation.js"></script>
<script src="/assets/js/app.js"></script>
<script src="/assets/js/app.js"></script> -->
</body>
</html>

View File

@@ -18,6 +18,7 @@ import (
"github.com/hako/durafmt"
"github.com/gin-contrib/gzip"
"github.com/gin-gonic/gin"
)
@@ -67,6 +68,7 @@ func Create(bmm *db.BookmarkManager, cmm *db.ConfigManager) *Server {
}
r.Use(headersByURI())
r.Use(gzip.Gzip(gzip.DefaultCompression, gzip.WithExcludedExtensions([]string{".pdf", ".mp4"})))
r.SetHTMLTemplate(templ)
r.StaticFS("/assets", http.FS(staticFS))