github.com/la5nta/wl2k-go@v0.11.8/transport/ax25/agwpe/address.go (about)

     1  package agwpe
     2  
     3  import "strings"
     4  
     5  type addr struct {
     6  	dest  string
     7  	digis []string
     8  }
     9  
    10  func (a addr) Network() string { return "AX.25" }
    11  
    12  func (a addr) String() string {
    13  	if len(a.digis) == 0 {
    14  		return a.dest
    15  	}
    16  	return a.dest + " via " + strings.Join(a.digis, " ")
    17  }