File tree Expand file tree Collapse file tree 4 files changed +17
-18
lines changed Expand file tree Collapse file tree 4 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,12 @@ BUNDLE_ID = co.randompaper.alfred-qiita-workflow
3
3
PACKAGE_FILE = info.plist
4
4
SYMLINK_TARGET = ${ALFRED_WORKFLOW_PATH}/${BUNDLE_ID}
5
5
6
+ default : build
7
+
6
8
build :
7
9
go get ./...
8
10
go build
9
11
10
- run :
11
- go run * .go
12
-
13
12
dist :
14
13
gox -osarch=" darwin/amd64" -output=" bin/{{.OS}}_{{.Arch}}"
15
14
Original file line number Diff line number Diff line change @@ -11,19 +11,19 @@ func cmdMy(c *cli.Context) {
11
11
if err != nil {
12
12
return
13
13
}
14
- items , _ , _ := client .Users . ListItems (nil )
14
+ items , _ , _ := client .AuthenticatedUser . Items (nil )
15
15
16
16
alfred .InitTerms (query )
17
17
response := alfred .NewResponse ()
18
18
for _ , item := range items {
19
- if ! alfred .MatchesTerms (query , * item .Title + * item .Body ) {
19
+ if ! alfred .MatchesTerms (query , item .Title + item .Body ) {
20
20
continue
21
21
}
22
22
response .AddItem (& alfred.AlfredResponseItem {
23
23
Valid : true ,
24
- Uid : * item .Id ,
25
- Title : * item .Title ,
26
- Arg : * item .URL ,
24
+ Uid : item .Id ,
25
+ Title : item .Title ,
26
+ Arg : item .URL ,
27
27
Subtitle : item .CreatedAt .Format ("2006/01/02 15:04:05" ),
28
28
})
29
29
}
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ func cmdSearch(c *cli.Context) {
20
20
for _ , item := range items {
21
21
response .AddItem (& alfred.AlfredResponseItem {
22
22
Valid : true ,
23
- Uid : * item .Id ,
24
- Title : * item .Title ,
25
- Arg : * item .URL ,
26
- Subtitle : * item .User .Id + " " + item .CreatedAt .Format ("2006/01/02 15:04:05" ),
23
+ Uid : item .Id ,
24
+ Title : item .Title ,
25
+ Arg : item .URL ,
26
+ Subtitle : item .User .Id + " " + item .CreatedAt .Format ("2006/01/02 15:04:05" ),
27
27
})
28
28
}
29
29
Original file line number Diff line number Diff line change @@ -11,20 +11,20 @@ func cmdStocks(c *cli.Context) {
11
11
if err != nil {
12
12
return
13
13
}
14
- items , _ , _ := client .Users .ListStocks ("uetchy" , nil )
14
+ items , _ , _ := client .Users .Stocks ("uetchy" , nil )
15
15
16
16
alfred .InitTerms (query )
17
17
response := alfred .NewResponse ()
18
18
for _ , item := range items {
19
- if ! alfred .MatchesTerms (query , * item .Title + * item .Body ) {
19
+ if ! alfred .MatchesTerms (query , item .Title + item .Body ) {
20
20
continue
21
21
}
22
22
response .AddItem (& alfred.AlfredResponseItem {
23
23
Valid : true ,
24
- Uid : * item .Id ,
25
- Title : * item .Title ,
26
- Arg : * item .URL ,
27
- Subtitle : * item .User .Id + " " + item .CreatedAt .Format ("2006/01/02 15:04:05" ),
24
+ Uid : item .Id ,
25
+ Title : item .Title ,
26
+ Arg : item .URL ,
27
+ Subtitle : item .User .Id + " " + item .CreatedAt .Format ("2006/01/02 15:04:05" ),
28
28
})
29
29
}
30
30
You can’t perform that action at this time.
0 commit comments