Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maddalax committed Nov 9, 2024
1 parent 94a7e36 commit cd180a6
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/ws-example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import (
"github.com/maddalax/htmgo/extensions/websocket"
ws2 "github.com/maddalax/htmgo/extensions/websocket/opts"
"github.com/maddalax/htmgo/extensions/websocket/session"
"github.com/maddalax/htmgo/framework/h"
"github.com/maddalax/htmgo/framework/service"
"github.com/maddalax/htmgo/framework/session"
"io/fs"
"net/http"
"ws-example/__htmgo"
Expand Down
2 changes: 1 addition & 1 deletion examples/ws-example/pages/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package pages

import (
"fmt"
"github.com/maddalax/htmgo/extensions/websocket/session"
"github.com/maddalax/htmgo/extensions/websocket/ws"
"github.com/maddalax/htmgo/framework/h"
"github.com/maddalax/htmgo/framework/session"
"ws-example/partials"
)

Expand Down
7 changes: 6 additions & 1 deletion examples/ws-example/pages/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import (

func RootPage(ctx *h.RequestContext, children ...h.Ren) h.Ren {
return h.Html(
h.HxExtension(h.BaseExtensions()),
h.JoinExtensions(
h.HxExtension(
h.BaseExtensions(),
),
h.HxExtension("ws"),
),
h.Head(
h.Link("/public/main.css", "stylesheet"),
h.Script("/public/htmgo.js"),
Expand Down
2 changes: 1 addition & 1 deletion examples/ws-example/pages/ws/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package ws

import (
"fmt"
"github.com/maddalax/htmgo/extensions/websocket/session"
"github.com/maddalax/htmgo/extensions/websocket/ws"
"github.com/maddalax/htmgo/framework/h"
"github.com/maddalax/htmgo/framework/session"
"runtime"
"time"
"ws-example/pages"
Expand Down
2 changes: 1 addition & 1 deletion examples/ws-example/partials/index.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package partials

import (
"github.com/maddalax/htmgo/extensions/websocket/session"
"github.com/maddalax/htmgo/extensions/websocket/ws"
"github.com/maddalax/htmgo/framework/h"
"github.com/maddalax/htmgo/framework/session"
)

type Counter struct {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion extensions/websocket/ws/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package ws

import (
"github.com/maddalax/htmgo/extensions/websocket/internal/wsutil"
"github.com/maddalax/htmgo/extensions/websocket/session"
"github.com/maddalax/htmgo/framework/h"
"github.com/maddalax/htmgo/framework/service"
"github.com/maddalax/htmgo/framework/session"
)

// PushServerSideEvent sends a server side event this specific session
Expand Down
2 changes: 1 addition & 1 deletion extensions/websocket/ws/every.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package ws

import (
"github.com/maddalax/htmgo/extensions/websocket/internal/wsutil"
"github.com/maddalax/htmgo/extensions/websocket/session"
"github.com/maddalax/htmgo/framework/h"
"github.com/maddalax/htmgo/framework/service"
"github.com/maddalax/htmgo/framework/session"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion extensions/websocket/ws/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ws
import (
"fmt"
"github.com/maddalax/htmgo/extensions/websocket/internal/wsutil"
"github.com/maddalax/htmgo/framework/session"
"github.com/maddalax/htmgo/extensions/websocket/session"
"sync"
)

Expand Down
2 changes: 1 addition & 1 deletion extensions/websocket/ws/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ws

import (
"github.com/maddalax/htmgo/extensions/websocket/internal/wsutil"
"github.com/maddalax/htmgo/extensions/websocket/session"
"github.com/maddalax/htmgo/framework/service"
"github.com/maddalax/htmgo/framework/session"
)

func StartListener(locator *service.Locator) {
Expand Down
2 changes: 1 addition & 1 deletion extensions/websocket/ws/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ws

import (
"github.com/maddalax/htmgo/extensions/websocket/internal/wsutil"
"github.com/maddalax/htmgo/extensions/websocket/session"
"github.com/maddalax/htmgo/framework/h"
"github.com/maddalax/htmgo/framework/session"
"github.com/puzpuzpuz/xsync/v3"
"sync"
"sync/atomic"
Expand Down
2 changes: 1 addition & 1 deletion framework/h/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package h
import "strings"

func BaseExtensions() string {
extensions := []string{"path-deps", "response-targets", "mutation-error", "htmgo", "sse", "ws"}
extensions := []string{"path-deps", "response-targets", "mutation-error", "htmgo", "sse"}
if IsDevelopment() {
extensions = append(extensions, "livereload")
}
Expand Down

0 comments on commit cd180a6

Please sign in to comment.