Use local repository as the dependencies in golang

In my development, I extract some common feature to a dependent project, and in the main project use the mod to include it, but when I need…

Use local repository as the dependencies in golang

In my development, I extract some common feature to a dependent project, and in the main project use the mod to include it, but when I need to update the common functions, I need to commit the common codes to the repository and get them to the main project, so I want to use the local repository as the dependencies, so I don’t need to upload the code to remote before I tested in the main project.

I find the solution from the link below:

Using “replace” in go.mod to point to your local module

Solution

The solution from the article above is use the replace to specify the local dir of the common project, the example go module file is like below.

module github.com/pselle/foo 
 
replace github.com/pselle/bar => /Users/pselle/Projects/bar 
 
require ( 
 github.com/pselle/bar v1.0.0 
)

Read more

AI读经 - 马太福音 第7章

AI读经 - 马太福音 第7章

这段经文出自《马太福音》第7章,是耶稣“登山宝训”的总结部分,主题集中在信徒的内在生命与外在行为。主要内容包括不论断他人(1-5节)、寻求神的帮助(7-12节)、选择生命的道路(13-14节)、提防假先知(15-20节)、真信徒的生命表征(21-23节)、以及听道与行道的重要性(24-27节)。这些教导旨在呼召信徒过敬虔和真实的生活,表现出神国的公义与恩典。

By Stephen Li