CommentCommunity comments out the community cheatpath block in the config template. This is used when the community cheatsheets directory won't exist (either because the user declined to download them, or because the config is being output as an example).
(configs string, confpath string)
| 43 | // (either because the user declined to download them, or because the config |
| 44 | // is being output as an example). |
| 45 | func CommentCommunity(configs string, confpath string) string { |
| 46 | community, _, _ := cheatsheetDirs(confpath) |
| 47 | |
| 48 | return strings.ReplaceAll(configs, |
| 49 | " - name: community\n"+ |
| 50 | " path: "+community+"\n"+ |
| 51 | " tags: [ community ]\n"+ |
| 52 | " readonly: true", |
| 53 | " #- name: community\n"+ |
| 54 | " # path: "+community+"\n"+ |
| 55 | " # tags: [ community ]\n"+ |
| 56 | " # readonly: true", |
| 57 | ) |
| 58 | } |
no test coverage detected