Skip to content

Commit 6376dd6

Browse files
committed
Fix warnings
1 parent bed22cc commit 6376dd6

File tree

26 files changed

+71
-77
lines changed

26 files changed

+71
-77
lines changed

examples/basic/bufferop/use_as_writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/devlights/gomy/output"
88
)
99

10-
// UseAsReader -- bytes.Buffer を io.Writer として利用するサンプルです.
10+
// UseAsWriter -- bytes.Buffer を io.Writer として利用するサンプルです.
1111
func UseAsWriter() error {
1212
// bytes.Buffer は io.Writer を実装しているので
1313
// io.Readerが必要な様々な場面で利用できる

examples/basic/containers/generic/ring/ring.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package ring
33

44
import "container/ring"
55

6-
// Ring[T] は、container/ring/Ring のジェネリック版です.
6+
// Ring は、container/ring/Ring のジェネリック版です.
77
//
88
// 標準の *ring.Ring と異なり、値の設定は SetValue() で行います。
99
type Ring[T any] struct {

examples/basic/fileio/filesystem/listdir.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/devlights/gomy/output"
88
)
99

10-
// ListDir -- os.DirFS() から fs.Glob() 経由で ディレクトリ 内のファイル一覧を出力するサンプルです.
10+
// Listdir -- os.DirFS() から fs.Glob() 経由で ディレクトリ 内のファイル一覧を出力するサンプルです.
1111
func Listdir() error {
1212
cwd, err := os.Getwd()
1313
if err != nil {

examples/basic/fileio/stat/examples.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func NewRegister() mapping.Register {
1515
}
1616

1717
func (*register) Regist(m mapping.ExampleMapping) {
18-
m["fileio_stat_mkdir_removeall"] = StatMkdirRemoveAll
18+
m["fileio_stat_mkdir_removeall"] = MkdirRemoveAll
1919
m["fileio_stat"] = Stat
20-
m["fileio_stat_permission"] = StatPermission
20+
m["fileio_stat_permission"] = Permission
2121
}

examples/basic/fileio/stat/fileio_permission.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"github.com/devlights/gomy/output"
88
)
99

10-
// StatPermission は、ファイルのパーミッションに関するサンプルです。
11-
func StatPermission() error {
10+
// Permission は、ファイルのパーミッションに関するサンプルです。
11+
func Permission() error {
1212
const fpath = "examples/basic/fileio/stat/fileio_permission.go"
1313

1414
absPath, err := filepath.Abs(fpath)

examples/basic/fileio/stat/fileio_stat_mkdir_removeall.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"path/filepath"
88
)
99

10-
// StatMkdirRemoveAll は、ディレクトリの存在確認と作成および削除のサンプルです.
11-
func StatMkdirRemoveAll() error {
10+
// MkdirRemoveAll は、ディレクトリの存在確認と作成および削除のサンプルです.
11+
func MkdirRemoveAll() error {
1212
// ディレクトリパスを生成
1313
dname := "try-golang-fileio03"
1414
dpath := filepath.Join(os.TempDir(), dname)

examples/basic/goroutines/select_nilchan3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ func SelectNilChan3() error {
1010
gen = func(out chan<- int) {
1111
defer close(out)
1212
for i := 0; i < 5; i++ {
13-
out <- (i + 1)
13+
out <- i + 1
1414
}
1515
}
1616
output = func(done chan<- any, in1, in2 <-chan int) {

examples/basic/ioop/limitread.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ import (
1515
// - https://pkg.go.dev/io@go1.19.3#LimitedReader
1616
func LimitRead() error {
1717
const (
18-
READ_SIZE = 0x04
19-
BUF_SIZE = 0xff
18+
ReadSize = 0x04
19+
BufSize = 0xff
2020
)
2121

2222
var (
2323
message = "hello world"
2424
src = bytes.NewBufferString(message)
25-
limitReader = io.LimitReader(src, READ_SIZE)
25+
limitReader = io.LimitReader(src, ReadSize)
2626
)
2727
output.Stdoutf("[LimitReader]", "original: %v\n", message)
2828

2929
for {
3030
var (
31-
buf = make([]byte, BUF_SIZE)
31+
buf = make([]byte, BufSize)
3232
size int
3333
err error
3434
)

examples/basic/ioop/onebyteread.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515
// - https://pkg.go.dev/io@go1.19.3#LimitedReader
1616
func OneByteRead() error {
1717
const (
18-
READ_SIZE = 0x01
19-
BUF_SIZE = 0xff
18+
ReadSize = 0x01
19+
BufSize = 0xff
2020
)
2121

2222
var (
@@ -26,8 +26,8 @@ func OneByteRead() error {
2626

2727
for {
2828
var (
29-
reader = io.LimitReader(src, READ_SIZE)
30-
buf = make([]byte, BUF_SIZE)
29+
reader = io.LimitReader(src, ReadSize)
30+
buf = make([]byte, BufSize)
3131
size int
3232
err error
3333
)

examples/basic/jsonop/types/customdate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
type (
11-
// YYYY/MM/DD 形式で json.Marshal/json.Unmarshal するために利用できる構造体です.
11+
// YyyyMmDd は、 YYYY/MM/DD 形式で json.Marshal/json.Unmarshal するために利用できる構造体です.
1212
YyyyMmDd struct {
1313
time.Time
1414
}

0 commit comments

Comments
 (0)