From efa6f33b4c67f64a4a8d8cd723b9bbc9494fc735 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 21:47:44 +0800 Subject: Unexport fields in Server --- git_hooks_deploy.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git_hooks_deploy.go') diff --git a/git_hooks_deploy.go b/git_hooks_deploy.go index eeda995..afab7f0 100644 --- a/git_hooks_deploy.go +++ b/git_hooks_deploy.go @@ -24,7 +24,7 @@ func (s *Server) deployHooks() (err error) { } defer srcFD.Close() - if dstFD, err = os.OpenFile(filepath.Join(s.Config.Hooks.Execs, "hookc"), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o755); err != nil { + if dstFD, err = os.OpenFile(filepath.Join(s.config.Hooks.Execs, "hookc"), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o755); err != nil { return err } defer dstFD.Close() @@ -41,14 +41,14 @@ func (s *Server) deployHooks() (err error) { // Go's embed filesystems do not store permissions; but in any case, // they would need to be 0o755: - if err = os.Chmod(filepath.Join(s.Config.Hooks.Execs, "hookc"), 0o755); err != nil { + if err = os.Chmod(filepath.Join(s.config.Hooks.Execs, "hookc"), 0o755); err != nil { return err } for _, hookName := range []string{ "pre-receive", } { - if err = os.Symlink(filepath.Join(s.Config.Hooks.Execs, "hookc"), filepath.Join(s.Config.Hooks.Execs, hookName)); err != nil { + if err = os.Symlink(filepath.Join(s.config.Hooks.Execs, "hookc"), filepath.Join(s.config.Hooks.Execs, hookName)); err != nil { if !errors.Is(err, fs.ErrExist) { return err } -- cgit v1.2.3