This project is dual-licensed under the following terms:
-
For non-commercial use, you may choose either the GNU Affero General Public License v3.0 (AGPLv3) or a separate commercial license (see below). You can find a copy of the AGPLv3 at: https://www.gnu.org/licenses/agpl-3.0.txt
-
For commercial use, a separate commercial license is required. Commercial licenses are available for various use cases. Please contact me via my contact page to obtain a commercial license.
go get github.com/dracory/base
The Dracory project is a Go framework that provides various utilities, including:
- BBCode to HTML conversion
- Slice manipulation
- Database interaction
- Error handling and validation
- Image manipulation
- URL downloading
- QR code generation
- HTTP request handling
- Timezone conversion
- Date and datetime validation
- Web server functionality
- Command line functionality
The Dracory framework provides easy access to environment variables
using the env
package.
For information on environment variables, see the env/README.md file.
The database package provides database interaction functionalities for the Dracory framework. It offers a set of tools for interacting with various database systems.
For more information, see the database/README.md file.
Here's an example of how to run a web server using Dracory:
package main
import (
"fmt"
"net/http"
"github.com/dracory/base/server"
)
func main() {
// Define the handler function
handler := func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, Dracory!")
}
// Define the server options
options := server.Options{
Host: "localhost",
Port: "8080",
Handler: handler,
}
// Start the server
_, err := server.Start(options)
if err != nil {
panic(err)
}
}