utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package utils diff implements a Diff function that compare two inputs using the 'diff' tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(prefix string, b1, b2 []byte) ([]byte, error)

Diff returns diff of two arrays of bytes in diff tool format.

func SortDeDup

func SortDeDup(l []string) []string

Types

type Stack

type Stack []interface{}

func NewStack

func NewStack(capacity int) *Stack

NewStack returns a new Stack.

func (*Stack) Copy

func (s *Stack) Copy(start, end int) *Stack

func (*Stack) Get

func (s *Stack) Get(idx int) (interface{}, bool)

Get read the value at idx from Stack without modifying the Stack. Return nil, false if idx out of range.

func (*Stack) Len

func (s *Stack) Len() int

Len returns the length of Stack.

func (*Stack) Pop

func (s *Stack) Pop() (interface{}, bool)

Pop removes and return top element of Stack. Return nil, false if Stack is empty.

func (*Stack) Push

func (s *Stack) Push(node interface{})

Push a new value onto the Stack.

Jump to

Keyboard shortcuts

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