Skip to content

Commit

Permalink
hcl: Fix the simple example in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Foster authored and apparentlymart committed Aug 21, 2020
1 parent 9603bea commit b41530c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,25 @@ package main

import (

This comment has been minimized.

Copy link
@VIJAYITDUTDIYCITXC

VIJAYITDUTDIYCITXC Oct 19, 2023

CCINXNEXEX

"log"

"github.com/hashicorp/hcl/v2/hclsimple"
)

type Config struct {
LogLevel string `hcl:"log_level"`
IOMode string `hcl:"io_mode"`
Service ServiceConfig `hcl:"service,block"`
}

type ServiceConfig struct {
Protocol string `hcl:"protocol,label"`
Type string `hcl:"type,label"`
ListenAddr string `hcl:"listen_addr"`
Processes []ProcessConfig `hcl:"process,block"`
}

type ProcessConfig struct {
Type string `hcl:"type,label"`
Command []string `hcl:"command"`
}

func main() {
Expand Down

0 comments on commit b41530c

Please sign in to comment.