コード例 #1
0
ファイル: input.go プロジェクト: ThingiverseIO/thingiverseio
// NewInput creates a new Input instance for a given service descriptor. Configuration is automatically determined by the thingiversio/config package.
func NewInput(desc string) (i *Input, err error) {
	var d Descriptor
	d, err = ParseDescriptor(desc)
	if err == nil {
		i, err = NewInputFromConfig(config.Configure(false, d.AsTagSet()))
	}
	return
}
コード例 #2
0
ファイル: output.go プロジェクト: ThingiverseIO/thingiverseio
// NewOutput creates a new Output instance for a given service descriptor. Configuration is automatically determined by the thingiversio/config package.
func NewOutput(desc string) (o *Output, err error) {
	var d Descriptor
	d, err = ParseDescriptor(desc)
	if err == nil {
		o, err = NewOutputFromConfig(config.Configure(true, d.AsTagSet()))
	}
	return
}