Skip to content

Releases: nekomeowww/fo

v1.6.0

01 Apr 08:38
ae49ca7
Compare
Choose a tag to compare

What's Changed

  • chore(deps): update golangci/golangci-lint-action action to v6.5.0 by @renovate in #9
  • chore(deps): update golangci/golangci-lint-action action to v7 by @renovate in #11
  • chore(deps): update dependency golang to v1.24.1 by @renovate in #10

Full Changelog: v1.5.1...v1.6.0

v1.5.1

26 Feb 05:16
v1.5.1
2eda4d4
Compare
Choose a tag to compare

What's Changed

  • chore(deps): update golangci/golangci-lint-action action to v6.2.0 by @renovate in #7
  • fix(invoke): remove redundant goroutine and prevent data race by @iseki0 in #8

New Contributors

  • @iseki0 made their first contribution in #8

Full Changelog: v1.5.0...v1.5.1

v1.5.0

23 Dec 03:12
v1.5.0
1d0b4a5
Compare
Choose a tag to compare

What's Changed

  • chore(deps): update golangci/golangci-lint-action action to v6 by @renovate in #6
  • fix(deps): update module github.com/stretchr/testify to v1.10.0 by @renovate in #5

New Contributors

Full Changelog: v1.4.0...v1.5.0

v1.4.0

29 Aug 10:47
v1.4.0
2a9cdf2
Compare
Choose a tag to compare
  • feat: new WithZapLoggerFuncHandler for zap logger

Quite useful with zap logger when working with loads of different omitting error handling use cases:

may := fo.NewMay()
may.Use(fo.WithZapLoggerHandler(zapLogger))

may.Invoke(os.Open("./test_file.json"), "failed to open file", zap.String("file", "test_file.json"))

or having this pattern in https://github.com/nekomeowww/insights-bot/blob/967fa028caf356b0a96eaf19d85dcaa2968bbd1f/internal/services/autorecap/autorecap.go#L462-L465

func handleMessage() {
	may.Invoke(m.botService.UnpinChatMessage(tgbot.NewUnpinChatMessageConfig(chatID, lastPinnedMessage.MessageID)), "failed to unpin chat message", zap.Int64("chat_id", chatID), zap.Int("message_id", lastPinnedMessage.MessageID))
	may.Invoke(m.chathistories.UpdatePinnedMessage(lastPinnedMessage.ChatID, lastPinnedMessage.MessageID, false), "failed to save one telegram sent message", zap.Int64("chat_id", lastPinnedMessage.ChatID), zap.Int("message_id", lastPinnedMessage.MessageID))
	may.Invoke(m.botService.PinChatMessage(tgbot.NewPinChatMessageConfig(chatID, sentMsg.MessageID)), "failed to pin chat message", zap.Int64("chat_id", chatID), zap.Int("message_id", sentMsg.MessageID))
	may.Invoke(m.chathistories.SaveOneTelegramSentMessage(&sentMsg, true), "failed to save one telegram sent message")
}

Full Changelog: v1.3.0...v1.4.0

v1.3.0

19 Feb 08:53
6f7a7b2
Compare
Choose a tag to compare

Full Changelog: v1.2.1...v1.3.0

v1.2.1

30 Aug 10:18
5a49731
Compare
Choose a tag to compare

v1.1.2

16 Aug 03:43
922e923
Compare
Choose a tag to compare
  • Updated to go1.21

Full Changelog: v1.1.1...v1.1.2

v1.1.1

18 May 05:02
Compare
Choose a tag to compare

Changes

  • Added more testable examples
  • Complete README.md docs

Full Changelog: v1.1.0...v1.1.1

v1.1.0

17 May 17:02
Compare
Choose a tag to compare

Breaking change

  • removed package level CollectAsError(...), CollectAsErrors(...), HandleErrors(...), HandleErrorsWithReturns(...) functions, now these functions has become the member methods of MayInvoker*.

Full Changelog: v1.0.0...v1.1.0

v1.0.0

17 May 13:55
Compare
Choose a tag to compare

Published