micro/config/source/service/util.go
Vasiliy Tolstov 60993e6275
config/source/service: base64 fix (#1345)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-13 21:44:55 +00:00

19 lines
379 B
Go

package service
import (
"time"
"github.com/micro/go-micro/v2/config/source"
proto "github.com/micro/go-micro/v2/config/source/service/proto"
)
func toChangeSet(c *proto.ChangeSet) *source.ChangeSet {
return &source.ChangeSet{
Data: []byte(c.Data),
Checksum: c.Checksum,
Format: c.Format,
Timestamp: time.Unix(c.Timestamp, 0),
Source: c.Source,
}
}