Update to handle non-int64 IDs
Pleroma/Akkoma and GotoSocial use opaque IDs rather than `int64`s like
Mastodon which means that `madon` can't talk to either of those.
This commit updates everything that can be an ID to `madon.ActivityID`
which is an alias for `string` - can't create a specific type for it
since there's more than a few places where they're concatenated directly
to strings for URLs, etc. Which means it could just as easily be a
direct `string` type itself but I find that having distinct types can
often make the code more readable and understandable.
One extra bit is that `statusOpts` has grown a `_hasReplyTo` boolean
to indicate whether the `--in-reply-to` flag was given or not because
we can't distinguish because "empty because default" or "empty because
given and empty". Another way around this would be to set the default
to some theoretically impossible or unlikely string but you never
know when someone might spin up an instance where, e.g., admin posts
have negative integer IDs.
module github.com/McKael/madonctl
require (
github.com/McKael/madon/v2 v2.4.0
github.com/ghodss/yaml v1.0.0
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/kr/text v0.2.0
github.com/mattn/go-isatty v0.0.16
github.com/pkg/errors v0.9.1
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.13.0
github.com/stretchr/testify v1.8.0
golang.org/x/net v0.0.0-20220921203646-d300de134e69
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect
)
go 1.13