mirror of
https://github.com/fleetdm/fleet
synced 2026-05-06 14:58:33 +00:00
* #511 refactored update options - new params & ts * updated server to include agent_options for read and update * added agent options form to org settings * #511 finished connecting agent form to server * #511 fixing api to save/read agent options * #511 linted * #511 fixed reading & updating agent options * #511 api fixes to support agent options * #511 removed log * Fix json.RawMessage pointers in tests Co-authored-by: Zach Wasserman <zach@fleetdm.com>
37 lines
711 B
Go
37 lines
711 B
Go
// Package ptr includes functions for creating pointers from values.
|
|
package ptr
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
// String returns a pointer to the provided string.
|
|
func String(x string) *string {
|
|
return &x
|
|
}
|
|
|
|
// Int returns a pointer to the provided int.
|
|
func Int(x int) *int {
|
|
return &x
|
|
}
|
|
|
|
// Uint returns a pointer to the provided uint.
|
|
func Uint(x uint) *uint {
|
|
return &x
|
|
}
|
|
|
|
// Bool returns a pointer to the provided bool.
|
|
func Bool(x bool) *bool {
|
|
return &x
|
|
}
|
|
|
|
// Time returns a pointer to the provided time.Time.
|
|
func Time(x time.Time) *time.Time {
|
|
return &x
|
|
}
|
|
|
|
// RawMessage returns a pointer to the provided json.RawMessage.
|
|
func RawMessage(x json.RawMessage) *json.RawMessage {
|
|
return &x
|
|
}
|