When we are writing problem or build a project, most of time we need to free our resources. When the program release resources ; 1. Program run so fast 2. Resources allocate to others user too. 3. Handle multitasking. Today I'm writing on Defer function call. Defer function call execute when you free your resources such as closing file, resources lock and unlock, network connection close etc. Defer also use for debugging purpose too. Defer keyword is used. func title(url string) error { resp, err := http.Get(url) if err != nil { return err } defer resp.Body.Close() ct := resp.Header.Get("Content-Type") if ct != "text/html" && !strings.HasPrefix(ct, "text/html;") { return fmt.Errorf("%s has type %s, not text/html", url, ct) } doc, err := html.Parse(resp.Body) if err != nil { return fmt.Errorf("parsing %s as HTML: ...