Comments (4)
I didn't mean to close this issue
from goplantuml.
@thomase1993 This is a great find. Thank you very much. I was not looking into the fields of an interface. I'll work on it.
from goplantuml.
I adapted your code a bit since the code needs to compile. I had to change a bit of the example
package tmp
type Lock struct {
}
type Buffer interface {
}
type Locker interface {
}
type ReadWriter interface {
Read(b Buffer) bool
Write(b Buffer) bool
}
type File interface {
Buffer // same as adding the methods of ReadWriter
Locker // same as adding the methods of Locker
Close()
}
type LockedFile interface {
Locker
File // illegal: Lock, Unlock not unique
Lock() // illegal: Lock not unique
}
If you notice I am adding the structs that are missing, otherwise you need to add the imports. But it should now be working as expected.
Here is an example of what this will generate after the update. :)
@startuml
namespace tmp {
class Lock << (S,Aquamarine) >> {
}
interface Buffer {
}
interface Locker {
}
interface ReadWriter {
+ Read(b Buffer) bool
+ Write(b Buffer) bool
}
interface File {
+ Close()
}
interface LockedFile {
+ Lock()
}
}
tmp.Locker *-- tmp.File
tmp.Buffer *-- tmp.File
tmp.Locker *-- tmp.LockedFile
tmp.File *-- tmp.LockedFile
@enduml
from goplantuml.
I am going to do this update and cut a new tag for the release. Thank you very much.
from goplantuml.
Related Issues (20)
- confusing syntax about composition
- How to use the generated .puml file? HOT 1
- Error processing self HOT 2
- Visualize single function as a functor
- typo
- Parser Panic HOT 5
- zsh: command not found: goplantuml HOT 3
- Add support for layout direction HOT 1
- Add support for hiding package members
- Adding some usage example in the readme HOT 1
- [question] GoLand plugin? HOT 1
- proposal: support mermaid?
- the example of README.md, output not has compositions relation HOT 1
- panic: runtime error: index out of range HOT 1
- Enhancement: Clarify/Improve the `-ignore` usage
- Enhancement: add option to ignore mocks HOT 1
- Whether there are parameters to control not displaying types without methods?
- Add option: Representing dependencies of structures within the same package in a UML class diagram
- Duplicate package names will affect the diagram HOT 1
- Why aren't they convergent?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goplantuml.