mirror of
https://github.com/vacp2p/research.git
synced 2025-02-23 19:58:30 +00:00
Basic REPL mock functionality
This commit is contained in:
parent
eadda955e6
commit
055afb747b
@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/swarm/pss"
|
||||
"context"
|
||||
"bufio"
|
||||
"fmt"
|
||||
"crypto/ecdsa"
|
||||
"os"
|
||||
@ -264,6 +265,23 @@ func init() {
|
||||
|
||||
func main() {
|
||||
fmt.Printf("Hello PSS\n")
|
||||
fmt.Printf("> ")
|
||||
|
||||
// Basic REPL functionality
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
for scanner.Scan() {
|
||||
input := scanner.Text()
|
||||
fmt.Println("Input:", input)
|
||||
fmt.Printf("> ")
|
||||
}
|
||||
if err := scanner.Err(); err != nil {
|
||||
fmt.Println("Unable to read input", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
os.Exit(1)
|
||||
|
||||
// TODO: Then, integrate feed and update there too
|
||||
|
||||
// TODO: Bad CLI design, use golang flags
|
||||
// TODO: Pull this out to separate parseArgs function
|
||||
|
Loading…
x
Reference in New Issue
Block a user