mirror of
https://codeberg.org/scip/anydb.git
synced 2026-10-08 03:04:20 +02:00
update linter config, satisfy linter (#28)
This commit is contained in:
16
app/attr.go
16
app/attr.go
@@ -1,3 +1,5 @@
|
||||
package app
|
||||
|
||||
/*
|
||||
Copyright © 2024-2025 Thomas von Dein
|
||||
|
||||
@@ -14,7 +16,6 @@ GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -125,17 +126,24 @@ func (attr *DbAttr) GetFileValue() error {
|
||||
}
|
||||
} else {
|
||||
// read from console stdin
|
||||
var input string
|
||||
var data string
|
||||
var (
|
||||
input string
|
||||
data string
|
||||
buf strings.Builder
|
||||
)
|
||||
|
||||
for {
|
||||
_, err := fmt.Scanln(&input)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
data += input + "\n"
|
||||
|
||||
buf.WriteString(input)
|
||||
buf.WriteString("\n")
|
||||
}
|
||||
|
||||
data += buf.String()
|
||||
|
||||
attr.Val = []byte(data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user