Command line to create a new .go file in command prompt

Hi guys,

I’m running go on windows and I forgot the command line that creates a new .go source file from the cmd prompt. I was wondering if anyone knows and could pass me the information!

Thank you for the help!
Rob

Hey @Robert_Kasprzyk,

As far as I’m aware, there is no special command to create a new .go source file.
All you have to do is just create a regular file with the .go extension.

If you haven’t written any Go code before, you should check out https://golang.org/doc/code.html.

try using Google search for this kind of complicated problems :wink:

1 Like

Definetely, the question is weird.
Do you want to create a empty file from the Windows Command prompt?
if yes, you can use: copy NUL your_file_name.go

That is what I was going of, my apologies for the vague question. Thank you!

My mind was with luke, my apologies for the vague question.

It’s no problem at all and there was nothing wrong with your question, I just wasn’t exactly sure what you meant :slight_smile:

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