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
643 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-10-31 15:27:30 +08:00
{{if .UseBTS}}
var _ _bts
{{end }}
{{if .EnableSingleFlight}}
var cacheSingleFlights = [SFCOUNT]*singleflight.Group{SFINIT}
{{end }}
`