code: func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool {
  	handle := tag_directive.handle
  	prefix := tag_directive.prefix
  	if len(handle) == 0 {
  		return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty")
  	}
  	if handle[0] != '!' {
  		return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'")
  	}
  	if handle[len(handle)-1] != '!' {
  		return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'")
  	}
  	for i := 1; i < len(handle)-1; i += width(handle[i]) {
  		if !is_alpha(handle, i) {
  			return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only")
  		}
  	}
  	if len(prefix) == 0 {
  		return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty")
  	}
  	return true
  }
docs: // Check if a %TAG directive is valid.