chore: gofumpt (#11839)
* fumpt using main not master... * be more descriptive * fumpt * fix nits Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
Julien Robert
parent
bc2d553f77
commit
55054282d2
@@ -133,7 +133,7 @@ func (fss *StreamingService) openBeginBlockFile(req abci.RequestBeginBlock) (*os
|
||||
if fss.filePrefix != "" {
|
||||
fileName = fmt.Sprintf("%s-%s", fss.filePrefix, fileName)
|
||||
}
|
||||
return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0600)
|
||||
return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0o600)
|
||||
}
|
||||
|
||||
// ListenDeliverTx satisfies the baseapp.ABCIListener interface
|
||||
@@ -183,7 +183,7 @@ func (fss *StreamingService) openDeliverTxFile() (*os.File, error) {
|
||||
fileName = fmt.Sprintf("%s-%s", fss.filePrefix, fileName)
|
||||
}
|
||||
fss.currentTxIndex++
|
||||
return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0600)
|
||||
return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0o600)
|
||||
}
|
||||
|
||||
// ListenEndBlock satisfies the baseapp.ABCIListener interface
|
||||
@@ -232,7 +232,7 @@ func (fss *StreamingService) openEndBlockFile() (*os.File, error) {
|
||||
if fss.filePrefix != "" {
|
||||
fileName = fmt.Sprintf("%s-%s", fss.filePrefix, fileName)
|
||||
}
|
||||
return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0600)
|
||||
return os.OpenFile(filepath.Join(fss.writeDir, fileName), os.O_CREATE|os.O_WRONLY, 0o600)
|
||||
}
|
||||
|
||||
// Stream satisfies the baseapp.StreamingService interface
|
||||
@@ -272,7 +272,7 @@ func (fss *StreamingService) Close() error {
|
||||
// to dir. It returns nil if dir is writable.
|
||||
func isDirWriteable(dir string) error {
|
||||
f := path.Join(dir, ".touch")
|
||||
if err := ioutil.WriteFile(f, []byte(""), 0600); err != nil {
|
||||
if err := ioutil.WriteFile(f, []byte(""), 0o600); err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Remove(f)
|
||||
|
||||
@@ -128,7 +128,7 @@ func TestFileStreamingService(t *testing.T) {
|
||||
if os.Getenv("CI") != "" {
|
||||
t.Skip("Skipping TestFileStreamingService in CI environment")
|
||||
}
|
||||
err := os.Mkdir(testDir, 0700)
|
||||
err := os.Mkdir(testDir, 0o700)
|
||||
require.Nil(t, err)
|
||||
defer os.RemoveAll(testDir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user