mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
@@ -16,15 +16,15 @@ type ClusterInfo struct {
|
||||
Hostname string `json:"hostname"`
|
||||
}
|
||||
|
||||
func (me *ClusterInfo) ToJson() string {
|
||||
b, _ := json.Marshal(me)
|
||||
func (ci *ClusterInfo) ToJson() string {
|
||||
b, _ := json.Marshal(ci)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func ClusterInfoFromJson(data io.Reader) *ClusterInfo {
|
||||
var me *ClusterInfo
|
||||
json.NewDecoder(data).Decode(&me)
|
||||
return me
|
||||
var ci *ClusterInfo
|
||||
json.NewDecoder(data).Decode(&ci)
|
||||
return ci
|
||||
}
|
||||
|
||||
func ClusterInfosToJson(objmap []*ClusterInfo) string {
|
||||
|
||||
Reference in New Issue
Block a user