π This material has been acquired and actively maintained by Ardan Labs β
π The Ultimate Go Notebook is now available on Amazon β
Stargazers over time
The Ultimate Go Study Guide
Home Page: https://gumroad.com/l/bpUYF
License: Apache License 2.0
https://github.com/hoanhan101/ultimate-go/blob/master/go/testing/sub_test.go
test method: TestParallelize
before added output:
=== RUN TestParallelize
11_test.go:82: Given the need to test downloading different content.
--- PASS: TestParallelize (1.04s)
=== RUN TestParallelize/statusok
11_test.go:90: Test: 0 When checking "https://www.baidu.com" for status code 200
11_test.go:96: β Should be able to make the Get call.
11_test.go:101: β Should receive a 200 status code.
--- PASS: TestParallelize/statusok (0.28s)
=== RUN TestParallelize/statusnotfound
11_test.go:90: Test: 1 When checking "http://rss.cnn.com/rss/cnn_topstorie.rss" for status code 404
11_test.go:96: β Should be able to make the Get call.
11_test.go:101: β Should receive a 404 status code.
--- PASS: TestParallelize/statusnotfound (0.75s)
PASS
after added t.Parallel()
=== RUN TestParallelize
11_test.go:82: Given the need to test downloading different content.
--- PASS: TestParallelize (0.00s)
=== RUN TestParallelize/statusok
=== PAUSE TestParallelize/statusok
=== CONT TestParallelize/statusok
11_test.go:90: Test: 1 When checking "http://rss.cnn.com/rss/cnn_topstorie.rss" for status code 404
11_test.go:96: β Should be able to make the Get call.
11_test.go:101: β Should receive a 404 status code.
--- PASS: TestParallelize/statusok (1.00s)
=== RUN TestParallelize/statusnotfound
=== PAUSE TestParallelize/statusnotfound
=== CONT TestParallelize/statusnotfound
11_test.go:90: Test: 1 When checking "http://rss.cnn.com/rss/cnn_topstorie.rss" for status code 404
11_test.go:96: β Should be able to make the Get call.
11_test.go:101: β Should receive a 404 status code.
--- PASS: TestParallelize/statusnotfound (0.71s)
PASS
the bold text is the difference
ultimate-go/go/language/constant.go
Line 66 in d53aafd
The above line fails with constant 9223372036854775807 overflows int
when executed at https://play.golang.org
Current comment:
// Rule 1:
// Depending on the size a particular value, Go determines the alignment we need. Every 2 bytes
// value must follow a 2 bytes boundary.
Corrected comment:
// Rule 1:
// Depending on the size a particular value, Go determines the alignment we need. Every 2 bytes
// value must fall on a 2 bytes boundary.
I am not sure if it's a typo, but here changing follow to fall changes the meaning of the sentence.
ultimate-go/go/language/pointer.go
Line 110 in 43f4bde
If this is the case, then we are in trouble
ultimate-go/go/language/array.go
Line 182 in 43f4bde
// Declare an array of 6 strings initialized with values.
This is not an issue, just want to say thanks. Thank you for compiling this information. I will have this repo in my favorites and share it with anyone asking something about go. Thank you so very much.
A lot of Go Projects are now moving to new dependency management system: Go Module
Is there any plan for it, or it need further discussion?
https://blog.golang.org/using-go-modules
https://github.com/golang/go/wiki/Modules
Hi,
A seed needs to be added to all examples that use rand functions, for example in channel_2.go.
rand.Seed(time.Now().UnixNano())
ultimate-go/go/language/struct.go
Lines 29 to 34 in 3fb5ca6
The first rule's statements are really hard to comprehend if it's your first time dealing with data structure alignments. Please, correct me if I'm wrong.
Every 2 bytes value must follow a 2 bytes boundary.
It is really hard sentence to start this explanation, because it does not imply what to do with other cases, e.g. if you put 1 byte value, it must be followed by 1 byte boundary, etc. The reader may not conclude that this implies even further for 2, 4, 8 byte values (I'm not sure for Go case, but this statement may depend on specific architecture).
Similarly, if it is a 4 bytes value then we will have a 3 bytes padding value.
Here, you don't point out that you are referring on the same example with setting 1 byte value on the beginning of the 8 byte block. I was thinking that you just appended value of pi to complete explaining alignment in that specific struct
I don't say that something here is wrong, but it's hard to understand. Maybe it should be revisited or put some references like this to be easier to understand.
ultimate-go/go/language/pointer.go
Line 53 in 43f4bde
Nothing has changed
This is an awesome repo as well as guide for people who want to learn go. Anyone is translating to Chinese version? I am willing to do so.
In 49, write "flag bool" as "float bool"
ultimate-go/go/language/struct.go
Lines 45 to 50 in 9bb393c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.