Categorygithub.com/ohait/forego
repository
0.0.0-20240316071033-fdde330ab406
Repository: https://github.com/ohait/forego.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

forego

THIS MODULE IS STILL A WORK IN PROGRESS AND NOT READY FOR USE

Go framework to simplify testing, http/ws API, authentication/authorization, etc...

Some subfolders have a README with more details:

test

Having a good testing library, means less to write, and better results.

All the tests will generate a log message when they succeed based on the arguments, most of the time this is enough to understand the test.

E.g. with this code:

  err := foo(123)
  test.NoError(t, err)

The following log message is generated:

    my_test.go:123 ok: foo(123)

ast parsing

Some functions like test.NoError() and test.Assert() will log the code which they have been invoked with. E.g.:

  func TestX(t *testing.T) {
    everything := 42
    test.Assert(t, everything > 7*3)
  }

It will log a message like:

ok: everything > 7*3

In the case of error, it will print what was the function assigning to the error

api

Framework to automatically create bindings and documentation for APIs:

  • no more test of bindings, just test the business logic
  • OpenAPI automatically generated
  • tight integration with http, WebSocket and other streaming libraries
  • simple and no boiler plate

TODO