feat: add kakao channel, template, and brand template management#5
Merged
Palbahngmiyine merged 3 commits intomainfrom Apr 15, 2026
Merged
feat: add kakao channel, template, and brand template management#5Palbahngmiyine merged 3 commits intomainfrom
Palbahngmiyine merged 3 commits intomainfrom
Conversation
…ands Add comprehensive Kakao business channel inquiry, alimtalk template management, and brand template management to the CLI. This enables users to manage their Kakao messaging resources directly from solactl. New command groups: - `solactl kakao channel` (list/get/categories) — channel inquiry - `solactl kakao channel-group` (list/get) — channel group inquiry - `solactl kakao template` (list/get/create/update/delete/inspect/ cancel-inspect/sendable/categories/release-dormant) — full alimtalk template lifecycle - `solactl kakao brand-template` (list/create/update/delete/sendable) — brand template CRUD All list commands support cursor-based pagination with --start-key and --limit flags. Sensitive fields (senderKeys, groupKeys) are excluded from response types. 83 tests covering success/failure/pagination/XOR validation/delete confirmation paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request implements a comprehensive suite of CLI commands for managing KakaoTalk channels, channel groups, alimtalk templates, and brand templates, including full CRUD support and inspection workflows. Feedback focuses on resolving compilation errors caused by an undefined stdinReader variable in deletion commands, ensuring consistent output behavior by removing redundant JSON printing in creation commands, and refining the brand template update logic to correctly handle optional JSON fields.
|
|
||
| if !kakaoBtplDeleteFlagYes { | ||
| _, _ = fmt.Fprintf(out(), "\u26a0 브랜드 템플릿 %s을 삭제하시겠습니까? (y/N): ", brandTemplateID) | ||
|
|
| func runKakaoTemplateDelete(cmd *cobra.Command, args []string) error { | ||
| templateID := args[0] | ||
|
|
||
| if !kakaoTplDeleteFlagYes { |
Comment on lines
+145
to
+146
| _, _ = fmt.Fprintln(out(), "브랜드 템플릿이 생성되었습니다.") | ||
| return p.PrintJSON(raw) |
There was a problem hiding this comment.
--json 플래그가 지정되지 않은 경우에도 생성된 리소스의 전체 JSON을 출력하고 있습니다. 이는 다른 커맨드들과 일관성이 없으며, 일반적인 텍스트 모드 출력으로는 부적절합니다. 성공 메시지만 출력하거나 p.PrintResult를 사용하여 플래그에 따라 출력을 제어하는 것이 좋습니다.
Suggested change
| _, _ = fmt.Fprintln(out(), "브랜드 템플릿이 생성되었습니다.") | |
| return p.PrintJSON(raw) | |
| _, _ = fmt.Fprintln(out(), "브랜드 템플릿이 생성되었습니다.") | |
| return nil |
Comment on lines
+85
to
+98
| jsonFields := map[string]string{ | ||
| "carousel": kakaoBtplUpdateFlagCarousel, | ||
| "mainWideItem": kakaoBtplUpdateFlagMainWideItem, | ||
| "subWideItemList": kakaoBtplUpdateFlagSubWideItemList, | ||
| "video": kakaoBtplUpdateFlagVideo, | ||
| "commerce": kakaoBtplUpdateFlagCommerce, | ||
| "buttons": kakaoBtplUpdateFlagButtons, | ||
| "coupon": kakaoBtplUpdateFlagCoupon, | ||
| } | ||
| for key, value := range jsonFields { | ||
| if err := setJSONField(body, key, value); err != nil { | ||
| return err | ||
| } | ||
| } |
Comment on lines
+155
to
+156
| return p.PrintJSON(raw) | ||
| } |
- Fix double output in create commands (success message + raw JSON)
- Remove dead --channel-id/--channel-group-id flags from template
update (API does not support changing channel via update)
- Gate brand-template update JSON fields on Changed state to prevent
sending empty/default values for unspecified flags
- Replace variadic interface{} setIfChanged with typed
setStringIfChanged and setJSONIfChanged helpers
- Replace custom contains/searchString with strings.Contains in tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace all interface{} with any in kakao command and test files
- Add resetPflagChanged helper to clear pflag Changed bits between
tests, preventing order-dependent test failures in partial update
scenarios
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kakao channel— list/get/categories)kakao channel-group— list/get, 소속 채널 포함)kakao template— list/get/create/update/delete/inspect/cancel-inspect/sendable/categories/release-dormant)kakao brand-template— list/create/update/delete/sendable)--start-key,--limit) 및 다음 페이지 안내Test plan
go test ./cmd/ -run TestKakaoChannel -count=1— 채널/채널 그룹 테스트go test ./cmd/ -run TestKakaoTemplate -count=1— 알림톡 템플릿 테스트go test ./cmd/ -run TestKakaoBrandTemplate -count=1— 브랜드 템플릿 테스트go test ./pkg/types/ -run TestKakao -count=1— 타입 테스트go test ./cmd/ -run TestKakao -race -count=1— race detectiongo build ./...— 빌드 성공go vet ./...— 정적 분석 통과🤖 Generated with Claude Code