Documentation
¶
Overview ¶
Copyright © 2021 Unknown <applicant@airwallex.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrStackEmpty = errors.New("stack: is empty")
ErrStackEmpty
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack is
func (*Stack) Pop ¶
Pop pops a value from the end of the stack and returns it. If the stack is empty it will raise an error
func (*Stack) Print ¶
Print is a helper method to print the current stack in human readable format with a maximum of 10 decimal places to the provided io.Writer interface.
func (*Stack) PushString ¶
Push pushes a string to the end of the stack