javaprops

package
v0.0.0-...-bc06931 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...jfOption) jfConfig

func WithJavaCmd

func WithJavaCmd(cmd string) jfOption

func WithJavaPath

func WithJavaPath(p string) jfOption

Types

type Entries

type Entries []Entry

Entries is a collection object since the properties file has a lot of them all beneath the root.

func (Entries) AsProps

func (e Entries) AsProps() Props

AsProps converts Entries ([]Entry) to Props (map[string]string)

type Entry

type Entry struct {
	Key   string `xml:"key,attr"`
	Value string `xml:",chardata"`
}

Entry holds a single property key/value combination <entry key="myKey">the value</entry>

type JVMPropertyFile

type JVMPropertyFile struct {
	Comment string  `xml:"comment"`
	Entries Entries `xml:"entry"`
}

JVMPropertyFile represents the top level of the properties XML document

type Props

type Props map[string]string

Props provide a place to add method receivers to a golang map[string]string for formatting

func (Props) AsJSON

func (p Props) AsJSON() string

Renders the Props as a pretty JSON string

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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