properties

package
v0.0.0-...-82e7740 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 9 Imported by: 0

README

comm-properties GoDoc

properties library for Go

Installation

go get gopkg.in/goyy/goyy.v0/comm/properties

Usage

// example.properties:
// say=Hello, world!
// sayf=Hello, %s!
p, _ := properties.New("./example.properties")
fmt.Println(p.Property("say"))           // Output: Hello, world!
fmt.Println(p.Propertyf("sayf", "goyy")) // Output: Hello, goyy!

Documentation

Overview

Package properties implements properties utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Properties

type Properties interface {
	Property(key string) string
	Propertyf(key string, args ...interface{}) string
	SetProperty(key, value string) error
}

Properties is the interface that wraps the operation properties file method.

func New

func New(filename string) (p Properties, err error)

New creates a new Properties by filename.

Jump to

Keyboard shortcuts

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