GOProgramming

所属分类:硬件设计
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2022-06-10 18:34:28
上 传 者sh-1993
说明:  ...增加了结构类型、[3]内存安全功能和CSP风格的并发编程功能。[13] 编译器和其他语言...,
(Go (often referred to as golang) is a programming language created at Google[12] in 2009 by Robert Griesemer, Rob Pike, and Ken Thompson.[10] It is a compiled, statically typed language in the tradition of Algol and C, with garbage collection, limited structural typing,[3] memory safety features and CSP-style concurrent programming features)

文件列表:
.vscode/ (0, 2022-06-10)
.vscode/launch.json (611, 2022-06-10)
API/ (0, 2022-06-10)
API/HelloAPI.go (258, 2022-06-10)
API/HelloAPI2.go (632, 2022-06-10)
API/Notes_API.txt (166, 2022-06-10)
GroupSession/ (0, 2022-06-10)
GroupSession/Channel/ (0, 2022-06-10)
GroupSession/Channel/channel.buffered.go (348, 2022-06-10)
GroupSession/Channel/channel.go (391, 2022-06-10)
GroupSession/Channel/channel2.go (386, 2022-06-10)
GroupSession/Channel/channel3.go (585, 2022-06-10)
GroupSession/Channel/channel4.go (193, 2022-06-10)
GroupSession/Channel/channel5.go (386, 2022-06-10)
GroupSession/Channel/channel6.go (752, 2022-06-10)
GroupSession/Channel/channel_len_cap.go (251, 2022-06-10)
GroupSession/Channel/confusion.go (145, 2022-06-10)
GroupSession/IO/ (0, 2022-06-10)
GroupSession/IO/10_Exit/ (0, 2022-06-10)
GroupSession/IO/10_Exit/Exit.go (109, 2022-06-10)
GroupSession/IO/10_Exit/debug (2170368, 2022-06-10)
GroupSession/IO/1_ReadingFiles/ (0, 2022-06-10)
GroupSession/IO/1_ReadingFiles/MyFiles/ (0, 2022-06-10)
GroupSession/IO/1_ReadingFiles/ReadingFiles.go (211, 2022-06-10)
GroupSession/IO/2_WritingFiles/ (0, 2022-06-10)
GroupSession/IO/2_WritingFiles/MyFiles/ (0, 2022-06-10)
GroupSession/IO/2_WritingFiles/MyFiles/WriteMe.txt (17, 2022-06-10)
GroupSession/IO/2_WritingFiles/WritingFiles.go (336, 2022-06-10)
GroupSession/IO/3_LineFilters/ (0, 2022-06-10)
GroupSession/IO/3_LineFilters/LineFilters.go (527, 2022-06-10)
GroupSession/IO/4_CommandLineArguments/ (0, 2022-06-10)
GroupSession/IO/4_CommandLineArguments/CommandLineArguments.go (217, 2022-06-10)
GroupSession/IO/4_CommandLineArguments/debug (2170368, 2022-06-10)
GroupSession/IO/5_CommandLineFlags/ (0, 2022-06-10)
GroupSession/IO/5_CommandLineFlags/CommandLineFlags.go (700, 2022-06-10)
GroupSession/IO/6_EnvironmentVariables/ (0, 2022-06-10)
GroupSession/IO/6_EnvironmentVariables/EnvironmentVariables.go (352, 2022-06-10)
GroupSession/IO/7_SpawningProcesses/ (0, 2022-06-10)
... ...

# Go (programming language) Go (often referred to as golang) is a programming language created at Google in 2009 by Robert Griesemer, Rob Pike, and Ken Thompson. It is a compiled, statically typed language in the tradition of Algol and C, with garbage collection, limited structural typing, memory safety features and CSP-style concurrent programming features added. The compiler and other language tools originally developed by Google are all free and open source. (Wiki)
![stack Overflow](https://github.com/shahedbd/GOProgramming/blob/master/Resources/GOlang.jpg) # Golang Highlights ### 01. Compiled ### 02. Performant ### 03. Multiple-cores ### 04. Concurrency ### 05. Network ### 06. Statically typed language in the tradition of Algol and C ### 07. With garbage collection ### 08. Limited structural typing ### 09. Memory safety features ### 10. CSP-style concurrent programming #### Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. ## How to run in Windows 01. First download GO windows installer
https://golang.org/dl/ 02. For editor i suggest VS code. If you already dont have it please download overe here,
https://code.visualstudio.com/download 03. Go lang VS code market place,
https://marketplace.visualstudio.com/items?itemName=lukehoban.Go 04. How to Go programming in VS Code,
https://code.visualstudio.com/docs/languages/go ## Hello World code: package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
} ### Run from VS code, A. Go to VS code terminal (View-->Integrated Terminal)
B. Tyep,cd "your test.go file loc"
Ex: cd E:\GOWP
C. Then type go run test.go
![stack Overflow](https://github.com/shahedbd/GOProgramming/blob/master/Resources/GoRunFromVSCode.JPG) ## VS Code Editor Command 1. Format your Go file using Shift+Alt+F
2. Go To Definition F12 - Go to the source code of the type definition.
3. Peek Definition Alt+F12 - Bring up a Peek window with the type definition.
4. Find All References Shift+F12 - Find all references for the type.

# Top Go Web Frameworks A list of popular github projects related to Go web framework (ranked by stars automatically) Please update **list.txt** (via Pull Request) | Project Name | Stars | Forks | Open Issues | Description | | ------------ | ----- | ----- | ----------- | ----------- | | [gin](https://github.com/gin-gonic/gin) | 15881 | 1853 | 208 | Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin. | | [beego](https://github.com/astaxie/beego) | 14575 | 3196 | 454 | beego is an open-source, high-performance web framework for the Go programming language. | | [martini](https://github.com/go-martini/martini) | 10003 | 1049 | 1 | No longer maintained Classy web framework for Go | | [echo](https://github.com/labstack/echo) | 9799 | 834 | 102 | High performance, minimalist Go web framework | | [iris](https://github.com/kataras/iris) | 9649 | 978 | 5 | The fastest web framework for Go on (THIS) Earth | | [revel](https://github.com/revel/revel) | 9621 | 1228 | 65 | A high productivity, full-stack web framework for the Go language. | | [kit](https://github.com/go-kit/kit) | 9461 | 955 | 45 | A standard library for microservices. | | [httprouter](https://github.com/julienschmidt/httprouter) | 6655 | 666 | 53 | A high performance HTTP request router that scales well | | [fasthttp](https://github.com/valyala/fasthttp) | 5926 | 519 | 152 | Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http | | [mux](https://github.com/gorilla/mux) | 5691 | 724 | 20 | A powerful URL router and dispatcher for golang. | | [chi](https://github.com/go-chi/chi) | 3296 | 231 | 14 | lightweight, idiomatic and composable router for building Go HTTP services | | [go-json-rest](https://github.com/ant0ine/go-json-rest) | 3063 | 330 | 41 | A quick and easy way to setup a RESTful JSON API | | [goa](https://github.com/goadesign/goa) | 2679 | 268 | 34 | Design-based APIs and microservices in Go | | [go-restful](https://github.com/emicklei/go-restful) | 2602 | 400 | 7 | package for building REST-style Web Services using Google Go | | [buffalo](https://github.com/gobuffalo/buffalo) | 2517 | 190 | 47 | Rapid Web Development w/ Go | | [macaron](https://github.com/go-macaron/macaron) | 2277 | 215 | 12 | Package macaron is a high productive and modular web framework in Go. | | [gizmo](https://github.com/NYTimes/gizmo) | 2135 | 130 | 8 | A Microservice Toolkit from The New York Times | | [go-swagger](https://github.com/go-swagger/go-swagger) | 2076 | 389 | 227 | Swagger 2.0 implementation for go | | [armor](https://github.com/labstack/armor) | 1344 | 42 | 11 | Uncomplicated, modern HTTP server | | [web](https://github.com/gocraft/web) | 1297 | 99 | 17 | Go Router + Middleware. Your Contexts. | | [dotweb](https://github.com/devfeel/dotweb) | 815 | 122 | 9 | Simple and easy go web micro framework | | [tango](https://github.com/lunny/tango) | 700 | 104 | 9 | Micro & pluggable web framework for Go | | [rest-layer](https://github.com/rs/rest-layer) | 642 | 47 | 35 | REST Layer, Go (golang) REST API framework | | [goji](https://github.com/goji/goji) | 616 | 44 | 3 | Goji is a minimalistic and flexible HTTP request multiplexer for Go (golang) | | [traffic](https://github.com/pilu/traffic) | 515 | 26 | 0 | Sinatra inspired regexp/pattern mux and web framework for Go [NOT MAINTAINED] | | [neo](https://github.com/ivpusic/neo) | 357 | 35 | 5 | Go Web Framework | | [aegis](https://github.com/tmaiaroto/aegis) | 140 | 5 | 5 | Serverless Golang APIs with AWS Lambda & API Gateway | | [gorest](https://github.com/tideland/gorest) | 27 | 1 | 2 | Tideland GoREST | | [webgo](https://github.com/bnkamalesh/webgo) | 22 | 2 | 2 | A very lightweight & simple web framework for Go | ## The major differences between Java and Golang are: 01. Go’s compilation speed is very fast as no VM is needed to execute Go program.
02. Go can return more than one value whereas Java can’t. Every time you need to create object as there is no pointer support in Java.
03. Garbage collection is pretty good in Golang.
04. Golang have goroutine in order to achieve multitasking.
05. A single thread in java takes more than 1 MB memory on heap whereas goroutine takes approx. 2 KB.
06. You need to extend class from Thread class or implements Runnable interface and need to put your logic in run() in java , but in Golang you just need to write go keyword before function definition so it will make that function as goroutine.
07. Also synchronization support is very good in golang.
08. Go’s interface is more flexible as there is no support for inheritance. Inheritance makes things more complex in bigger projects.
### VS code debugging: https://github.com/Microsoft/vscode-go
https://github.com/derekparker/delve/tree/master/Documentation/installation
https://github.com/derekparker/delve/blob/master/Documentation/installation/windows/install.md
go get -u github.com/derekparker/delve/cmd/dlv
### Recommended IDE: https://www.jetbrains.com/go/
VS Code
Web Strome
### SQLDrivers https://github.com/golang/go/wiki/SQLDrivers ### A pure Go MSSQL driver for Go's database/sql package https://github.com/denisenkom/go-mssqldb
cmd: go get github.com/denisenkom/go-mssqldb
### Go MySQL Driver https://github.com/go-sql-driver/mysql/
cmd: go get -u github.com/go-sql-driver/mysql
## Graphical comparison of GO language with other languages ![stack Overflow](https://github.com/shahedbd/GOProgramming/blob/master/Resources/FastFunforHuman.JPG)
![stack Overflow](https://github.com/shahedbd/GOProgramming/blob/master/Resources/EfficiencyConcurrency.JPG)

近期下载者

相关文件


收藏者