File: add.go

package info (click to toggle)
golang-github-dave-jennifer 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 372 kB
  • sloc: makefile: 4
file content (19 lines) | stat: -rw-r--r-- 442 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package jen

// Add appends the provided items to the statement.
func Add(code ...Code) *Statement {
	return newStatement().Add(code...)
}

// Add appends the provided items to the statement.
func (g *Group) Add(code ...Code) *Statement {
	s := Add(code...)
	g.items = append(g.items, s)
	return s
}

// Add appends the provided items to the statement.
func (s *Statement) Add(code ...Code) *Statement {
	*s = append(*s, code...)
	return s
}