Skip to content

Commit e706b99

Browse files
authored
Fix template and variable name (#94)
* fix variable name * text.template has no operator `neq`
1 parent bc5cfb3 commit e706b99

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

templates/internal/cachestore/cachestore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var cachePort = os.Getenv("CACHE_PORT")
1717

1818
<%if eq (index .Params `cacheStore`) "redis" %>
1919
func TestConnection() {
20-
context := context.Background()
20+
ctx := context.Background()
2121
rdb := redis.NewClient(&redis.Options{
2222
Addr: fmt.Sprintf("%s:%s", cacheEndpoint, cachePort),
2323
Password: "", // no password set

templates/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
<%if eq (index .Params `billingEnabled`) "yes" %>
2525
"<% .Files.Repository %>/internal/billing"
2626
<%- end %>
27-
<%if neq (index .Params `cacheStore`) "none" %>
27+
<%if ne (index .Params `cacheStore`) "none" %>
2828
"<% .Files.Repository %>/internal/cachestore"
2929
<% end %>
3030
)
@@ -38,7 +38,7 @@ func main() {
3838
db := database.Connect()
3939
db.TestConnection()
4040

41-
<%if neq (index .Params `cacheStore`) "none" %>
41+
<%if ne (index .Params `cacheStore`) "none" %>
4242
// test cacheStore connection
4343
cachestore.TestConnection()
4444
<% end %>

0 commit comments

Comments
 (0)