blob: 54f14af27c50135e6255f058fffdc9439934f58e [file] [log] [blame]
Joe Tsai009e0672018-11-27 18:45:07 -08001// Copyright 2018 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Package scalar provides wrappers for populating optional scalar fields.
6package scalar
7
8// TODO: Should this be public in the v2 API? Where should it live?
9// Would we want to do something different if Go gets generics?
10
11func Bool(v bool) *bool { return &v }
12func Int32(v int32) *int32 { return &v }
13func Int64(v int64) *int64 { return &v }
14func Uint32(v uint32) *uint32 { return &v }
15func Uint64(v uint64) *uint64 { return &v }
16func Float32(v float32) *float32 { return &v }
17func Float64(v float64) *float64 { return &v }
18func String(v string) *string { return &v }