From 78a9774147c91407be3fb925b52336174854e632 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 23 Oct 2017 09:40:35 -0700 Subject: add model.NewX funcs for builtin types (#7692) * add model.NewX funcs for builtin types * whoops, forgot to add the new file --- model/builtin.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 model/builtin.go (limited to 'model/builtin.go') diff --git a/model/builtin.go b/model/builtin.go new file mode 100644 index 000000000..5dd00a964 --- /dev/null +++ b/model/builtin.go @@ -0,0 +1,9 @@ +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package model + +func NewBool(b bool) *bool { return &b } +func NewInt(n int) *int { return &n } +func NewInt64(n int64) *int64 { return &n } +func NewString(s string) *string { return &s } -- cgit v1.2.3-1-g7c22