processfile

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package processfile allows for reading, modifying, and writing Procfile format files.

It does not preserve the ordering of definitions within a Procfile.

See: https://devcenter.heroku.com/articles/procfile

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Procfile

type Procfile map[string]string

Procfile contains the definition of a Procfile.

func New

func New() Procfile

New creates a new Procfile in-memory.

func Read

func Read(in io.Reader) (Procfile, error)

Read reads and parses a Procfile from the given io.Reader.

Read does not call Close() on in, the caller is expected to do so.

func (Procfile) Add

func (p Procfile) Add(process, entrypoint string) Procfile

Add adds a new entry to the Procfile, overwriting any previous entry for the same process.

func (Procfile) Defined

func (p Procfile) Defined(process string) bool

Defined checks whether the given process is defined (has an entrypoint) in the Procfile.

func (Procfile) Entrypoint

func (p Procfile) Entrypoint(process string) (string, bool)

Entrypoint returns the entrypoint for the given process as defined in the Procfile.

func (Procfile) Processes

func (p Procfile) Processes() []string

Processes returns the list of all defined processes in the Procfile.

func (Procfile) Remove

func (p Procfile) Remove(process string) Procfile

Remove removes any entry in the Procfile for the given process.

func (Procfile) Write

func (p Procfile) Write(out io.Writer) (int, error)

Write writes the Procfile to the given io.Writer.

Write does not call Close() on out, the caller is expected to do so.

Jump to

Keyboard shortcuts

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