#! /bin/shset-euo pipefail
for i in{1..100};do
echo"$i"sleep 1
done
main.go
packagemainimport("bufio""encoding/base64""log""os")funcmain(){l:=log.New(os.Stdout,"[STREAM] ",log.Lshortfile|log.LstdFlags|log.Lmsgprefix)s:=bufio.NewScanner(os.Stdin)fors.Scan(){t:=s.Text()b:=s.Bytes()// for example process the input to b64b64:=base64.StdEncoding.EncodeToString(b)l.Println(t,"=>",b64)}}
Top comments (0)