blob: 398e348599bd33179a11f5a5d7694095353bbe6e [file] [log] [blame]
khenaidoo5fc5cea2021-08-11 17:39:16 -04001// Copyright 2019 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
5package proto
6
7// Bool stores v in a new bool value and returns a pointer to it.
8func Bool(v bool) *bool { return &v }
9
10// Int stores v in a new int32 value and returns a pointer to it.
11//
12// Deprecated: Use Int32 instead.
13func Int(v int) *int32 { return Int32(int32(v)) }
14
15// Int32 stores v in a new int32 value and returns a pointer to it.
16func Int32(v int32) *int32 { return &v }
17
18// Int64 stores v in a new int64 value and returns a pointer to it.
19func Int64(v int64) *int64 { return &v }
20
21// Uint32 stores v in a new uint32 value and returns a pointer to it.
22func Uint32(v uint32) *uint32 { return &v }
23
24// Uint64 stores v in a new uint64 value and returns a pointer to it.
25func Uint64(v uint64) *uint64 { return &v }
26
27// Float32 stores v in a new float32 value and returns a pointer to it.
28func Float32(v float32) *float32 { return &v }
29
30// Float64 stores v in a new float64 value and returns a pointer to it.
31func Float64(v float64) *float64 { return &v }
32
33// String stores v in a new string value and returns a pointer to it.
34func String(v string) *string { return &v }