Skip to content

Commit

Permalink
feat(libsvelte): renaming EchoSveltePage to SendSveltePage.
Browse files Browse the repository at this point in the history
  • Loading branch information
razshare committed Jan 14, 2025
1 parent 75af2ca commit 4a9cede
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func ServerWithSveltePage(self *Server, pattern string, pageId string, configure
options.Props["query"] = request.HttpRequest.URL.Query()
options.Props["form"] = request.HttpRequest.Form

EchoSveltePage(response, options)
SendSveltePage(response, options)
})
})
})
Expand Down
4 changes: 2 additions & 2 deletions libsvelte.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ type SveltePageConfiguration struct {

var noScriptPattern = regexp.MustCompile(`<script.*>.*</script>`)

// EchoSveltePage renders and echos a svelte page.
func EchoSveltePage(response *Response, configuration *SveltePageConfiguration) {
// SendSveltePage renders and echos a svelte page.
func SendSveltePage(response *Response, configuration *SveltePageConfiguration) {
if nil == configuration {
configuration = &SveltePageConfiguration{
Render: ModeFull,
Expand Down
4 changes: 2 additions & 2 deletions libsvelte_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestEchoSveltePageModeServer(test *testing.T) {
test.Fatal(err)
})
ServerWithRequestHandler(server, "GET /", func(server *Server, request *Request, response *Response) {
EchoSveltePage(response, &SveltePageConfiguration{
SendSveltePage(response, &SveltePageConfiguration{
Render: ModeServer,
Props: map[string]interface{}{
"pageId": "welcome",
Expand Down Expand Up @@ -50,7 +50,7 @@ func TestEchoSveltePageModeClient(test *testing.T) {
test.Fatal(err)
})
ServerWithRequestHandler(server, "GET /", func(server *Server, request *Request, response *Response) {
EchoSveltePage(response, &SveltePageConfiguration{
SendSveltePage(response, &SveltePageConfiguration{
Render: ModeClient,
Props: map[string]interface{}{
"pageId": "welcome",
Expand Down

0 comments on commit 4a9cede

Please sign in to comment.