@@ -120,17 +120,14 @@ func (cm configModel) View() string {
120120 switch cm .configKeySelected {
121121 // 設定項目を選んでいない時
122122 case false :
123- white := color .New (color .FgWhite ).SprintFunc ()
124- b .WriteString (white ("設定項目を選んでください:\n " ))
125- b .WriteString (white (" ↑↓の矢印キーで項目を移動、Enterで選択\n " ))
123+ b .WriteString (color .WhiteString ("設定項目を選んでください:\n " ))
124+ b .WriteString (color .WhiteString (" ↑↓の矢印キーで項目を移動、Enterで選択\n " ))
126125
127126 for i , choice := range configKey {
128- cyan := color .New (color .FgCyan ).SprintFunc ()
129- hiCyan := color .New (color .FgHiCyan ).SprintFunc ()
130127 if i == cm .configKeyIndex {
131- b .WriteString (fmt .Sprintf (hiCyan ("➡️ %s\n " ), choice ))
128+ b .WriteString (fmt .Sprintf (color . HiCyanString ("➡️ %s\n " ), choice ))
132129 } else {
133- b .WriteString (fmt .Sprintf (cyan (" %s\n " ), choice ))
130+ b .WriteString (fmt .Sprintf (color . CyanString (" %s\n " ), choice ))
134131 }
135132 }
136133
@@ -139,26 +136,22 @@ func (cm configModel) View() string {
139136 // 選択肢のない項目はテキストエリアを表示
140137 switch len (configOption [cm .configKeyIndex ]) {
141138 case 0 :
142- white := color .New (color .FgWhite ).SprintFunc ()
143- b .WriteString (white (fmt .Sprintf (
139+ b .WriteString (color .WhiteString (fmt .Sprintf (
144140 "ここに%sを入力: %s\n " ,
145141 configKey [cm .configKeyIndex ],
146142 cm .textInput .View (),
147143 )))
148- b .WriteString (white (" Enterキーで確定" ))
144+ b .WriteString (color . WhiteString (" Enterキーで確定" ))
149145
150146 default :
151- white := color .New (color .FgWhite ).SprintFunc ()
152- b .WriteString (white ("設定内容を選んでください:\n " ))
153- b .WriteString (white (" ↑↓の矢印キーで項目を移動、Enterで選択\n " ))
147+ b .WriteString (color .WhiteString ("設定内容を選んでください:\n " ))
148+ b .WriteString (color .WhiteString (" ↑↓の矢印キーで項目を移動、Enterで選択\n " ))
154149
155150 for i , option := range configOption [cm .configKeyIndex ] {
156- cyan := color .New (color .FgCyan ).SprintFunc ()
157- hiCyan := color .New (color .FgHiCyan ).SprintFunc ()
158151 if i == cm .configOptionIndex {
159- b .WriteString (fmt .Sprintf (hiCyan ("➡️ %s\n " ), option ))
152+ b .WriteString (fmt .Sprintf (color . HiCyanString ("➡️ %s\n " ), option ))
160153 } else {
161- b .WriteString (fmt .Sprintf (cyan (" %s\n " ), option ))
154+ b .WriteString (fmt .Sprintf (color . CyanString (" %s\n " ), option ))
162155 }
163156 }
164157 }
0 commit comments