equal
deleted
inserted
replaced
185 result = result + "/" + jid.Resource |
185 result = result + "/" + jid.Resource |
186 } |
186 } |
187 return result |
187 return result |
188 } |
188 } |
189 |
189 |
|
190 // Set implements flag.Value. It returns true if it successfully |
|
191 // parses the string. |
190 func (jid *JID) Set(val string) bool { |
192 func (jid *JID) Set(val string) bool { |
191 r := regexp.MustCompile("^(([^@/]+)@)?([^@/]+)(/([^@/]+))?$") |
193 r := regexp.MustCompile("^(([^@/]+)@)?([^@/]+)(/([^@/]+))?$") |
192 parts := r.FindStringSubmatch(val) |
194 parts := r.FindStringSubmatch(val) |
193 if parts == nil { |
195 if parts == nil { |
194 return false |
196 return false |