@@ -127,17 +127,14 @@ func (cm configModel) View() string {
127127 switch cm .configKeySelected {
128128 // 設定項目を選んでいない時
129129 case false :
130- white := color .New (color .FgWhite ).SprintFunc ()
131- b .WriteString (white ("設定項目を選んでください:\n " ))
132- b .WriteString (white (" ↑↓の矢印キーで項目を移動、Enterで選択\n " ))
130+ b .WriteString (color .WhiteString ("設定項目を選んでください:\n " ))
131+ b .WriteString (color .WhiteString (" ↑↓の矢印キーで項目を移動、Enterで選択\n " ))
133132
134133 for i , choice := range configKey {
135- cyan := color .New (color .FgCyan ).SprintFunc ()
136- hiCyan := color .New (color .FgHiCyan ).SprintFunc ()
137134 if i == cm .configKeyIndex {
138- b .WriteString (fmt .Sprintf (hiCyan ("➡️ %s\n " ), choice ))
135+ b .WriteString (fmt .Sprintf (color . HiCyanString ("➡️ %s\n " ), choice ))
139136 } else {
140- b .WriteString (fmt .Sprintf (cyan (" %s\n " ), choice ))
137+ b .WriteString (fmt .Sprintf (color . CyanString (" %s\n " ), choice ))
141138 }
142139 }
143140
@@ -146,26 +143,22 @@ func (cm configModel) View() string {
146143 // 選択肢のない項目はテキストエリアを表示
147144 switch len (configOption [cm .configKeyIndex ]) {
148145 case 0 :
149- white := color .New (color .FgWhite ).SprintFunc ()
150- b .WriteString (white (fmt .Sprintf (
146+ b .WriteString (color .WhiteString (fmt .Sprintf (
151147 "ここに%sを入力: %s\n " ,
152148 configKey [cm .configKeyIndex ],
153149 cm .textInput .View (),
154150 )))
155- b .WriteString (white (" Enterキーで確定" ))
151+ b .WriteString (color . WhiteString (" Enterキーで確定" ))
156152
157153 default :
158- white := color .New (color .FgWhite ).SprintFunc ()
159- b .WriteString (white ("設定内容を選んでください:\n " ))
160- b .WriteString (white (" ↑↓の矢印キーで項目を移動、Enterで選択\n " ))
154+ b .WriteString (color .WhiteString ("設定内容を選んでください:\n " ))
155+ b .WriteString (color .WhiteString (" ↑↓の矢印キーで項目を移動、Enterで選択\n " ))
161156
162157 for i , option := range configOptionLabel [cm .configKeyIndex ] {
163- cyan := color .New (color .FgCyan ).SprintFunc ()
164- hiCyan := color .New (color .FgHiCyan ).SprintFunc ()
165158 if i == cm .configOptionIndex {
166- b .WriteString (fmt .Sprintf (hiCyan ("➡️ %s\n " ), option ))
159+ b .WriteString (fmt .Sprintf (color . HiCyanString ("➡️ %s\n " ), option ))
167160 } else {
168- b .WriteString (fmt .Sprintf (cyan (" %s\n " ), option ))
161+ b .WriteString (fmt .Sprintf (color . CyanString (" %s\n " ), option ))
169162 }
170163 }
171164 }
0 commit comments