Funktionsfähig ohne Pointer
This commit is contained in:
parent
eff7131cb7
commit
4781aac595
|
@ -3,6 +3,7 @@ package nhooyrioWebsocketAddons
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"nhooyr.io/websocket"
|
||||
"nhooyr.io/websocket/wsjson"
|
||||
|
@ -12,6 +13,8 @@ type GosmContainerSection struct {
|
|||
TagID string `json:"tagid"`
|
||||
Attribute string `json:"attribute"` // might left empty
|
||||
Content string `json:"content"`
|
||||
Upstream bool `json:"streamdirection"` // up = true / down = false
|
||||
Status string `json:"status"` // reserved for status message; type errors is out of bounds
|
||||
}
|
||||
|
||||
type GosmContainer []GosmContainerSection
|
||||
|
@ -26,6 +29,9 @@ type GosmAdapter interface {
|
|||
|
||||
func (r GosmContainer) Convert() (GosmAdapter, error) {
|
||||
buffer, err := json.Marshal(r)
|
||||
fmt.Println("Hier", r)
|
||||
r = GosmContainer{GosmContainerSection{"E", "FF", "GGG", true, "Hallo"}}
|
||||
fmt.Println("Hier2", r)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue