Go 언어

Code 2021. 3. 6. 23:42

 

    - GoLang , Go Programming Language, 고 프로그래밍 언어

 

* 버전 역사

1.0 - 2012

1.5 - 2015

1.10 - 2018

1.15 - 2020




* 매뉴얼

https://golang.org/doc/

http://golang.site/go/basics - 한글



* 다운로드 설치

https://golang.org/dl/

    *.msi 파일 다운로드 실행

 

    - 설치 확인

> go version

go version go1.16 windows/amd64



//---------------------------

* hello world

mkdir hello

cd hello

 

    - 모듈 초기화

go mod init hello

        - 이과정이 없으면 vs code go extension 에러가 남

        - 에러 메시지

Error loading workspace: You are outside of a module and outside of $GOPATH/src. If you are using modules, please open your editor to a directory in your module. If you believe this warning is incorrect, please file an issue: https://github.com/golang/go/issues/new.

 

    //---------------

    - hello.go 파일 작성

package main

import (

    "fmt"

    "github.com/google/go-cmp/cmp"

)

func main() {

    fmt.Println(cmp.Diff("Hello World", "Hello Go"))

}

 

    - 외부 패키지 설치

go get github.com/google/go-cmp/cmp

 

    - 프로그램 실행

go run hello.go

 

    - 컴파일 빌드, exe 파일 생성

go build




//---------------------------------

* GO로 Windows GUI 프로그램 만들기

https://golangr.com/gui/



* walk - 0 <== 성공

https://github.com/lxn/walk - 5.3k



    //-----------------

    // pass

 

* go-app - PWA 용

https://github.com/maxence-charriere/go-app - 4.5k



* webview - X

https://github.com/webview/webview - 7.9k

    - TDM-GCC-64 필요http://tdm-gcc.tdragon.net/download

    - 떳다가 살아짐



//-------------------

* 웹 프레임워크 (백앤드)

https://github.com/gin-gonic/gin - 46.2k





//--------------------------

// 참고

https://golang.org/

https://en.wikipedia.org/wiki/Go_(programming_language)

https://namu.wiki/w/Go(%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D%20%EC%96%B8%EC%96%B4)

https://github.com/avelino/awesome-go - 62.5k



반응형
Posted by codens