git

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package git 封装通过 Gitea API 操作远端 Git 仓库的基础设施能力。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRepoStructure

func InitRepoStructure(ctx context.Context, client *gitea.Client, fullName string) error

InitRepoStructure 通过 Gitea API 向指定仓库写入初始内容文件 (.gitignore 与 .leros/memory/.gitkeep)。

行为:

  • client 为 nil 或 fullName 不符合 owner/repo 格式时返回 error
  • 单个文件创建失败会记录告警并继续尝试其余文件
  • 若存在任一文件失败,最终返回聚合后的 error

调用方应根据业务语义决定是否容忍该 error。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL