Refactor of serialization function applied to getItem.go
This commit is contained in:
parent
d331ad8ecf
commit
105314d379
@ -115,21 +115,22 @@ func runDisplayM365JSON(
|
|||||||
|
|
||||||
channel := make(chan data.Stream, 1)
|
channel := make(chan data.Stream, 1)
|
||||||
|
|
||||||
sw := kw.NewJsonSerializationWriter()
|
|
||||||
|
|
||||||
response, err := get(ctx, user, m365ID)
|
response, err := get(ctx, user, m365ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, support.ConnectorStackErrorTrace(err))
|
return errors.Wrap(err, support.ConnectorStackErrorTrace(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
// First return is the number of bytes that were serialized. Ignored
|
// First return is the number of bytes that were serialized. Ignored
|
||||||
_, err = serializeFunc(ctx, gs.Client(), sw, channel, response, user)
|
service := gs.(graph.Service)
|
||||||
|
_, err = serializeFunc(ctx, &service, channel, response, user)
|
||||||
close(channel)
|
close(channel)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sw := kw.NewJsonSerializationWriter()
|
||||||
|
|
||||||
for item := range channel {
|
for item := range channel {
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user