Skip to content

Commit

Permalink
Format source code as per standards using golint
Browse files Browse the repository at this point in the history
  • Loading branch information
pravj committed Mar 9, 2015
1 parent 68337c7 commit ced26ae
Show file tree
Hide file tree
Showing 8 changed files with 416 additions and 417 deletions.
2 changes: 1 addition & 1 deletion examples/base64.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import (
// Prints pattern's Base64 encoded string
func main() {
args := map[string]string{}
gp := geo_pattern.Base64_string(args)
gp := geo_pattern.Base64String(args)
fmt.Println(gp)
}
2 changes: 1 addition & 1 deletion examples/base_color.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

// Prints pattern's SVG string with a specific base background color
func main() {
args := map[string]string{"base_color": "#e2b"}
args := map[string]string{"baseColor": "#e2b"}
gp := geo_pattern.Generate(args)
fmt.Println(gp)
}
2 changes: 1 addition & 1 deletion examples/uri_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import (
// Prints pattern's uri image string
func main() {
args := map[string]string{}
gp := geo_pattern.Uri_image(args)
gp := geo_pattern.URIimage(args)
fmt.Println(gp)
}
22 changes: 11 additions & 11 deletions geo_pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ import (
"github.com/pravj/geo_pattern/pattern"
)

// Returns pattern's SVG string
// Generate returns pattern's SVG string
func Generate(args map[string]string) string {
p := pattern.New(args)

return p.Svg_str()
return p.SvgStr()
}

// Returns pattern's Base64 encoded string
func Base64_string(args map[string]string) string {
svg_str := Generate(args)
base64_str := base64.StdEncoding.EncodeToString([]byte(svg_str))
// Base64String returns pattern's Base64 encoded string
func Base64String(args map[string]string) string {
svgStr := Generate(args)
base64Str := base64.StdEncoding.EncodeToString([]byte(svgStr))

return base64_str
return base64Str
}

// Returns pattern's uri image string
func Uri_image(args map[string]string) string {
base64_str := Base64_string(args)
// URIimage returns pattern's uri image string
func URIimage(args map[string]string) string {
base64Str := Base64String(args)

return fmt.Sprintf("url(data:image/svg+xml;base64,%s);", base64_str)
return fmt.Sprintf("url(data:image/svg+xml;base64,%s);", base64Str)
}
Loading

0 comments on commit ced26ae

Please sign in to comment.