-
Notifications
You must be signed in to change notification settings - Fork 5
/
misc.go
34 lines (28 loc) · 864 Bytes
/
misc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* *******************************************************************************
* * Copyright (c) 2020 Edgeworx, Inc.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Eclipse Public License v. 2.0 which is available at
* * http://www.eclipse.org/legal/epl-2.0
* *
* * SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*
*/
package util
import (
rsc "github.com/eclipse-iofog/iofogctl/v3/internal/resource"
)
func IsSystemAgent(agentConfig *rsc.AgentConfiguration) bool {
return agentConfig != nil && agentConfig.IsSystem != nil && *agentConfig.IsSystem
}
func MakeIntPtr(value int) *int {
return &value
}
func MakeStrPtr(value string) *string {
return &value
}
func MakeBoolPtr(value bool) *bool {
return &value
}