fix godoc
This commit is contained in:
parent
a0225e0dde
commit
37ad69e8b9
4 changed files with 5 additions and 5 deletions
2
int.go
2
int.go
|
@ -26,7 +26,7 @@ func IntFrom(i int64) Int {
|
|||
return NewInt(i, i != 0)
|
||||
}
|
||||
|
||||
// StringFrom creates a new String that be null if i is nil.
|
||||
// IntFromPtr creates a new String that be null if i is nil.
|
||||
func IntFromPtr(i *int64) Int {
|
||||
if i == nil {
|
||||
return NewInt(0, false)
|
||||
|
|
|
@ -28,7 +28,7 @@ func IntFrom(i int64) Int {
|
|||
return NewInt(i, true)
|
||||
}
|
||||
|
||||
// StringFrom creates a new String that be null if i is nil.
|
||||
// IntFromPtr creates a new String that be null if i is nil.
|
||||
func IntFromPtr(i *int64) Int {
|
||||
if i == nil {
|
||||
return NewInt(0, false)
|
||||
|
|
|
@ -17,7 +17,7 @@ func StringFrom(s string) String {
|
|||
return NewString(s, true)
|
||||
}
|
||||
|
||||
// StringFrom creates a new String that be null if s is nil.
|
||||
// StringFromPtr creates a new String that be null if s is nil.
|
||||
func StringFromPtr(s *string) String {
|
||||
if s == nil {
|
||||
return NewString("", false)
|
||||
|
|
|
@ -29,7 +29,7 @@ func StringFrom(s string) String {
|
|||
return NewString(s, s != "")
|
||||
}
|
||||
|
||||
// StringFrom creates a new String that be null if s is nil or blank.
|
||||
// StringFromPtr creates a new String that be null if s is nil or blank.
|
||||
// It will make s point to the String's value.
|
||||
func StringFromPtr(s *string) String {
|
||||
if s == nil {
|
||||
|
@ -76,7 +76,7 @@ func (s *String) UnmarshalText(text []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to this String's value, or a nil pointer if this String is null.
|
||||
// Ptr returns a pointer to this String's value, or a nil pointer if this String is null.
|
||||
func (s String) Ptr() *string {
|
||||
if !s.Valid {
|
||||
return nil
|
||||
|
|
Loading…
Add table
Reference in a new issue