Skip to content
This repository has been archived by the owner on Oct 20, 2018. It is now read-only.

Latest commit

 

History

History
15 lines (13 loc) · 590 Bytes

README.md

File metadata and controls

15 lines (13 loc) · 590 Bytes

Reflect helpers for krolaw/dhcp4

This package adds simple way to init DHCP4 Options from JSON object. For example, read DHCP Options from JSON formatted config file.

Born from this Pull Request.

Usage

import "encoding/json"
import "github.com/krolaw/dhcp4"
import "github.com/ZiroKyl/reflectDHCP"
...
var opt = dhcp4.Options{};
json.Unmarshal(strJSON, (*reflectDHCP.Options)(&opt));

For more examples see test file