smartgorest

command module
v0.0.0-...-1309a47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: ISC Imports: 21 Imported by: 0

README

Smart Go REST

Go Report Card

Smart Go REST screenshot

Setup

You should have a single workspace repository for all of your GO code, and a GOPATH pointing to that.

It is advisable to have a /src directory inside your workspace.

This code must be installed in a directory inside

$GOPATH/src

with the following path

github.com/guildenstern70/smartgorest

so that you find the LICENSE file here:

$GOPATH/src/github.com/guildenstern70/smartgorest/LICENSE

Build

First, update the dependencies by running

go mod tidy

You build the executable file by running

go install .

Run

go run .

To run the executable file:

$GOPATH/bin/smartgorest.exe (Windows)
$GOPATH/bin/smartgorest (Mac + Linux)

Test

Run the test suite of this project by running

go test github.com/guildenstern70/smartgorest/internal

Ecosystem

Read here about the ecosystem of this project: https://medium.com/@alessiosaltarin/beyond-the-jvm-building-truly-native-microservices-with-go-83f383d13455

Add modules to the project
go get -u [fully qualified module name]
Ent.

Add a new entity

go run -mod=mod entgo.io/ent/cmd/ent new Person

Regenerate the code

go run -mod=mod entgo.io/ent/cmd/ent generate ./ent/schema --feature sql/lock

Notice that the changes are applied to the database when you run the app, because it has a mechanism to auto-create the schema on startup.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
ent
internal
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL