-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from cxjava/gonew
Use gonew to create new project base on template
- Loading branch information
Showing
10 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
vendor/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
## Getting Started | ||
|
||
* If not already installed, please install the [gonew](https://pkg.go.dev/golang.org/x/tools/cmd/gonew) command. | ||
|
||
```console | ||
go install golang.org/x/tools/cmd/gonew@latest | ||
``` | ||
|
||
* Create a new project using this template. | ||
- Second argument passed to `gonew` is a module path of your new app. | ||
|
||
```console | ||
gonew github.com/donseba/go-htmx/examples/pokedex your.module/my-app # e.g. github.com/donseba/my-app | ||
cd my-app | ||
go mod tidy | ||
go build | ||
|
||
``` | ||
|
||
## Testing | ||
|
||
- Start your app | ||
|
||
```console | ||
./my-app | ||
``` | ||
|
||
- Open your browser http://localhost:3210/ | ||
- Search `charizard` or `metapod` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/donseba/go-htmx/examples/pokedex | ||
|
||
go 1.22 | ||
|
||
require github.com/donseba/go-htmx v1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
vendor/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
## Getting Started | ||
|
||
* If not already installed, please install the [gonew](https://pkg.go.dev/golang.org/x/tools/cmd/gonew) command. | ||
|
||
```console | ||
go install golang.org/x/tools/cmd/gonew@latest | ||
``` | ||
|
||
* Create a new project using this template. | ||
- Second argument passed to `gonew` is a module path of your new app. | ||
|
||
```console | ||
gonew github.com/donseba/go-htmx/examples/render your.module/my-app # e.g. github.com/donseba/my-app | ||
cd my-app | ||
go mod tidy | ||
go build | ||
|
||
``` | ||
|
||
## Testing | ||
|
||
- Start your app | ||
|
||
```console | ||
./my-app | ||
``` | ||
|
||
- Open your browser http://localhost:3210/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/donseba/go-htmx/examples/render | ||
|
||
go 1.22 | ||
|
||
require github.com/donseba/go-htmx v1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
vendor/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
## Getting Started | ||
|
||
* If not already installed, please install the [gonew](https://pkg.go.dev/golang.org/x/tools/cmd/gonew) command. | ||
|
||
```console | ||
go install golang.org/x/tools/cmd/gonew@latest | ||
``` | ||
|
||
* Create a new project using this template. | ||
- Second argument passed to `gonew` is a module path of your new app. | ||
|
||
```console | ||
gonew github.com/donseba/go-htmx/examples/sse your.module/my-app # e.g. github.com/donseba/my-app | ||
cd my-app | ||
go mod tidy | ||
go build | ||
|
||
``` | ||
|
||
## Testing | ||
|
||
- Start your app | ||
|
||
```console | ||
./my-app | ||
``` | ||
|
||
- Open your browser http://localhost:3210/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/donseba/go-htmx/examples/sse | ||
|
||
go 1.22 | ||
|
||
require github.com/donseba/go-htmx v1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters