// PostMessage posts message in a new goroutine
PostMessage posts message in a new goroutine
// PostMessage posts message in a new goroutine
func (b *Client) PostMessage(chat, text string) {
	log.Tracef("posting message in chat %s: %s", chat, text)
	go func() {
		postMsgURL := b.URL + constants.RouteApi + constants.RouteLoggedOnly + constants.RoutePostMessage
		if _, err := b.client.Post(postMsgURL, contentJSON,
			strings.NewReader(fmt.Sprintf(`{"user": "%s", "chat": "%s", "text": "%s"}`,
				b.Username, chat, text))); err != nil {
			log.Errorf("postMessage: %v", err)
		}
	}()
}
func ( b * Client ) PostMessage ( chat , text string ) { log . Tracef ( " " , chat , text ) go func ( ) { postMsgURL := b . URL + constants . RouteApi + constants . RouteLoggedOnly + constants . RoutePostMessage if _ , err := b . client . Post ( postMsgURL , contentJSON , strings . NewReader ( fmt . Sprintf ( `{"user": "%s", "chat": "%s", "text": "%s"}` , b . Username , chat , text ) ) ) ; err != nil { log . Errorf ( " " , err ) } } ( ) }
PostMessage posts message in a new goroutine
PostMessage posts message in a new goroutine