Skip to content

Commit f103d81

Browse files
committed
template: Reorganize writeTemplates() for easier reading
1 parent 6f4e800 commit f103d81

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

template.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import (
1111
)
1212

1313
func writeTemplates(dir, gopkg, debsrc, debLib, debProg, debversion string,
14-
pkgType packageType, dependencies []string, u *upstream, dep14, pristineTar bool) error {
14+
pkgType packageType, dependencies []string, u *upstream,
15+
dep14, pristineTar bool,
16+
) error {
17+
1518
if err := os.Mkdir(filepath.Join(dir, "debian"), 0755); err != nil {
1619
return err
1720
}
@@ -31,21 +34,26 @@ func writeTemplates(dir, gopkg, debsrc, debLib, debProg, debversion string,
3134
if err := writeDebianRules(dir, pkgType); err != nil {
3235
return err
3336
}
34-
if err := writeDebianSourceFormat(dir); err != nil {
37+
38+
if err := writeDebianWatch(dir, gopkg, debsrc, u.hasRelease); err != nil {
3539
return err
3640
}
37-
if err := writeDebianGbpConf(dir, dep14, pristineTar); err != nil {
41+
42+
if err := writeDebianSourceFormat(dir); err != nil {
3843
return err
3944
}
40-
if err := writeDebianWatch(dir, gopkg, debsrc, u.hasRelease); err != nil {
45+
if err := writeDebianPackageInstall(dir, debLib, debProg, pkgType); err != nil {
4146
return err
4247
}
43-
if err := writeDebianPackageInstall(dir, debLib, debProg, pkgType); err != nil {
48+
49+
if err := writeDebianGbpConf(dir, dep14, pristineTar); err != nil {
4450
return err
4551
}
52+
4653
if err := writeDebianGitLabCI(dir); err != nil {
4754
return err
4855
}
56+
4957
return nil
5058
}
5159

0 commit comments

Comments
 (0)