Files
android_development/tools/repo_diff/service/repodiff/persistence/filesystem/xml.go
Scott Lobdell 9a38910900 Add project type to database records
Test: No production impact, unit tests included, actively testing
current production dataset

Change-Id: Ia7835938d602f3a11e0d001a1242a8278960b096
2018-04-16 09:49:45 -07:00

15 lines
246 B
Go

package filesystem
import (
"encoding/xml"
"io/ioutil"
)
func ReadXMLAsEntity(filePath string, entity interface{}) error {
xmlBytes, err := ioutil.ReadFile(filePath)
if err != nil {
return err
}
return xml.Unmarshal(xmlBytes, entity)
}