Skip to content

Commit 1e3a9eb

Browse files
author
Paolo Biglioli
committed
add NewTerminator
1 parent 68d4eaf commit 1e3a9eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

datapiece.go

+7
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ type Terminator struct {
5252
terminatorType TerminatorType
5353
}
5454

55+
func NewTerminator(variable *string, terminatorType TerminatorType) *Terminator {
56+
return &Terminator{
57+
variable: variable,
58+
terminatorType: terminatorType,
59+
}
60+
}
61+
5562
func (t *Terminator) get() (string, error) {
5663
if t.variable != nil {
5764
return *t.variable + string(t.terminatorType), nil

0 commit comments

Comments
 (0)