-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability to create unexported types from an exported template
This allows one to create an exported template type and create a non exported type from that template. Fixes #66
- Loading branch information
1 parent
3e22f1a
commit 0d00bd7
Showing
5 changed files
with
69 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// This file was automatically generated by genny. | ||
// Any changes will be lost if this file is regenerated. | ||
// see https://github.com/cheekybits/genny | ||
|
||
package queue | ||
|
||
// intQueue is a queue of ints. | ||
type intQueue struct { | ||
items []int | ||
} | ||
|
||
func NewintQueue() *intQueue { | ||
return &intQueue{items: make([]int, 0)} | ||
} | ||
func (q *intQueue) Push(item int) { | ||
q.items = append(q.items, item) | ||
} | ||
func (q *intQueue) Pop() int { | ||
item := q.items[0] | ||
q.items = q.items[1:] | ||
return item | ||
} |