-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial wallet support for boost (#422)
* initial wallet support for boost * add flag * fixup * lint * rename * remove market flag * Update cmd/boost/deal_status_cmd.go Co-authored-by: dirkmc <[email protected]> * missing wallet flag Co-authored-by: dirkmc <[email protected]>
- Loading branch information
Showing
7 changed files
with
564 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"io" | ||
"os" | ||
|
||
ufcli "github.com/urfave/cli/v2" | ||
) | ||
|
||
type AppFmt struct { | ||
app *ufcli.App | ||
Stdin io.Reader | ||
} | ||
|
||
func NewAppFmt(a *ufcli.App) *AppFmt { | ||
var stdin io.Reader | ||
istdin, ok := a.Metadata["stdin"] | ||
if ok { | ||
stdin = istdin.(io.Reader) | ||
} else { | ||
stdin = os.Stdin | ||
} | ||
return &AppFmt{app: a, Stdin: stdin} | ||
} | ||
|
||
func (a *AppFmt) Print(args ...interface{}) { | ||
fmt.Fprint(a.app.Writer, args...) | ||
} | ||
|
||
func (a *AppFmt) Println(args ...interface{}) { | ||
fmt.Fprintln(a.app.Writer, args...) | ||
} | ||
|
||
func (a *AppFmt) Printf(fmtstr string, args ...interface{}) { | ||
fmt.Fprintf(a.app.Writer, fmtstr, args...) | ||
} | ||
|
||
func (a *AppFmt) Scan(args ...interface{}) (int, error) { | ||
return fmt.Fscan(a.Stdin, args...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ func main() { | |
dealCmd, | ||
dealStatusCmd, | ||
offlineDealCmd, | ||
walletCmd, | ||
}, | ||
} | ||
app.Setup() | ||
|
Oops, something went wrong.