Skip to content

Commit 9553330

Browse files
Added kbd tag handling and another badge
1 parent 6de800f commit 9553330

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/shadowy-pycoder/goso)
66
[![Go Reference](https://pkg.go.dev/badge/github.com/shadowy-pycoder/goso.svg)](https://pkg.go.dev/github.com/shadowy-pycoder/goso)
7+
[![Go Report Card](https://goreportcard.com/badge/github.com/shadowy-pycoder/goso)](https://goreportcard.com/report/github.com/shadowy-pycoder/goso)
8+
79

810

911
## Demo

goso.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ var (
103103
"</dt>", "",
104104
"<dd>", " - ",
105105
"</dd>", "",
106+
"<kbd>", bold,
107+
"</kbd>", reset,
106108
)
107109
)
108110

@@ -263,15 +265,15 @@ func (a *Answer) String() string {
263265
return fmt.Sprintf(`
264266
%s
265267
%s[%d]%s %sAnswer from %s%s%s
266-
%sDate: %s
267-
Link: %s%s
268+
%sDate: %s%s
269+
%sLink: %s%s
268270
%s
269271
270272
`,
271273
line,
272274
color, a.Score, reset, answerColor, bold, a.Author, reset,
273-
lightgray, a.Date.Format(time.RFC822),
274-
a.Link, reset,
275+
lightgray, a.Date.Format(time.RFC822), reset,
276+
lightgray, a.Link, reset,
275277
line)
276278
}
277279

@@ -294,13 +296,13 @@ func (r *Result) String() string {
294296
return fmt.Sprintf(`
295297
%s
296298
%s[%d]%s %s%s%s%s
297-
%sDate: %s
298-
Link: %s%s
299+
%sDate: %s%s
300+
%sLink: %s%s
299301
%s`,
300302
line,
301303
color, r.UpvoteCount, reset, bold, questionColor, r.Title, reset,
302-
lightgray, r.Date.Format(time.RFC822),
303-
r.Link, reset,
304+
lightgray, r.Date.Format(time.RFC822), reset,
305+
lightgray, r.Link, reset,
304306
line)
305307
}
306308

0 commit comments

Comments
 (0)