---
title: "Discussion on \"Golang - iota\" | Hashnode"
description: "Discussion on \"Golang - iota\". Requirement\nDefine a function to return a storage size string in a human reading format (KB, MB etc)\ntype ByteSize float64\n\nconst (\n    _           = iota\n    KB ByteSize = 1 << (10 * iota)\n    MB\n    GB\n    TB\n    PB\n    EB\n    ZB\n    YB\n)\n\nfunc (b ..."
url: "https://hashnode.com/posts/golang-iota/642c35ff3a83fd66f5b74bc4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Golang - iota](https://fabiochen.hashnode.dev/golang-iota?utm_source=hashnode&utm_medium=feed)

Requirement Define a function to return a storage size string in a human reading format (KB, MB etc) type ByteSize float64 const ( \_ = iota KB ByteSize = 1 << (10 \* iota) MB GB TB PB EB ZB YB ) func (b ...

Apr 4, 2023 · 1 min read · fabiochen.hashnode.dev  
Updated May 13, 2023  
Read the article

-   [#golang](https://hashnode.com/tag/golang)

## Written by

[Fabio Chen](https://hashnode.com/@fabiochen)

@fabiochen

  
[View profile](https://hashnode.com/@fabiochen)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
