go run postgres/1-connect.go
Hello, world!
go run gorillamux/1-newrouter.go
curl localhost:8080/hello
Hello there!
Send http.StatusOK for the HEAD method, other methods are not allowed.
go run gorillamux/2-methods.go
curl -I localhost:8080/hello
HTTP/1.1 200 OK
Date: Mon, 22 Apr 2024 13:56:03 GMT
go run gorillamux/3-query-params.go
curl localhost:8080/hello?name=John%20Doe
Hello John Doe!
go run gorillamux/4-path-vars.go
curl localhost:8080/hello/John%20Doe
Hello John Doe!
go run gorillamux/5-json-response.go
curl localhost:8080/now
{"now":"Mon Apr 22 14:01:01 2024"}
go run gorillamux/6-subroutes.go
curl localhost:8080/path1/
Subroute 1
curl localhost:8080/path2/
Subroute 2
go run gorillamux/7-static-files.go
curl localhost:8080/app/
This text in "gorillamux/7-static-files/index.html" without HTML-tags.
go run http/server/1-handle.go
curl localhost:8080/count && curl localhost:8080/count && curl localhost:8080/count
Counter: 1
Counter: 2
Counter: 3
go run http/server/2-handlefunc.go
curl localhost:8080
Hello, there
go run http/server/3-status-code.go
curl -I localhost:8080/status
HTTP/1.1 200 OK
Date: Tue, 23 Apr 2024 06:00:35 GMT
4. We have three endpoints, for anything other than these three endpoints, we return a 404 error message
go run http/server/4-not-found-handler.go
curl localhost:8080/about && curl localhost:8080 && curl localhost:8080/contact
about page
home page
404 - not found
go run http/server/5-get-header-server.go
go run http/server/5-get-header-client.go
User agent: Go-http-client/1.1
go run http/server/6-path-param.go
curl localhost:8080/John
go run http/server/7-query-param.go
curl localhost:8080/?name=Peter
Hello Peter!
go run http/server/8-file-server.go
curl localhost:8080
Home page. This text in "http/server/8-file-server/index.html" without HTML-tags.
curl localhost:8080/about.html
About page. This text in "http/server/8-file-server/about.html" without HTML-tags.
go run http/server/9-get-post.go
See the HTML form located at "http/server/9-get-post/form.html" at the following link: localhost:8080
curl -d 'name=John' -d 'occupation=Teacher' localhost:8080
John is a Teacher
go run http/server/10-serve-image.go
curl -I localhost:8080/image
HTTP/1.1 200 OK
Content-Type: image/png
Date: Tue, 23 Apr 2024 06:35:11 GMT
go run http/server/11-template.go
See the HTML page with a table of users at the following link: localhost:8080/users
go run http/client/1-status-code.go
200 OK
200
go run http/client/2-get-request.go
go run http/client/3-head-request.go
go run http/client/4-user-agent-header.go
go run http/client/5-postform.go
go run json/1-encoding.go
go run json/2-decoding.go
go run json/3-pretty_print.go
go run json/4-read_file.go
go run json/5-astros.go
go run csv/1-read.go
go run csv/2-readall.go
go run csv/3-delimiter.go
go run csv/4-write.go
go run csv/5-append.go
go run csv/6-read.go
go run csv/7-csv-json.go
go run csv/extra/1-write-gocsv.go
go run csv/extra/2-read-gocsv.go
Extra 3. Read "csv/extra/json2csv_input.json" and convert it to "csv/csv-files/json2csv_output.csv" CSV-file using "github.com/yukithm/json2csv"
go run csv/extra/3-json2csv.go
go run mutexes/1-race-condition.go && go run mutexes/1-race-condition.go && go run mutexes/1-race-condition.go && go run mutexes/1-race-condition.go && go run mutexes/1-race-condition.go
go run mutexes/1-mutex.go && go run mutexes/1-mutex.go && go run mutexes/1-mutex.go && go run mutexes/1-mutex.go && go run mutexes/1-mutex.go
go run mutexes/2-race-condition.go && go run mutexes/2-race-condition.go && go run mutexes/2-race-condition.go && go run mutexes/2-race-condition.go && go run mutexes/2-race-condition.go
go run mutexes/2-mutex.go && go run mutexes/2-mutex.go && go run mutexes/2-mutex.go && go run mutexes/2-mutex.go && go run mutexes/2-mutex.go
go run mutexes/3-concurrent-iter-write.go
go run mutexes/3-mutex.go
go run mutexes/3-rwmutex.go
go run basic/0-basic-program.go
go run basic/1-for-loop.go
go run basic/2-multiple-values-from-func.go
go run basic/3-strings-builder.go
go run basic/4-pointer.go
go run basic/5-type-conversion.go
go run basic/6-copy-map.go
go run basic/7-reverse-int-slice.go
go run basic/8-oop.go
go run basic/9-check-var-type.go
go run basic/10-concatenate-str.go
go run basic/11-func-closures.go
go run basic/12-implement-stack-lifo.go
go run basic/13-slice-chars-permutate.go
go run basic/14-vars-values-swap.go
go run basic/15-min-max.go
go run basic/16-check-slice-is-empty.go
go run basic/17-sum-of-squares.go
go run basic/18-sum-even-from-1-to-100.go
go run basic/19-largest-smallest-in-array.go
go run basic/20-prime-num.go
go run basic/21-factorial-of-num-recursion.go
go run basic/22-num-of-words.go
go run basic/23-bubble-sort.go
go run basic/24-permutations.go
go run basic/25-boyer-moore-search.go
go run basic/26-longest-subsequence-in-array.go
go run basic/27-binary-tree.go
go run basic/28-stack-array.go
go run basic/29-split-strings.go
go run basic/30-sort-slice-str.go
go run basic/31-sort-slice-str-len-alphabet.go
go run basic/32-shortest-len.go
go run basic/33-parse-html-table.go
go run atomic/1-wrong-output.go && go run atomic/1-wrong-output.go && go run atomic/1-wrong-output.go && go run atomic/1-wrong-output.go && go run atomic/1-wrong-output.go
go run atomic/1-correct-output.go && go run atomic/1-correct-output.go && go run atomic/1-correct-output.go && go run atomic/1-correct-output.go && go run atomic/1-correct-output.go
go run channels/1-hello.go
go run channels/2-sum-of-squares.go
go run channels/3-merge-sort.go
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.
go run problem-list/easy/1-two-sum.go
Given an integer x, return true if x is a palindrome, and false otherwise.
go run problem-list/easy/2-palindrome-no-int2str.go
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
go run problem-list/easy/3-roman-to-int.go
You are given two non-empty lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a list.
Example:
Input: l1 = [2,4,3], l2 = [5,6,4]
Output: [7,0,8]
Explanation: 342 + 465 = 807
go run problem-list/easy/4-add-two-numbers.go