Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
0c83f23d
Commit
0c83f23d
authored
Nov 12, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo in ByteSize example
R=rsc, agl1 CC=golang-dev
https://golang.org/cl/154076
parent
9e829c42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
effective_go.html
doc/effective_go.html
+6
-6
No files found.
doc/effective_go.html
View file @
0c83f23d
...
...
@@ -1356,17 +1356,17 @@ automatically for printing, even as part of a general type.
<pre>
func (b ByteSize) String() string {
switch {
case
s
>= YB:
case
b
>= YB:
return fmt.Sprintf("%.2fYB", b/YB)
case
s
>= PB:
case
b
>= PB:
return fmt.Sprintf("%.2fPB", b/PB)
case
s
>= TB:
case
b
>= TB:
return fmt.Sprintf("%.2fTB", b/TB)
case
s
>= GB:
case
b
>= GB:
return fmt.Sprintf("%.2fGB", b/GB)
case
s
>= MB:
case
b
>= MB:
return fmt.Sprintf("%.2fMB", b/MB)
case
s
>= KB:
case
b
>= KB:
return fmt.Sprintf("%.2fKB", b/KB)
}
return fmt.Sprintf("%.2fB", b)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment