1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-26 03:52:12 +02:00
kratos/tool/kratos-gen-bts/header_template.go

34 lines
624 B
Go
Raw Normal View History

package main
var _headerTemplate = `
// Code generated by kratos tool genbts. 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
2019-07-23 12:01:12 +08:00
"github.com/bilibili/kratos/pkg/cache"
{{if .EnableBatch }}"github.com/bilibili/kratos/pkg/sync/errgroup"{{end}}
{{.ImportPackage}}
NEWLINE
{{if .EnableSingleFlight}} "golang.org/x/sync/singleflight" {{end}}
)
2019-07-20 19:38:44 +08:00
var (
_ _bts
)
{{if .EnableSingleFlight}}
var cacheSingleFlights = [SFCOUNT]*singleflight.Group{SFINIT}
{{end }}
`