Skip to content

v0.1.2

Choose a tag to compare

@pardnchiu pardnchiu released this 12 Apr 16:57
· 52 commits to master since this release

v0.1.1 -> v0.1.2

Summary

Add Init function with sync.Once to keychain package and simplify public API by removing per-call service/fallbackPath parameters.

翻譯 新增 keychain Init 函式以 sync.Once 初始化設定,簡化公開 API 移除逐次傳遞的 service/fallbackPath 參數。

Changes

REFACTOR

  • Replace per-call service and fallbackPath parameters with package-level state initialized via Init using sync.Once
  • Simplify Get, Set, Delete signatures to accept only the key (and value for Set)
  • Convert all internal helpers to read from package-level variables instead of function parameters
翻譯
  • Init 搭配 sync.Once 初始化 package 層級狀態,取代逐次傳遞 servicefallbackPath 參數
  • 簡化 GetSetDelete 簽章,僅接受 key(Set 額外接受 value)
  • 所有內部輔助函式改為讀取 package 層級變數

Files Changed

File Status Tag
filesystem/keychain/init.go Added REFACTOR
filesystem/keychain/get.go Modified REFACTOR
filesystem/keychain/set.go Modified REFACTOR
filesystem/keychain/delete.go Modified REFACTOR

Generated by SKILL