My name is keita69sawada.
Since it seems that I will make a command line tool, I investigated the development language from the following viewpoints.
Go language (golang) looks good! !!
Then, "Would you like to try something in Go language for the time being!" This article was uni-uni.
See here https://qiita.com/keita69sawada/items/5b7af117a313aae02399
Copy and paste the following on the command line to install it.
command
choco install -y golang
choco install -y VisualStudioCode
Copy and paste to the command line.
command
mkdir c:\tmp\project\bin
mkdir c:\tmp\project\src\main
mkdir c:\tmp\project\pkg
The Go language project (directory) structure is as follows.
project(directory)Constitution
C:\tmp\project
├─bin
├─pkg
└─src
└─main
Set the starting path GOPATH.
set GOPATH=C:\tmp\project
In the editor (Visual Studio Code), go to % GOPATH% \ src \ main \ hello.go
Copy the sauce.
src
package main
import "fmt"
func main() {
fmt.Println("Hello,world")
}
command
go build -o %GOPATH%\bin\hello.exe %GOPATH%\src\main\hello.go
The exe file is created.
result
C:\tmp\project
├─bin
│ hello.exe
├─pkg
│ └─windows_amd64
│ hello.a
└─src
└─main
hello.go
command
%GOPATH%\bin\hello.exe
I think it will move quickly.
This time, it's "touch it for the time being", so it ends with the experience of "The .exe file was created after building! Oh, it worked!". Next, I plan to find time to try out the functions of external command calls and API calls.
Recommended Posts