procfile

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: MIT Imports: 2 Imported by: 0

README

procfile

A go package for parsing Procfile entries.

Install

go get github.com/hecticjeff/procfile

Usage

package main

import (
	"fmt"
	"github.com/hecticjeff/procfile"
)

func main() {
	proclist := procfile.Parse("web: bundle exec rackup\nworker: rake resque:work")
	for name, process := range proclist {
		fmt.Println(name, "command", process.Command)
		fmt.Println(name, "arguments", process.Arguments)
	}
}

Copyright (c) Chris Mytton

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(procfile string) (procs map[string]Process)

Parse will read the contents of a procfile and returns a map of string names to Process structs.

Types

type Process

type Process struct {
	Command   string
	Arguments []string
}

Jump to

Keyboard shortcuts

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