DEV Community

Pallat Anchaleechamaikorn
Pallat Anchaleechamaikorn

Posted on

5

dev go inside container using vscode

แนะนำกาาติดตั้ง vscode extension สำหรับเขียน go ง่ายๆ แต่ก่อนอื่นในเครื่องจะต้องติดตั้ง Visual Studio Code ก่อนนะครับ จากนั้นก็ไปตาม url นี้เลย
https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

ไม่งั้นก็ไปหาใน vscode

Alt Text

เมื่อติดตั้งเสร็จแล้ว ให้เปิด Command Palette แล้วเลือก Try a Sample ตามรูป

Alt Text

แล้วก็เลิอก go เลย

Alt Text

จากนั้นมันจะ pull image ซึ่งจะใช้เวลานิดหน่อย เมื่อเสร็จแล้วมันจะเปิด vscode สำหรับเขียนโปรแกรมใน container ขึ้นมาให้
ซึ่งถ้าเราเปิด terminal ขึ้นมา อาจจะต้อง set GOROOT ให้มันสักหน่อย

Alt Text

export GOROOT=/usr/local/go

ทีนี้เราก็เขียนโปรแกรมในนี้ได้โดยไม่ต้องติดตั้ง go ในเครื่องเราเองแล้ว

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more