pkger

package module
v2.0.0-...-03508dc Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

pkger

pkger plugin for go-config

Prerequisites

Install pkger cli

go install github.com/markbates/pkger/cmd/pkger
pkger -h
Packager

generating pkged.go with all files in /config as part of build pipeline

pkger -o srv/greeter -include /config
Usage
	if err := config.Load(
		pkger.NewSource(pkger.WithPath("/config/config.yaml")),
	); err != nil {
    log.Fatal(err.Error())
	}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPath = "/config.yaml"
)

Functions

func NewSource

func NewSource(opts ...source.Option) source.Source

func WithPath

func WithPath(p string) source.Option

WithPath sets the path to pkger

Types

This section is empty.

Jump to

Keyboard shortcuts

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