simple

command
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Simple example

This example runs two modules:

  • poller registers settings only.
  • http registers settings and binds repeated labeled HCL route blocks.

Each module lives in its own package under modules/<name>/module.go; main.go only assembles the application.

From the repository root, run:

go run ./examples/simple -config ./examples/simple/application.hcl

Press Ctrl+C to stop the application and observe reverse module shutdown order.

Generate a new starter configuration at a path that does not already exist:

go run ./examples/simple -config ./generated.hcl -generate-config

Generation fails rather than replacing an existing file.

Documentation

Overview

Command simple demonstrates a two-module application loaded from HCL.

Directories

Path Synopsis
modules
http
Package httpmodule demonstrates a module with settings and structured HCL.
Package httpmodule demonstrates a module with settings and structured HCL.
poller
Package poller demonstrates a module configured only through application settings.
Package poller demonstrates a module configured only through application settings.

Jump to

Keyboard shortcuts

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