Maybe you are asking how to get build version information into the 
executable.  If yes, then use -ldflags.  
https://pmcgrath.net/include-version-information-in-golang-app

On Thursday, 13 August 2020 at 15:12:36 UTC+5:30 seank...@gmail.com wrote:

> go version -m <executable>
>
> On Thursday, August 13, 2020 at 10:30:56 AM UTC+2 santhoshth...@gmail.com 
> wrote:
>
>> Hi All,
>>
>> What is best way to know a executable version without executing it 
>> through golang?
>>
>> I tried with reading the executable file through a scanner and matching 
>> every line with regex (like ngnix regx) but this is not working for all 
>> executables.
>>
>> Do you have any idea?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/eac6fad2-edcf-47c2-8b0e-e1f2d2dd6d56n%40googlegroups.com.

Reply via email to