pkger

package module
v2.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

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