pizza

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: GPL-2.0, GPL-2.0-or-later Imports: 0 Imported by: 0

README

Slice args at boundary.


© 2015-2016 Platina Systems, Inc. All rights reserved. Use of this source code is governed by this BSD-style LICENSE.

Documentation

Overview

Slice args at boundary. For example,

pl := pizza.New("|")
pl.Slice("ls", "-lR", "|", "more")
// pl.Slices == [][]string{
// 	[]string{"ls", "-lR"},
// 	[]string{"more"},
// }
pl.Reset()
pl.Slice("ls", "-lR", "|")
// pl.Slices == [][]string{
// 	[]string{"ls", "-lR"},
// }
if pl.More {
	pl.Slice("more")
}
// pl.Slices == [][]string{
// 	[]string{"ls", "-lR"},
// 	[]string{"more"},
// }

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pizza

type Pizza struct {
	Boundary string
	// More is true if the last arg of the last Slice was Boundary.
	More   bool
	Slices [][]string
}

func New

func New(boundary string) *Pizza

func (*Pizza) Reset

func (p *Pizza) Reset()

func (*Pizza) Slice

func (p *Pizza) Slice(args ...string)

Jump to

Keyboard shortcuts

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