celestix / gotgproto

A wrapper for Go Telegram Client, i.e. gotd/td.
GNU General Public License v3.0
162 stars 31 forks source link

Add a bounded text interface parameter for ctx.Reply #55

Open celestix opened 4 months ago

celestix commented 4 months ago

As discussed in https://github.com/celestix/gotgproto/issues/19, text is a raw unbounded interface currently which can cause problems in many ways. To avoid it, we should add a bounded interface with at least one private method to prevent people breaking the library from external manipulation.

type InputText interface{
    isAPrivateMethodYetToBeNamed()
}