File: helper.go

package info (click to toggle)
golang-code.forgejo-f3-gof3 3.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,952 kB
  • sloc: sh: 100; makefile: 65
file content (20 lines) | stat: -rw-r--r-- 490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

package sdk

// OptionalBool convert a bool to a bool reference
func OptionalBool(v bool) *bool {
	return &v
}

// OptionalString convert a string to a string reference
func OptionalString(v string) *string {
	return &v
}

// OptionalInt64 convert a int64 to a int64 reference
func OptionalInt64(v int64) *int64 {
	return &v
}