lib-instance-gen-go

module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: Apache-2.0

README

lib-instance-gen-go

Library for starting new Go applications allowing for creating and updating common files.

app

Create a skeleton structure for a new application

See godocs for specifics.

Create an 'init' go file in the root of your repository and use go generate. This will create the skeleton of your application with boiler code providing the following:

  • config ingestion
  • logging (utilizes zerolog)
Example File

Filename: app-init.go

package main

//go:generate go run app-init.go

import instanceGen "github.com/skeletonkey/lib-instance-gen-go/app"

func main() {
    app := instanceGen.NewApp("rachio-next-run", "app")
    app.SetupApp(
        app.WithCGOEnabled(),
        app.WithConfig(),
        app.WithDependencies(
            "github.com/labstack/echo/v4",
        ),
        app.WithGithubWorkflows("linter", "test"),
        app.WithMakefile(),
        app.WithGoVersion("1.23"),
        app.WithPackages("logger", "pushover", "rachio"),
    ).Generate()

}

Directories

Path Synopsis
Package app is a library for creating a bare-bones application with boilerplate files taken care of.
Package app is a library for creating a bare-bones application with boilerplate files taken care of.

Jump to

Keyboard shortcuts

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