1
1
mirror of https://github.com/adammck/terraform-inventory synced 2024-11-23 04:22:08 +01:00
terraform-inventory/output.go

26 lines
401 B
Go
Raw Normal View History

package main
import (
"fmt"
)
type Output struct {
// The keyName and value of the output
keyName string
2016-04-09 17:27:00 +02:00
value string
}
func NewOutput(keyName string, value string) (*Output, error) {
// TODO: Warn instead of silently ignore error?
if len(keyName) == 0 {
return nil, fmt.Errorf("couldn't parse keyName: %s", keyName)
}
return &Output{
keyName: keyName,
2016-04-09 17:27:00 +02:00
value: value,
}, nil
}