file

command
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Example: File provider

Prerequisites:

  1. Create a config file (JSON or YAML) in the current directory:

    echo '{"timeout":"30s","verbose":true,"max_conn":100}' > /tmp/config.json

    // or for YAML: cat > /tmp/config.yaml <<'YAML' timeout: 30s verbose: true max_conn: 100 YAML

  2. Update the path below to point to your file.

  3. Run: go run examples/file/main.go

  4. In another terminal, edit the file: echo '{"timeout":"60s","verbose":false,"max_conn":200}' > /tmp/config.json Watch the output — the update is reflected almost instantly.

Jump to

Keyboard shortcuts

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