This repository has been archived by the owner on May 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Igor Shishkin <[email protected]>
- Loading branch information
Showing
10 changed files
with
386 additions
and
389 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,66 @@ | ||
package types | ||
|
||
import "time" | ||
|
||
// PtrBool ... | ||
func PtrBool(t bool) *bool { return &t } | ||
|
||
// PtrInt64 ... | ||
func PtrInt64(t int64) *int64 { return &t } | ||
|
||
// PtrFloat64 ... | ||
func PtrFloat64(t float64) *float64 { return &t } | ||
|
||
// PtrString ... | ||
func PtrString(t string) *string { return &t } | ||
|
||
// PtrTime ... | ||
func PtrTime(t time.Time) *time.Time { return &t } | ||
|
||
// PtrFilmAdvanceMode ... | ||
func PtrFilmAdvanceMode(fam FilmAdvanceMode) *FilmAdvanceMode { | ||
if fam == "" { | ||
return nil | ||
} | ||
return &fam | ||
} | ||
|
||
// PtrAFMode ... | ||
func PtrAFMode(t AFMode) *AFMode { | ||
if t == "" { | ||
return nil | ||
} | ||
return &t | ||
} | ||
|
||
// PtrFlashMode ... | ||
func PtrFlashMode(fm FlashMode) *FlashMode { | ||
if fm == "" { | ||
return nil | ||
} | ||
return &fm | ||
} | ||
|
||
// PtrMeteringMode ... | ||
func PtrMeteringMode(mm MeteringMode) *MeteringMode { | ||
if mm == "" { | ||
return nil | ||
} | ||
return &mm | ||
} | ||
|
||
// PtrMultipleExposure ... | ||
func PtrMultipleExposure(me MultipleExposure) *MultipleExposure { | ||
if me == "" { | ||
return nil | ||
} | ||
return &me | ||
} | ||
|
||
// PtrShootingMode ... | ||
func PtrShootingMode(sm ShootingMode) *ShootingMode { | ||
if sm == "" { | ||
return nil | ||
} | ||
return &sm | ||
} |
Oops, something went wrong.