Getting Invalid class Exception for os.Hostname()

Hello Team,

In my code i am doing
hostName, err := os.Hostname()

But I am getting error:
Exception occurred. (Invalid class )

Can any one help?
I am using Microsoft Windows 7 Professional 6.1 desktop.

Could you please provide a full main function which produces the problem and the full output produced by that program?

1 Like

Can not share the code.
One thing i can let you know that this application is used on diffrent os systems and for the mentioned windows system Microsoft Windows 7 Professional 6.1 desktop it is throwing this error.

But Iā€™m pretty sure you are able to isolate the issue and create a minified example that shows the issue?


I just grepped the go code base, I have not found a place where either Exception occured or invalid class might be created as a string.

So whatever you get there, is probably not created by go.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.