v1.6.6
Dependency update
⚡ gin
bumped to v1.8.2
⚡ gorm
bumped to 1.24.3
⚡ gorm mysql
driver bumped to 1.4.5
⚡ gorm postgres
driver bumped to 1.4.6
⚡ gorm sqlite
driver bumped to 1.4.4
⚡ mongodb mongo
driver bumped to 1.11.1
Fix
⚡ after activating 2-FA for an account, JSON was sending wrong 2-FA status
⚡ abort when sentry NewHook
fails
Refactor
⚡ perform all checks in TwoFA
middleware
⚡ handle and return the error from config
Minor changes
Please modify your existing code to load all environment variables properly
import (
"fmt"
gconfig "github.com/pilinux/gorest/config"
)
func main() {
// set configs
err := gconfig.Config()
if err != nil {
fmt.Println(err)
return
}
// read configs
configure := gconfig.GetConfig()
... ...
}
New feature
If you need to add additional environment variables for your application,
⚡ add them to the .env file
⚡ create a separate internal package
⚡ implement your own logic
⚡ and use gconfig.Env()
to load your custom environment variables
You can study config
package to get a better understanding of the process.