package cleanversion import ( "fmt" ) func (s *Service) GetVersion() int32 { return 1 } func (s *Service) IsValidVersion(v int32) error { currentVersion := s.GetVersion() if v < 1 || v > currentVersion { return fmt.Errorf("document clean code version must be in the range 0 < version <= %d", currentVersion) } return nil }