util

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright © 2022 Oliver Götz <developer@geekgasm.eu>

Copyright © 2022 Oliver Götz <developer@geekgasm.eu>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyToClipboard added in v0.3.0

func CopyToClipboard(output string)

func PrintInventory

func PrintInventory(inventory Inventory)

func RenderXML added in v0.3.0

func RenderXML(inventory Inventory, multiline bool) string

func WriteToFile added in v0.3.0

func WriteToFile(outputfile string, output string)

Types

type Inventory

type Inventory struct {
	Items []Item `xml:"ITEM"`
}

func CreateSubtractionInventory

func CreateSubtractionInventory(inventory1 Inventory, inventory2 Inventory) Inventory

func ReadList

func ReadList(list string) Inventory

type Item

type Item struct {
	ItemType  string `xml:"ITEMTYPE"`
	ItemID    string `xml:"ITEMID"`
	Color     string `xml:"COLOR"`
	Maxprice  string `xml:"MAXPRICE"`
	MinQTY    int    `xml:"MINQTY"`
	Condition string `xml:"CONDITION"`
	Remarks   string `xml:"REMARKS"`
	Notify    string `xml:"NOTIFY"`
}

type ItemKey

type ItemKey struct {
	ItemType  string
	ItemID    string
	Color     string
	Condition string
}

type ItemMap

type ItemMap map[ItemKey]Item

Jump to

Keyboard shortcuts

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