golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.86k stars 17.65k forks source link

Time Crash time.go:1126 #40439

Closed Dontmindmes closed 4 years ago

Dontmindmes commented 4 years ago

https://i.imgur.com/1VkYgnG.png

This is the code im using https://i.imgur.com/SPGClVC.png

`The system cannot find the path specified. panic: time: missing Location in call to Time.In

goroutine 1 [running]: time.Time.In(...) c:/go/src/time/time.go:1126 main.main()`

When I run this on my machine with Go installed it runs perfectly but when I compile and run on my NUC with no golang installed it causes that error, Windows 10 home

davecheney commented 4 years ago

@Dontmindmes can you please post your code samples as text, not images.

Dontmindmes commented 4 years ago

https://github.com/Dontmindmes/GHome-Athan-System/blob/master/Application/main.go This is the code im trying to run, https://i.imgur.com/KKguTYj.png

davecheney commented 4 years ago

The error handling on this line is not correct

https://github.com/Dontmindmes/GHome-Athan-System/blob/master/Application/main.go#L161

If an error occurs then the state of any other variables returned becomes unknown and they cannot be used safely.

Thank you for raising this issue. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For asking questions, see: