Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

app: update go code for amp -> golly restructure.

  • Loading branch information...
commit d29c7a76681f7df2a4a7cb7296722444c43660f5 1 parent 9d39da1
@tav authored
Showing with 16 additions and 12 deletions.
  1. +2 −2 markdown.go
  2. +14 −10 planfile.go
View
4 markdown.go
@@ -4,12 +4,12 @@
package main
import (
- "amp/log"
- "amp/runtime"
"bytes"
"encoding/binary"
"fmt"
"github.com/russross/blackfriday"
+ "github.com/tav/golly/log"
+ "github.com/tav/golly/runtime"
"html"
"io"
"os"
View
24 planfile.go
@@ -4,13 +4,6 @@
package main
import (
- "amp/crypto"
- "amp/httputil"
- "amp/log"
- "amp/oauth"
- "amp/optparse"
- "amp/runtime"
- "amp/tlsconf"
"archive/tar"
"bytes"
"compress/gzip"
@@ -20,6 +13,13 @@ import (
"encoding/json"
"errors"
"fmt"
+ "github.com/tav/golly/crypto"
+ "github.com/tav/golly/httputil"
+ "github.com/tav/golly/log"
+ "github.com/tav/golly/oauth"
+ "github.com/tav/golly/optparse"
+ "github.com/tav/golly/runtime"
+ "github.com/tav/golly/tlsconf"
"html"
"io"
"io/ioutil"
@@ -295,11 +295,15 @@ func NewPlanfile(path string, content []byte, callGithub githubCallFunc) (p *Pla
case "id":
id = string(v)
case "tags":
+ tags := []string{}
for _, f := range bytes.Split(v, []byte{' '}) {
- tag := strings.TrimRight(string(f), ",")
- if len(tag) < 2 {
- continue
+ for _, tag := range bytes.Split(f, []byte{','}) {
+ if len(tag) >= 2 {
+ tags = append(tags, string(tag))
+ }
}
+ }
+ for _, tag := range tags {
if tag[0] == '@' {
users = append(users, strings.ToLower(tag[1:]))
}
Please sign in to comment.
Something went wrong with that request. Please try again.