sr_core/publishers/go.rs
1//! Go publisher: noop.
2//!
3//! Go modules are "published" by pushing a semver-prefixed git tag
4//! (`v1.2.3` for root modules, `<path>/v1.2.3` for submodules). sr already
5//! cuts the tag as part of the release pipeline, so by the time a package
6//! with `publish: go` is evaluated, the work is done.
7//!
8//! `check` always returns `Completed`. `run` is a no-op.
9
10use super::{PublishCtx, PublishState, Publisher};
11use crate::error::ReleaseError;
12
13pub struct GoPublisher;
14
15impl Publisher for GoPublisher {
16 fn name(&self) -> &'static str {
17 "go"
18 }
19
20 fn check(&self, _ctx: &PublishCtx<'_>) -> Result<PublishState, ReleaseError> {
21 Ok(PublishState::Completed)
22 }
23
24 fn run(&self, _ctx: &PublishCtx<'_>) -> Result<(), ReleaseError> {
25 Ok(())
26 }
27}