Source File
server.go
Belonging Package
github.com/limanmys/render-engine/internal/liman
package liman
import (
)
// GetServer searches db and returns matching server
func ( *models.Server) (*models.Server, error) {
:= database.Connection().Where(&).First(&)
if .Error != nil {
return nil, logger.FiberError(fiber.StatusNotFound, "cannot found server with this id")
}
if .RowsAffected > 0 {
return , nil
}
return nil, logger.FiberError(fiber.StatusNotFound, "cannot found server with this id")
}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |