Move config files and folders

This commit is contained in:
Philipp Heckel 2021-12-18 22:02:36 -05:00
parent 2c1989beb0
commit fa9d6444f5
18 changed files with 70 additions and 52 deletions

View file

@ -50,7 +50,8 @@ func New(config *Config) *Client {
}
}
func (c *Client) Publish(topicURL, message string, options ...PublishOption) error {
func (c *Client) Publish(topic, message string, options ...PublishOption) error {
topicURL := c.expandTopicURL(topic)
req, _ := http.NewRequest("POST", topicURL, strings.NewReader(message))
for _, option := range options {
if err := option(req); err != nil {