# Os.close undefined

**URL:** <https://forum.golangbridge.org/t/os-close-undefined/7937>\
**Category:** Getting Help\
**Created:** [January 26, 2018, 12:43am UTC](https://forum.golangbridge.org/t/os-close-undefined/7937 "2018-01-26T00:43:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![billc3012](https://forum.golangbridge.org/letter_avatar_proxy/v4/letter/b/eb9ed0/32.png) [@billc3012](https://forum.golangbridge.org/u/billc3012)\
**Post date:** [January 26, 2018, 12:43am UTC](https://forum.golangbridge.org/t/os-close-undefined/7937/1 "2018-01-26T00:43:16Z")

</div>

![image](https://forum.golangbridge.org/uploads/default/original/2X/3/3e3ed6d3b409a42ec6f081eeb30ada41f990b91f.png)

Any help appreciated. Is my GO install corrupt or am I missing something? Go version is go1.9.2 linux/amd64 running Solus 4.9.75-68.lts reasonably uptodate

---

<div class="post-metadata">

**Author:** ![nathankerr](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/nathankerr/32/2287_2.png) [@nathankerr](https://forum.golangbridge.org/u/nathankerr)\
**Post date:** [January 26, 2018, 12:55am UTC](https://forum.golangbridge.org/t/os-close-undefined/7937/2 "2018-01-26T00:55:23Z")

</div>

`Close()` is defined on `*os.File`, not the package.

`fL.Close()` is what you want in this case.

Please don’t forget to check the returned errors.

---

<div class="post-metadata">

**Author:** ![billc3012](https://forum.golangbridge.org/letter_avatar_proxy/v4/letter/b/eb9ed0/32.png) [@billc3012](https://forum.golangbridge.org/u/billc3012)\
**Post date:** [January 26, 2018, 1:23am UTC](https://forum.golangbridge.org/t/os-close-undefined/7937/3 "2018-01-26T01:23:05Z")

</div>

Thanks for your prompt and useful reply. I started using GO 24 Dec and  
have found it very usable and am optimistic that it will do the job I  
want. I am impressed by the GO forum. My first post resolved in about half an hour.

---

<div class="post-metadata">

**Author:** ![lutzhorn](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/lutzhorn/32/8119_2.png) [@lutzhorn](https://forum.golangbridge.org/u/lutzhorn)\
**Post date:** [January 26, 2018, 7:57am UTC](https://forum.golangbridge.org/t/os-close-undefined/7937/4 "2018-01-26T07:57:00Z")

</div>

It would be easier for us if you don’t include code as a screenshot but as text. The editor helps you to format your code properly.

---

<div class="post-metadata">

**Author:** ![system](https://forum.golangbridge.org/uploads/default/original/2X/5/5ad234f7c3dbc68b6cc72d338ce4f2973d9fd81c.png) [@system](https://forum.golangbridge.org/u/system)\
**Post date:** [April 26, 2018, 7:57am UTC](https://forum.golangbridge.org/t/os-close-undefined/7937/5 "2018-04-26T07:57:05Z")

</div>

Closed on April 26, 2018, 7:57am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
