From 8762c84e9a5b76d5173abaf1f14abf5f3dbb8f78 Mon Sep 17 00:00:00 2001 From: raspi Date: Tue, 31 Dec 2019 13:35:02 +0200 Subject: [PATCH] comments --- pkg/display/ascii.go | 3 +++ pkg/display/bit.go | 3 +++ pkg/display/dec.go | 3 +++ pkg/display/hex.go | 3 +++ pkg/display/oct.go | 3 +++ pkg/display/percent.go | 3 +++ 6 files changed, 18 insertions(+) diff --git a/pkg/display/ascii.go b/pkg/display/ascii.go index c4d3df4..b4252e0 100644 --- a/pkg/display/ascii.go +++ b/pkg/display/ascii.go @@ -5,6 +5,9 @@ import ( "strings" ) +/* +Ascii displays bytes as ASCII characters. Non-printable characters are displayed as dots ('.'). +*/ type Ascii struct { sb strings.Builder } diff --git a/pkg/display/bit.go b/pkg/display/bit.go index 4378c61..8d19d2b 100644 --- a/pkg/display/bit.go +++ b/pkg/display/bit.go @@ -5,6 +5,9 @@ import ( "strings" ) +/* +Bit displays bytes as bits 00000000-11111111 +*/ type Bit struct { sb strings.Builder } diff --git a/pkg/display/dec.go b/pkg/display/dec.go index 9d63272..12508cb 100644 --- a/pkg/display/dec.go +++ b/pkg/display/dec.go @@ -8,6 +8,9 @@ import ( "strings" ) +/* +Dec displays bytes as 000-255 +*/ type Dec struct { fs uint64 offFormat string // Format for offset column diff --git a/pkg/display/hex.go b/pkg/display/hex.go index 6c9f984..1482d30 100644 --- a/pkg/display/hex.go +++ b/pkg/display/hex.go @@ -9,6 +9,9 @@ import ( "strings" ) +/* +Hex displays bytes in hexadecimal format 00-ff. +*/ type Hex struct { fs uint64 // File size bw uint8 // Bit width calculated from file size diff --git a/pkg/display/oct.go b/pkg/display/oct.go index 90e08e8..1281bf3 100644 --- a/pkg/display/oct.go +++ b/pkg/display/oct.go @@ -8,6 +8,9 @@ import ( "strings" ) +/* +Oct displays bytes in octal format 000-377 +*/ type Oct struct { fs uint64 // File size offFormat string // Format for offset column diff --git a/pkg/display/percent.go b/pkg/display/percent.go index e6f7172..5862ed0 100644 --- a/pkg/display/percent.go +++ b/pkg/display/percent.go @@ -7,6 +7,9 @@ import ( "strings" ) +/* +Percent displays offset as 000.000% - 100.000% +*/ type Percent struct { fs uint64 // File size sb strings.Builder