mirror of
https://github.com/RGBCube/GoNew
synced 2025-07-31 17:37:45 +00:00
Rename package to ptr
This commit is contained in:
parent
9dc7cb7b36
commit
717ed11ee0
2 changed files with 3 additions and 3 deletions
|
@ -17,14 +17,14 @@ func String(ok bool) *string {
|
|||
// s := "Hello, World!"
|
||||
// return &s
|
||||
// You now can do this!
|
||||
return new.New("Hello, World!")
|
||||
return ptr.New("Hello, World!")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Int32(ok bool) *int32 {
|
||||
if ok {
|
||||
return new.New[int32](42)
|
||||
return ptr.New[int32](42)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue