psi: made TimeLocation struct member vars exported

This commit is contained in:
saxon 2019-01-07 12:05:05 +10:30
parent 7a73f69fe9
commit 239e1dfc93
1 changed files with 6 additions and 6 deletions

View File

@ -42,18 +42,18 @@ const (
) )
type TimeLocation struct { type TimeLocation struct {
time uint64 Time uint64
location string Location string
} }
var metaData = TimeLocation{} var metaData = TimeLocation{}
func SetTimeStamp(t uint64) { func SetTimeStamp(t uint64) {
metaData.time = t metaData.Time = t
} }
func SetLocation(g string) { func SetLocation(g string) {
metaData.location = g metaData.Location = g
} }
var ( var (
@ -186,11 +186,11 @@ func (e *Encoder) writePSI() error {
} }
// Update pmt table time and location // Update pmt table time and location
err = psi.UpdateTime(pmtTable, metaData.time) err = psi.UpdateTime(pmtTable, metaData.Time)
if err != nil { if err != nil {
return err return err
} }
err = psi.UpdateLocation(pmtTable, metaData.location) err = psi.UpdateLocation(pmtTable, metaData.Location)
if err != nil { if err != nil {
return nil return nil
} }