Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseCoretta committed Aug 24, 2023
1 parent fa4e5ca commit d0298c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ honored during the Push operation.
Note this will only have an effect when not using a custom
PushPolicy. When using a custom PushPolicy, the user has
total control -- and full responsibility -- in deciding
what may or may not be pushed.
what may or may not be pushed.
Also note that setting or unsetting this bit shall not, in
any way, have an impact on pre-existing Stack or Stack type
Expand All @@ -983,21 +983,21 @@ current state of the nesting bit (i.e.: true->false and
false->true)
*/
func (r Stack) NoNesting(state ...bool) Stack {
if r.IsZero() {
return r
}
if r.IsZero() {
return r
}

if len(state) > 0 {
if state[0] {
r.stack.setOpt(nnest)
} else {
r.stack.unsetOpt(nnest)
}
} else {
r.stack.toggleOpt(nnest)
}
if len(state) > 0 {
if state[0] {
r.stack.setOpt(nnest)
} else {
r.stack.unsetOpt(nnest)
}
} else {
r.stack.toggleOpt(nnest)
}

return r
return r
}

/*
Expand Down Expand Up @@ -1868,7 +1868,7 @@ func (r stack) typ() (kind string, typ stackType) {
if sym := r.getSymbol(); len(sym) > 0 {
kind = sym
} else if !(typ == list || typ == basic) {
kind = padValue(true, kind) // TODO: make this better
kind = padValue(true, kind) // TODO: make this better
}

return
Expand Down
2 changes: 1 addition & 1 deletion stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (r customStack) String() string {

func TestStack_noInit(t *testing.T) {
var x Stack
x.Push(`well?`) // first off, this should not panic
x.Push(`well?`) // first off, this should not panic

// next, make sure it really
// did not work ...
Expand Down

0 comments on commit d0298c9

Please sign in to comment.