• Agniva De Sarker's avatar
    time: improve error message for LoadLocation · 7df585d1
    Agniva De Sarker authored
    Currently, when a tz file was being checked inside a zoneInfo dir,
    a syscall.ENOENT error was being returned, which caused it to look
    in the zoneinfo.zip file and return an error for that case.
    
    We return a syscall.ENOENT error for the zip file case too, so that
    it falls through to the end of the loop and returns an uniform error
    for both cases.
    
    Fixes #20969
    
    Change-Id: If1de068022ac7693caabb5cffd1c929878460140
    Reviewed-on: https://go-review.googlesource.com/121877
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    7df585d1
zoneinfo_read.go 10.6 KB