README ¶
= Exercise 5.5 // Refs: :url-base: https://github.com/fenegroni/TGPL-exercise-solutions :workflow: workflows/Exercise 5.5 :action: actions/workflows/ch5ex5.yml :url-workflow: {url-base}/{workflow} :url-action: {url-base}/{action} :badge-exercise: image:{url-workflow}/badge.svg?branch=main[link={url-action}] {badge-exercise} Implement `countWordsAndImages`. (See Exercise 4.9 for word splitting.) == Test This is an example of a function that multiple return values. Such functions are called _multi values functions_. For the test's `got` variable I defined a struct `result`. There's an exported function `CountWordsAndImages`, which calls upon `countWordsAndImages`: a recursive function similar to `Visit` in Exercise 5.1. We do not test the exported function nor provide an example of how to call the inner function. We will test the exported function in the future using `gomock`. == Example We don't provide examples for internal functions.
Documentation ¶
Overview ¶
CountWordsAndImages counts the words and images in each HTML document. The URL to each document is supplied on the command line.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountWordsAndImages ¶
CountWordsAndImages does an HTTP GET request for the HTML document url and returns the number of words and images in it
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.