Skip to content

Gin can't serve wails template in GET request #4244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
justinmoon opened this issue Apr 26, 2025 · 0 comments
Open

Gin can't serve wails template in GET request #4244

justinmoon opened this issue Apr 26, 2025 · 0 comments
Labels
Bug Something isn't working

Comments

@justinmoon
Copy link

Description

I was trying to have a GET request served by gin on v3 return a rendered templ template, but it was throwing this error: https://gist.github.com/justinmoon/9f12bc889967f494668507107336627d. The commit at the top of my post fixes it.

To Reproduce

have gin serve a GET request that renders templ template.

Expected behaviour

no big red error

Screenshots

No response

Attempted Fixes

I'm going to submit a PR right after this fixing it.

System Details

❯ wails3 doctor
 Wails (v3.0.0-dev)  Wails Doctor

# System

┌──────────────────────────────────────────────────┐
| Name          | MacOS                            |
| Version       | 15.3.2                           |
| ID            | 24D81                            |
| Branding      | Sequoia                          |
| Platform      | darwin                           |
| Architecture  | arm64                            |
| Apple Silicon | true                             |
| CPU           | Apple M2 Pro                     |
| CPU 1         | Apple M2 Pro                     |
| CPU 2         | Apple M2 Pro                     |
| GPU           | 19 cores, Metal Support: Metal 3 |
| Memory        | 16 GB                            |
└──────────────────────────────────────────────────┘

# Build Environment

┌─────────────────────────────────────────────────────────┐
| Wails CLI    | v3.0.0-dev                               |
| Go Version   | go1.24.1                                 |
| Revision     | 685d8101aa67e354a87ea6f0e7b92148582844cb |
| Modified     | false                                    |
| -buildmode   | exe                                      |
| -compiler    | gc                                       |
| CGO_CFLAGS   |                                          |
| CGO_CPPFLAGS |                                          |
| CGO_CXXFLAGS |                                          |
| CGO_ENABLED  | 1                                        |
| CGO_LDFLAGS  |                                          |
| GOARCH       | arm64                                    |
| GOARM64      | v8.0                                     |
| GOOS         | darwin                                   |
| vcs          | git                                      |
| vcs.modified | false                                    |
| vcs.revision | 685d8101aa67e354a87ea6f0e7b92148582844cb |
| vcs.time     | 2025-04-23T05:45:38Z                     |
└─────────────────────────────────────────────────────────┘

# Dependencies

┌────────────────────────────────────────────────────────────────────────┐
| Xcode cli tools | 2409                                                 |
| npm             | 10.9.2                                               |
| *NSIS           | Not Installed. Install with `brew install makensis`. |
|                                                                        |
└─────────────────────── * - Optional Dependency ────────────────────────┘

# Checking for issues

 SUCCESS  No issues found

# Diagnosis

 SUCCESS  Your system is ready for Wails development!

Need documentation? Run: wails3 docs
 ♥   If Wails is useful to you or your company, please consider sponsoring the project: wails3 sponsor

Additional context

No response

@justinmoon justinmoon added the Bug Something isn't working label Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant