mirror of
https://github.com/emirpasic/gods.git
synced 2026-06-15 16:16:35 +03:00
Generics migration (#237)
* Generics migration This attempts to migrate this library in the least invasive way by preserving as much of the original API as possible. It does not change the tests in a meaningful way nor does it attempt to upgrade any logic that can be simplified or improved with generics. This is purely an API migration, and still requires a lot of additional work to be fully ready. * Fix a few broken tests around serialization * Add v2 suffix * Temporarily change mod name for testing * Rename module to /v2
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
|
||||
package main
|
||||
|
||||
import aq "github.com/emirpasic/gods/queues/arrayqueue"
|
||||
import aq "github.com/emirpasic/gods/v2/queues/arrayqueue"
|
||||
|
||||
// ArrayQueueExample to demonstrate basic usage of ArrayQueue
|
||||
func main() {
|
||||
queue := aq.New() // empty
|
||||
queue := aq.New[int]() // empty
|
||||
queue.Enqueue(1) // 1
|
||||
queue.Enqueue(2) // 1, 2
|
||||
_ = queue.Values() // 1, 2 (FIFO order)
|
||||
|
||||
Reference in New Issue
Block a user