code: func StringToBondMode(s string) BondMode {
  	mode, ok := StringToBondModeMap[s]
  	if !ok {
  		return BOND_MODE_UNKNOWN
  	}
  	return mode
  }
docs: // StringToBondMode returns bond mode, or uknonw is the s is invalid.