58 Commits

Author SHA1 Message Date
Oleksandr Redko
34fe08cfff
Enable misspell and gofmtmd; fix formatting issues (#706) 2023-10-06 08:14:56 +01:00
Sugam Adhikari
2263e5903a
Updated code example to fit previous refactor (#597) 2022-08-10 14:18:22 +01:00
Leigh Stillard
187c40ae47
Added additional context to example changes for the 'it returns acepted on POST' (#525)
As written it was a bit confusing the exact change that needed to be made, so I dug into the example code to look up where it was to go. The main bit of confusion was the name of the test changed. 

I've added the rest of the function around the previous code snippet to add additional context
2022-02-26 13:25:54 +00:00
Leigh Stillard
1652c30b9a
New file context: adding package and imports (#526)
For clarity added the package and import lines for this new file. Saves the reader looking it up if unsure or if their IDE doesn't support import autocompletion.
2022-02-26 13:12:22 +00:00
Bharath Kumar Uppala
e964f078de
Issue: Automate the gofmt in markdown files using gofmtmd during build (#498)
Issue Link: https://github.com/quii/learn-go-with-tests/issues/353
Modifications:
* Modified the build script to download and run the gofmtmd tool on the markdown files
* Ran the script locally and fixed the issues reported by gofmtmd tool

Note: Intro to generics md file contains some syntax related to generics which is not recognised by the tool. So some valid
code fences are not marked as go
2021-10-31 08:35:22 +00:00
James Peiris
395712ba1b
Documentation Tweaks (#461)
* Update maps.md

Rogue parenthesis in refactor example

* Documentation Updates

* tab->spaces

* Removed an option that wasn't an option, just a description of the current state of affairs

* Char formatting better with exclamation mark italicised
2021-06-10 14:57:27 +01:00
Chris James
b00f1cb573 handle http.ListenAndServe better, fixes #439 2021-03-20 10:54:22 +00:00
colezlaw
44628759bf
switched to using TB for helpers (#383)
Co-authored-by: Will Stranathan <will@cltnc.us>
Co-authored-by: Chris James <qui666@gmail.com>
2020-10-22 11:02:43 +01:00
Charles Clinton Pustejovsky III
3d0fc535af
Further http chapter edits (#380)
* Update outdated descriptions and links (#358)

* Update reflection.md (#361)

Code examples for chan and func are incorrect

* Update select.md (#371)

Hi all,

I've been following this repo to help teach myself go and it's been a great help.
I noticed on line 399 the first argument in t.Run doesn't match the assertion. Raising this PR for your consideration as to whether you think this wording fits better or not.

* specifying what files need to be created

* adding final file comments to http chapter

* typo fixes

Co-authored-by: 森 優太 mori <59682979+uta-mori@users.noreply.github.com>
Co-authored-by: Johan Baaij <johanbaaij@gmail.com>
Co-authored-by: Brady <37232811+BClark88@users.noreply.github.com>
2020-10-09 09:27:15 +01:00
Charles Clinton Pustejovsky III
a0a399c918
(WIP) HTTP chapter edits (#379)
* Update outdated descriptions and links (#358)

* Update reflection.md (#361)

Code examples for chan and func are incorrect

* Update select.md (#371)

Hi all,

I've been following this repo to help teach myself go and it's been a great help.
I noticed on line 399 the first argument in t.Run doesn't match the assertion. Raising this PR for your consideration as to whether you think this wording fits better or not.

* specifying what files need to be created

Co-authored-by: 森 優太 mori <59682979+uta-mori@users.noreply.github.com>
Co-authored-by: Johan Baaij <johanbaaij@gmail.com>
Co-authored-by: Brady <37232811+BClark88@users.noreply.github.com>
2020-10-08 09:03:18 +01:00
Chris James
92879fecb2 change from master to main 2020-06-18 13:46:29 +01:00
Benoit Tigeot
d2e1cf2ef6
go fmt code block to reduce formating errors (#350)
I used gofmtmd package:
```sh
ls -1 *.md  | xargs -I % sh -c 'echo %; gofmtmd % -r'
```

There is some errors, in file that could not be parsed
2020-05-23 07:56:06 +01:00
Attila Nagy
522e730226
Fix function name in chapter HTTP Server (#312) 2020-02-02 17:30:17 +00:00
Nicholas Lim
8f4724074d Fix documentation for http-server section (#280)
* Improve http-server docs clarity

- how type http.Handler is implemented
- usage of http.HandlerFunc

Signed-off-by: nicnicknicky <5416460+nicnicknicky@users.noreply.github.com>

* Add documentation to include mutex addition

Signed-off-by: nicnicknicky <5416460+nicnicknicky@users.noreply.github.com>
2019-11-03 16:50:22 +00:00
Nicholas Lim
11a6a727ae http-server: use strings.Trimspace instead of slicing (#283) 2019-11-03 16:48:44 +00:00
Chris James
ee184c83d4 replace _all_ of the with %q 2019-07-11 15:16:34 +01:00
mukulrawat1986
27ded382e5 Name the function which holds our subtest. 2018-10-03 10:05:29 +05:30
pityonline
b3597f2908
fix a mistake 2018-08-13 10:53:36 +08:00
pityonline
6163b77445
trivial grammar and style tweak on http-server.md 2018-07-21 12:02:23 +08:00
pityonline
0d1d3e7b4e
convert hard tabs to 4 spaces in Markdown files 2018-06-18 17:42:46 +08:00
Chris James
aac24a74d9
Merge pull request #63 from pdbrito/http-server
Http server
2018-05-13 21:56:05 +01:00
Pedro de Brito
0a74a3353f Use the same endpoint throughout 2018-05-13 22:35:46 +02:00
Pedro de Brito
e5f293f944 Edit test description 2018-05-13 22:20:43 +02:00
Pedro de Brito
bdd6f55c7a Fix a typo 2018-05-06 22:57:56 +02:00
pityonline
d1039d1396
fix punctuation, indent, blank line 2018-05-03 23:37:05 +08:00
Chris James
f030fdb2b9
Merge pull request #58 from pdbrito/http-fixes
Fix check for zero value
2018-05-03 10:06:39 +01:00
Pedro de Brito
abf9d4b161 Fix if comparison 2018-05-02 21:13:58 +02:00
Chris James
dde5a203dd
Merge pull request #55 from gypsydave5/patch-5
Typos and some other bits
2018-04-29 21:06:59 +01:00
Chris James
7483ccf5cf
Merge pull request #56 from gypsydave5/patch-6
Store is now called RecordWin
2018-04-29 21:06:13 +01:00
David Wickes
f834aa2a30
backticks on an if 2018-04-29 21:03:43 +01:00
David Wickes
7f2ae3c0b8
Store is now called RecordWin 2018-04-29 20:58:57 +01:00
David Wickes
03edcecf7c
Typos and some other bits 2018-04-29 20:55:56 +01:00
Pedro de Brito
de16e8fba6 Fix code example 2018-04-29 20:13:07 +02:00
pityonline
866f20d33a
fix punctuation, header level 2018-04-29 21:51:03 +08:00
Pedro de Brito
da7befccaf Fix link 2018-04-28 18:09:32 +02:00
Chris James
465159ff96 http server no longer WIP 2018-04-28 11:08:00 +01:00
Chris James
6f09986253 some other typos 2018-04-28 11:07:20 +01:00
Chris James
3b31d24823 typo 2018-04-28 11:01:35 +01:00
Chris James
ff3d36b624 verboseness in tests is nice 2018-04-28 10:39:19 +01:00
Chris James
dbbe868fc5 more tiny edits 2018-04-27 11:19:40 +01:00
Chris James
8092066068 http-server some tidying up 2018-04-27 11:15:25 +01:00
Chris James
01a4cfd0bb first draft of http server done i think 2018-04-27 10:49:59 +01:00
Chris James
b9fb7a03a1 continue with more iterations on http server 2018-04-26 13:36:40 +01:00
Chris James
fefb508e4e make next test pass on http server 2018-04-26 13:19:27 +01:00
Chris James
6299ce8913 tw - submit for approval 2018-04-26 13:05:56 +01:00
Chris James
73d8877882 wip - starting storing of player scores 2018-04-26 08:55:33 +01:00
Pedro de Brito
f084e6f177 Fix typo 2018-04-24 22:44:10 +02:00
Chris James
b593f1fb1b some corrections and refactoring 2018-04-24 17:14:54 +01:00
Chris James
47ee24180c typo 2018-04-24 17:08:41 +01:00
Chris James
673402ba7e remove hello, world server part as we dont need it 2018-04-24 07:00:08 +01:00