gromer

#golang#htmx#ssr

git clone https://git.pyrossh.dev/gromer

gromer is a framework and cli to build multipage web apps in golang using htmx and alpinejs.


2a8adc2 — Peter John 2022-08-03T22:55:26+05:30
Fix todo meta

Generated files not shown: go.sum

Files changed (3) hide show
  1. _example/routes/todos.go +8 -6
  2. go.mod +4 -15
  3. gsx/gsx.go +1 -0
_example/routes/todos.go CHANGED
@@ -7,6 +7,13 @@ import (
7
7
  "github.com/rotisserie/eris"
8
8
  )
9
9
 
10
+ var TodoMeta = M{
11
+ "title": "Gromer Todos",
12
+ "description": "Gromer Todos",
13
+ "author": "gromer",
14
+ "keywords": "gromer",
15
+ }
16
+
10
17
  var TodoStyles = M{
11
18
  "bg": "bg-gray-50 min-h-screen font-sans",
12
19
  "container": "container mx-auto flex flex-col items-center",
@@ -55,12 +62,7 @@ func TodosPage(c *Context, params TodosPageParams) ([]*Tag, int, error) {
55
62
  c.Set("allClass", allClass)
56
63
  c.Set("activeClass", activeClass)
57
64
  c.Set("completedClass", completedClass)
58
- c.Meta(M{
65
+ c.Meta(TodoMeta)
59
- "title": "Gromer Todos",
60
- "description": "Gromer Todos",
61
- "author": "gromer",
62
- "keywords": "gromer",
63
- })
64
66
  c.Styles(TodoStyles)
65
67
  return c.Render(`
66
68
  <div id="bg" class="bg">
go.mod CHANGED
@@ -4,6 +4,7 @@ go 1.18
4
4
 
5
5
  require (
6
6
  github.com/alecthomas/participle/v2 v2.0.0-beta.3
7
+ github.com/alecthomas/repr v0.1.0
7
8
  github.com/felixge/httpsnoop v1.0.1
8
9
  github.com/go-playground/validator/v10 v10.9.0
9
10
  github.com/goneric/stack v0.0.0-20220131052059-5990ae324dbd
@@ -13,9 +14,9 @@ require (
13
14
  github.com/imdario/mergo v0.3.12
14
15
  github.com/rotisserie/eris v0.5.4
15
16
  github.com/rs/zerolog v1.26.1
16
- github.com/samber/lo v1.21.0
17
+ github.com/samber/lo v1.27.0
17
18
  github.com/segmentio/go-camelcase v0.0.0-20160726192923-7085f1e3c734
18
- github.com/stretchr/testify v1.7.0
19
+ github.com/stretchr/testify v1.7.1
19
20
  gocloud.dev v0.24.0
20
21
  xojoc.pw/useragent v0.0.0-20200116211053-1ec61d55e8fe
21
22
  )
@@ -24,26 +25,15 @@ require (
24
25
  cloud.google.com/go v0.94.0 // indirect
25
26
  cloud.google.com/go/firestore v1.5.0 // indirect
26
27
  github.com/blang/semver v3.5.1+incompatible // indirect
27
- github.com/chromedp/cdproto v0.0.0-20220515234810-83d799542a04 // indirect
28
- github.com/chromedp/chromedp v0.8.2 // indirect
29
- github.com/chromedp/sysutil v1.0.0 // indirect
30
- github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
31
28
  github.com/davecgh/go-spew v1.1.1 // indirect
32
29
  github.com/go-playground/locales v0.14.0 // indirect
33
30
  github.com/go-playground/universal-translator v0.18.0 // indirect
34
- github.com/go-stack/stack v1.8.1 // indirect
35
- github.com/gobwas/httphead v0.1.0 // indirect
36
- github.com/gobwas/pool v0.2.1 // indirect
37
- github.com/gobwas/ws v1.1.0 // indirect
38
31
  github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
39
32
  github.com/golang/protobuf v1.5.2 // indirect
40
33
  github.com/google/go-cmp v0.5.6 // indirect
41
34
  github.com/google/wire v0.5.0 // indirect
42
35
  github.com/googleapis/gax-go/v2 v2.1.0 // indirect
43
- github.com/josharian/intern v1.0.0 // indirect
44
36
  github.com/leodido/go-urn v1.2.1 // indirect
45
- github.com/mailru/easyjson v0.7.7 // indirect
46
- github.com/playwright-community/playwright-go v0.2000.1 // indirect
47
37
  github.com/pmezard/go-difflib v1.0.0 // indirect
48
38
  go.opencensus.io v0.23.0 // indirect
49
39
  golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e // indirect
@@ -58,6 +48,5 @@ require (
58
48
  google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect
59
49
  google.golang.org/grpc v1.40.0 // indirect
60
50
  google.golang.org/protobuf v1.27.1 // indirect
61
- gopkg.in/square/go-jose.v2 v2.6.0 // indirect
51
+ gopkg.in/yaml.v3 v3.0.1 // indirect
62
- gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
63
52
  )
gsx/gsx.go CHANGED
@@ -9,6 +9,7 @@ import (
9
9
  "strconv"
10
10
  "strings"
11
11
 
12
+ _ "github.com/alecthomas/repr"
12
13
  "github.com/rotisserie/eris"
13
14
  "github.com/samber/lo"
14
15
  )