Unverified Commit 4284e347 authored by Kevin Lyda's avatar Kevin Lyda
Browse files

Initial pass at a repl

parent cf1f64af
Loading
Loading
Loading
Loading

NOTES.md

0 → 100644
+11 −0
Original line number Diff line number Diff line
# Development notes

These are the development notes for the Go version.

The idea is to use the help files to implement BULLETIN.

## Module links

  * cli ([docs](https://cli.urfave.org/v3/getting-started/), [github](https://pkg.go.dev/github.com/urfave/cli/v3))
  * readline ([docs](https://pkg.go.dev/github.com/chzyer/readline), [github](https://github.com/chzyer/readline))
  * xdg ([docs](https://pkg.go.dev/github.com/adrg/xdg), [github](https://github.com/adrg/xdg))
+5 −0
Original line number Diff line number Diff line
@@ -10,3 +10,8 @@ func Verify(acc string) error {
	}
	return nil
}

// IsAdmin returns true if the user is an admin
func IsAdmin(acc string) bool {
	return false
}
+5 −1
Original line number Diff line number Diff line
@@ -2,4 +2,8 @@ module git.lyda.ie/kevin/bulletin

go 1.24.2

require github.com/urfave/cli/v3 v3.3.2 // indirect
require (
	github.com/chzyer/readline v1.5.1 // indirect
	github.com/urfave/cli/v3 v3.3.2 // indirect
	golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 // indirect
)
+6 −0
+5 −1
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ import (
	"os"

	"git.lyda.ie/kevin/bulletin/accounts"
	"git.lyda.ie/kevin/bulletin/repl"

	"github.com/urfave/cli/v3"
)
@@ -32,7 +33,10 @@ func main() {
			if err != nil {
				return err
			}
			fmt.Println("Running as", user)
			err = repl.Loop(user)
			if err != nil {
				return err
			}
			return nil
		},
	}
Loading