go-common/app/tool/cache/header_template.go

32 lines
621 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package main
var _headerTemplate = `
// Code generated by $GOPATH/src/go-common/app/tool/cache/gen. DO NOT EDIT.
NEWLINE
/*
Package {{.PkgName}} is a generated cache proxy package.
It is generated from:
ARGS
*/
NEWLINE
package {{.PkgName}}
import (
"context"
{{if .EnableBatch }}"sync"{{end}}
NEWLINE
"go-common/library/stat/prom"
{{if .EnableBatch }}"go-common/library/sync/errgroup"{{end}}
{{.ImportPackage}}
NEWLINE
{{if .EnableSingleFlight}} "golang.org/x/sync/singleflight" {{end}}
)
var _ _cache
{{if .EnableSingleFlight}}
var cacheSingleFlights = [SFCOUNT]*singleflight.Group{SFINIT}
{{end }}
`