mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
This PR deprecates some functions in favor of generic alternatives. The new functions are compatible only with Nomad v1.4+. The old functions (nor their use) should not be removed until Nomad v1.6+.
19 lines
205 B
Go
19 lines
205 B
Go
package pointer
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/shoenig/test/must"
|
|
)
|
|
|
|
func Test_Of(t *testing.T) {
|
|
s := "hello"
|
|
sPtr := Of(s)
|
|
|
|
must.Eq(t, s, *sPtr)
|
|
|
|
b := "bye"
|
|
sPtr = &b
|
|
must.NotEq(t, s, *sPtr)
|
|
}
|